WebKit-https.git
6 years ago[iOS] simctl can hang if run quickly after shutting down CoreSimulator services
dfarler@apple.com [Wed, 6 Aug 2014 01:07:09 +0000 (01:07 +0000)]
[iOS] simctl can hang if run quickly after shutting down CoreSimulator services
https://bugs.webkit.org/show_bug.cgi?id=135626

Reviewed by Dan Bernstein.

* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort.setup_test_run):
Remove call to simctl shutdown <device> - telling the simulator app to quit
will shut down all booted devices.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172115 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[Win] Build attempts to use ANGLE when not building WebGL.
bfulgham@apple.com [Wed, 6 Aug 2014 01:06:02 +0000 (01:06 +0000)]
[Win] Build attempts to use ANGLE when not building WebGL.
https://bugs.webkit.org/show_bug.cgi?id=135630
<rdar://problem/135630>

Unreviewed build fix.

* platform/graphics/win/GraphicsContext3DWin.cpp: Move #include of GraphicsContext3D.h
inside USE(3D_GRAPHICS) guard.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172114 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoFix resource leak of unclosed file descriptor.
commit-queue@webkit.org [Wed, 6 Aug 2014 01:02:50 +0000 (01:02 +0000)]
Fix resource leak of unclosed file descriptor.
https://bugs.webkit.org/show_bug.cgi?id=135417

Patch by Przemyslaw Kuczynski <p.kuczynski@samsung.com> on 2014-08-05
Reviewed by Darin Adler.

When open returns zero, fd handle leaks. Checking (fd > 0) needs to be replaced
with (fd != -1).

* assembler/MacroAssemblerARM.cpp:
(JSC::isVFPPresent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172113 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[iOS WK2] Crash going back on a specific tumblr blog (under ScrollingStateTree::remov...
simon.fraser@apple.com [Wed, 6 Aug 2014 00:54:04 +0000 (00:54 +0000)]
[iOS WK2] Crash going back on a specific tumblr blog (under ScrollingStateTree::removeNodeAndAllDescendants)
https://bugs.webkit.org/show_bug.cgi?id=135629
<rdar://problem/17802174>

Reviewed by Tim Horton.

Source/WebCore:

In r170198 I added an "orphan scrolling nodes" code path that sets aside subtrees
of scrolling nodes into an m_orphanedSubframeNodes map, which keeps them alive until
they get reparented or destroyed. The nodes in that subtree remain in m_stateNodeMap,
which holds raw pointers to them.

However, ScrollingStateTree::commit() can clear m_orphanedSubframeNodes, which is
sometimes non-empty at this point. When that happened, we would destroy nodes which
were still referenced by m_stateNodeMap, with the result that a later query for the
same nodeID would hand back a pointer to a deleted object.

Fix by calling recursiveNodeWillBeRemoved() on nodes in the m_orphanedSubframeNodes
before clearing it, which removes them and all their descendants from the state node map.

Test: platform/mac-wk2/tiled-drawing/scrolling/frames/orphaned-subtree.html

* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::clear):
(WebCore::ScrollingStateTree::commit):

LayoutTests:

Testcase with nesting of frames inside fixed inside frames, where a subframe disconnects
part of the scrolling tree.

* platform/mac-wk2/tiled-drawing/scrolling/frames/orphaned-subtree-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/frames/orphaned-subtree.html: Added.
* platform/mac-wk2/tiled-drawing/scrolling/frames/resources/leaf-frame.html: Added.
* platform/mac-wk2/tiled-drawing/scrolling/frames/resources/subframe-inside-fixed.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172112 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoAdd the ability to force text to render in white, not just black
commit-queue@webkit.org [Tue, 5 Aug 2014 23:40:24 +0000 (23:40 +0000)]
Add the ability to force text to render in white, not just black
https://bugs.webkit.org/show_bug.cgi?id=135625

Patch by Peyton Randolph <prandolph@apple.com> on 2014-08-05
Reviewed by Beth Dakin.

This patch introduces PaintBehaviorForceWhiteText, a complement to PaintBehaviorForceBlackText. If
a client specifies both PaintBehaviorForceWhiteText and PaintBehaviorForceBlackText, the text will be
painted black.

No new tests.

* rendering/EllipsisBox.cpp:
(WebCore::EllipsisBox::paint): Use the forced text color to paint the text if requested.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint): Disable the text shadow if a text color has been forced.
* rendering/PaintInfo.h:
(WebCore::PaintInfo::forceTextColor):
Return true iff the client has requested to force a black or white text color.
(WebCore::PaintInfo::forceWhiteText):
Return true iff forcing white text has been requested.
(WebCore::PaintInfo::forcedTextColor):
Return the forced text color. Currently only white and black are supported.
* rendering/PaintPhase.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents): Remove the forceBlackText-related code as it is redundant.
(WebCore::RenderLayer::paintForegroundForFragments):
Remove forceBlackText parameter and infer the correct behavior from the given paint behavior.
* rendering/RenderLayer.h:
* rendering/TextPaintStyle.cpp:
(WebCore::computeTextPaintStyle): Use the forced text color if available.
(WebCore::computeTextSelectionPaintStyle): Use the forced text color if available.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172110 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoREGRESSION (r164337): Pages are sometimes cut off/oriented incorrectly after using...
timothy_horton@apple.com [Tue, 5 Aug 2014 23:32:24 +0000 (23:32 +0000)]
REGRESSION (r164337): Pages are sometimes cut off/oriented incorrectly after using WKThumbnailView
https://bugs.webkit.org/show_bug.cgi?id=135622
<rdar://problem/17202556>

Reviewed by Dan Bernstein.

In some cases (when the page changed scroll offset while thumbnailed),
when transitioning back to thumbnail scale = 1, we would get the math
wrong and end up with a non-identity sublayerTransform on the DrawingArea.

Luckily, none of this code is necessary anymore, as the only client
of WKThumbnailView only uses its snapshotting mode.

* Shared/ImageOptions.h:
Remove SnapshotOptionsRespectDrawingAreaTransform; DrawingArea no longer
has a rootLayerTransform().

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setThumbnailScale): Deleted.
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::scaledSnapshotWithOptions):
(WebKit::WebPage::snapshotAtSize):

(WebKit::WebPage::setThumbnailScale): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Remove setThumbnailScale and SnapshotOptionsRespectDrawingAreaTransform.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad):
Revert this to its state before r164337, as we no longer have "thumbnail scale".

* UIProcess/API/Cocoa/_WKThumbnailView.h:
* UIProcess/API/Cocoa/_WKThumbnailView.mm:
(-[_WKThumbnailView initWithFrame:fromWKView:]):
(-[_WKThumbnailView _viewWasUnparented]):
(-[_WKThumbnailView _viewWasParented]):
(-[_WKThumbnailView _requestSnapshotIfNeeded]):
(-[_WKThumbnailView setScale:]):
Clean up code assuming _shouldApplyThumbnailScale = NO, _usesSnapshot = YES.

(-[_WKThumbnailView setUsesSnapshot:]):
(-[_WKThumbnailView usesSnapshot]):
Always return YES from usesSnapshot; we only support snapshotting WKThumbnailViews.
Ignore setUsesSnapshot.

* UIProcess/API/mac/WKView.mm:
(-[WKView _setThumbnailView:]):
(-[WKView _updateThumbnailViewLayer]):
Stop checking usesSnapshot; it's always true.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::setRootLayerTransform): Deleted.
* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::rootLayerTransform): Deleted.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::setRootLayerTransform): Deleted.
Remove rootLayerTransform() and setRootLayerTransform().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172104 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoThe JIT should cache property lookup misses.
akling@apple.com [Tue, 5 Aug 2014 23:10:38 +0000 (23:10 +0000)]
The JIT should cache property lookup misses.
<https://webkit.org/b/135578>

Source/JavaScriptCore:

Add support for inline caching of object properties that don't exist.
Previously we'd fall back to the C++ slow-path whenever a property was missing.

It's implemented as a simple GetById-style stub that returns jsUndefined() as
long as the Structure chain check passes.

10x speedup on the included microbenchmark.

Reviewed by Geoffrey Garen.

* jit/Repatch.cpp:
(JSC::toString):
(JSC::kindFor):
(JSC::generateByIdStub):
(JSC::tryCacheGetByID):
(JSC::patchJumpToGetByIdStub):
* runtime/PropertySlot.h:
(JSC::PropertySlot::isUnset):

LayoutTests:

Add a JS microbenchmark that accesses an undefined property in a hot loop.

Reviewed by Geoffrey Garen.

* js/regress/script-tests/undefined-property-access.js: Added.
(foo):
* js/regress/undefined-property-access-expected.txt: Added.
* js/regress/undefined-property-access.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172099 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoUnreviewed, rolling out r172009.
commit-queue@webkit.org [Tue, 5 Aug 2014 23:06:03 +0000 (23:06 +0000)]
Unreviewed, rolling out r172009.
https://bugs.webkit.org/show_bug.cgi?id=135627

"Commit landed on trunk instead of ftlopt branch." (Requested
by saamyjoon on #webkit).

Reverted changeset:

"Create a more generic way for VMEntryScope to notify those
interested that it will be destroyed"
https://bugs.webkit.org/show_bug.cgi?id=135358
http://trac.webkit.org/changeset/172009

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172098 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoRemove an unused argument from BuildbotQueue.update()
ap@apple.com [Tue, 5 Aug 2014 23:00:57 +0000 (23:00 +0000)]
Remove an unused argument from BuildbotQueue.update()
https://bugs.webkit.org/show_bug.cgi?id=135623

Reviewed by Timothy Hatcher.

Also remaned a constant to better match what it means.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172097 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoWeb Inspector: support storing multiple timeline recordings in the manager
burg@cs.washington.edu [Tue, 5 Aug 2014 22:32:58 +0000 (22:32 +0000)]
Web Inspector: support storing multiple timeline recordings in the manager
https://bugs.webkit.org/show_bug.cgi?id=132875

Reviewed by Timothy Hatcher.

This patch adds support for capturing multiple timeline recordings and switching
between them in the user interface using hierarchical path components.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded): Remove hard-coded priming of the timeline sidebar panel.
Instead, load the first recording in the timeline manager after the initial load.

(WebInspector._revealAndSelectRepresentedObjectInNavigationSidebar): Don't suppress
onselect events when selecting the tree element for a newly shown content view. This
allows the sidebar to sync the current content view and timeline tree element selection
with what is displayed in the content browser.

* UserInterface/Controllers/TimelineManager.js: Add two new events, RecordingCreated and
RecordingLoaded. A recording is considered active when any new records recieved will be
appended to that recording. The user interface is not necessarily viewing the active
recording.

(WebInspector.TimelineManager.delayedWork):
(WebInspector.TimelineManager): Keep a list of recordings, and load the first recording
asynchronously so that everyone can add an event listener for it.

(WebInspector.TimelineManager.prototype.get activeRecording):
(WebInspector.TimelineManager.prototype.get recordings):
(WebInspector.TimelineManager.prototype.startCapturing):
(WebInspector.TimelineManager.prototype.stopCapturing): Use promises to make the iOS 7
fallback path better match the async semantics of the non-fallback path.

(WebInspector.TimelineManager.prototype.unloadRecording):
(WebInspector.TimelineManager.prototype._loadNewRecording): Stop capturing and unload
any existing recording before creating and loading a new recording.

(WebInspector.TimelineManager.prototype._startAutoCapturing): Create a new recording
rather than resetting the current recording.

* UserInterface/Models/NetworkTimeline.js:
(WebInspector.NetworkTimeline):
* UserInterface/Models/Timeline.js:
(WebInspector.Timeline):
(WebInspector.Timeline.prototype.get type): Each timeline stores its TimelineRecord.Type
so that other code can create type-specific views using the Timeline as a representedObject.

* UserInterface/Models/TimelineRecording.js: For each recording, add new state for a unique identifier,
display string, and an isWritable flag. Once a recording is unloaded, it becomes read-only.
(WebInspector.TimelineRecording.prototype.get displayName):
(WebInspector.TimelineRecording.prototype.get identifier):
(WebInspector.TimelineRecording.prototype.isWritable):
(WebInspector.TimelineRecording.prototype.unloaded):
(WebInspector.TimelineRecording.prototype.reset): A recording can only be reset if it is writable.

* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.setTimelineProfilingEnabled): Don't make redundant start/stop capturing calls.

* UserInterface/Views/LayoutTimelineOverviewGraph.js: Use a timeline as the representedObject for all
timeline-specific graphs and views. Otherwise, use the recording.
(WebInspector.LayoutTimelineOverviewGraph):
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView):
(WebInspector.LayoutTimelineView.prototype._treeElementSelected):
* UserInterface/Views/NetworkTimelineOverviewGraph.js:
(WebInspector.NetworkTimelineOverviewGraph):
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView):
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView.prototype._networkTimelineRecordAdded):
* UserInterface/Views/ScriptTimelineOverviewGraph.js:
(WebInspector.ScriptTimelineOverviewGraph):
* UserInterface/Views/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView):
(WebInspector.ScriptTimelineView.prototype._treeElementSelected):

* UserInterface/Views/TimelineContentView.js: Iterate over timeline objects when setting up maps. Use timelines
as keys rather than their type identifiers.
(WebInspector.TimelineContentView.prototype.showTimelineViewForTimeline): Renamed from showTimelineView. This
function takes a Timeline instance rather than an identifier, since the conten view is specific to one recording.
(WebInspector.TimelineContentView.prototype.get selectionPathComponents): Match types against the currently
visible timeline's representedObject.
(WebInspector.TimelineContentView.prototype.get currentTimelineView): Used by the sidebar panel to sync timeline
tree element selections to TimelineView shown by the TimelineContentView.
(WebInspector.TimelineContentView.prototype.shown): Sync enablement of the "Clear Timelines" button to recording
read-only state.

(WebInspector.TimelineContentView.prototype.saveToCookie):
(WebInspector.TimelineContentView.prototype.restoreFromCookie): Added. Only handle saving/restoring the subview.

(WebInspector.TimelineContentView.prototype._pathComponentSelected):
(WebInspector.TimelineContentView.prototype._showTimelineView): Relax the early return so that timeline views
and content tree outlines are reattached when re-navigating to the same timeline view via back-forward entries.
(WebInspector.TimelineContentView.prototype.showTimelineView): Deleted.

* UserInterface/Views/TimelineOverviewGraph.js:
(WebInspector.TimelineOverviewGraph):

* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel): Keep a tree outline and tree element map for storing available recordings.
(WebInspector.TimelineSidebarPanel.createTimelineTreeElement):
(WebInspector.TimelineSidebarPanel.prototype.shown): Added.
(WebInspector.TimelineSidebarPanel.prototype.showDefaultContentView): Add a guard.
(WebInspector.TimelineSidebarPanel.prototype.get hasSelectedElement): Added. Selected recording tree elements
should be considered when deciding whether a represented object has been selected in the sidebar panel.

(WebInspector.TimelineSidebarPanel.prototype.treeElementForRepresentedObject.looselyCompareRepresentedObjects):
(WebInspector.TimelineSidebarPanel.prototype.treeElementForRepresentedObject.get if):
(WebInspector.TimelineSidebarPanel.prototype.treeElementForRepresentedObject):
(WebInspector.TimelineSidebarPanel.prototype.showTimelineOverview):
(WebInspector.TimelineSidebarPanel.prototype.showTimelineViewForType): Renamed to explicit take a type identifier.
Delegate the actual showing of the timeline view to the onselect handler for the timelines tree outline.

(WebInspector.TimelineSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
(WebInspector.TimelineSidebarPanel.prototype.saveStateToCookie): Fix a typo.
(WebInspector.TimelineSidebarPanel.prototype.restoreStateFromCookie): Fix a typo.
(WebInspector.TimelineSidebarPanel.prototype._recordingsTreeElementSelected): Sync the currently displayed
recording object and content view, and sync the selected tree element to the displayed timeline subview.

(WebInspector.TimelineSidebarPanel.prototype._timelinesTreeElementSelected): If this is a user action, show the timeline.
(WebInspector.TimelineSidebarPanel.prototype._contentBrowserCurrentContentViewDidChange): Use classList.toggle().
(WebInspector.TimelineSidebarPanel.prototype._recordingCreated): Dynamically add new recordings to the interface.
(WebInspector.TimelineSidebarPanel.prototype._recordingLoaded): Automatically show recordings when they are loaded.
(WebInspector.TimelineSidebarPanel.prototype._recordGlyphClicked): Shift+click will force-create a new recording.
(WebInspector.TimelineSidebarPanel.prototype.initialize): Deleted.
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView):
(WebInspector.TimelineView.prototype.get representedObject):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172094 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoMore work on CMake.
achristensen@apple.com [Tue, 5 Aug 2014 22:28:19 +0000 (22:28 +0000)]
More work on CMake.
https://bugs.webkit.org/show_bug.cgi?id=135620

.:
Reviewed by Laszlo Gombos.

* Source/cmake/OptionsMac.cmake:
Use UDIS86 by default on Mac.

Source/JavaScriptCore:
Reviewed by Laszlo Gombos.

* CMakeLists.txt:
Added missing source files.
* PlatformEfl.cmake:
* PlatformGTK.cmake:
Include glib directories and libraries to find glib.h in EventLoop.cpp.
* PlatformMac.cmake:
Moved STATICALLY_LINKED_WITH_WTF definition away from the common CMakeLists
because it should not be defined on Windows.
Added remote inspector source files.

Source/WebCore:
Reviewed by Reviewed by Laszlo Gombos.

* CMakeLists.txt:
Added missing idls.
* PlatformMac.cmake:
Added additional include directories and source files.
* css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
* css/makeSelectorPseudoElementsMap.py:
The Windows distribution of gperf doesn't like single quotes for its key-positions parameters.
* page/Chrome.h:
Compile fix.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172093 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoWeb Inspector: ReplayManager shouldn't assume replay status when the inspector is...
burg@cs.washington.edu [Tue, 5 Aug 2014 21:56:57 +0000 (21:56 +0000)]
Web Inspector: ReplayManager shouldn't assume replay status when the inspector is opened
https://bugs.webkit.org/show_bug.cgi?id=135212

Reviewed by Timothy Hatcher.

Source/WebCore:

The frontend should be able to introspect the session and segment state machines,
currently loaded segment and session identifiers, and replay position.

* inspector/InspectorReplayAgent.cpp:
(WebCore::buildInspectorObjectForSessionState): Added.
(WebCore::buildInspectorObjectForSegmentState): Added.
(WebCore::InspectorReplayAgent::currentReplayState): Added.
* inspector/InspectorReplayAgent.h:
* inspector/protocol/Replay.json: Add currentReplayState query command.
* replay/ReplayController.h: Add some accessors.

Source/WebInspectorUI:

The inspector could be closed and reopened at any point during capturing or replaying.
ReplayManager should query the current state on initialization rather than assuming
that the replay controller is still in its initial state.

ReplayManager's initialization code requires querying the backend for the current replay
state. This could race with replay protocol events that mutate the manager's state before
it is fully initialized, leading to undefined behavior.

To mitigate this, all protocol event handlers (called by ReplayObserver) are wrapped
with a guard that enqueues the callback if initialization is not yet complete. This
queue is implemented via multiple then-chaining of a shared 'initialization' promise
which resolves when initialization completes.

* UserInterface/Controllers/ReplayManager.js:
(WebInspector.ReplayManager.then):
(WebInspector.ReplayManager.catch):
(WebInspector.ReplayManager): Rewrite the initialization code to first query the replay
state, set the initialization flag to true, and then request and update session records.
The sessions must be loaded after querying initial state because ReplayManager.sessionCreated
requires replay state to be initialized.

(WebInspector.ReplayManager.prototype.get sessionState):
(WebInspector.ReplayManager.prototype.get segmentState):
(WebInspector.ReplayManager.prototype.get activeSessionIdentifier):
(WebInspector.ReplayManager.prototype.get activeSegmentIdentifier):
(WebInspector.ReplayManager.prototype.get playbackSpeed):
(WebInspector.ReplayManager.prototype.set playbackSpeed):
(WebInspector.ReplayManager.prototype.get currentPosition): Add assertions to catch uses of
manager state before the manager is fully initialized.

(WebInspector.ReplayManager.prototype.waitUntilInitialized): Added. It returns a shared promise
that is fulfilled when initialization is complete.

(WebInspector.ReplayManager.prototype.captureStarted):
(WebInspector.ReplayManager.prototype.captureStopped):
(WebInspector.ReplayManager.prototype.playbackStarted):
(WebInspector.ReplayManager.prototype.playbackHitPosition):
(WebInspector.ReplayManager.prototype.playbackPaused):
(WebInspector.ReplayManager.prototype.playbackFinished):
(WebInspector.ReplayManager.prototype.sessionModified):
(WebInspector.ReplayManager.prototype.sessionLoaded):
(WebInspector.ReplayManager.prototype.segmentCompleted.set catch):
(WebInspector.ReplayManager.prototype.segmentCompleted):
(WebInspector.ReplayManager.prototype.segmentRemoved.then):
(WebInspector.ReplayManager.prototype.segmentRemoved):
(WebInspector.ReplayManager.prototype.segmentLoaded): Add initialization guards.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172087 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[iOS] Media controls layout incorrectly in RTL content
dino@apple.com [Tue, 5 Aug 2014 21:33:54 +0000 (21:33 +0000)]
[iOS] Media controls layout incorrectly in RTL content
https://bugs.webkit.org/show_bug.cgi?id=135621
<rdar://problem/17849206>

Reviewed by Eric Carlson.

Media controls should always layout in LTR mode, even when the
page content is RTL. There already was a rule to do this on
non-iOS systems, but it wasn't getting included for iOS.
In this case I put the rule on the composited parent of the
controls in order to maintain the padding of the control panel.
This should still leave the captions unaffected.

* Modules/mediacontrols/mediaControlsiOS.css:
(video::-webkit-media-controls-panel-composited-parent): Add direction: ltr.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172083 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoWeb Replay: rename protocol methods for getting replay session/segment data
burg@cs.washington.edu [Tue, 5 Aug 2014 21:28:38 +0000 (21:28 +0000)]
Web Replay: rename protocol methods for getting replay session/segment data
https://bugs.webkit.org/show_bug.cgi?id=135618

Reviewed by Timothy Hatcher.

Source/WebCore:

* inspector/InspectorReplayAgent.cpp:
(WebCore::InspectorReplayAgent::getSessionData):
(WebCore::InspectorReplayAgent::getSegmentData):
(WebCore::InspectorReplayAgent::getSerializedSession): Deleted.
(WebCore::InspectorReplayAgent::getSerializedSegment): Deleted.
* inspector/InspectorReplayAgent.h:
* inspector/protocol/Replay.json:

Source/WebInspectorUI:

* UserInterface/Controllers/ReplayManager.js:
(WebInspector.ReplayManager.prototype.getSession.get var):
(WebInspector.ReplayManager.prototype.getSegment.get var):
* UserInterface/Models/ReplaySession.js:
(WebInspector.ReplaySession.prototype.segmentsChanged):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172080 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoREGRESSION: Extremely flashy scrolling while a page is still loading (because of...
antti@apple.com [Tue, 5 Aug 2014 20:15:40 +0000 (20:15 +0000)]
REGRESSION: Extremely flashy scrolling while a page is still loading (because of flush throttling)
https://bugs.webkit.org/show_bug.cgi?id=135603
<rdar://problem/17876385>

This hit ASSERT(frame().isMainFrame()) in FrameView::updateLayerFlushThrottling
running scrollbars/scrollbar-iframe-click-does-not-blur-content.html and a few other tests.

* page/FrameView.cpp:
(WebCore::FrameView::setWasScrolledByUser): Only invoke updateLayerFlushThrottling for the main frame.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172053 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoRename MAC_LONG_PRESS feature flag to LONG_MOUSE_PRESS.
commit-queue@webkit.org [Tue, 5 Aug 2014 19:53:07 +0000 (19:53 +0000)]
Rename MAC_LONG_PRESS feature flag to LONG_MOUSE_PRESS.
https://bugs.webkit.org/show_bug.cgi?id=135276

Patch by Peyton Randolph <prandolph@apple.com> on 2014-08-05
Reviewed by Beth Dakin.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

No new tests. Just a compiler flag.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172048 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[Media iOS] Ensure there is a nice default fallback for missing wireless target names
dino@apple.com [Tue, 5 Aug 2014 19:36:39 +0000 (19:36 +0000)]
[Media iOS] Ensure there is a nice default fallback for missing wireless target names
https://bugs.webkit.org/show_bug.cgi?id=135488
<rdar://problem/17879156>

Reviewed by Antoine Quint.

Antoine found me on iMessage to tell me I'm an idiot and that I've
forgotten how to write JavaScript. Embarrassingly, this code is what
I originally had, but then second-guessed myself.

* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.updateWirelessPlaybackStatus): No need for the local
variable or conditional statement, since null and "" both evaluate as false.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172047 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoWeb Inspector: cannot navigate between multiple applicable dashboards
burg@cs.washington.edu [Tue, 5 Aug 2014 19:25:07 +0000 (19:25 +0000)]
Web Inspector: cannot navigate between multiple applicable dashboards
https://bugs.webkit.org/show_bug.cgi?id=135130

Reviewed by Timothy Hatcher.

Add navigation arrows between dashboards when multiple dashboards are applicable.
For example, the user should be able to go back to the default dashboard while paused
at a breakpoint. Dashboards form a stack based on when they are first introduced.

* UserInterface/Views/DashboardContainerView.css:
(.toolbar .dashboard): Increase padding-right a bit to make room for arrows.
(.toolbar .dashboard:not(.visible)): Fix a bug where higher dashboards in the dashboard stack
can shine through when animating between two lower dashboards that have transparent background.
This ensures that at most two dashboards (namely, the ones being animated) are displayed.

(.dashboard-container .advance-arrow): Main style class for navigation arrows.
(.dashboard-container .advance-arrow:hover):
(.dashboard-container .advance-arrow:active):
(.dashboard-container .advance-arrow.inactive):
(.toolbar.label-only .dashboard-container .advance-arrow): Make arrows slightly smaller when
the dashboards get shorter.

(.dashboard-container .advance-arrow.advance-forward):
(.dashboard-container .advance-arrow.advance-backward):
* UserInterface/Views/DashboardContainerView.js:
(WebInspector.DashboardContainerView): Arrow styles are updated when a dashboard is shown,
hidden, or closed. When moving away, we dismiss (i.e., set zero opacity) arrows at animation
start. When the animation finishes, redisplay arrows that are applicable for the new dashboard.

(WebInspector.DashboardContainerView.prototype._advanceForwardArrowClicked):
(WebInspector.DashboardContainerView.prototype._advanceBackwardArrowClicked):
(WebInspector.DashboardContainerView.prototype._dismissAdvanceArrows):
(WebInspector.DashboardContainerView.prototype._updateAdvanceArrowVisibility):
(WebInspector.DashboardContainerView.prototype._showDashboardAtIndex): There was a bug here
where it would unconditionally use the same animation direction when showing a dashboard, but
it was hard to spot without arrows that must correlate with the animation direction.

(WebInspector.DashboardContainerView.prototype.animationEnded):
(WebInspector.DashboardContainerView.prototype._showDashboardView):
(WebInspector.DashboardContainerView.prototype._hideDashboardView):
(WebInspector.DashboardContainerView.prototype._closeDashboardView):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172044 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoREGRESSION: Extremely flashy scrolling while a page is still loading (because of...
antti@apple.com [Tue, 5 Aug 2014 18:34:57 +0000 (18:34 +0000)]
REGRESSION: Extremely flashy scrolling while a page is still loading (because of flush throttling)
https://bugs.webkit.org/show_bug.cgi?id=135603
<rdar://problem/17876385>

Reviewed by Andreas Kling.

* page/FrameView.cpp:
(WebCore::determineLayerFlushThrottleState):

    Disable throttling after user has scrolled the page.
    This is consistent with the speculative tiling. It also gets enabled on first scroll.

(WebCore::FrameView::setWasScrolledByUser):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172039 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoWeb Inspector: shown() called on a content view when stepping over an instruction...
commit-queue@webkit.org [Tue, 5 Aug 2014 18:29:42 +0000 (18:29 +0000)]
Web Inspector: shown() called on a content view when stepping over an instruction in the debugger
https://bugs.webkit.org/show_bug.cgi?id=135311

Patch by Saam Barati <sbarati@apple.com> on 2014-08-05
Reviewed by Timothy Hatcher.

ContentViewContainer should not repeatedly call ContentView.prototype.shown
on ContentViews that are already visible. ContentViewContainer now passes
a flag to BackForwardEntry.prototype.prepareToShow indicating whether it should
call the shown function on the ContentView it is about to display.
ContentViewContainer.prototype.showBackForwardEntryForIndex passes in this
flag based on its ContentView being visible.

* UserInterface/Models/BackForwardEntry.js:
(WebInspector.BackForwardEntry.prototype.prepareToShow):
* UserInterface/Views/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.showBackForwardEntryForIndex):
(WebInspector.ContentViewContainer.prototype.replaceContentView):
(WebInspector.ContentViewContainer.prototype.closeAllContentViewsOfPrototype):
(WebInspector.ContentViewContainer.prototype.shown):
(WebInspector.ContentViewContainer.prototype._showEntry):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172038 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoASSERTION FAILED: name[0] == '@' && length >= 2 in WebCore::CSSParser::detectAtToken
commit-queue@webkit.org [Tue, 5 Aug 2014 18:14:31 +0000 (18:14 +0000)]
ASSERTION FAILED: name[0] == '@' && length >= 2 in WebCore::CSSParser::detectAtToken
https://bugs.webkit.org/show_bug.cgi?id=134632

Source/WebCore:

At-rules must consist of at least two characters: the '@' symbol followed by
an identifier name. The failure of this condition makes the assertion fail.

The length of an at-rule is currently calculated by pointer arithmetic on
the 'result' pointer, which is expected to be set to the end of the at-rule
identifier by the WebCore::*CSSTokenizer::parseIdentifier method.
If the at-rule token is a sequence of 8-bit-only characters then
'result' will point correctly at the end of the identifier. However, if
the at-rule contains a 16-bit Unicode escape then 'result' will not be
updated correctly anymore, hence it cannot be used for length calculation.
The patch makes the parseIdentifier bump the result pointer even in the 16-bit slow case.

Patch by Renata Hodovan, backported from Chromium: https://codereview.chromium.org/241053002

Patch by Martin Hodovan <mhodovan.u-szeged@partner.samsung.com> on 2014-08-05
Reviewed by Darin Adler.

Test: fast/css/atrule-with-escape-character-crash.html

* css/CSSParser.cpp:
(WebCore::CSSParser::realLex):

LayoutTests:

Added test demonstrates that at-rules containing 16-bit Unicode characters
can be handled properly.

Patch by Martin Hodovan <mhodovan.u-szeged@partner.samsung.com> on 2014-08-05
Reviewed by Darin Adler.

* fast/css/atrule-with-escape-character-crash-expected.txt: Added.
* fast/css/atrule-with-escape-character-crash.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172036 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[iOS] The raw bytes of an iWork document's PDF preview are displayed rather than...
aestes@apple.com [Tue, 5 Aug 2014 17:49:44 +0000 (17:49 +0000)]
[iOS] The raw bytes of an iWork document's PDF preview are displayed rather than the PDF itself
https://bugs.webkit.org/show_bug.cgi?id=135596

Reviewed by David Kilzer.

Source/WebCore:

Some iWork documents contain pre-rendered PDF previews. When WebKit asks QuickLook to convert such a document,
QuickLook will return this PDF as the converted response. However, until WebKit has sent the document's data to
QuickLook, -[QLPreviewConverter previewResponse] will misleadingly tell WebKit that the converted resource will
be of type 'text/html'. This leads WebKit to render the PDF preview as HTML.

Instead of querying QLPreviewConverter for the previewResponse before we've sent it any data, postpone calling
ResourceLoader::didReceiveResponse until we've begun to receive data via the QLPreviewConverter delegate. At
that point -[QLPreviewConverter previewResponse] will have the correct MIME type and we can call didReceiveResponse.

No new tests. QuickLook is not testable from WebKit.

* platform/network/ios/QuickLook.mm:
(-[WebResourceLoaderQuickLookDelegate connection:didReceiveDataArray:]): If didReceiveResponse has yet to be
called, call it now with QuickLookHandle::nsResponse().
(-[WebResourceLoaderQuickLookDelegate connection:didReceiveData:lengthReceived:]): Ditto.
(-[WebResourceLoaderQuickLookDelegate connection:didFailWithError:]): Ditto.
(-[WebResourceLoaderQuickLookDelegate connectionDidFinishLoading:]): Assert that didReceiveResponse has been called.
(-[WebResourceLoaderQuickLookDelegate clearHandle]): Cleared the raw pointer to QuickLookHandle.
(WebCore::QuickLookHandle::create): Pointed WebResourceLoaderQuickLookDelegate's quickLookHandle property to
the newly created QuickLookHandle.

Source/WebKit2:

* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): If the response will be handled by
QuickLook, do not call ResourceLoader::didReceiveResponse. It will be called later by
WebResourceLoaderQuickLookDelegate once converted data is received.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172035 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoBuild fix.
ap@apple.com [Tue, 5 Aug 2014 17:03:25 +0000 (17:03 +0000)]
Build fix.

* UIProcess/WebContext.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172034 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoFixing calc() parameter parsing in cubic-bezier functions
commit-queue@webkit.org [Tue, 5 Aug 2014 16:46:20 +0000 (16:46 +0000)]
Fixing calc() parameter parsing in cubic-bezier functions
https://bugs.webkit.org/show_bug.cgi?id=135605

Patch by Renata Hodovan <rhodovan.u-szeged@partner.samsung.com> on 2014-08-05
Reviewed by Andreas Kling.

Source/WebCore:

Before this patch, calc values in cubic-bezier functions weren't being read correctly
since they were handled as simple floats.

Blink: https://codereview.chromium.org/369313002/
Test: css3/calc/cubic-bezier-with-multiple-calcs-crash.html.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseCubicBezierTimingFunctionValue):

LayoutTests:

* css3/calc/cubic-bezier-with-multiple-calcs-crash.html-expected.txt: Added.
* css3/calc/cubic-bezier-with-multiple-calcs-crash.html.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172033 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[MSE] Seeking occasionally causes many frames to be displayed in "fast forward" mode
jer.noble@apple.com [Tue, 5 Aug 2014 16:42:09 +0000 (16:42 +0000)]
[MSE] Seeking occasionally causes many frames to be displayed in "fast forward" mode
https://bugs.webkit.org/show_bug.cgi?id=135422

Reviewed by Eric Carlson.

Three related fixes:

In reenqueueMediaForTime(), update TrackBuffer.lastEnqueuedPresentationTime when we flush
samples, so that the next time samples are re-enqueued, the starting point for re-enqueueing
is correct.

In sourceBufferPrivateDidReceiveSample(), do not add samples to the decode queue
if they are before the current media time.

When a seek is pending, but samples for the new time is not yet present in the SourceBuffer,
the SourceBufferPrivate may signal that it's ready for new samples through the
sourceBufferPrivateDidBecomeReadyForMoreSamples() method. In this situation, we should not
continue to provideMediaData(), as that will append samples from the prior-to-seeking media
timeline. Since the timeline may have moved forward due to the seek, a decoder may decide to
display those frames as quickly as possible (the "fast forward" behavior) in order to catch
up to the new current time.

If a re-enqueue is pending, don't provide media data in response to being notified that the
SourceBufferPrivate is ready for more samples. Wait until samples for the new current time
are appended.

Also, don't provide media data if we are waiting for a seek to complete.

* Modules/mediasource/MediaSource.h:
(WebCore::MediaSource::isSeeking): Convenience method.
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
(WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
(WebCore::SourceBuffer::reenqueueMediaForTime):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172032 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoSSO expects to be able to walk parent application's bundle
oliver@apple.com [Tue, 5 Aug 2014 16:41:46 +0000 (16:41 +0000)]
SSO expects to be able to walk parent application's bundle
https://bugs.webkit.org/show_bug.cgi?id=135581
<rdar://problem/17864079>

Reviewed by Alexey Proskuryakov.

SSO expects to be able to walk the parent application's
bundle looking for Info plists. To allow this to actually
work we provide an extension from the ui process that
covers the bundle directory, and then in the profile
restrict access to the ability to read directories and
files named Info.plist.

* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):
* Shared/Network/NetworkProcessCreationParameters.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureNetworkProcess):
(WebKit::WebContext::parentBundleDirectory):
* UIProcess/WebContext.h:
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::parentBundleDirectory):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172031 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[gtk] Include llvm-dev(el) package to satisfy mesa build configuration
vivek.vg@samsung.com [Tue, 5 Aug 2014 16:38:53 +0000 (16:38 +0000)]
[gtk] Include llvm-dev(el) package to satisfy mesa build configuration
https://bugs.webkit.org/show_bug.cgi?id=135555

Reviewed by Philippe Normand.

Initial setup of gtk on linux requires this package to be installed.
This is required during the build configuration of mesa through jhbuild.

* gtk/install-dependencies:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172030 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoFix the commit-log-editor after r167243 and add more unit tests
commit-queue@webkit.org [Tue, 5 Aug 2014 15:16:23 +0000 (15:16 +0000)]
Fix the commit-log-editor after r167243 and add more unit tests
https://bugs.webkit.org/show_bug.cgi?id=131727

Patch by Eva Balazsfalvi <evab.u-szeged@partner.samsung.com> on 2014-08-05
Reviewed by Csaba Osztrogonác.

* Scripts/commit-log-editor:
(createCommitMessage):
(removeLongestCommonPrefixEndingInNewline):
* Scripts/webkitpy/common/checkout/checkout_unittest.py:
(CommitMessageForThisCommitTest):
(CommitMessageForThisCommitTest.mock_changelog):
(CommitMessageForThisCommitTest.mock_checkout_for_test):
(CommitMessageForThisCommitTest.test_commit_message_for_unreviewed_changelogs_with_different_messages):
(test_commit_message_for_one_reviewed_changelog):
(test_commit_message_for_changelogs_with_same_messages):
(test_commit_message_for_changelogs_with_different_messages):
(test_commit_message_for_one_rollout_changelog):
(test_commit_message_for_rollout_changelogs_with_different_directories):
(setUp): Deleted.
(test_commit_message_for_this_commit): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172029 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoAX: Select text activity should return replaced text instead of previously selected...
cfleizach@apple.com [Tue, 5 Aug 2014 15:15:58 +0000 (15:15 +0000)]
AX: Select text activity should return replaced text instead of previously selected text
https://bugs.webkit.org/show_bug.cgi?id=135595

Reviewed by Mario Sanchez Prada.

Source/WebCore:
When the select activity API is used to replace text, the replacement string should be returned instead of the old selected text.

Updated existing test: platform/mac/accessibility/select-text.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::selectText):

LayoutTests:
* platform/mac/accessibility/select-text-expected.txt:
* platform/mac/accessibility/select-text.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172028 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoAX: Select activity behavior does not work when an existing range is already selected
cfleizach@apple.com [Tue, 5 Aug 2014 05:09:05 +0000 (05:09 +0000)]
AX: Select activity behavior does not work when an existing range is already selected
https://bugs.webkit.org/show_bug.cgi?id=135579

Reviewed by Mario Sanchez Prada.

Source/WebCore:
If you have an existing range selected, and try to apply a select and replace operation, like capitalize,
searching for that range will fail because it skips the currently selected range.

For these cases, it seems the best way is to start the search from the start position, rather than relying on the
entire range.

Updated existing test: platform/mac/accessibility/select-text.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::selectText):

LayoutTests:
* platform/mac/accessibility/select-text-expected.txt:
* platform/mac/accessibility/select-text.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172027 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[MSE][Mac] Seeking past buffered range will not resume playback when seek completes.
jer.noble@apple.com [Tue, 5 Aug 2014 03:58:28 +0000 (03:58 +0000)]
[MSE][Mac] Seeking past buffered range will not resume playback when seek completes.
https://bugs.webkit.org/show_bug.cgi?id=135591

Reviewed by Eric Carlson.

If a seek is delayed due to seeking into an unbuffered area, playback will not be restarted
at that point. Instead, playback must resume when enough media data has been added, and
the MediaSource indicates the seek should complete.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekCompleted):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172026 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[MSE] Videos will report a stall when within 1 frame-duration before the end of a...
jer.noble@apple.com [Tue, 5 Aug 2014 03:57:27 +0000 (03:57 +0000)]
[MSE] Videos will report a stall when within 1 frame-duration before the end of a movie.
https://bugs.webkit.org/show_bug.cgi?id=135586

Reviewed by Eric Carlson.

Under certain circumstances, videos which are within 1/24 seconds before the end of a media stream when
monitorSourceBuffers() is called will fail the hasFutureTime() check. This is because hasFutureTime()
checks whether enough media is buffered to play back at least some time in the future, but when the
current time is close to the duration, not enough data is buffered to satisfy that check.

Add some logic which will break out early when the SourceBuffer has buffered up to and including the
media's duration, and return that the buffer indeed hasFutureTime() available.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::hasFutureTime):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172025 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoSimplify the StyleInvalidation mode of rule collection
benjamin@webkit.org [Tue, 5 Aug 2014 03:40:55 +0000 (03:40 +0000)]
Simplify the StyleInvalidation mode of rule collection
https://bugs.webkit.org/show_bug.cgi?id=135521

Reviewed by Antti Koivisto.

Source/WebCore:
There are two branches where StyleInvalidation code is removed:
-Pseudo elements for shadow dom elements.
-Pseudo elements without dom tree counterpart.

The first can never be hit because StyleInvalidationAnalysis does a complete invalidation
when there is any shadow dom styling involved in the stylesheets.

Even if that branch was hit, not failing on custom pseudo elements would be equivalent
to ignoring those pseudo elements from the Selector. By doing so, we would match elements
that do not have shadow dom and invalidate pretty much everything.

Unlike pseudo elements without real elements, shadow dom elements are not matched separately with a different
context, thus we could generalize StyleInvalidationAnalysis to handle this case.

The second case handle pseudo elements that do not have a real element. That case no longer need to be handled
separately at the filter time, it has become a special case of SelectorChecker::match() after everything else
has matched.

The only condition for this to work is that the Context's pseudoId must be NOPSEUDO. This is the case
in practice since matching specific pseudo types would be a waste of time. ElementRuleCollector::collectMatchingRules()
has a new assertion to enforce that.

Test: fast/css/stylesheet-change-updates-pseudo-elements.html

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::collectMatchingRules):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::matchRecursively):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement):

LayoutTests:
This test by:
1) Forcing the recalc of the user-agent stylesheet.
2) Wait for the page to finish loading.
3) Add a style changing only pseudo elements without corresponding shadow element.

* fast/css/stylesheet-change-updates-pseudo-elements-expected.html: Added.
* fast/css/stylesheet-change-updates-pseudo-elements.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172024 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoAdd a flag for the CSS Selectors level 4 implementation
benjamin@webkit.org [Tue, 5 Aug 2014 03:25:52 +0000 (03:25 +0000)]
Add a flag for the CSS Selectors level 4 implementation
https://bugs.webkit.org/show_bug.cgi?id=135535

Reviewed by Andreas Kling.

.:
* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:

Source/JavaScriptCore:
* Configurations/FeatureDefines.xcconfig:

Source/WebCore:
* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:
* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:
* Configurations/FeatureDefines.xcconfig:

WebKitLibraries:
* win/tools/vsprops/FeatureDefines.props:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172023 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[GTK] run-launcher --gtk is broken
commit-queue@webkit.org [Tue, 5 Aug 2014 02:51:50 +0000 (02:51 +0000)]
[GTK] run-launcher --gtk is broken
https://bugs.webkit.org/show_bug.cgi?id=135571

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2014-08-04
Reviewed by Martin Robinson.

* Scripts/webkitdirs.pm:
(builtDylibPathForName): Search for libwebkit2gtk-4.0

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172022 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoAX: add AccessibilityObject::computedLabelString() for WebAXI
cfleizach@apple.com [Tue, 5 Aug 2014 02:47:01 +0000 (02:47 +0000)]
AX: add AccessibilityObject::computedLabelString() for WebAXI
https://bugs.webkit.org/show_bug.cgi?id=129939

Reviewed by Mario Sanchez Prada.

Provide a method that the WebKit Inspector can call in order to
display an accessible name for an AX node.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::accessibilityComputedLabel):
* accessibility/AccessibilityObject.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172021 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoLots of crashes in WebKit1 after r172013.
timothy_horton@apple.com [Tue, 5 Aug 2014 01:39:24 +0000 (01:39 +0000)]
Lots of crashes in WebKit1 after r172013.
https://bugs.webkit.org/show_bug.cgi?id=135582
<rdar://problem/17837636>

Reviewed by Enrica Casucci.

* editing/SelectionRectGatherer.cpp:
(WebCore::SelectionRectGatherer::addRect):
(WebCore::SelectionRectGatherer::addGapRects):
Don't try to do local-to-absolute coordinate conversion if we don't have
a repaint container, which happens a lot in WebKit1.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172018 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[GTK] Unreviewed GTK gardening.
clopez@igalia.com [Tue, 5 Aug 2014 01:22:03 +0000 (01:22 +0000)]
[GTK] Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Report and mark new failures after 172008 and r172010.
Remove expectations for test that now pass after r171964 (revert of r171957).
Update expectations for new flaky tests.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172017 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoCheck for null frame when processing geolocation authorization request
benjamin@webkit.org [Tue, 5 Aug 2014 01:04:55 +0000 (01:04 +0000)]
Check for null frame when processing geolocation authorization request
https://bugs.webkit.org/show_bug.cgi?id=135577
<rdar://problem/17896295>

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-08-04
Reviewed by Geoffrey Garen.

Source/WebKit/mac:
* WebCoreSupport/WebGeolocationClient.mm:
(WebGeolocationClient::requestPermission):

Source/WebKit2:
I could have put the null check in GeolocationController instead of the WebKit layer,
but that would be a little weird as GeolocationController knows nothing about how
the WebKit layer decides what to do with requests.

* WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
(WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172016 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoProgress towards CMake on Mac.
achristensen@apple.com [Tue, 5 Aug 2014 00:30:15 +0000 (00:30 +0000)]
Progress towards CMake on Mac.
https://bugs.webkit.org/show_bug.cgi?id=135528

Reviewed by Gyuyoung Kim.

.:
* Source/cmake/OptionsMac.cmake:
Made options list based on FeatureDefines.xcconfig files.

Source/JavaScriptCore:
* CMakeLists.txt:
Include necessary directories and copy all necessary forwarding headers.
Only compile UDis86Disassembler.cpp if we're using UDIS86.
* PlatformMac.cmake: Added.
* tools/CodeProfiling.cpp:
Compile fix.  Include sys/time.h on darwin, too.

Source/WebCore:
* PlatformMac.cmake: Added.

Source/WTF:
* wtf/CMakeLists.txt:
Include text directory.
* wtf/PlatformMac.cmake: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172014 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoSelection services menu dropdown is in the wrong place when selecting some text on...
timothy_horton@apple.com [Tue, 5 Aug 2014 00:28:25 +0000 (00:28 +0000)]
Selection services menu dropdown is in the wrong place when selecting some text on Yelp
https://bugs.webkit.org/show_bug.cgi?id=135582
<rdar://problem/17837636>

Reviewed by Simon Fraser.

* editing/SelectionRectGatherer.cpp:
(WebCore::SelectionRectGatherer::addRect):
(WebCore::SelectionRectGatherer::addGapRects):
(WebCore::SelectionRectGatherer::addRects): Deleted.
Rename addRects to addGapRects for clarity.
Map rects and gapRects to absolute RenderView coordinates so that
they are in a form WebKit2 can use. Previously they were sometimes
relative to a different repaint container, but that information was
lost when moving through SelectionRectGatherer.

Ideally we would keep selection rects as full quads instead of rects
for more of their life, but that problem is much deeper than just SelectionRectGatherer.

* editing/SelectionRectGatherer.h:
Add a comment clarifying the coordinate space of the stored selection rects.

* rendering/RenderView.cpp:
(WebCore::RenderView::applySubtreeSelection):
Rename addRects to addGapRects for clarity.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172013 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agolldb_webkit.py throws exception when generating summary of null StringImpl
commit-queue@webkit.org [Mon, 4 Aug 2014 23:06:09 +0000 (23:06 +0000)]
lldb_webkit.py throws exception when generating summary of null StringImpl
https://bugs.webkit.org/show_bug.cgi?id=129448

Patch by Matt Baker <mattbaker@apple.com> on 2014-08-04
Reviewed by Jer Noble.

Added checks for null StringImpl and 0 byte ReadMemory calls.

* lldb/lldb_webkit.py:
(WTFStringImpl_SummaryProvider):
(ustring_to_string):
(lstring_to_string):
(WTFStringImplProvider.to_string):
(WTFStringImplProvider.is_initialized):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172012 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[CSS Shapes] shape-margin not respected when it extends beyond an explicitly set...
bjonesbe@adobe.com [Mon, 4 Aug 2014 22:17:19 +0000 (22:17 +0000)]
[CSS Shapes] shape-margin not respected when it extends beyond an explicitly set margin
https://bugs.webkit.org/show_bug.cgi?id=135308

Reviewed by Dean Jackson.

Source/WebCore:
When a zero height line is supplied and the image shape extends into
the margin box (only possible when a shape-margin is supplied), then
only an empty interval was being returned. This patch makes it
properly return the interval for the line in question.

Test: fast/shapes/shape-outside-floats/shape-outside-image-shape-margin.html

* rendering/shapes/RasterShape.cpp:
(WebCore::RasterShape::getExcludedIntervals): Handle the zero height
line case.

LayoutTests:
Test case based on the one supplied by Rebecca Hauck in the bug
report.

* fast/shapes/resources/square.png: Added.
* fast/shapes/shape-outside-floats/shape-outside-image-shape-margin-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-image-shape-margin.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172010 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoCreate a more generic way for VMEntryScope to notify those interested that it will...
commit-queue@webkit.org [Mon, 4 Aug 2014 22:04:39 +0000 (22:04 +0000)]
Create a more generic way for VMEntryScope to notify those interested that it will be destroyed
https://bugs.webkit.org/show_bug.cgi?id=135358

Patch by Saam Barati <sbarati@apple.com> on 2014-08-04
Reviewed by Geoffrey Garen.

When VMEntryScope is destroyed, and it has a flag set indicating that the
Debugger needs to recompile all functions, it calls Debugger::recompileAllJSFunctions.
This flag is only used by Debugger to have VMEntryScope notify it when the
Debugger is safe to recompile all functions. This patch will substitute this
Debugger-specific recompilation flag with a list of callbacks that are notified
when the outermost VMEntryScope dies. This creates a general purpose interface
for being notified when the VM stops executing code via the event of the outermost
VMEntryScope dying.

* debugger/Debugger.cpp:
(JSC::Debugger::recompileAllJSFunctions):
* runtime/VMEntryScope.cpp:
(JSC::VMEntryScope::VMEntryScope):
(JSC::VMEntryScope::addEntryScopeDidPopListener):
(JSC::VMEntryScope::~VMEntryScope):
* runtime/VMEntryScope.h:
(JSC::VMEntryScope::setRecompilationNeeded): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172009 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoSubpixel rendering: InlineTextBox mistakenly rounds offset value before painting.
zalan@apple.com [Mon, 4 Aug 2014 22:01:04 +0000 (22:01 +0000)]
Subpixel rendering: InlineTextBox mistakenly rounds offset value before painting.
https://bugs.webkit.org/show_bug.cgi?id=135470

Reviewed by Simon Fraser.

This patch removes the premature paint offset adjustment for inlines. Premature snapping
could alter the final painting coordinates and push content to wrong positions.

This patch also enforces WebCore's pixel snapping strategy (round) on text painting.
It ensures that text positioning is in sync with other painting related operations including
clipping, box decorations etc. Underlying graphics libraries can take different directions on
text snapping, for example CG ceils text coordinates vertically (in horizontal context,
with the current settings). It can lead to undesired side effects.

Source/WebCore:
Test: fast/inline/hidpi-inline-selection-leaves-gap.html

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects): wrong direction used at r171896.
* rendering/SimpleLineLayoutFunctions.cpp: we don't paint vertical content here.
(WebCore::SimpleLineLayout::paintFlow):

LayoutTests:
* fast/inline/hidpi-inline-selection-leaves-gap-expected.html: Added.
* fast/inline/hidpi-inline-selection-leaves-gap.html: Added.
* fast/multicol/newmulticol/multicol-clip-rounded-corners-expected.html:
* fast/multicol/newmulticol/multicol-clip-rounded-corners.html: pixels are distributed properly.
No need to have the special 122px shortened width for col2.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172008 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoUnreviewed, rolling out r171992, r171995, & r172000.
jer.noble@apple.com [Mon, 4 Aug 2014 21:58:13 +0000 (21:58 +0000)]
Unreviewed, rolling out r171992, r171995, & r172000.

The cumulative effect of those revisions was to cause decoding errors when switching resolutions on YouTube.

Reverted changesets:

https://bugs.webkit.org/show_bug.cgi?id=135422 / http://trac.webkit.org/changeset/171992
https://bugs.webkit.org/show_bug.cgi?id=135424 / http://trac.webkit.org/changeset/171995
https://bugs.webkit.org/show_bug.cgi?id=135572 / http://trac.webkit.org/changeset/172000

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172007 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoAlways clear ConsoleClient when Page/WindowShell is destroyed
commit-queue@webkit.org [Mon, 4 Aug 2014 21:57:27 +0000 (21:57 +0000)]
Always clear ConsoleClient when Page/WindowShell is destroyed
https://bugs.webkit.org/show_bug.cgi?id=135569

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-08-04
Reviewed by Mark Lam.

* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::~ScriptController):
Whenever a window shell goes away, clear the console client.
We did this in clearWindowShell but not before destroying.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172006 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoAX: isWordEndMatch should allow for multiple word selections
cfleizach@apple.com [Mon, 4 Aug 2014 21:56:08 +0000 (21:56 +0000)]
AX: isWordEndMatch should allow for multiple word selections
https://bugs.webkit.org/show_bug.cgi?id=135573

Reviewed by Mario Sanchez Prada.

Source/WebCore:
isWordEndMatch was searching from the beginning of the selected range, which meant
that if the result was multiple words, we'd reject the result.
Instead, we should search from the end of the range, so that we encompass all words.

Modified existing test: platform/mac/accessibility/select-text-should-match-whole-words.html

* editing/TextIterator.cpp:
(WebCore::SearchBuffer::isWordEndMatch):

LayoutTests:
* platform/mac/accessibility/select-text-should-match-whole-words-expected.txt:
* platform/mac/accessibility/select-text-should-match-whole-words.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172005 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoAX: Secure text fields need to support Search parameterized attributes
cfleizach@apple.com [Mon, 4 Aug 2014 21:17:39 +0000 (21:17 +0000)]
AX: Secure text fields need to support Search parameterized attributes
https://bugs.webkit.org/show_bug.cgi?id=135568

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Secure text fields still need to support the fast searching that WebKit exposes, even though they don't support
other parameterized attributes.

Test: platform/mac/accessibility/secure-text-field-supports-fast-search.html

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):

LayoutTests:

* platform/mac/accessibility/secure-text-field-supports-fast-search-expected.txt: Added.
* platform/mac/accessibility/secure-text-field-supports-fast-search.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172002 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[MSE] Further fixes for "fast forward" playback after seeking in YouTube behavior.
jer.noble@apple.com [Mon, 4 Aug 2014 20:54:57 +0000 (20:54 +0000)]
[MSE] Further fixes for "fast forward" playback after seeking in YouTube behavior.
https://bugs.webkit.org/show_bug.cgi?id=135572

Reviewed by Eric Carlson.

Two related fixes:

In reenqueueMediaForTime(), update TrackBuffer.lastEnqueuedPresentationTime when we flush samples, so that
the next time samples are re-enqueued, the starting point for re-enqueueing is correct.

In sourceBufferPrivateDidReceiveSample(), do not add samples to the decode queue if they are before the
current media time.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
(WebCore::SourceBuffer::reenqueueMediaForTime):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172000 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoWeb Inspector: All-caps CSS properties are not shown in Computed pane
commit-queue@webkit.org [Mon, 4 Aug 2014 20:50:19 +0000 (20:50 +0000)]
Web Inspector: All-caps CSS properties are not shown in Computed pane
https://bugs.webkit.org/show_bug.cgi?id=133700

Patch by Matt Baker <mattbaker@apple.com> on 2014-08-04
Reviewed by Timothy Hatcher.

* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyle::styleWithProperties):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171999 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoAX: SelectText functionality always selects text after current selection even if...
cfleizach@apple.com [Mon, 4 Aug 2014 17:42:44 +0000 (17:42 +0000)]
AX: SelectText functionality always selects text after current selection even if closer selection is behind it
https://bugs.webkit.org/show_bug.cgi?id=135546

Reviewed by Mario Sanchez Prada.

Source/WebCore:
Logic was incorrect for comparing ranges found before the current selection.
ASSERT was incorrect for allowed ranges. We need to allow ranges that are right at the boundaries of our found ranges.

Extended existing test: platform/mac/accessibility/select-text.html

* accessibility/AccessibilityObject.cpp:
(WebCore::rangeClosestToRange):

LayoutTests:
* platform/mac/accessibility/select-text-expected.txt:
* platform/mac/accessibility/select-text.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171997 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoAX: AXSelectTextWithCriteriaParameterizedAttribute incorrectly selects the beginning...
cfleizach@apple.com [Mon, 4 Aug 2014 17:32:21 +0000 (17:32 +0000)]
AX: AXSelectTextWithCriteriaParameterizedAttribute incorrectly selects the beginning letters of a word
https://bugs.webkit.org/show_bug.cgi?id=135547

Reviewed by Mario Sanchez Prada.

Source/WebCore:
Allow text search to specify that it wants to match end of words as well as start of words.
This allows select text criteria to match on whole words only.

Test: platform/mac/accessibility/select-text-should-match-whole-words.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::rangeOfStringClosestToRangeInDirection):
* editing/FindOptions.h:
* editing/TextIterator.cpp:
(WebCore::SearchBuffer::isWordEndMatch):
(WebCore::SearchBuffer::search):

LayoutTests:
* platform/mac/accessibility/select-text-should-match-whole-words-expected.txt: Added.
* platform/mac/accessibility/select-text-should-match-whole-words.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171996 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[MSE] Re-enqueing due to overlapping appended samples can cause stuttering playback
jer.noble@apple.com [Mon, 4 Aug 2014 17:26:42 +0000 (17:26 +0000)]
[MSE] Re-enqueing due to overlapping appended samples can cause stuttering playback
https://bugs.webkit.org/show_bug.cgi?id=135424

Reviewed by Eric Carlson.

If it become necessary to re-enqueue samples (due to appending overlapping samples which cause
existing samples to be removed), the previous behavior was to flush and re-enqueue the new
samples dependencies; i.e., everything up to and including the previous sync sample. This causes
the decoder to visibly stall while it decodes those non-displaying samples, which could be
a second or more worth of encoded video samples, depending on the frequency of sync samples.

Instead, when we are asked to re-enqueue, we will look for the next occurring sync sample.
If found, we can switch over to the replacement samples at that point in the decode queue.
This limits the overhead of a stream switch, and should allow for a visually seamless switch,
at the cost of having to wait for the next sync sample to occur to affect the switch.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::seekToTime): Clear the decode queue when seeking.
(WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Call reenqueueMediaForCurrentTime.
(WebCore::SourceBuffer::reenqueueMediaForCurrentTime): Switch over to the new stream only
    at the next sync sample.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171995 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoAX: The Dictation command "Replace <phrase> with <phrase>" always capitalizes the...
cfleizach@apple.com [Mon, 4 Aug 2014 17:23:49 +0000 (17:23 +0000)]
AX: The Dictation command "Replace <phrase> with <phrase>" always capitalizes the replacement string
https://bugs.webkit.org/show_bug.cgi?id=135557

Reviewed by Mario Sanchez Prada.

Source/WebCore:
When replacing text, we should match the capitalization of the word being replaced
(unless the replacement looks like an abbreviation).

Test: platform/mac/accessibility/find-and-replace-match-capitalization.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::selectText):

LayoutTests:
* platform/mac/accessibility/find-and-replace-match-capitalization-expected.txt: Added.
* platform/mac/accessibility/find-and-replace-match-capitalization.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171994 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoQuickLook resources are cache-replaced with their original binary data causing ASSERT...
psolanki@apple.com [Mon, 4 Aug 2014 17:19:12 +0000 (17:19 +0000)]
QuickLook resources are cache-replaced with their original binary data causing ASSERT(m_data->size() == newBuffer->size()) in CachedResource.cpp
https://bugs.webkit.org/show_bug.cgi?id=135548
<rdar://problem/17891321>

Reviewed by David Kilzer.

When loading QuickLook resources, the SharedBuffer in the CachedResource is actually a
converted representation of the real QuickLook resource. Replacing this with the actual
network resource (which is what tryReplaceEncodedData() tried to do) is wrong and triggered
asserts in the code.

Fix this by having CachedRawResource::mayTryReplaceEncodedData() return false if we are
loading a QuickLook resource.

No new tests because we don't have a way to test QuickLook documents.

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::ResourceLoader):
(WebCore::ResourceLoader::didCreateQuickLookHandle):
    Set a flag to indicate that we are loading a QuickLook document.
* loader/ResourceLoader.h:
(WebCore::ResourceLoader::isQuickLookResource):
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::CachedRawResource):
(WebCore::CachedRawResource::finishLoading):
    Check if we were loading a QuickLook document and if so disable encoded data
    replacement.
* loader/cache/CachedRawResource.h:
    Add a new bool field returned by mayTryReplaceEncodedData(). Default is true but it is
    set to false in finishLoading() if we were loading QuickLook document.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171993 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[MSE] Seeking occasionally causes many frames to be displayed in "fast forward" mode
jer.noble@apple.com [Mon, 4 Aug 2014 17:17:30 +0000 (17:17 +0000)]
[MSE] Seeking occasionally causes many frames to be displayed in "fast forward" mode
https://bugs.webkit.org/show_bug.cgi?id=135422

Reviewed by Eric Carlson.

When a seek is pending, but samples for the new time is not yet present in the SourceBuffer,
the SourceBufferPrivate may signal that it's ready for new samples through the
sourceBufferPrivateDidBecomeReadyForMoreSamples() method. In this situation, we should not
continue to provideMediaData(), as that will append samples from the prior-to-seeking media
timeline. Since the timeline may have moved forward due to the seek, a decoder may decide to
display those frames as quickly as possible (the "fast forward" behavior) in order to catch
up to the new current time.

If a re-enqueue is pending, don't provide media data in response to being notified that the
SourceBufferPrivate is ready for more samples. Wait until samples for the new current time
are appended.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
* dom/Document.cpp:
(WebCore::Document::unregisterCollection):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171992 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[GTK] Install all unstable webkitdom headers
carlosgc@webkit.org [Mon, 4 Aug 2014 15:08:17 +0000 (15:08 +0000)]
[GTK] Install all unstable webkitdom headers
https://bugs.webkit.org/show_bug.cgi?id=135544

Reviewed by Gustavo Noronha Silva.

We were checking whether generated file existed before they had
been generated.

* PlatformGTK.cmake: Add Unstable.h header for all stable classes
to GObjectDOMBindingsUnstable_INSTALLED_HEADERS and split the
install command for stable and unstable headers making unstable
headers optional.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171991 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoUnreviewed EFL gardening
m.pakula@samsung.com [Mon, 4 Aug 2014 13:31:58 +0000 (13:31 +0000)]
Unreviewed EFL gardening

* platform/efl/TestExpectations: Add or update test expectations for failing tests.
* platform/efl/fast/text/international/cjk-segmentation-expected.txt: Added.
* platform/efl/js/dom/global-constructors-attributes-expected.txt: Rebaseline after r167632.
* platform/efl/sputnik/Unicode/Unicode_320/S7.6_A2.2_T2-expected.txt: Added.
* platform/efl/sputnik/Unicode/Unicode_320/S7.6_A5.2_T8-expected.txt: Added.
* platform/efl/svg/text/non-bmp-positioning-lists-expected.png: Rebaseline after r168350 and r168543.
* platform/efl/svg/text/non-bmp-positioning-lists-expected.txt: Ditto.
* platform/efl/transforms/2d/hindi-rotated-expected.txt: Fix baseline.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171990 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[WinCairo] Compile error in OpenTypeMathData.cpp.
commit-queue@webkit.org [Mon, 4 Aug 2014 08:47:50 +0000 (08:47 +0000)]
[WinCairo] Compile error in OpenTypeMathData.cpp.
https://bugs.webkit.org/show_bug.cgi?id=135541

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-08-04
Reviewed by Brent Fulgham.

The SharedBuffer class needs to be defined.
Also, the OpenTypeMathData constructor should be implemented when OPENTYPE_MATH is not enabled.

* platform/graphics/opentype/OpenTypeMathData.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171989 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[GTK] Windowing target support should reflect the support in the GTK+ dependency
zandobersek@gmail.com [Mon, 4 Aug 2014 07:17:55 +0000 (07:17 +0000)]
[GTK] Windowing target support should reflect the support in the GTK+ dependency
https://bugs.webkit.org/show_bug.cgi?id=134736

Reviewed by Martin Robinson.

* Source/cmake/FindGTK3.cmake: Don't error out if the GTK+ dependency doesn't
support the X11 or Wayland windowing targets -- instead, if there's no support
the specific target is disabled, and an error is thrown only if neither of the
backends is enabled at the end..
For now the X11 target remains enabled by default, and the Wayland target is
kept disabled. Once it's possible to have both targets enabled at runtime in
WebKit, the Wayland target will be enabled as well and we'll leave it to the
GTK+ dependency to determine which targets can be enabled.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171988 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[CMake] Add FindWayland.cmake
zandobersek@gmail.com [Mon, 4 Aug 2014 07:10:15 +0000 (07:10 +0000)]
[CMake] Add FindWayland.cmake
https://bugs.webkit.org/show_bug.cgi?id=135540

Reviewed by Martin Robinson.

* Source/cmake/FindWayland.cmake: Added. Enables finding the Wayland
dependency. For now bundles the wayland-client, wayland-server and
wayland-egl pkg-config targets into one dependency, but these could
be split in the future if necessary.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171987 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[GTK] Do not include JavaScriptCore stress tests in release tarballs
carlosgc@webkit.org [Mon, 4 Aug 2014 07:00:21 +0000 (07:00 +0000)]
[GTK] Do not include JavaScriptCore stress tests in release tarballs
https://bugs.webkit.org/show_bug.cgi?id=135503

Reviewed by Martin Robinson.

* gtk/manifest.txt: Exclude Source/JavaScriptCore/tests dir.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171986 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[EFL] Move DATA_INSTALL_DIR to ewebkit2-0
ryuan.choi@samsung.com [Mon, 4 Aug 2014 02:12:06 +0000 (02:12 +0000)]
[EFL] Move DATA_INSTALL_DIR to ewebkit2-0
https://bugs.webkit.org/show_bug.cgi?id=135553

Reviewed by Gyuyoung Kim.

Since WebKit1/Efl is dropped, we don't need to use ewebkit-1 and ewebkit2-1.
And removed WebKit_OUTPUT_NAME variable which is not used anymore on the EFL port.

* Source/cmake/OptionsEfl.cmake:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171985 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago<rdar://problem/17782529> REGRESSION: OS marketing version in iOS Simulator user...
mitz@apple.com [Sun, 3 Aug 2014 19:21:49 +0000 (19:21 +0000)]
<rdar://problem/17782529> REGRESSION: OS marketing version in iOS Simulator user-agent string is the host OS’s
https://bugs.webkit.org/show_bug.cgi?id=135549

Reviewed by Mark Rowe.

* platform/cocoa/SystemVersion.mm:
(WebCore::createSystemMarketingVersion): On the iOS Simulator, locate the system Library
directory relative to the Simulator root.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171984 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoSupport both window and view based video fullscreen.
commit-queue@webkit.org [Sun, 3 Aug 2014 00:03:18 +0000 (00:03 +0000)]
Support both window and view based video fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=135525

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-08-02
Reviewed by Simon Fraser.

Source/WebCore:
Presenting in a separate window gives greater flexibility for rotation separately from the app.
Presenting in the same window works better if the interface is rehosted in another process.

* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(-[WebVideoFullscreenController enterFullscreen:]): Use clientRect instead of screenRect.
* platform/ios/WebVideoFullscreenInterfaceAVKit.h: Add m_window and m_parentView.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVVideoLayer setBounds:]): Parent view might not be fullscreen; use window instead.
(WebVideoFullscreenInterfaceAVKit::setupFullscreen): Conditionally create UIWindow and UIViewController for fullscreen.
(WebVideoFullscreenInterfaceAVKit::enterFullscreen): Video, not the container should have black background.
(WebVideoFullscreenInterfaceAVKit::exitFullscreen): Conditionally translate finalRect.
(WebVideoFullscreenInterfaceAVKit::cleanupFullscreen): Clean up UIWindow and force status bar to correct orientation.
(WebVideoFullscreenInterfaceAVKit::invalidate): Clean up UIWindow.
(WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): Hide window and exit without animation.
* platform/ios/WebVideoFullscreenModelMediaElement.mm:
(WebVideoFullscreenModelMediaElement::setVideoFullscreenLayer): Apply frame, because it may have been set before the layer.

Source/WebKit/mac:
Parenting in the view instead of the window gives the fullscreen implementation more latitude
in how it implements the animation.

* WebView/WebView.mm:
(-[WebView _enterFullscreenForNode:]): Use view instead of window.

Source/WebKit2:
Parenting in the view instead of the window gives the fullscreen implementation more latitude
in how it implements the animation.

* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Use view instead of window.
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::clientRectForNode): Use client rect instead of screen rect.
(WebKit::WebVideoFullscreenManager::enterFullscreenForNode): ditto
(WebKit::WebVideoFullscreenManager::exitFullscreenForNode): ditto
(WebKit::screenRectForNode): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171973 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoUpdate the SearchFieldResultsButtonElement shadow Pseudo Id when HTMLInputElement...
benjamin@webkit.org [Sat, 2 Aug 2014 20:51:12 +0000 (20:51 +0000)]
Update the SearchFieldResultsButtonElement shadow Pseudo Id when HTMLInputElement's maxResults change
https://bugs.webkit.org/show_bug.cgi?id=135491

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-08-02
Reviewed by Ryosuke Niwa.

Replace the shadowPseudoId() override + manual style invalidation by the generic pseudo ID update.

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::parseAttribute):
* html/InputType.cpp:
(WebCore::InputType::maxResultsAttributeChanged):
* html/InputType.h:
* html/SearchInputType.cpp:
(WebCore::SearchInputType::SearchInputType):
(WebCore::updateResultButtonPseudoType):
(WebCore::SearchInputType::maxResultsAttributeChanged):
(WebCore::SearchInputType::createShadowSubtree):
(WebCore::SearchInputType::destroyShadowSubtree):
* html/SearchInputType.h:
* html/shadow/TextControlInnerElements.cpp:
(WebCore::SearchFieldResultsButtonElement::shadowPseudoId): Deleted.
* html/shadow/TextControlInnerElements.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171972 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoAdd warnings for the buggy implementations of shadowPseudoId()
benjamin@webkit.org [Sat, 2 Aug 2014 20:47:53 +0000 (20:47 +0000)]
Add warnings for the buggy implementations of shadowPseudoId()
https://bugs.webkit.org/show_bug.cgi?id=135477

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-08-02
Reviewed by Ryosuke Niwa.

Dean is going to look into fixing media element styling.
In the meantime, add warnings to prevent this from spreading.

* dom/Element.h:
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::shadowPseudoId):
(WebCore::SliderContainerElement::shadowPseudoId):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171971 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[Win] Unreviewed build fix.
bfulgham@apple.com [Sat, 2 Aug 2014 18:35:57 +0000 (18:35 +0000)]
[Win] Unreviewed build fix.

* src/libGLESv2/renderer/d3d11/BufferStorage11.cpp:
(rx::BufferStorage11::copyData): Help compiler make
decision about types.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171970 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agobuild-webkittestrunner doesn't build the app target for iOS SDKs
dfarler@apple.com [Sat, 2 Aug 2014 18:04:48 +0000 (18:04 +0000)]
build-webkittestrunner doesn't build the app target for iOS SDKs
https://bugs.webkit.org/show_bug.cgi?id=135433

Reviewed by Dan Bernstein.

* Scripts/build-dumprendertree: Build the app target on iOS.
* Scripts/build-webkittestrunner: Build the app target on iOS.
* Scripts/webkitdirs.pm: Add -sdk flags when building for iOS.
(buildXCodeProject):
* Scripts/webkitpy/port/ios.py: Use --sdk flags instead of SDKROOT.
(IOSSimulatorPort._build_driver_flags):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171969 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoRemove iOS Perl DumpRenderTree support target
dfarler@apple.com [Sat, 2 Aug 2014 18:03:19 +0000 (18:03 +0000)]
Remove iOS Perl DumpRenderTree support target
https://bugs.webkit.org/show_bug.cgi?id=135271

Reviewed by Dan Bernstein.

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Remove the target.
* DumpRenderTree/ios/PerlSupport/DumpRenderTreeSupport.c: Removed.
* DumpRenderTree/ios/PerlSupport/DumpRenderTreeSupportPregenerated.pm: Removed.
* DumpRenderTree/ios/PerlSupport/DumpRenderTreeSupport_wrapPregenerated.c: Removed.
* DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/Changes: Removed.
* DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/IPhoneSimulatorNotification.xs: Removed.
* DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/MANIFEST: Removed.
* DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/Makefile.PL: Removed.
* DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/README: Removed.
* DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/lib/IPhoneSimulatorNotification.pm: Removed.
* DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/ppport.h: Removed.
* DumpRenderTree/ios/PerlSupport/IPhoneSimulatorNotification/t/IPhoneSimulatorNotification.t: Removed.
* DumpRenderTree/ios/PerlSupport/Makefile: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171968 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoRemove old-run-webkit-tests
dfarler@apple.com [Sat, 2 Aug 2014 18:01:29 +0000 (18:01 +0000)]
Remove old-run-webkit-tests
https://bugs.webkit.org/show_bug.cgi?id=135374

Reviewed by Csaba Osztrogonác.

* Scripts/old-run-webkit-tests: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171967 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoprepare-ChangeLog --no-write shouldn’t require ChangeLog to exist
mitz@apple.com [Sat, 2 Aug 2014 17:34:34 +0000 (17:34 +0000)]
prepare-ChangeLog --no-write shouldn’t require ChangeLog to exist
https://bugs.webkit.org/show_bug.cgi?id=135542

Reviewed by Tim Horton.

* Scripts/prepare-ChangeLog:
(main): Pass $writeChangeLogs for the new requireChangeLogToExist parameter of
findChangeLogs.
(findChangeLogs): Don’t require a ChangeLog file to exist if unless the
requireChangeLogToExist argument is true.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171966 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago<rdar://problem/17891752> [iOS] WebKit links against libraries it doesn’t use
mitz@apple.com [Sat, 2 Aug 2014 06:06:53 +0000 (06:06 +0000)]
<rdar://problem/17891752> [iOS] WebKit links against libraries it doesn’t use
https://bugs.webkit.org/show_bug.cgi?id=135536

Reviewed by Tim Horton.

Source/WebKit/mac:
* Configurations/WebKitLegacy.xcconfig: Removed -framework MobileAsset from
OTHER_LDFLAGS_iphoneos.

Source/WebKit2:
* Configurations/WebKit.xcconfig: Removed -lassertion_extension and -framework MobileAsset
from FRAMEWORK_AND_LIBRARY_LDFLAGS_iphonesimulator.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171965 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoUnreviewed, rolling out r171957.
commit-queue@webkit.org [Sat, 2 Aug 2014 05:10:46 +0000 (05:10 +0000)]
Unreviewed, rolling out r171957.
https://bugs.webkit.org/show_bug.cgi?id=135538

Caused GTK assertions and test failures (Requested by smfr on
#webkit).

Reverted changeset:

"Clean up image subsampling code, make it less iOS-specific"
https://bugs.webkit.org/show_bug.cgi?id=134916
http://trac.webkit.org/changeset/171957

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171964 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[GTK] Unreviewed GTK gardening.
clopez@igalia.com [Sat, 2 Aug 2014 04:00:18 +0000 (04:00 +0000)]
[GTK] Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Report and mark new failures and flaky tests after 171341, r171591, r171567 and others.
* platform/gtk/fast/css/viewport-units-dynamic-expected.txt: Added. Rebaseline after r171567.
* platform/gtk/fast/multicol/pagination/RightToLeft-max-width-expected.txt: Added. Rebaseline after r171609.
* platform/gtk/svg/zoom/page/zoom-foreignObject-expected.txt: Rebaseline after 171341.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171963 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[CMake] Allow CMake to find GLib on FreeBSD
commit-queue@webkit.org [Sat, 2 Aug 2014 00:46:22 +0000 (00:46 +0000)]
[CMake] Allow CMake to find GLib on FreeBSD
https://bugs.webkit.org/show_bug.cgi?id=132530

Patch by Myles C. Maxfield <litherum@gmail.com> on 2014-08-01
Reviewed by Gustavo Noronha Silva.

On FreeBSD, glibconfig.h is at /usr/local/include/glib-2.0/glibconfig.h.

* Source/cmake/FindGLIB.cmake:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171962 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoREGRESSION(r171942): [CMAKE] [GTK] build broken (clean build).
clopez@igalia.com [Sat, 2 Aug 2014 00:10:11 +0000 (00:10 +0000)]
REGRESSION(r171942): [CMAKE] [GTK] build broken (clean build).
https://bugs.webkit.org/show_bug.cgi?id=135522

Reviewed by Martin Robinson.

Source/JavaScriptCore:
* CMakeLists.txt: Output the inspector headers inside inspector
subdirectory.

Source/WebCore:
No new tests required, no new functionality.

* CMakeLists.txt: Add missing include to the inspector headers
and fix the path to InspectorJSTypeBuilders.h

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171961 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoFix resource leak in FillLayersPropertyWrapper object member
simon.fraser@apple.com [Sat, 2 Aug 2014 00:00:19 +0000 (00:00 +0000)]
Fix resource leak in FillLayersPropertyWrapper object member
https://bugs.webkit.org/show_bug.cgi?id=135462

Reviewed by Andreas Kling.

Fix leak of m_fillLayerPropertyWrapper by using unique_ptr<>.
Based on patch by Przemyslaw Kuczynski.

* page/animation/CSSPropertyAnimation.cpp:
(WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171960 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[iOS WK2] Add extension read permission to network sandbox profile
joepeck@webkit.org [Fri, 1 Aug 2014 23:57:12 +0000 (23:57 +0000)]
[iOS WK2] Add extension read permission to network sandbox profile
<rdar://problem/17671574>

Reviewed by Alexey Proskuryakov and Oliver Hunt.

* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171959 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoUnreviewed post-review test fixup
mmaxfield@apple.com [Fri, 1 Aug 2014 23:55:40 +0000 (23:55 +0000)]
Unreviewed post-review test fixup

* editing/pasteboard/img-srcset-copy-paste-canonicalization.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171958 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoClean up image subsampling code, make it less iOS-specific
simon.fraser@apple.com [Fri, 1 Aug 2014 23:22:44 +0000 (23:22 +0000)]
Clean up image subsampling code, make it less iOS-specific
https://bugs.webkit.org/show_bug.cgi?id=134916

Reviewed by Dean Jackson.

Compile the image subsampling code on both Mac and iOS, and make it more platform
neutral in general. Add a setting to allow it to be enabled on Mac for testing.

The most significant changes are in ImageSourceCG and BitmapImageCG. CG's ImageSource
is no longer stateful with respect to subsampling; its functions take a SubsamplingLevel
when appropriate. CG's BitmapImage now determines which level of subsampling to use
for a given frame, storing the subsampling level in the frame data. It can replace
an aggressively subsampled frame with a less subsampled frame if necessary.

To reduce the chances of subsampling affecting rendering, BitmapImage::size() now
always returns the non-subsampled size; subsampling is strictly internal to BitmapImage.
BitmapImage::draw() takes care of scaling the srcRect for subsampled images.

iOS had a code path that enabled caching of frame metadata in BitmapImage without
actually decoding the frame; make this cross-platform.

* WebCore.exp.in: Changed signature for GraphicsContext::drawNativeImage().
* WebCore.xcodeproj/project.pbxproj: Added ImageSource.cpp, which is not built
for Cocoa but useful for reference.
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::imageSizeForRenderer): Remove iOS-specific subsampling code.
(WebCore::CachedImage::createImage): Call setAllowSubsampling() on the image if we
can get to Settings (m_loader is null for image documents).
(WebCore::CachedImage::currentFrameKnownToBeOpaque): This forced decode always
caused creation of the non-subsampled image, so remove it. There's no reason to
eagerly decode the frame here.
* loader/cache/CachedImage.h: Fix comment.
* page/Settings.cpp: Add defaultImageSubsamplingEnabled, true for iOS and false for Mac.
* page/Settings.in: Added imageSubsamplingEnabled.
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::BitmapImage): Init some more things. Default m_allowSubsampling to
true for iOS to catch images created in code paths where we can't get to Settings.
(WebCore::BitmapImage::haveFrameAtIndex): Handy helper.
(WebCore::BitmapImage::cacheFrame): Now takes the subsampling level and whether to cache
just metadata, or also the frame.
(WebCore::BitmapImage::didDecodeProperties): No need to store originalSize.
(WebCore::BitmapImage::updateSize): When we get the size for the first time, call
determineMinimumSubsamplingLevel() to choose a reasonable subsampling level which takes
platform-specific limits into account.
(WebCore::BitmapImage::dataChanged): Comment.
(WebCore::BitmapImage::ensureFrameIsCached): Take ImageFrameCaching into account.
(WebCore::BitmapImage::frameAtIndex): Choose a subsampling level given the scale,
then determine if we can use the currently cached frame, or whether we should resample.
(WebCore::BitmapImage::frameIsCompleteAtIndex): Caching m_isComplete is now done when caching
frame metadata.
(WebCore::BitmapImage::frameDurationAtIndex):
(WebCore::BitmapImage::frameHasAlphaAtIndex): The 'true' return is the safe return value.
(WebCore::BitmapImage::frameOrientationAtIndex): Caching m_orientation is now done when caching
frame metadata.
(WebCore::BitmapImage::cacheFrameInfo): Deleted.
(WebCore::BitmapImage::originalSize): Deleted.
(WebCore::BitmapImage::originalSizeRespectingOrientation): Deleted.
(WebCore::BitmapImage::currentFrameSize): Deleted.
(WebCore::BitmapImage::ensureFrameInfoIsCached): Deleted.
* platform/graphics/BitmapImage.h:
(WebCore::FrameData::FrameData):
* platform/graphics/GraphicsContext.h: No need to pass a scale param now.
* platform/graphics/ImageSource.cpp: Non-Cocoa changes.
(WebCore::ImageSource::subsamplingLevelForScale):
(WebCore::ImageSource::allowSubsamplingOfFrameAtIndex):
(WebCore::ImageSource::size):
(WebCore::ImageSource::frameSizeAtIndex):
(WebCore::ImageSource::createFrameAtIndex):
(WebCore::ImageSource::frameBytesAtIndex):
* platform/graphics/ImageSource.h: No longer stores subsampling state.
(WebCore::ImageSource::isSubsampled): Deleted.
* platform/graphics/cairo/BitmapImageCairo.cpp:
(WebCore::BitmapImage::determineMinimumSubsamplingLevel):
* platform/graphics/cg/BitmapImageCG.cpp:
(WebCore::FrameData::clear):
(WebCore::BitmapImage::BitmapImage): Init more members.
(WebCore::BitmapImage::determineMinimumSubsamplingLevel): Choose a minimum subsampling
level for the platform (subsample until the image area falls under a threshold).
(WebCore::BitmapImage::checkForSolidColor): Don't bother decoding frames if the image
is not 1x1. Also take care not to decode a non-subsampled image.
(WebCore::BitmapImage::draw): The actual bug fix is here; remove logic that
computed srcRectForCurrentFrame from m_size and m_originalSize; for some callers
srcRect was computed using the pre-subsampled size, and for others it was the subsampled size.
Instead, scale srcRect by mapping between the non-subsampled size, and the size of the CGImageRef
which is affected by subsampling.
(WebCore::BitmapImage::copyUnscaledFrameAtIndex):
* platform/graphics/cg/GraphicsContext3DCG.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage): Remove #ifdeffed code.
(WebCore::GraphicsContext3D::paintToCanvas):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawNativeImage): No more weird scaling!
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::draw):
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::ImageSource):
(WebCore::createImageSourceOptions): Helper that always returns a new CFDictionaryRef.
(WebCore::imageSourceOptions): If not subsampling, return the cached CFDictionaryRef, otherwise
make a new options dict and return it.
(WebCore::ImageSource::subsamplingLevelForScale): Helper that returns a subsampling level
between 0 and 3 given a scale.
(WebCore::ImageSource::isSizeAvailable): SkipMetadata is a default value for the param now.
(WebCore::ImageSource::allowSubsamplingOfFrameAtIndex): We turn off subsampling for progressive
JPEGs because of a bug, so need this to know if a frame should be subsampled.
(WebCore::ImageSource::frameSizeAtIndex): The looping to find a subsampling level is now in BitmapImageCG.
(WebCore::ImageSource::orientationAtIndex):
(WebCore::ImageSource::size): Always use a subsampling level of 0 for size().
(WebCore::ImageSource::getHotSpot):
(WebCore::ImageSource::repetitionCount):
(WebCore::ImageSource::createFrameAtIndex): The caller mapped a scale to a level.
(WebCore::ImageSource::frameDurationAtIndex):
(WebCore::ImageSource::frameBytesAtIndex):
(WebCore::ImageSource::imageSourceOptions): Deleted.
(WebCore::ImageSource::originalSize): Deleted.
* platform/graphics/mac/ImageMac.mm:
(WebCore::BitmapImage::invalidatePlatformData): 0 -> nullptr
* platform/graphics/wince/ImageWinCE.cpp:
(WebCore::BitmapImage::determineMinimumSubsamplingLevel):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171957 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoMany DOM objects have InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero...
akling@apple.com [Fri, 1 Aug 2014 23:20:45 +0000 (23:20 +0000)]
Many DOM objects have InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero for no reason.
<https://webkit.org/b/135519>

Don't set this structure flag unless the object actually has an override
for getOwnPropertySlotByIndex().

Reviewed by Geoffrey Garen.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
* bindings/scripts/test/JS/JSTestException.h:
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestTypedefs.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171956 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoSVG Font kerning can take an early out if the font has no kerning information
mmaxfield@apple.com [Fri, 1 Aug 2014 23:14:30 +0000 (23:14 +0000)]
SVG Font kerning can take an early out if the font has no kerning information
https://bugs.webkit.org/show_bug.cgi?id=135524

Reviewed by Dean Jackson.

Rather than calling SVGFontElement::horizontalKerningForPairOfStringsAndGlyphs() again
and again, skip the iteration entirely if every call would return 0.

No new tests because there is no behavior change.

* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::SVGTextRunRenderingContext::applySVGKerning):
* svg/SVGFontElement.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171955 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agocommit-log-editor uses a non-standard message format when git index contains no Chang...
mitz@apple.com [Fri, 1 Aug 2014 23:10:50 +0000 (23:10 +0000)]
commit-log-editor uses a non-standard message format when git index contains no ChangeLog changes
https://bugs.webkit.org/show_bug.cgi?id=135527

Reviewed by Tim Horton.

* Scripts/commit-log-editor:
In the case of a git repository when there are no changed ChangeLog files, changed to pass
the --delimiters option to prepare-ChangeLog, then process each entry in the output using
commitMessageFromChangeLogEntry.
(commitMessageFromChangeLogEntry): Factored out from createCommitMessage.
(sortKey): Factored out from createCommitMessage.
(createCommitMessage): Changed to use new sortKey and commitMessageFromChangeLogEntry
subroutines.

* Scripts/prepare-ChangeLog:
(main): Parse new --delimiters option.
(generateNewChangeLogs): When --no-write and --delimiters are both specified, always print
the label before each change log entry, and a "~" delimiter on a new line after each entry.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171954 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoAdd some structure related assertions.
mark.lam@apple.com [Fri, 1 Aug 2014 22:49:51 +0000 (22:49 +0000)]
Add some structure related assertions.
<https://webkit.org/b/135523>

Reviewed by Geoffrey Garen.

Adding 2 assertions:
1. assert that we don't index pass the end of the StructureIDTable.
   This should never happen, but this assertion will help catch bugs
   where a bad structureID gets passed in.
2. assert that cells in MarkedBlock::callDestructor() that are not
   zapped should have a non-null StructureID.  This will help us catch
   bugs where the other cell header flag bits get set after the cell is
   zapped, thereby making the cell look like an unzapped cell but has a
   null structureID.

* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::callDestructor):
* runtime/StructureIDTable.h:
(JSC::StructureIDTable::get):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171953 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoInspector highlights clipped at the bottom on the page in WK1 views with
bdakin@apple.com [Fri, 1 Aug 2014 22:47:57 +0000 (22:47 +0000)]
Inspector highlights clipped at the bottom on the page in WK1 views with
contentInsets
https://bugs.webkit.org/show_bug.cgi?id=135480
-and corresponding-
<rdar://problem/17850323>

Forgot to commit this one very critical part with
http://trac.webkit.org/changeset/171951

* platform/ScrollView.cpp:
(WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171952 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoInspector highlights clipped at the bottom on the page in WK1 views with
bdakin@apple.com [Fri, 1 Aug 2014 22:39:52 +0000 (22:39 +0000)]
Inspector highlights clipped at the bottom on the page in WK1 views with
contentInsets
https://bugs.webkit.org/show_bug.cgi?id=135480
-and corresponding-
<rdar://problem/17850323>

Reviewed by Simon Fraser.

unscaledTotalVisibleContentSize() was the main function on Mac that was expected
to return the rect representing ALL visible content, including content that might
be in an inset area and obscured by UI elements. This patch re-names that function
to unscaledVisibleContentSizeIncludingObscuredArea(), and that patch makes that
function return the right thing in the platformWidget() case.

Re-name.
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::update):

Return platformVisibleContentSizeIncludingObscuredArea() for the platformWidget()
case and re-name.
* platform/ScrollView.cpp:
(WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea):

This was just wrong. It was returning the big rectangle instead of the small one
for platformWidget().
(WebCore::ScrollView::unscaledUnobscuredVisibleContentSize):

New platform functions.
(WebCore::ScrollView::platformVisibleContentRectIncludingObscuredArea):
(WebCore::ScrollView::platformVisibleContentSizeIncludingObscuredArea):
(WebCore::ScrollView::unscaledTotalVisibleContentSize): Deleted.
* platform/ScrollView.h:
* platform/ios/ScrollViewIOS.mm:
(WebCore::ScrollView::platformVisibleContentRectIncludingObscuredArea):
(WebCore::ScrollView::platformVisibleContentSizeIncludingObscuredArea):
* platform/mac/ScrollViewMac.mm:
(WebCore::ScrollView::platformVisibleContentRect):
(WebCore::ScrollView::platformVisibleContentSize):
(WebCore::ScrollView::platformVisibleContentRectIncludingObscuredArea):
(WebCore::ScrollView::platformVisibleContentSizeIncludingObscuredArea):

Re-name.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::RenderLayerCompositor::frameViewDidChangeSize):
(WebCore::RenderLayerCompositor::updateRootLayerPosition):
(WebCore::RenderLayerCompositor::ensureRootLayer):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171951 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoSVGGlyph wastes space due to padding
mmaxfield@apple.com [Fri, 1 Aug 2014 22:33:50 +0000 (22:33 +0000)]
SVGGlyph wastes space due to padding
https://bugs.webkit.org/show_bug.cgi?id=135520

Reviewed by Dean Jackson.

Rearrange members in SVGGlyph so there is no wasted padding space.

No new tests because there is no behavior change.

* platform/graphics/SVGGlyph.h:
(WebCore::SVGGlyph::SVGGlyph):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171950 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoURTBF after r171946 to fix non-Apple builds.
ossy@webkit.org [Fri, 1 Aug 2014 20:58:19 +0000 (20:58 +0000)]
URTBF after r171946 to fix non-Apple builds.

* bytecode/InlineCallFrameSet.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171949 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoREGRESSION (r171891): platform/mac/fast/scrolling/scroll-select-bottom-test.html
bdakin@apple.com [Fri, 1 Aug 2014 20:46:28 +0000 (20:46 +0000)]
REGRESSION (r171891): platform/mac/fast/scrolling/scroll-select-bottom-test.html
failing
https://bugs.webkit.org/show_bug.cgi?id=135485

Now that WK1 really tests contentInset, this test no longer works on platforms
that do not support the real contentInset
* platform/mac-wk1/TestExpectations:
* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171948 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[Feature Queries] Enable Feature Queries on EFL/GTK
betravis@adobe.com [Fri, 1 Aug 2014 20:43:56 +0000 (20:43 +0000)]
[Feature Queries] Enable Feature Queries on EFL/GTK
https://bugs.webkit.org/show_bug.cgi?id=134902

Reviewed by Benjamin Poulain.

.:
Enable CSS Feature Queries by default on the EFL and GTK
platforms.

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsGTK.cmake:

Tools:
Turn the feature on by default for the build script.

* Scripts/webkitperl/FeatureList.pm:

LayoutTests:
Resume running the CSS Feature Query tests on the EFL and GTK platforms.

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171947 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoCodeBlock fails to visit the Executables of its InlineCallFrames
ggaren@apple.com [Fri, 1 Aug 2014 20:17:25 +0000 (20:17 +0000)]
CodeBlock fails to visit the Executables of its InlineCallFrames
https://bugs.webkit.org/show_bug.cgi?id=135471

Patch by Mark Hahnenberg <mhahnenberg@apple.com> on 2014-08-01
Reviewed by Geoffrey Garen.

CodeBlock needs to visit its InlineCallFrames' owner Executables. If it doesn't, they
can be prematurely collected and cause crashes.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::stronglyVisitStrongReferences):
* bytecode/CodeOrigin.h:
(JSC::InlineCallFrame::visitAggregate):
* bytecode/InlineCallFrameSet.cpp:
(JSC::InlineCallFrameSet::visitAggregate):
* bytecode/InlineCallFrameSet.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171946 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoBuild fix for 32-bit after r171926.
timothy_horton@apple.com [Fri, 1 Aug 2014 20:01:15 +0000 (20:01 +0000)]
Build fix for 32-bit after r171926.

* MiniBrowser/mac/SettingsController.h:
* MiniBrowser/mac/SettingsController.m:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171945 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[Media iOS] Ensure there is a nice default fallback for missing wireless target names
dino@apple.com [Fri, 1 Aug 2014 19:42:06 +0000 (19:42 +0000)]
[Media iOS] Ensure there is a nice default fallback for missing wireless target names
https://bugs.webkit.org/show_bug.cgi?id=135488
<rdar://problem/17879156>

Reviewed by Eric Carlson.

We occasionally run into cases where this.host.externalDeviceDisplayName
is empty or null, creating a pretty ugly/confusing string in the
wireless playback status screen.

If this happens, we should default to using "Apple TV".

* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.updateWirelessPlaybackStatus): Check if the externalDeviceDisplayName
is empty or null, and fall back to "Apple TV" if so.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171944 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoVarious frameworks may want to use the container temp directory, so our current restr...
oliver@apple.com [Fri, 1 Aug 2014 19:19:22 +0000 (19:19 +0000)]
Various frameworks may want to use the container temp directory, so our current restrictions are too tight
https://bugs.webkit.org/show_bug.cgi?id=135518
<rdar://17869279>

Reviewed by Anders Carlsson.

We don't (and can't) have complete knowledge of what different frameworks
will want to use the container temporary directory for, and so our
current attempt to heavily restrict access is simply too tight.

This patch recognises this by simply giving read-write access to the
entire NSTemporary() directory (e.g. $container/tmp in the general case),
rather than the single sub directory we wishfully thought that we would
be able to get away with.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess):
(WebKit::WebContext::mediaCacheDirectory): Deleted.
* UIProcess/WebContext.h:
* UIProcess/efl/WebContextEfl.cpp:
(WebKit::WebContext::containerTemporaryDirectory):
(WebKit::WebContext::platformMediaCacheDirectory): Deleted.
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::containerTemporaryDirectory):
(WebKit::WebContext::platformMediaCacheDirectory): Deleted.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::containerTemporaryDirectory):
(WebKit::WebContext::platformMediaCacheDirectory): Deleted.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171943 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoProgress towards cmake on Windows.
achristensen@apple.com [Fri, 1 Aug 2014 19:19:14 +0000 (19:19 +0000)]
Progress towards cmake on Windows.
https://bugs.webkit.org/show_bug.cgi?id=135484

Reviewed by Martin Robinson.

.:
* CMakeLists.txt:
Added Mac to list of ports, even though it is not done yet.
Changed minimum bison version to version installed on Macs.
* Source/cmake/OptionsAppleWin.cmake:
Added some definitions.
* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsGTK.cmake:
Set WTF_LIBRARY_TYPE to STATIC to not change WTF linking on EFL or GTK ports.
* Source/cmake/OptionsMac.cmake: Added blank for now.
* Source/cmake/OptionsWinCairo.cmake:
* Source/cmake/OptionsWindows.cmake:
Added some definitions.
Removed /WX (warnings treated as error while compiling).
Copied warnings to ignore from WebKitLibraries/win/tools/vsprops/common.props.

Source/JavaScriptCore:
* CMakeLists.txt:
Generate code directly to inspector directory to avoid using the cp command
which is not available on Windows.
* PlatformWin.cmake: Added.

Source/WTF:
* wtf/CMakeLists.txt:
Added WTF_LIBRARY_TYPE because Windows needs WTF to be a shared library.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171942 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoURLs in srcset attributes are not made absolute upon copy and paste
mmaxfield@apple.com [Fri, 1 Aug 2014 19:08:59 +0000 (19:08 +0000)]
URLs in srcset attributes are not made absolute upon copy and paste
https://bugs.webkit.org/show_bug.cgi?id=135448

Reviewed by Ryosuke Niwa.

Source/WebCore:
When pasting, canonicalize URLs in srcset the same way we do with src.

Test: editing/pasteboard/img-srcset-copy-paste-canonicalization.html

* dom/Element.cpp:
(WebCore::Element::completeURLsInAttributeValue): Initial implemention, moved from markup.cpp.
* dom/Element.h:
(WebCore::Element::attributeContainsURL): New function for completeURLs to call.
(WebCore::Element::completeURLsInAttributeValue): Only called if attributeContainsURL returns
true. Default implementation simply calls isURLAttribute().
* editing/markup.cpp:
(WebCore::completeURLs): Call attributeContainsURL() and completeURLsInAttributeValue() to
complete the URL, so nodes can perform their own behavior.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::attributeContainsURL): Return true for srcset.
(WebCore::HTMLImageElement::completeUrlAttributeValue): Use our existing srcset parser to
parse the srcset attribute, then use its output to canonicalize URLs, and build it back up
into a string.
* html/HTMLImageElement.h:
(WebCore::HTMLImageElement::attributeContainsURL):
(WebCore::HTMLImageElement::completeUrlAttributeValue):
* html/parser/HTMLSrcsetParser.cpp: Make parseImageCandidatesFromSrcsetAttribute() public
and change its signature to return its result.
(WebCore::parseImageCandidatesFromSrcsetAttribute):
* html/parser/HTMLSrcsetParser.h: Ditto.

LayoutTests:
Copy and paste a srcset image with relative URLs, and make sure that the
pasted srcset attribute doesn't match what it was before. I can't actually
dump the new srcset because it will include a full path of the file on the
user's system, and would therefore be machine-specific.

* editing/pasteboard/img-srcset-copy-paste-canonicalization-expected.txt:
* editing/pasteboard/img-srcset-copy-paste-canonicalization.html: Paste and check.
* editing/pasteboard/resources/img-srcset-copy-paste-canonicalization-iframe.html:
This has to be an iframe because we don't perform any url canonicalization if we
are copying and pasting from a document into itself.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171941 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoWeb Inspector: Timeline header height doesn't match style updates.
jonowells@apple.com [Fri, 1 Aug 2014 19:06:55 +0000 (19:06 +0000)]
Web Inspector: Timeline header height doesn't match style updates.
https://bugs.webkit.org/show_bug.cgi?id=135516

Reviewed by Timothy Hatcher.

Update the timeline header height to match the updates
to the navigation bars in other panels made in
https://bugs.webkit.org/show_bug.cgi?id=135445. Also
update the shadows on some of the search bars.

* UserInterface/Views/FilterBar.css:
(.filter-bar > input[type="search"]):
(body.mac-platform.legacy .filter-bar > input[type="search"]):
* UserInterface/Views/FindBanner.css:
(.find-banner > input[type="search"]):
(body.mac-platform.legacy .find-banner > input[type="search"]):
* UserInterface/Views/LogContentView.css:
(.search-bar.log-search-bar > input[type="search"]):
(body.mac-platform.legacy .search-bar.log-search-bar > input[type="search"]):
Remove inset shadows on search bars.

* UserInterface/Views/TimelineSidebarPanel.css:
(.sidebar > .panel.navigation.timeline > .status-bar):
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .status-bar):
(.sidebar > .panel.navigation.timeline > .status-bar > .record-glyph):
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .status-bar > .record-glyph):
(.sidebar > .panel.navigation.timeline > .status-bar > .record-status):
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .status-bar > .record-status):
(.sidebar > .panel.navigation.timeline > .title-bar.timelines):
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .title-bar.timelines):
(.sidebar > .panel.navigation.timeline > .title-bar.timeline-events):
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .title-bar.timeline-events):
(.sidebar > .panel.navigation.timeline > .timelines-content):
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .timelines-content):
(.sidebar > .panel.navigation.timeline > .empty-content-placeholder):
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .empty-content-placeholder):
Update the height of the timeline status bar.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171940 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoRemove the JSC::OverridesVisitChildren flag.
akling@apple.com [Fri, 1 Aug 2014 18:57:39 +0000 (18:57 +0000)]
Remove the JSC::OverridesVisitChildren flag.
<https://webkit.org/b/135489>

Source/JavaScriptCore:
Except for 3 special classes, the visitChildren() call is always
dispatched through the method table (see SlotVisitor.cpp.)

The OverridesVisitChildren flag doesn't actually do anything.
It could be used to implement a non-virtual direct call to
JSCell::visitChildren, bypassing the method table for some objects,
but such a micro-optimization seems like a weak trade for all this
code complexity. Instead, just remove the flag.

This change frees up an inline flag bit in JSCell.

Reviewed by Geoffrey Garen.

* API/JSAPIWrapperObject.h:
* API/JSAPIWrapperObject.mm:
(JSC::JSAPIWrapperObject::visitChildren):
* API/JSCallbackObject.h:
(JSC::JSCallbackObject::visitChildren):
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedFunctionExecutable::visitChildren):
(JSC::UnlinkedCodeBlock::visitChildren):
(JSC::UnlinkedProgramCodeBlock::visitChildren):
* bytecode/UnlinkedCodeBlock.h:
* debugger/DebuggerScope.cpp:
(JSC::DebuggerScope::visitChildren):
* debugger/DebuggerScope.h:
* jsc.cpp:
* runtime/Arguments.cpp:
(JSC::Arguments::visitChildren):
* runtime/Arguments.h:
* runtime/Executable.cpp:
(JSC::EvalExecutable::visitChildren):
(JSC::ProgramExecutable::visitChildren):
(JSC::FunctionExecutable::visitChildren):
* runtime/Executable.h:
* runtime/GetterSetter.cpp:
(JSC::GetterSetter::visitChildren):
* runtime/GetterSetter.h:
(JSC::GetterSetter::createStructure):
* runtime/JSAPIValueWrapper.h:
(JSC::JSAPIValueWrapper::createStructure):
* runtime/JSActivation.cpp:
(JSC::JSActivation::visitChildren):
* runtime/JSActivation.h:
* runtime/JSArrayIterator.cpp:
(JSC::JSArrayIterator::visitChildren):
* runtime/JSArrayIterator.h:
* runtime/JSBoundFunction.cpp:
(JSC::JSBoundFunction::visitChildren):
* runtime/JSBoundFunction.h:
* runtime/JSCellInlines.h:
(JSC::JSCell::setStructure):
* runtime/JSFunction.cpp:
(JSC::JSFunction::visitChildren):
* runtime/JSFunction.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
* runtime/JSMap.h:
* runtime/JSMapIterator.cpp:
(JSC::JSMapIterator::visitChildren):
* runtime/JSMapIterator.h:
* runtime/JSNameScope.cpp:
(JSC::JSNameScope::visitChildren):
* runtime/JSNameScope.h:
* runtime/JSPromise.cpp:
(JSC::JSPromise::visitChildren):
* runtime/JSPromise.h:
* runtime/JSPromiseDeferred.cpp:
(JSC::JSPromiseDeferred::visitChildren):
* runtime/JSPromiseDeferred.h:
* runtime/JSPromiseReaction.cpp:
(JSC::JSPromiseReaction::visitChildren):
* runtime/JSPromiseReaction.h:
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::visitChildren):
* runtime/JSPropertyNameIterator.h:
* runtime/JSProxy.cpp:
(JSC::JSProxy::visitChildren):
* runtime/JSProxy.h:
* runtime/JSScope.cpp:
(JSC::JSScope::visitChildren):
* runtime/JSScope.h:
* runtime/JSSegmentedVariableObject.cpp:
(JSC::JSSegmentedVariableObject::visitChildren):
* runtime/JSSegmentedVariableObject.h:
* runtime/JSSet.h:
* runtime/JSSetIterator.cpp:
(JSC::JSSetIterator::visitChildren):
* runtime/JSSetIterator.h:
* runtime/JSSymbolTableObject.cpp:
(JSC::JSSymbolTableObject::visitChildren):
* runtime/JSSymbolTableObject.h:
* runtime/JSTypeInfo.h:
(JSC::TypeInfo::overridesVisitChildren): Deleted.
* runtime/JSWeakMap.h:
* runtime/JSWithScope.cpp:
(JSC::JSWithScope::visitChildren):
* runtime/JSWithScope.h:
* runtime/JSWrapperObject.cpp:
(JSC::JSWrapperObject::visitChildren):
* runtime/JSWrapperObject.h:
* runtime/MapData.h:
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::visitChildren):
* runtime/NativeErrorConstructor.h:
* runtime/PropertyMapHashTable.h:
* runtime/PropertyTable.cpp:
(JSC::PropertyTable::visitChildren):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::visitChildren):
* runtime/RegExpConstructor.h:
* runtime/RegExpMatchesArray.cpp:
(JSC::RegExpMatchesArray::visitChildren):
* runtime/RegExpMatchesArray.h:
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::visitChildren):
* runtime/RegExpObject.h:
* runtime/SparseArrayValueMap.h:
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::visitChildren):
* runtime/StructureChain.cpp:
(JSC::StructureChain::visitChildren):
* runtime/StructureChain.h:
* runtime/StructureRareData.cpp:
(JSC::StructureRareData::visitChildren):
* runtime/StructureRareData.h:
* runtime/WeakMapData.h:

Source/WebCore:
Tweak the bindings code generator to stop spitting out the flag.

Reviewed by Geoffrey Garen.

* bindings/js/JSDOMBinding.h:
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::visitChildren):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171939 268f45cc-cd09-0410-ab3c-d52691b4dbfc