WebKit-https.git
5 years agoFix internal build configuration issues
jacob_nielsen@apple.com [Tue, 12 May 2015 01:54:51 +0000 (01:54 +0000)]
Fix internal build configuration issues
https://bugs.webkit.org/show_bug.cgi?id=144762

Reviewed by Darin Adler.

Modifies TestWebKitAPI and WebKitTestRunner's xcconfig files to use SDK selectors.

* TestWebKitAPI/Configurations/Base.xcconfig:
* TestWebKitAPI/Configurations/DebugRelease.xcconfig:
* TestWebKitAPI/Configurations/InjectedBundle.xcconfig:
* TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
* WebKitTestRunner/Configurations/DebugRelease.xcconfig:
* WebKitTestRunner/Configurations/InjectedBundle.xcconfig:
* WebKitTestRunner/Configurations/WebKitTestRunner.xcconfig:

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

5 years ago[Mac] Update device picker icon when video tracks change
eric.carlson@apple.com [Tue, 12 May 2015 01:13:30 +0000 (01:13 +0000)]
[Mac] Update device picker icon when video tracks change
https://bugs.webkit.org/show_bug.cgi?id=144889
<rdar://problem/20907253>

Reviewed by Brent Fulgham.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.updateHasVideo):

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

5 years agoScroll snap logic should be triggered when resizing the WebView
bfulgham@apple.com [Tue, 12 May 2015 01:12:01 +0000 (01:12 +0000)]
Scroll snap logic should be triggered when resizing the WebView
https://bugs.webkit.org/show_bug.cgi?id=142590
<rdar://problem/20125088>

Reviewed by Simon Fraser.

Source/WebCore:

Tests coming in a second patch.

Resizing of the main frame or overflow regions was properly recalculating the scroll snap points,
but there was no code to honor these values when window resizing was occurring. The correction was
handled in two ways:
1. Scrolling thread operations that moved to new snap points needed to notify the main thread that
   it had shifted to a new snap point, so that the resize code (which happens on the main thread)
   could ensure that we stayed clamped to the correct 'tile' in the snap region.
2. Main thread (overflow) resizes were likewise missing code to honor the current snap position
   after resizing calculations were complete.

This change also required the addition of two indices to the scrollable area to track which scroll
snap point was currently being used. We don't bother with a 'none' case because you cannot have a
'none' state when you have an active set of scroll snap points, and we do not execute this code
if the scroll snap points are null.

The FrameView code was computing updated snap offsets after it had dispatched frame view layout
information to the scrolling thread, which was wrong. This was also corrected.

I think it might be possible to track all of this state inside the ScrollController, but the current
scroll snap architecture destroys and recreates the state each time a new set of interactions starts.
This should be fixed in the future, which would allow us to remove some of this local state.

* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks): Make sure 'updateSnapOffsets' is called prior to
calling 'frameViewLayoutUpdated' so the scrolling thread gets correct updated points. Add a new
call to 'scrollToNearestActiveSnapPoint', which will keep us on our current snap point during
resize (if appropriate).
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::updateScrollSnapOffsetIndices): Added. This finds and notifies
the correct scroll region when a new snap position (index) has been selected by user interaction on
the scrolling thread.
(WebCore::AsyncScrollingCoordinator::deferTestsForReason): Added an assertion for 'isMainThread'.
(WebCore::AsyncScrollingCoordinator::removeTestDeferralForReason): Ditto.
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/AxisScrollSnapOffsets.h:
(WebCore::closestSnapOffset): Modified to also return the selected snap point index so we can track
it to handle resize operations.
* page/scrolling/ScrollingTree.h:
(WebCore::ScrollingTree::updateScrollSnapOffsetIndices):
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::updateScrollSnapOffsetIndices): Added method to dispatch the active
horizontal and vertical scroll snap indices back to the main thread.
* page/scrolling/ThreadedScrollingTree.h:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent): After the scroll controller processes
the current event, notify the main thread of any change in the active scroll snap index.
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::activeScrollSnapOffsetIndexDidChange): Added method to allow ScrollAnimator
clients to find out about the current scroll snap state, which is only known by the ScrollController.
(WebCore::ScrollAnimator::activeScrollSnapOffsetIndexForAxis): Ditto.
* platform/ScrollAnimator.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::scrollToNearestActiveSnapPoint): Added method that allows us to set scroll position
to one of our active scroll snap offsets.
* platform/ScrollView.h:
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::handleWheelEvent): If the active scroll snap offset has changed, make sure we
keep track of the new values for potential resize operations.
(WebCore::ScrollableArea::clearHorizontalSnapOffsets): Make sure to also clear out the current snap index.
(WebCore::ScrollableArea::clearVerticalSnapOffsets): Ditto.
(WebCore::ScrollableArea::nearestActiveSnapPoint): New method that returns an updated IntPoint reflecting
the proper scroll position based on the active scroll snap offset.
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::currentHorizontalSnapPointIndex): Added.
(WebCore::ScrollableArea::setCurrentHorizontalSnapPointIndex): Added.
(WebCore::ScrollableArea::currentVerticalSnapPointIndex): Added.
(WebCore::ScrollableArea::setCurrentVerticalSnapPointIndex): Added.
(WebCore::ScrollableArea::scrollToNearestActiveSnapPoint): Added.
* platform/cocoa/ScrollController.h:
(WebCore::ScrollControllerClient::activeScrollOffsetIndex): Added new method for clients to implement.
(WebCore::ScrollController::activeScrollSnapOffsetIndexDidChange): Added.
(WebCore::ScrollController::setScrollSnapOffsetIndexDidChange): Added.
* platform/cocoa/ScrollController.mm:
(WebCore::ScrollController::activeScrollSnapOffsetIndexForAxis): Helper method to return current active
index (if applicable).
(WebCore::ScrollController::setActiveScrollSnapOffsetIndexForAxis): Helper function to safely set
the current active index.
(WebCore::ScrollController::beginScrollSnapAnimation): Updated to keep track of the new active scroll snap
index, as well as whether the current animation actually changed the active snap point offset.
* platform/cocoa/ScrollSnapAnimatorState.h: Revise to use modern C++ initializers, and to track a new index
that represents the current scroll snap offset.
* platform/cocoa/ScrollSnapAnimatorState.mm:
(WebCore::ScrollSnapAnimatorState::ScrollSnapAnimatorState): Update for modern C++ syntax.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollToNearestActiveSnapPoint): New method to set scroll position to be one of our
active scroll snap points.
(WebCore::RenderLayer::updateScrollInfoAfterLayout): Add a new call to 'scrollToNearestActiveSnapPoint' so that
we stay on the current scroll snap offset during resizing.
* rendering/RenderLayer.h:

Source/WebKit2:

* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling): Modify use of 'closestSnapOffset' to satisfy the additional
argument I added. This is currently not used for anything on iOS.
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: Ditto.

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

5 years agoAddressing post-review comments after r184037.
mmaxfield@apple.com [Tue, 12 May 2015 01:06:59 +0000 (01:06 +0000)]
Addressing post-review comments after r184037.

Unreviewed.

No new tests because there is no behavior change.

* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):

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

5 years ago[Win] Move Windows build target to Windows 7 (or newer)
bfulgham@apple.com [Tue, 12 May 2015 00:58:07 +0000 (00:58 +0000)]
[Win] Move Windows build target to Windows 7 (or newer)
https://bugs.webkit.org/show_bug.cgi?id=144890
<rdar://problem/20707307>

Reviewed by Anders Carlsson.

Update linked SDK and minimal Windows level to be compatible with
Windows 7 or newer.

Source/JavaScriptCore:

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj:
* JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj:
* JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj:
* JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj:
* JavaScriptCore.vcxproj/jsc/jsc.vcxproj:
* JavaScriptCore.vcxproj/jsc/jscLauncher.vcxproj:
* JavaScriptCore.vcxproj/libllvmForJSC/libllvmForJSC.vcxproj:
* JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj:
* JavaScriptCore.vcxproj/testRegExp/testRegExpLauncher.vcxproj:
* JavaScriptCore.vcxproj/testapi/testapi.vcxproj:
* JavaScriptCore.vcxproj/testapi/testapiLauncher.vcxproj:
* config.h:

Source/ThirdParty:

* gtest/msvc/gtest-md.vcxproj:

Source/ThirdParty/ANGLE:

* ANGLE.vcxproj/libEGL.vcxproj:
* ANGLE.vcxproj/libGLESv2.vcxproj:
* ANGLE.vcxproj/preprocessor.vcxproj:
* ANGLE.vcxproj/translator_common.vcxproj:
* ANGLE.vcxproj/translator_glsl.vcxproj:
* ANGLE.vcxproj/translator_hlsl.vcxproj:

Source/WebCore:

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCoreGenerated.vcxproj:
* WebCore.vcxproj/WebCoreTestSupport.vcxproj:
* WebCorePrefix.h:
* config.h:
* testing/js/WebCoreTestSupportPrefix.h:

Source/WebInspectorUI:

* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:

Source/WebKit:

* WebKit.vcxproj/Interfaces/Interfaces.vcxproj:
* WebKit.vcxproj/WebKit/WebKit.vcxproj:
* WebKit.vcxproj/WebKitGUID/WebKitGUID.vcxproj:

Source/WebKit/win:

* WebKitPrefix.h:

Source/WTF:

* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTFGenerated.vcxproj:
* config.h:

Tools:

* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj:
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncher.vcxproj:
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiff.vcxproj:
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncher.vcxproj:
* DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj:
* DumpRenderTree/config.h:
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj:
* WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj:
* WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj:
* WinLauncher/stdafx.h:

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

5 years agoAX: [ATK] Always include rows in the tree of accessible tables
jdiggs@igalia.com [Tue, 12 May 2015 00:09:26 +0000 (00:09 +0000)]
AX: [ATK] Always include rows in the tree of accessible tables
https://bugs.webkit.org/show_bug.cgi?id=144885

Reviewed by Chris Fleizach.

Source/WebCore:

Remove the code that excluded rows from the tree of accessible tables for
Gtk and Efl, the latter of which inherited the exclusion from the former.

No new tests. We already have several tests which cover table hierarchy.
The associated expectations have been updated as part of this fix.

* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::addChildrenFromSection):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetParent):

LayoutTests:

Update the expectations to reflect the rows which are now included in the tree.

* platform/efl/accessibility/table-attributes-expected.txt: Updated.
* platform/efl/accessibility/table-cell-spans-expected.txt: Updated.
* platform/efl/accessibility/table-cells-expected.txt: Updated.
* platform/efl/accessibility/table-sections-expected.txt: Updated.
* platform/gtk/accessibility/table-attributes-expected.txt: Updated.
* platform/gtk/accessibility/table-cell-spans-expected.txt: Updated.
* platform/gtk/accessibility/table-cells-expected.txt: Updated.
* platform/gtk/accessibility/table-sections-expected.txt: Updated.

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

5 years agoUnreviewed, rolling out r184119.
commit-queue@webkit.org [Mon, 11 May 2015 23:41:35 +0000 (23:41 +0000)]
Unreviewed, rolling out r184119.
https://bugs.webkit.org/show_bug.cgi?id=144888

broke JSC tests on Apple Windows bots (Requested by kling on
#webkit).

Reverted changeset:

"Fix run-javascriptcore-tests step on the WinCairo bot"
https://bugs.webkit.org/show_bug.cgi?id=144866
http://trac.webkit.org/changeset/184119

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

5 years agoForce a rebuild of JSNPObject.cpp on bots.
akling@apple.com [Mon, 11 May 2015 23:27:21 +0000 (23:27 +0000)]
Force a rebuild of JSNPObject.cpp on bots.

* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::callMethod):

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

5 years agorun-benchmark should support Dromaeo
rniwa@webkit.org [Mon, 11 May 2015 23:21:43 +0000 (23:21 +0000)]
run-benchmark should support Dromaeo
https://bugs.webkit.org/show_bug.cgi?id=144849

Reviewed by Chris Dumez.

Added the benchmark plans for Dromaeo DOM tests. We only run these tests once since
they can take as much as 15 minutes to run each.

* Scripts/webkitpy/benchmark_runner/data/patches/Dromaeo.patch: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-cssquery.plan: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-dom.plan: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-jslib.plan: Added.

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

5 years agoWeb Inspector: REGRESSION (Tabs): Issues reloading a resource with breakpoints
timothy@apple.com [Mon, 11 May 2015 23:18:14 +0000 (23:18 +0000)]
Web Inspector: REGRESSION (Tabs): Issues reloading a resource with breakpoints
https://bugs.webkit.org/show_bug.cgi?id=144650

Fix a number of issues with Debugger tab and navigation/reloading:
- Close old content views in the Debugger tab when main frame navigates.
- Prune old resource tree elements before attempting to restore a cookie that might match an old resource.
- Allow breakpoint selections to be restored from a saved cookie.
- Fix an assert when closing a content view that isn't the current index, but is the current view.
- Avoid calling closed() multiple times when a ContentView is in the back/forward list more than once.
- Make restoreStateFromCookie properly set and use the causedByNavigation argument for a longer restore delay.
- Create a new cookie object per tab instead of it being cumulative from the previous cookie.

Reviewed by Brian Burg.

* UserInterface/Base/Main.js:
(WebInspector._mainResourceDidChange): Delay calling _restoreCookieForOpenTabs to give time for sidebars
and tabs to respond to the main resource change.
(WebInspector._restoreCookieForOpenTabs): Rename causedByReload to causedByNavigation. Nothing special about
reload since we restore on all navigation.

* UserInterface/Views/ContentView.js:
(WebInspector.ContentView): Support Breakpoint as a represented object, which happens during a cookie restore.
(WebInspector.ContentView.isViewable): Ditto.

* UserInterface/Views/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.closeAllContentViews): Disassociate if the view is current and not just
the current entry index. This matches other close functions. This fixes an assert in _disassociateFromContentView.
(WebInspector.ContentViewContainer.prototype._disassociateFromContentView): Don't disassociate multiple times. This
avoids calling the closed() function on a view more than once.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype.saveStateToCookie):
(WebInspector.DebuggerSidebarPanel.prototype._mainResourceDidChange): Renamed from _mainResourceChanged.
Close all content views if this is the main frame. Also prune all old resources. Doing this now avoids a flash
of having old and new resources in the tree caused by the default delay in NavigationSidebarPanel's _checkForOldResources.

* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel): Set _autoPruneOldTopLevelResourceTreeElements for later.
(WebInspector.NavigationSidebarPanel.prototype.get contentTreeOutlineToAutoPrune): Deleted.
(WebInspector.NavigationSidebarPanel.prototype.showDefaultContentView): Fix typo.
(WebInspector.NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement): Fix whitespace.
(WebInspector.NavigationSidebarPanel.prototype.pruneOldResourceTreeElements): Added. Broken out from
_checkForOldResources.delayedWork so it can be called manually. Also check all visible tree outlines.
(WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged): Pass treeElement in an array.
(WebInspector.NavigationSidebarPanel.prototype._checkForOldResourcesIfNeeded): Added.
(WebInspector.NavigationSidebarPanel.prototype._checkForOldResources): Call pruneOldResourceTreeElements on a delay.
(WebInspector.NavigationSidebarPanel.prototype._checkForOldResources.delayedWork): Deleted.
(WebInspector.NavigationSidebarPanel.prototype._checkOutlinesForPendingViewStateCookie): Call _checkForOldResourcesIfNeeded.
(WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie): Remove array folding code.

* UserInterface/Views/TabContentView.js:
(WebInspector.TabContentView.prototype.restoreStateFromCookie): Rename causedByReload to causedByNavigation.
(WebInspector.TabContentView.prototype.saveStateToCookie): Don't allow the cookie to build on the old cookie.

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

5 years agoUnreviewed build fix. Add "Duration" as a time metric.
rniwa@webkit.org [Mon, 11 May 2015 22:51:37 +0000 (22:51 +0000)]
Unreviewed build fix. Add "Duration" as a time metric.

* public/js/helper-classes.js:
* public/v2/data.js:
(RunsData.unitFromMetricName):

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

5 years agoCPS rethreading phase's flush detector flushes way too many SetLocals
fpizlo@apple.com [Mon, 11 May 2015 22:42:49 +0000 (22:42 +0000)]
CPS rethreading phase's flush detector flushes way too many SetLocals
https://bugs.webkit.org/show_bug.cgi?id=144819

Reviewed by Geoffrey Garen.

After probably unrelated changes, this eventually caused some arguments elimination to stop
working because it would cause more SetLocals to turn into PutStacks. But it was a bug for
a long time. Basically, we don't want the children of a SetLocal to be flushed. Flushing is
meant to only affect the SetLocal itself.

This is a speed-up on Octane/earley.

* dfg/DFGCPSRethreadingPhase.cpp:
(JSC::DFG::CPSRethreadingPhase::computeIsFlushed):

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

5 years agogmail and google maps fail to load with eager compilation: Failed to insert inline...
fpizlo@apple.com [Mon, 11 May 2015 22:41:36 +0000 (22:41 +0000)]
gmail and google maps fail to load with eager compilation: Failed to insert inline cache for varargs call (specifically, CallForwardVarargs) because we thought the size would be 250 but it ended up being 262 prior to compaction.
https://bugs.webkit.org/show_bug.cgi?id=144854

Reviewed by Oliver Hunt.

This is easy: just lift the threshold. Also remove the need for some duplicate thresholds.
It used to be that Construct required less code, but that's not the case for now.

* ftl/FTLInlineCacheSize.cpp:
(JSC::FTL::sizeOfCallForwardVarargs):
(JSC::FTL::sizeOfConstructVarargs):
(JSC::FTL::sizeOfConstructForwardVarargs):

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

5 years agoBuild fix. jetstream has a local copy, not remote archive.
rniwa@webkit.org [Mon, 11 May 2015 22:36:51 +0000 (22:36 +0000)]
Build fix. jetstream has a local copy, not remote archive.

* Scripts/webkitpy/benchmark_runner/data/plans/jetstream.plan:

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

5 years agoSimplify shim path computation
andersca@apple.com [Mon, 11 May 2015 22:31:33 +0000 (22:31 +0000)]
Simplify shim path computation
https://bugs.webkit.org/show_bug.cgi?id=144884
Part of rdar://problem/19708579.

Reviewed by Sam Weinig.

Factor the code that computes the shim path out into a separate function. Also make this mac only
since we don't have any shims on iOS.

* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::computeProcessShimPath):
(WebKit::addDYLDEnvironmentAdditions):

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

5 years agorun-benchmark should support SunSpider, Kraken and Octane
rniwa@webkit.org [Mon, 11 May 2015 21:40:52 +0000 (21:40 +0000)]
run-benchmark should support SunSpider, Kraken and Octane
https://bugs.webkit.org/show_bug.cgi?id=144840

Reviewed by Darin Adler.

Added the support for SunSpider, Kraken, and Octane. Because of the licensing issues, we can't commit the
Kraken source code into the WebKit repository as done for other benchmarks. Instead, we'll dynamically
download it from the remote server using newly added RemoteZipBenchmarkBuilder. We do the same for Octane
for simplicity. Use newly added --local-copy option to specify the location of a local copy if there is any.

Renamed "original_benchmark in the plan file to "local_copy" and added a new optional "remote_archive" to
specify the URL to a remote ZIP file. This optional field is used by Kraken and Octane benchmark plans.

In addition, generalized the ability to run a "create script" in JetStreamBenchmarkBuilder since it's also
needed for SunSpider and Kraken. This feature has now been folded into GenericBenchmarkBuilder.

* Scripts/webkitpy/benchmark_runner/benchmark_builder/benchmark_builders.json: Added
RemoteZipBenchmarkBuilder for Kraken and removed JetStreamBenchmarkBuilder since GenericBenchmarkBuilder
now has the ability to run an arbitrary "create script".

* Scripts/run-benchmark:
(main): Added an optional argument, --local-copy, to override the location of the benchmark's local copy.
This also overrides the remote archive URL specified in the plan.

* Scripts/webkitpy/benchmark_runner/README.md: Updated the description.

* Scripts/webkitpy/benchmark_runner/benchmark_builder/benchmark_builders.json: Deleted the entry for
JetStreamBenchmarkBuilder.

* Scripts/webkitpy/benchmark_runner/benchmark_builder/generic_benchmark_builder.py:
(GenericBenchmarkBuilder.prepare): Call _fetchRemoteArchive if local_copy is not specified in the plan or
by --local-copy option but remote_archive is specified. Also call self.clean() here instead of relying on
_runCreateScript and _applyPatch to clean after themselves.
(GenericBenchmarkBuilder._runCreateScript): Moved from JetStreamBenchmarkBuilder._runCreateScript since
JetStream, SunSpider, Kraken all use this feature.
(GenericBenchmarkBuilder._copyBenchmarkToTempDir): Use self.name as the destination location instead of
the leaf directory name since the latter is not available when a remote ZIP file is used.
(GenericBenchmarkBuilder._fetchRemoteArchive): Added.
(GenericBenchmarkBuilder._applyPatch): Apply the patch inside destination directory to avoid hard coding
the benchmark name in the patches.

* Scripts/webkitpy/benchmark_runner/benchmark_builder/jetstream_benchmark_builder.py: Removed.

* Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
(BenchmarkRunner.__init__): Set self.planName. Also override 'local_copy' when --local-copy option is used.
(BenchmarkRunner.execute): Exit early if neither local_copy nor remote_archive is specified. Prefix the URL
the browser opens by planName as the plan file no longer contains that.

* Scripts/webkitpy/benchmark_runner/data/patches/JetStream.patch: Changed the path to be relative against
the top directory of JetStream instead of its parent.
* Scripts/webkitpy/benchmark_runner/data/patches/Kraken.patch: Added.
* Scripts/webkitpy/benchmark_runner/data/patches/Octane.patch: Added.
* Scripts/webkitpy/benchmark_runner/data/patches/Speedometer.patch: Changed the path to be relative against
the top directory of JetStream instead of its parent.
* Scripts/webkitpy/benchmark_runner/data/patches/SunSpider.patch: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/jetstream.plan: Uses GenericBenchmarkBuilder and specifies
the script to run. The entry point was changed to the relative path from the top directory of JetStream as
done in JetStream.patch.
* Scripts/webkitpy/benchmark_runner/data/plans/kraken.plan: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/octane.plan: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/speedometer.plan: The entry point was changed to the relative
path from the top directory of JetStream as done in JetStream.patch.
* Scripts/webkitpy/benchmark_runner/data/plans/sunspider.plan: Added.

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

5 years agoREGRESSION(r180595): same-callee profiling no longer works
rniwa@webkit.org [Mon, 11 May 2015 21:21:17 +0000 (21:21 +0000)]
REGRESSION(r180595): same-callee profiling no longer works
https://bugs.webkit.org/show_bug.cgi?id=144787

Reviewed by Michael Saboff.

This patch introduces a DFG optimization to use NewObject node when the callee of op_create_this is
always the same JSFunction. This condition doesn't hold when the byte code creates multiple
JSFunction objects at runtime as in: function y() { return function () {} }; new y(); new y();

To enable this optimization, LLint and baseline JIT now store the last callee we saw in the newly
added fourth operand of op_create_this. We use this JSFunction's structure in DFG after verifying
our speculation that the callee is the same. To avoid recompiling the same code for different callee
objects in the polymorphic case, the special value of seenMultipleCalleeObjects() is set in
LLint and baseline JIT when multiple callees are observed.

Tests: stress/create-this-with-callee-variants.js

* bytecode/BytecodeList.json: Increased the number of operands to 5.
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset): op_create_this uses 2nd (constructor) and 4th (callee cache)
operands.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode): Dump the newly added callee cache.
(JSC::CodeBlock::finalizeUnconditionally): Clear the callee cache if the callee is no longer alive.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitCreateThis): Add the instruction to propertyAccessInstructions so that
we can clear the callee cache in CodeBlock::finalizeUnconditionally. Also initialize the newly added
operand.
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock): Implement the optimization. Speculate the actual callee to
match the cache. Use the cached callee's structure if the speculation succeeds. Otherwise, OSR exit.
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_create_this): Go to the slow path to update the cache unless it's already marked
as seenMultipleCalleeObjects() to indicate the polymorphic behavior.
(JSC::JIT::emitSlow_op_create_this):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_create_this): Ditto.
(JSC::JIT::emitSlow_op_create_this):
* llint/LowLevelInterpreter32_64.asm:
(_llint_op_create_this): Ditto.
* llint/LowLevelInterpreter64.asm:
(_llint_op_create_this): Ditto.
* runtime/CommonSlowPaths.cpp:
(slow_path_create_this): Set the callee cache to the actual callee if it's not set. If the cache has
been set to a JSFunction* different from the actual callee, set it to seenMultipleCalleeObjects().
* runtime/JSCell.h:
(JSC::JSCell::seenMultipleCalleeObjects): Added.
* runtime/WriteBarrier.h:
(JSC::WriteBarrierBase::unvalidatedGet): Removed the compile guard around it.
* tests/stress/create-this-with-callee-variants.js: Added.

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

5 years agoAX: [ATK] Need expectation files for menu-list-crash2.html for Gtk and Efl
jdiggs@igalia.com [Mon, 11 May 2015 21:20:46 +0000 (21:20 +0000)]
AX: [ATK] Need expectation files for menu-list-crash2.html for Gtk and Efl
https://bugs.webkit.org/show_bug.cgi?id=144881

Unreviewed GTK+ and EFL gardening.

* platform/efl/accessibility/menu-list-crash2-expected.txt: Added.
* platform/gtk/accessibility/menu-list-crash2-expected.txt: Added.

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

5 years agoUnreviewed build fix
mmaxfield@apple.com [Mon, 11 May 2015 21:14:05 +0000 (21:14 +0000)]
Unreviewed build fix

Unreviewed.

* UIProcess/API/APIUserContentExtensionStore.cpp:
(API::compiledToFile):

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

5 years agoPropertyNameArray should use a Vector when there are few entries.
akling@apple.com [Mon, 11 May 2015 21:13:53 +0000 (21:13 +0000)]
PropertyNameArray should use a Vector when there are few entries.
<https://webkit.org/b/144874>

Reviewed by Geoffrey Garen.

Bring back an optimization that was lost in the for-in refactoring.
PropertyNameArray now holds a Vector<AtomicStringImpl*> until there are
enough (20) entries to justify converting to a HashSet for contains().

Also inlined the code while we're here, since it has so few clients and
the call overhead adds up.

~5% progression on Kraken/json-stringify-tinderbox.

* runtime/PropertyNameArray.cpp: Removed.
* runtime/PropertyNameArray.h:
(JSC::PropertyNameArray::canAddKnownUniqueForStructure):
(JSC::PropertyNameArray::add):
(JSC::PropertyNameArray::addKnownUnique):

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

5 years agoFix run-javascriptcore-tests step on the WinCairo bot
ossy@webkit.org [Mon, 11 May 2015 20:42:39 +0000 (20:42 +0000)]
Fix run-javascriptcore-tests step on the WinCairo bot
https://bugs.webkit.org/show_bug.cgi?id=144866

Reviewed by Darin Adler.

* Scripts/run-jsc-stress-tests:

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

5 years agoAdd a Windows-specific result for the new accessibility/menu-list-crash2.html test.
akling@apple.com [Mon, 11 May 2015 20:28:40 +0000 (20:28 +0000)]
Add a Windows-specific result for the new accessibility/menu-list-crash2.html test.

* platform/win/accessibility/menu-list-crash2-expected.txt: Added.

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

5 years agoWeb Inspector: REGRESSION (r175203): No profile information is shown in Inspector
mattbaker@apple.com [Mon, 11 May 2015 20:09:14 +0000 (20:09 +0000)]
Web Inspector: REGRESSION (r175203): No profile information is shown in Inspector
https://bugs.webkit.org/show_bug.cgi?id=144808

Reviewed by Darin Adler.

Source/JavaScriptCore:

Since a profile can be started after a timeline recording has already begun, we can't assume a zero start time.
The start time for the root node's call entry should be based on the stopwatch used by the ProfileGenerator.

* profiler/Profile.cpp:
(JSC::Profile::create):
(JSC::Profile::Profile):
* profiler/Profile.h:
* profiler/ProfileGenerator.cpp:
(JSC::ProfileGenerator::ProfileGenerator):
(JSC::AddParentForConsoleStartFunctor::operator()):

Source/WebCore:

Profiles started from the console should always use the Inspector environment's shared stopwatch.

* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::startFromConsole):

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

5 years ago[Content Extensions] Support domain-specific rules and exceptions.
commit-queue@webkit.org [Mon, 11 May 2015 19:54:15 +0000 (19:54 +0000)]
[Content Extensions] Support domain-specific rules and exceptions.
https://bugs.webkit.org/show_bug.cgi?id=144833

Patch by Alex Christensen <achristensen@webkit.org> on 2015-05-11
Reviewed by Darin Adler.

Source/WebCore:

Test: http/tests/contentextensions/domain-rules.html
(And lots of API tests)

This patch adds if-domain and unless-domain to the trigger in the JSON format.
if-domain makes the rule apply only to domains in the list.
unless-domain makes the rule apply to domains that are not in the list.

All rules without if-domain or unless-domain are compiled into a set of DFAs.  This behavior is unchanged.
All rules with if-domain or unless-domain are compiled into a separate set of DFAs.
The domains are also compiled into another set of DFAs.  This makes 3 arrays of DFA bytecode instead of 1.

If there are no domain specific rules, there is no change in behavior.
If there are domain specific rules, the URL will be checked for matches in both
filtersWithoutDomainsBytecode and filtersWithDomainsBytecode.  If there are matches from
filtersWithDomainsBytecode then the domain of the main document will be checked with
domainFiltersBytecode to see which of the matches applies to this domain.

* contentextensions/CombinedURLFilters.cpp:
(WebCore::ContentExtensions::CombinedURLFilters::isEmpty):
(WebCore::ContentExtensions::CombinedURLFilters::addDomain):
* contentextensions/CombinedURLFilters.h:
Added addDomain, which adds characters from a domain to the prefix tree directly without using YARR.
* contentextensions/CompiledContentExtension.cpp:
(WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
* contentextensions/CompiledContentExtension.h:
* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::serializeActions):
(WebCore::ContentExtensions::compileRuleList):
Separate the rules into rules with domains and rules without domains and compile to bytecode.
* contentextensions/ContentExtensionCompiler.h:
Updated compiler interface to reflect the slightly more complicated structure.
* contentextensions/ContentExtensionError.cpp:
(WebCore::ContentExtensions::contentExtensionErrorCategory):
* contentextensions/ContentExtensionError.h:
Added new parsing errors.
* contentextensions/ContentExtensionParser.cpp:
(WebCore::ContentExtensions::getDomainList):
(WebCore::ContentExtensions::loadTrigger):
(WebCore::ContentExtensions::loadEncodedRules):
* contentextensions/ContentExtensionRule.h:
(WebCore::ContentExtensions::Trigger::operator==):
Parse the new domain structures from JSON into the Trigger structure.
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
Interpret as much bytecode as necessary to determine which rules apply to this URL and domain.
* contentextensions/DFABytecode.h:
(WebCore::ContentExtensions::instructionSizeWithArguments):
* contentextensions/DFABytecodeCompiler.cpp:
(WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
(WebCore::ContentExtensions::DFABytecodeCompiler::emitTestFlagsAndAppendAction):
(WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
* contentextensions/DFABytecodeCompiler.h:
* contentextensions/DFABytecodeInterpreter.cpp:
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
(WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
* contentextensions/DFABytecodeInterpreter.h:
* loader/ResourceLoadInfo.h:
Keep track of which actions have an if-domain trigger.  If an action is in the
filtersWithDomainsBytecode, then it either has an if-domain or an unless-domain in its trigger.
This requires additional information in the bytecode, so there are two new bytecode types.

Source/WebKit2:

* Shared/WebCompiledContentExtension.cpp:
(WebKit::WebCompiledContentExtension::filtersWithoutDomainsBytecode):
(WebKit::WebCompiledContentExtension::filtersWithoutDomainsBytecodeLength):
(WebKit::WebCompiledContentExtension::filtersWithDomainsBytecode):
(WebKit::WebCompiledContentExtension::filtersWithDomainsBytecodeLength):
(WebKit::WebCompiledContentExtension::domainFiltersBytecode):
(WebKit::WebCompiledContentExtension::domainFiltersBytecodeLength):
(WebKit::WebCompiledContentExtension::bytecode): Deleted.
(WebKit::WebCompiledContentExtension::bytecodeLength): Deleted.
* Shared/WebCompiledContentExtension.h:
* Shared/WebCompiledContentExtensionData.cpp:
(WebKit::WebCompiledContentExtensionData::encode):
(WebKit::WebCompiledContentExtensionData::decode):
* Shared/WebCompiledContentExtensionData.h:
(WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
* UIProcess/API/APIUserContentExtensionStore.cpp:
(API::ContentExtensionMetaData::fileSize):
(API::encodeContentExtensionMetaData):
(API::decodeContentExtensionMetaData):
(API::compiledToFile):
(API::createExtension):
Keep track of 3 different types of bytecode to be able to handle domain-specific rules.

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::InMemoryCompiledContentExtension::createFromFilter):
(TestWebKitAPI::InMemoryCompiledContentExtension::create):
(TestWebKitAPI::InMemoryCompiledContentExtension::InMemoryCompiledContentExtension):
Moved CompiledContentExtensionData from ContentExtensionCompiler.h because it is only used for testing.
(TestWebKitAPI::mainDocumentRequest):
(TestWebKitAPI::subResourceRequest):
(TestWebKitAPI::TEST_F):
(TestWebKitAPI::checkCompilerError):
Added tests for parsing and functionality of if-domain and unless-domain.

LayoutTests:

* http/tests/contentextensions/domain-rules-expected.txt: Added.
* http/tests/contentextensions/domain-rules.html: Added.
* http/tests/contentextensions/domain-rules.html.json: Added.

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

5 years agoAdd srcset, sizes and picture to the features json
yoav@yoav.ws [Mon, 11 May 2015 19:32:59 +0000 (19:32 +0000)]
Add srcset, sizes and picture to the features json
https://bugs.webkit.org/show_bug.cgi?id=144862

Reviewed by Benjamin Poulain.

Add the srcset w descriptor and sizes attribute as a new feature in the JSON file,
as well as adding the picture element and srcset's x descriptor as seperate features.

No new tests, since no new functionality added.

* features.json:

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

5 years agoFix checkingLogicalHeight initialization in Document::updateLayoutIfDimensionsOutOfDate()
cdumez@apple.com [Mon, 11 May 2015 19:01:26 +0000 (19:01 +0000)]
Fix checkingLogicalHeight initialization in Document::updateLayoutIfDimensionsOutOfDate()
https://bugs.webkit.org/show_bug.cgi?id=144873

Reviewed by Simon Fraser.

Fix checkingLogicalHeight initialization in Document::updateLayoutIfDimensionsOutOfDate().
checkingLogicalHeight should only be initialized to true when
"dimensionsCheck & WidthDimensionsCheck" if isVertical is true.

* dom/Document.cpp:
(WebCore::Document::updateLayoutIfDimensionsOutOfDate):

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

5 years agoUnreviewed, remove unintended change.
basile_clement@apple.com [Mon, 11 May 2015 18:41:51 +0000 (18:41 +0000)]
Unreviewed, remove unintended change.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

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

5 years agoMake it easy to enable eager/non-concurrent JIT compilation
fpizlo@apple.com [Mon, 11 May 2015 18:30:18 +0000 (18:30 +0000)]
Make it easy to enable eager/non-concurrent JIT compilation
https://bugs.webkit.org/show_bug.cgi?id=144877

Reviewed by Michael Saboff.

* runtime/Options.cpp:
(JSC::recomputeDependentOptions):
* runtime/Options.h:

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

5 years agoWe shouldn't promote LoadVarargs to a sequence of GetStacks and PutStacks if doing...
fpizlo@apple.com [Mon, 11 May 2015 18:18:10 +0000 (18:18 +0000)]
We shouldn't promote LoadVarargs to a sequence of GetStacks and PutStacks if doing so would exceed the LoadVarargs' limit
https://bugs.webkit.org/show_bug.cgi?id=144851

Reviewed by Michael Saboff.
Source/JavaScriptCore:

LoadVarargs loads arguments from some object and puts them on the stack. The region of
stack is controlled by a bunch of meta-data, including InlineCallFrame. InlineCallFrame
shouldn't really be edited after ByteCodeParser, so we cannot convert LoadVarargs to
something that uses more stack than the LoadVarargs wanted to.

This check was missing in the ArgumentsEliminationPhase's LoadVarargs->GetStack+PutStack
promoter. This is an important promotion rule for performance, and in cases where we are
compiling truly hot code, the LoadVarargs limit will be at least as big as the length of
the phantom arguments array that this phase sees. The LoadVarargs limit is based on
profiling and the phantom arguments array is a proof; in most cases the profiling is more
conservative.

But, you could write some crazy code where the statically obvious arguments array value is
bigger than what the profiling would have told you. When this happens, this promotion
effectively removes a bounds check. This either results in us clobbering a bunch of stack,
or it means that we never initialize a region of the stack that a later operation will read
(the uninitialization happens because PutStackSinkingPhase removes PutStacks that appear
unnecessary, and a GetMyArgumentByVal will claim not to use the region of the stack outside
the original LoadVarargs limit).

* dfg/DFGArgumentsEliminationPhase.cpp:
* tests/stress/load-varargs-elimination-bounds-check-barely.js: Added.
(foo):
(bar):
(baz):
* tests/stress/load-varargs-elimination-bounds-check.js: Added.
(foo):
(bar):
(baz):

LayoutTests:

* js/regress/load-varargs-elimination-expected.txt: Added.
* js/regress/load-varargs-elimination.html: Added.
* js/regress/script-tests/load-varargs-elimination.js: Added.
(foo):
(bar):
(baz):
* js/regress/sink-huge-activation-expected.txt: Added.
* js/regress/sink-huge-activation.html: Added.

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

5 years agorun-benchmark should support Chrome Canary and Firefox Nightly
rniwa@webkit.org [Mon, 11 May 2015 18:02:57 +0000 (18:02 +0000)]
run-benchmark should support Chrome Canary and Firefox Nightly
https://bugs.webkit.org/show_bug.cgi?id=144850

Reviewed by Darin Adler.

Added the support for Chrome Canary, Firefox (release), and Firefox Nightly.

This patch also extracts OSXBrowserDriver to launch and terminate processes on OS X.

* Scripts/webkitpy/benchmark_runner/browser_driver/browser_drivers.json:
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py: Added.
(OSXBrowserDriver):
(OSXBrowserDriver.prepareEnv): Extracted from ChromeBrowserDriver.prepareEnv.
(OSXBrowserDriver.closeBrowsers): Ditto.
(OSXBrowserDriver.launchProcess): Ditto.
(OSXBrowserDriver.terminateProcesses): Ditto.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py:
(OSXChromeDriver): Removed the unused self.chromePreferences.
(OSXChromeDriver.prepareEnv): Moved to OSXBrowserDriver.
(OSXChromeDriver.closeBrowsers): Ditto.
(OSXChromeDriver.launchUrl):
(OSXChromeCanaryDriver): Added.
(OSXChromeCanaryDriver.launchUrl):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py: Added.
(OSXFirefoxDriver): Added.
(OSXFirefoxDriver.launchUrl):
(OSXFirefoxNightlyDriver): Added.
(OSXFirefoxNightlyDriver.launchUrl):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
(OSXSafariDriver):
(OSXSafariDriver.closeBrowsers):

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

5 years agoWeb Inspector: NavigationSidebarPanel leaks some event listeners
timothy@apple.com [Mon, 11 May 2015 17:50:25 +0000 (17:50 +0000)]
Web Inspector: NavigationSidebarPanel leaks some event listeners
https://bugs.webkit.org/show_bug.cgi?id=144523

Reviewed by Joseph Pecoraro.

* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel):
(WebInspector.NavigationSidebarPanel.prototype.closed):
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.closed):
* UserInterface/Views/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype.closed):
* UserInterface/Views/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel.prototype.closed):
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype.closed):

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

5 years agoJSON.stringify shouldn't use generic get() to access Array.length
akling@apple.com [Mon, 11 May 2015 17:47:55 +0000 (17:47 +0000)]
JSON.stringify shouldn't use generic get() to access Array.length
<https://webkit.org/b/144847>

Reviewed by Geoffrey Garen.

If the value being serialized is a JSArray object, we can downcast and call its
length() directly instead of doing a generic property lookup.

0.5% progression on Kraken/json-stringify-tinderbox.

* runtime/JSONObject.cpp:
(JSC::Stringifier::Holder::appendNextProperty):

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

5 years agoPage overlay action context override should indicate the source of the request
timothy_horton@apple.com [Mon, 11 May 2015 17:38:51 +0000 (17:38 +0000)]
Page overlay action context override should indicate the source of the request
https://bugs.webkit.org/show_bug.cgi?id=144832
<rdar://problem/20562594>

Reviewed by Darin Adler.

* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
* WebProcess/WebPage/WebPageOverlay.cpp:
(WebKit::WebPageOverlay::actionContextForResultAtPoint):
* WebProcess/WebPage/WebPageOverlay.h:
(WebKit::WebPageOverlay::Client::actionContextForResultAtPoint):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
Add a parameter to WKBundlePageOverlayActionContextForResultAtPoint so that
clients can tell whether the requested action context should be targetted
at an action menu or immediate action.

* TestWebKitAPI/Tests/WebKit2ObjC/ActionMenusBundle.mm:
(TestWebKitAPI::ActionMenuTest::actionContextForResultAtPoint):

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

5 years ago[iOS] Close all open databases in expiration handler of process assertion
dbates@webkit.org [Mon, 11 May 2015 17:27:13 +0000 (17:27 +0000)]
[iOS] Close all open databases in expiration handler of process assertion
https://bugs.webkit.org/show_bug.cgi?id=144661
<rdar://problem/20845052>

Reviewed by Darin Adler.

Source/WebCore:

Expose functionality in WebCore to close all open databases. Closing a SQLite database
will interrupt any in-progress database transactions.

* Modules/webdatabase/AbstractDatabaseServer.h:
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::closeAllDatabases): Added; turns around and calls DatabaseServer::closeAllDatabases().
* Modules/webdatabase/DatabaseManager.h: Export DatabaseManager::closeAllDatabases() so that
we can call in from WebKit2.
* Modules/webdatabase/DatabaseServer.cpp:
(WebCore::DatabaseServer::closeAllDatabases): Added; turns around and calls DatabaseTracker::closeAllDatabases().
* Modules/webdatabase/DatabaseServer.h:
* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::closeAllDatabases): Added; closes all open databases.
* Modules/webdatabase/DatabaseTracker.h: Export DatabaseTracker::closeAllDatabases() so that
we can call in from Legacy WebKit.

Source/WebKit/mac:

For Legacy WebKit, close all open databases when the process assertion expiration
handler is called.

* Storage/WebDatabaseManager.mm:
(+[WebDatabaseManager startBackgroundTask]): Call DatabaseTracker::tracker().closeAllDatabases()
in the expiration handler to close all open databases. As a side effect of closing
a database all in-progress database transactions are interrupted.

Source/WebKit2:

For WebKit2, close all open databases when the process assertion expiration
handler is called.

When the process assertion expiration handler is called we dispatch a synchronous
message called ProcessWillSuspendImminently to the {Web, Network} processes to inform
them that they will be suspended imminently. The {Web, Network} process will always
service this message regardless if they were waiting for another message. In the
WebProcess, we will close all open databases among other tasks upon receiving this
message. In the NetworkProcess, we will purge some data from memory.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::didReceiveSyncMessage): Modified to call NetworkProcess::didReceiveSyncNetworkProcessMessage()
to process the synchronous ProcessWillSuspendImminently message.
(WebKit::NetworkProcess::processWillSuspendImminently): Added; free some memory.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in: Added synchronous message ProcessWillSuspendImminently.
* Shared/ChildProcessProxy.h:
(WebKit::ChildProcessProxy::sendSync): Added parameter sendSyncFlags so that we can send
a sync message with flag IPC::InterruptWaitingIfSyncMessageArrives to cause the {Web, Network}Process
to process the message regardless of whether it is waiting for another message.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::sendProcessWillSuspendImminently): Added. Sends the message
ProcessWillSuspendImminently to the NetworkProcess.
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/ProcessAssertion.cpp:
(WebKit::ProcessAndUIAssertion::setClient): Added.
* UIProcess/ProcessAssertion.h: Added abstract class ProcessAssertionClient.
(WebKit::ProcessAssertionClient::~ProcessAssertionClient): Added.
(WebKit::ProcessAssertion::setClient): Added.
(WebKit::ProcessAssertion::client): Added.
* UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::didConnectToProcess):
(WebKit::ProcessThrottler::assertionWillExpireImminently): Added; implements the ProcessAssertionClient
interface. Notify the process throttler clients that the assertion is near expiration.
* UIProcess/ProcessThrottler.h:
* UIProcess/ProcessThrottlerClient.h: Added
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::sendProcessWillSuspendImminently): Added. Sends the message
ProcessWillSuspendImminently to the WebProcess.
* UIProcess/WebProcessProxy.h:
* UIProcess/ios/ProcessAssertionIOS.mm:
(-[WKProcessAssertionBackgroundTaskManager addClient:]): Added.
(-[WKProcessAssertionBackgroundTaskManager removeClient:]): Added.
(-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]): Modified expiration handler
to notify ProcessAssertionClient clients that the assertion is near expiration.
(WebKit::ProcessAssertion::~ProcessAssertion): Remove the client on destruction.
(WebKit::ProcessAndUIAssertion::setClient): Added.
* WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
(WebKit::WebDatabaseManager::closeAllDatabases): Added; turns around and calls DatabaseManager::closeAllDatabases().
* WebProcess/WebCoreSupport/WebDatabaseManager.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didReceiveSyncMessage): Call WebProcess::didReceiveSyncWebProcessMessage() to process
the synchronous ProcessWillSuspendImminently message. Removed logging for an unhandled synchronous message
since WebProcess::didReceiveSyncWebProcessMessage() will ASSERT_NOT_REACHED() for such a message.
(WebKit::WebProcess::prepareToSuspend): Extracted code from WebProcess::processWillSuspend() so that it can
be used from both WebProcess::processWillSuspend() and WebProcess::processWillSuspendImminently(). And modified
it to conditionally dispatch a ProcessReadyToSuspend message to the WebProcessProxy. We only want to dispatch
such a message as part of a coordinated suspension by the ProcessThrottler. That is, we do not want to dispatch
the ProcessReadyToSuspend message when the background assertion is near expiration (i.e. WebProcess::processWillSuspendImminently()
is called).
(WebKit::WebProcess::processWillSuspendImminently): Added. Suspend all open databases among other tasks.
(WebKit::WebProcess::processWillSuspend): Implemented in terms of WebProcess::prepareToSuspend().
(WebKit::WebProcess::processSuspensionCleanupTimerFired): Modified to conditionally dispatch a ProcessReadyToSuspend
message to the WebProcessProxy.
(WebKit::WebProcess::processDidResume): Stop the suspension cleanup timer, which may be active if the WebProcess
did not mark all its graphics layers as volatile before process suspension.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in: Added synchronous message ProcessWillSuspendImminently.

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

5 years agoWebContent crash under com.apple.WebCore: WebCore::WebKitCSSResourceValue::isCSSValue...
antti@apple.com [Mon, 11 May 2015 16:26:16 +0000 (16:26 +0000)]
WebContent crash under com.apple.WebCore: WebCore::WebKitCSSResourceValue::isCSSValueNone const + 6
https://bugs.webkit.org/show_bug.cgi?id=144870
rdar://problem/20727702

Reviewed by Simon Fraser.

No repro but we are seeing null pointer crashes like this:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.WebCore   0x00007fff92da5706 WebCore::WebKitCSSResourceValue::isCSSValueNone() const + 6
1   com.apple.WebCore   0x00007fff93382b48 WebCore::MaskImageOperation::isCSSValueNone() const + 24
2   com.apple.WebCore   0x00007fff92e0475e WebCore::FillLayer::hasNonEmptyMaskImage() const + 30

* platform/graphics/MaskImageOperation.cpp:
(WebCore::MaskImageOperation::MaskImageOperation):
(WebCore::MaskImageOperation::isCSSValueNone):

    This would crash like this if both m_styleImage and m_cssMaskImageValue are null.
    There are no obvious guarantees that this doesn't happen. Two of the constructor variants allow it
    and there is setImage which may turn m_styleImage null later too.

    Fix by making null m_cssMaskImageValue always signify CSSValueNone.

(WebCore::MaskImageOperation::cssValue):

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

5 years ago[GTK] Gardening 11th May.
commit-queue@webkit.org [Mon, 11 May 2015 15:40:47 +0000 (15:40 +0000)]
[GTK] Gardening 11th May.
https://bugs.webkit.org/show_bug.cgi?id=144863

Unreviewed.

Patch by Marcos Chavarría Teijeiro <chavarria1991@gmail.com> on 2015-05-11

* platform/gtk/TestExpectations:

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

5 years agoAX: Crash at WebCore::AccessibilityMenuList::addChildren()
cfleizach@apple.com [Mon, 11 May 2015 15:08:00 +0000 (15:08 +0000)]
AX: Crash at WebCore::AccessibilityMenuList::addChildren()
https://bugs.webkit.org/show_bug.cgi?id=144860

Reviewed by Mario Sanchez Prada.

Source/WebCore:

There were some unsafe pointer accesses in AccessibilityMenuList code that needed to be cleaned up.

Test: accessibility/menu-list-crash2.html

* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::addChildren):

LayoutTests:

* accessibility/menu-list-crash2-expected.txt: Added.
* accessibility/menu-list-crash2.html: Added.

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

5 years ago[GTK] Gardening 7th May.
commit-queue@webkit.org [Mon, 11 May 2015 11:04:07 +0000 (11:04 +0000)]
[GTK] Gardening 7th May.
https://bugs.webkit.org/show_bug.cgi?id=144735

Unreviewed.

Patch by Marcos Chavarría Teijeiro <chavarria1991@gmail.com> on 2015-05-11

* platform/gtk/TestExpectations:
* platform/gtk/media/video-controls-no-scripting-expected.txt: Added.

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

5 years ago[WebGL] Unnecessary condition check in the while loop
commit-queue@webkit.org [Mon, 11 May 2015 10:41:24 +0000 (10:41 +0000)]
[WebGL] Unnecessary condition check in the while loop
https://bugs.webkit.org/show_bug.cgi?id=125001

Patch by Przemyslaw Szymanski <p.szymanski3@samsung.com> on 2015-05-11
Reviewed by Csaba Osztrogonác.

While loop in this case needs to be optimized a little.
For now a conditional statement in while will execute two
times at begin. do-while loop avoids to check first statement.

No new tests. No behaviour changed.

* html/canvas/WebGLFramebuffer.cpp:
(WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):

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

5 years ago[GTK] WorkQueue objects are not released
carlosgc@webkit.org [Mon, 11 May 2015 10:21:40 +0000 (10:21 +0000)]
[GTK] WorkQueue objects are not released
https://bugs.webkit.org/show_bug.cgi?id=144824

Reviewed by Žan Doberšek.

Do not keep a reference of the WorkQueue for the entire life of
its worker thread, since every task scheduled on the WorkQueue
already takes a reference. Instead, take a reference of the main
loop to make sure that when the worker thread starts, the main
loop hasn't been released to avoid runtime warnings (see
webkit.org/b/140998). Also removed the g_main_context_pop_thread_default()
from the thread body, since the thread-specific context queue will
be freed anyway when the thread exits.
If the WorkQueue is released early, before the thread has started,
schedule a main loop quit in the context, to make sure it will
be the first thing run by the main loop and the thread will exit.

* wtf/WorkQueue.h: Remove unused event loop mutex.
* wtf/gtk/WorkQueueGtk.cpp:
(WTF::WorkQueue::platformInitialize):
(WTF::WorkQueue::platformInvalidate):

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

5 years ago[GTK] Reorder Performance class's member initialization sequence
commit-queue@webkit.org [Mon, 11 May 2015 09:38:25 +0000 (09:38 +0000)]
[GTK] Reorder Performance class's member initialization sequence
https://bugs.webkit.org/show_bug.cgi?id=144858

Patch by Joonghun Park <jh718.park@samsung.com> on 2015-05-11
Reviewed by Csaba Osztrogonác.

No new tests, no new behaviors.

* page/Performance.cpp:
(WebCore::Performance::Performance):

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

5 years agoReduce TransformationMatrix copies in WebKitCSSMatrix operations
zandobersek@gmail.com [Mon, 11 May 2015 08:52:35 +0000 (08:52 +0000)]
Reduce TransformationMatrix copies in WebKitCSSMatrix operations
https://bugs.webkit.org/show_bug.cgi?id=144795

Reviewed by Darin Adler.

Instead of copying the TransformationMatrix member, performing
the operation on it and then copying it again when creating
the new WebKitCSSMatrix object, copy it just once by first
creating the new WebKitCSSMatrix object and then performing
the operation on that object's TransformationMatrix directly.

* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::multiply):
(WebCore::WebKitCSSMatrix::translate):
(WebCore::WebKitCSSMatrix::scale):
(WebCore::WebKitCSSMatrix::rotate):
(WebCore::WebKitCSSMatrix::rotateAxisAngle):
(WebCore::WebKitCSSMatrix::skewX):
(WebCore::WebKitCSSMatrix::skewY):

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

5 years agoAdd missing vtable override specifiers under Source/WebCore/loader, Source/WebCore/xml
zandobersek@gmail.com [Mon, 11 May 2015 08:40:15 +0000 (08:40 +0000)]
Add missing vtable override specifiers under Source/WebCore/loader, Source/WebCore/xml
https://bugs.webkit.org/show_bug.cgi?id=144793

Reviewed by Darin Adler.

Update virtual method overrides under Source/WebCore/loader
and Source/WebCore/dom which are missing the override specifier.

* loader/DocumentThreadableLoader.h:
(WebCore::DocumentThreadableLoader::refThreadableLoader):
(WebCore::DocumentThreadableLoader::derefThreadableLoader):
* loader/cache/CachedRawResource.h:
* xml/parser/XMLDocumentParser.h:

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

5 years agoAdd missing vtable override specifiers under Source/WebCore/accessibility, Source...
zandobersek@gmail.com [Mon, 11 May 2015 08:39:19 +0000 (08:39 +0000)]
Add missing vtable override specifiers under Source/WebCore/accessibility, Source/WebCore/dom
https://bugs.webkit.org/show_bug.cgi?id=144792

Reviewed by Darin Adler.

Update virtual method overrides under Source/WebCore/accessibility
and Source/WebCore/dom which are missing the override specifier.

* accessibility/AccessibilityMockObject.h:
(WebCore::AccessibilityMockObject::isDetachedFromParent): Deleted.
* accessibility/AccessibilityRenderObject.h:
* dom/DecodedDataDocumentParser.h:
* dom/TouchEvent.h:

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

5 years agoHave MediaStream::getAudioTracks(), MediaStream::getVideoTracks() return const references
zandobersek@gmail.com [Mon, 11 May 2015 06:38:50 +0000 (06:38 +0000)]
Have MediaStream::getAudioTracks(), MediaStream::getVideoTracks() return const references
https://bugs.webkit.org/show_bug.cgi?id=144794

Reviewed by Philippe Normand.

* Modules/mediastream/MediaStream.h: getAudioTracks() and getVideoTracks()
should return a const reference to the member variables, instead of
copying the objects on every call.

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

5 years agoUse Ref instead of PassRefPtr in WebCore/page
gyuyoung.kim@webkit.org [Mon, 11 May 2015 05:53:20 +0000 (05:53 +0000)]
Use Ref instead of PassRefPtr in WebCore/page
https://bugs.webkit.org/show_bug.cgi?id=144841

Reviewed by Darin Adler.

To kill PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr
in WebCore/page.

Source/WebCore:

No new tests, no behavior changes.

* page/DebugPageOverlays.cpp:
* page/EventSource.cpp:
(WebCore::EventSource::create):
* page/EventSource.h:
* page/History.h:
(WebCore::History::create):
* page/Location.h:
(WebCore::Location::create):
* page/MainFrame.cpp:
(WebCore::MainFrame::create):
* page/MainFrame.h:
* page/Navigator.h:
(WebCore::Navigator::create):
* page/PageOverlay.cpp:
(WebCore::PageOverlay::create):
* page/PageOverlay.h:
* page/Performance.h:
* page/PerformanceEntryList.h:
(WebCore::PerformanceEntryList::create):
* page/PerformanceMark.h:
(WebCore::PerformanceMark::create):
* page/PerformanceMeasure.h:
(WebCore::PerformanceMeasure::create):
* page/PerformanceNavigation.h:
(WebCore::PerformanceNavigation::create):
* page/PerformanceResourceTiming.h:
(WebCore::PerformanceResourceTiming::create):
* page/PerformanceTiming.h:
(WebCore::PerformanceTiming::create):
* page/PerformanceUserTiming.h:
(WebCore::UserTiming::create):
* page/Screen.h:
* page/Settings.cpp:
(WebCore::Settings::create):
* page/Settings.h:
* page/TextIndicator.cpp:
(WebCore::TextIndicator::create):
* page/TextIndicator.h:
* page/UserContentController.cpp:
(WebCore::UserContentController::create):
* page/UserContentController.h:
* page/UserMessageHandlerDescriptor.h:
(WebCore::UserMessageHandlerDescriptor::create):
* page/UserMessageHandlersNamespace.h:
* page/VisitedLinkStore.h:
* page/WebKitNamespace.h:
(WebCore::WebKitNamespace::create):
* page/WebKitPoint.h:
(WebCore::WebKitPoint::create):
* page/WorkerNavigator.h:
(WebCore::WorkerNavigator::create):
* page/animation/ImplicitAnimation.h:
(WebCore::ImplicitAnimation::create):
* page/animation/KeyframeAnimation.h:
* page/mac/ServicesOverlayController.h:
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::Highlight::createForSelection):
(WebCore::ServicesOverlayController::Highlight::createForTelephoneNumber):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::create):
* page/scrolling/ScrollingCoordinator.h:
* page/scrolling/ScrollingStateFixedNode.cpp:
(WebCore::ScrollingStateFixedNode::create):
(WebCore::ScrollingStateFixedNode::clone):
* page/scrolling/ScrollingStateFixedNode.h:
* page/scrolling/ScrollingStateFrameScrollingNode.cpp:
(WebCore::ScrollingStateFrameScrollingNode::create):
(WebCore::ScrollingStateFrameScrollingNode::clone):
* page/scrolling/ScrollingStateFrameScrollingNode.h:
* page/scrolling/ScrollingStateNode.h:
* page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
(WebCore::ScrollingStateOverflowScrollingNode::create):
(WebCore::ScrollingStateOverflowScrollingNode::clone):
* page/scrolling/ScrollingStateOverflowScrollingNode.h:
* page/scrolling/ScrollingStateStickyNode.cpp:
(WebCore::ScrollingStateStickyNode::create):
(WebCore::ScrollingStateStickyNode::clone):
* page/scrolling/ScrollingStateStickyNode.h:
* page/scrolling/ios/ScrollingCoordinatorIOS.mm:
(WebCore::ScrollingCoordinator::create):
* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
(WebCore::ScrollingTreeFrameScrollingNodeIOS::create):
* page/scrolling/ios/ScrollingTreeIOS.cpp:
(WebCore::ScrollingTreeIOS::create):
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinator::create):
* page/scrolling/mac/ScrollingTreeFixedNode.h:
* page/scrolling/mac/ScrollingTreeFixedNode.mm:
(WebCore::ScrollingTreeFixedNode::create):
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::create):
* page/scrolling/mac/ScrollingTreeMac.cpp:
(ScrollingTreeMac::create):
* page/scrolling/mac/ScrollingTreeMac.h:
* page/scrolling/mac/ScrollingTreeStickyNode.h:
* page/scrolling/mac/ScrollingTreeStickyNode.mm:
(WebCore::ScrollingTreeStickyNode::create):

Source/WebKit2:

(WebKit::WebUserContentController::WebUserContentController):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setTextIndicator):
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformDictionaryLookup):
* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserContentController::WebUserContentController):

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

5 years agobackground-position sometimes doesn't work properly with background-attachment: fixed
simon.fraser@apple.com [Mon, 11 May 2015 03:56:15 +0000 (03:56 +0000)]
background-position sometimes doesn't work properly with background-attachment: fixed
https://bugs.webkit.org/show_bug.cgi?id=103757
rdar://problem/18749925

Reviewed by Darin Adler.

Source/WebCore:

Fix sizing issues with fixed backgrounds when top content inset (blurred toolbar) is in
effect.

The primary issue was that positioningAreaSize was including the top content inset
height, and should not have been, but there were also issues with the "fixedBackgroundPaintsInLocalCoordinates"
code path, which kicks in when the root background is fixed.

Tests: platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover-local.html
       platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover.html
       platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-local.html
       platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-positioned.html

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):

LayoutTests:

Tests various configurations for painting the fixed backgrounds. The existing test was
actually wrong, so fixed to use a gradient (so you can see where the edges of the image are),
and be valid. Testing is complicated by the fact that setting top content inset actually
causes the snapshot to be inset at the top.

* platform/mac-wk2/tiled-drawing/resources/bordered-image.png: Added.
* platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover-expected.html: Added.
* platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover-local-expected.html: Added.
* platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover-local.html: Copied from LayoutTests/platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment.html.
* platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-cover.html: Added.
* platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-expected.html:
* platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-local-expected.html: Added.
* platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-local.html: Added.
* platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-positioned-expected.html: Added.
* platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-positioned.html: Added.
* platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment.html:

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

5 years ago[GTK][SOUP] Web and Network processes don't know how to get memory size on OSX
commit-queue@webkit.org [Mon, 11 May 2015 03:09:11 +0000 (03:09 +0000)]
[GTK][SOUP] Web and Network processes don't know how to get memory size on OSX
https://bugs.webkit.org/show_bug.cgi?id=144554

Patch by Philip Chimento <philip.chimento@gmail.com> on 2015-05-10
Reviewed by Darin Adler.

* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::platformSetCacheModel): Use WTF::ramSize()
instead of local function. Also use WTF::MB instead of dividing by
1024 * 1024.
(WebKit::getMemorySize): Deleted.
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformSetCacheModel): Ditto.
(WebKit::getMemorySize): Deleted.

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

5 years agoCMake defines CAIROGL_FOUND, not CAIRO_GL_FOUND
commit-queue@webkit.org [Mon, 11 May 2015 03:07:09 +0000 (03:07 +0000)]
CMake defines CAIROGL_FOUND, not CAIRO_GL_FOUND
https://bugs.webkit.org/show_bug.cgi?id=144846

Patch by Philip Chimento <philip.chimento@gmail.com> on 2015-05-10
Reviewed by Martin Robinson.

* Source/cmake/FindCairoGL.cmake: Use CAIROGL_* instead of
CAIRO_GL_* throughout, because find_package will define
CAIROGL_FOUND.
* Source/cmake/OptionsGTK.cmake: Ditto.

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

5 years ago[CMake] Some macros need to be defined/undefined, rather than ON/OFF
commit-queue@webkit.org [Mon, 11 May 2015 03:03:07 +0000 (03:03 +0000)]
[CMake] Some macros need to be defined/undefined, rather than ON/OFF
https://bugs.webkit.org/show_bug.cgi?id=144845

Patch by Philip Chimento <philip.chimento@gmail.com> on 2015-05-10
Reviewed by Martin Robinson.

* Source/cmake/OptionsGTK.cmake: Only define MOZ_X11 and XP_UNIX
if their corresponding WTF options are ON. The code in npapi.h
relies on these being undefined if they are to be switched off.

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

5 years agoUse preview view controller from WebKitSystemInterface.
commit-queue@webkit.org [Mon, 11 May 2015 01:41:13 +0000 (01:41 +0000)]
Use preview view controller from WebKitSystemInterface.
https://bugs.webkit.org/show_bug.cgi?id=144836

Add a property _allowsLinkPreview to WKWebView so that we can turn on/off preview at runtime. Also,
for client that doesn't provide preview view controller, use the default view controller prepared
by WebKitSystemInterface.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2015-05-10
Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView _allowsLinkPreview]):
(-[WKWebView _setAllowsLinkPreview:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h: Add _allowsLinkPreview property
* UIProcess/ios/WKContentView.mm:
(-[WKContentView willMoveToWindow:]):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _registerPreviewInWindow:]):
(-[WKContentView _unregisterPreviewInWindow:]):
(-[WKContentView previewViewControllerForPosition:inSourceView:]): : For client that doesn't provide
    preview delegate, use preview view controller in WebKitSystemInterface.
(-[WKContentView commitPreviewViewController:]):

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

5 years ago[GTK] fast/events/page-visibility-transition-test.html is timing out
mrobinson@webkit.org [Mon, 11 May 2015 00:57:01 +0000 (00:57 +0000)]
[GTK] fast/events/page-visibility-transition-test.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=114789

Reviewed by Darin Adler.

Tools:

* WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::setHidden): Map and unmap the WebView when the harness
requests visibility changes.

LayoutTests:

* platform/gtk/TestExpectations: Unskip failing tests.

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

5 years agoFix internal Apple builds on Mavericks.
darin@apple.com [Sun, 10 May 2015 23:28:55 +0000 (23:28 +0000)]
Fix internal Apple builds on Mavericks.

* UIProcess/API/mac/WKView.mm:
(-[WKView _dismissContentRelativeChildWindows]): Added missing conditionals around
some code that is for OS X 10.10 or newer only. There were similar conditionals around
other nearby code in this file, and around other uses of the same method in other files,
so matched the style.

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

5 years agoiOS internal build fix.
mitz@apple.com [Sun, 10 May 2015 22:49:57 +0000 (22:49 +0000)]
iOS internal build fix.

* Platform/mac/MenuUtilities.mm:

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

5 years ago[EFL] Fix install-dependencies on Ubuntu 14.10/15.04
ossy@webkit.org [Sun, 10 May 2015 22:15:08 +0000 (22:15 +0000)]
[EFL] Fix install-dependencies on Ubuntu 14.10/15.04
https://bugs.webkit.org/show_bug.cgi?id=144798

Reviewed by Darin Adler.

* efl/install-dependencies:

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

5 years agoGet rid of the public item accessors in BackForwardClient
commit-queue@webkit.org [Sun, 10 May 2015 21:45:25 +0000 (21:45 +0000)]
Get rid of the public item accessors in BackForwardClient
https://bugs.webkit.org/show_bug.cgi?id=144827

Patch by Sungmann Cho <sungmann.cho@navercorp.com> on 2015-05-10
Reviewed by Darin Adler.

Remove backItem(), currentItem(), and forwardItem() from BackForwardClient.
We can still use these functionalities through BackForwardController.

No new tests, no behavior change.

Source/WebCore:

* history/BackForwardClient.h:
(WebCore::BackForwardClient::backItem): Deleted.
(WebCore::BackForwardClient::currentItem): Deleted.
(WebCore::BackForwardClient::forwardItem): Deleted.

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView _loadBackForwardListFromOtherView:]):

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

5 years agoRename Length::isPercent() and Length::isPercentNotCalculated().
commit-queue@webkit.org [Sun, 10 May 2015 21:43:26 +0000 (21:43 +0000)]
Rename Length::isPercent() and Length::isPercentNotCalculated().
https://bugs.webkit.org/show_bug.cgi?id=144791

Patch by Sungmann Cho <sungmann.cho@navercorp.com> on 2015-05-10
Reviewed by Darin Adler.

1. Rename these methods as below for consistency and clarity.

Length::isPercentNotCalculated() => Length::isPercent()
Length::isPercent() => Length::isPercentOrCalculated()

2. Simplify the condition check of length type in SVGLengthContext::valueForLength().

"length.isPercent() && !length.isCalculated()" => "length.isPercent()"

No new tests, no behavior change.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForImageSliceSide):
(WebCore::valueForReflection):
(WebCore::percentageOrZoomAdjustedValue):
(WebCore::lineHeightFromStyle):
(WebCore::ComputedStyleExtractor::propertyValue):
* html/HTMLPlugInImageElement.cpp:
(WebCore::is100Percent):
* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::computeTransformedExtentViaTransformList):
* platform/Length.h:
(WebCore::Length::percent):
(WebCore::Length::isPercent):
(WebCore::Length::isPercentOrCalculated):
(WebCore::Length::isSpecified):
(WebCore::Length::isPercentNotCalculated): Deleted.
* platform/graphics/transforms/TranslateTransformOperation.h:
* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn):
(WebCore::AutoTableLayout::fullRecalc):
(WebCore::shouldScaleColumns):
(WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
(WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
(WebCore::AutoTableLayout::layout):
* rendering/FixedTableLayout.cpp:
(WebCore::FixedTableLayout::calcWidthArray):
(WebCore::FixedTableLayout::applyPreferredLogicalWidthQuirks):
(WebCore::FixedTableLayout::layout):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::isSelfCollapsingBlock):
(WebCore::RenderBlock::textIndentOffset):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::needsPreferredWidthsRecalculation):
(WebCore::RenderBox::computeLogicalHeight):
(WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
(WebCore::RenderBox::computeReplacedLogicalWidthUsing):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::availableLogicalHeightUsing):
(WebCore::logicalWidthIsResolvable):
(WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
(WebCore::RenderBox::hasUnsplittableScrollingOverflow):
(WebCore::RenderBox::layoutOverflowRectForPropagation):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight):
(WebCore::RenderBoxModelObject::relativePositionOffset):
(WebCore::RenderBoxModelObject::computedCSSPadding):
(WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
(WebCore::RenderBoxModelObject::calculateFillTileSize):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
(WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
* rendering/RenderElement.cpp:
(WebCore::mustRepaintFillLayers):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::layOutAxis):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::repaintOrMarkForLayout):
* rendering/RenderInline.cpp:
(WebCore::computeMargin):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::computeIntrinsicLogicalWidths):
* rendering/RenderMenuList.cpp:
(RenderMenuList::computeIntrinsicLogicalWidths):
* rendering/RenderObject.cpp:
(WebCore::objectIsRelayoutBoundary):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computePreferredLogicalWidths):
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::computeIntrinsicLogicalWidths):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layoutRows):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::computeIntrinsicLogicalWidths):
* rendering/RenderView.cpp:
(WebCore::RenderView::layout):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::verticalPositionForBox):
* rendering/style/GridLength.h:
(WebCore::GridLength::isPercentage):
* rendering/style/GridTrackSize.h:
(WebCore::GridTrackSize::isPercentage):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::computedLineHeight):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::hasRelativeDimensions):
* svg/SVGLengthContext.cpp:
(WebCore::SVGLengthContext::valueForLength):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::hasRelativeWidth):
(WebCore::SVGImage::hasRelativeHeight):

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

5 years agoRemove unnecessary semicolons.
commit-queue@webkit.org [Sun, 10 May 2015 21:26:51 +0000 (21:26 +0000)]
Remove unnecessary semicolons.
https://bugs.webkit.org/show_bug.cgi?id=144844

Patch by Sungmann Cho <sungmann.cho@navercorp.com> on 2015-05-10
Reviewed by Darin Adler.

No new tests, no behavior change.

Source/WebCore:

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::readString):
* platform/mediastream/RealtimeMediaSourceCapabilities.h:
(WebCore::RealtimeMediaSourceCapabilities::setHasVideoSource):
* platform/network/mac/ResourceErrorMac.mm:
(WebCore::ResourceError::nsError):
* rendering/RenderThemeIOS.mm:
(WebCore::getSharedFunctionRef):

Source/WebKit2:

* Shared/Downloads/mac/DownloadMac.mm:
(-[WKDownloadAsDelegate download:shouldDecodeSourceDataOfMIMEType:]):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::transformHandlesToObjects):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::idToHistoryItemMap):

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

5 years agoRemove unnecessary forward declarations in StyleProperties.h
commit-queue@webkit.org [Sun, 10 May 2015 21:23:33 +0000 (21:23 +0000)]
Remove unnecessary forward declarations in StyleProperties.h
https://bugs.webkit.org/show_bug.cgi?id=144843

Patch by Sungmann Cho <sungmann.cho@navercorp.com> on 2015-05-10
Reviewed by Darin Adler.

No new tests, no behavior change.

* css/StyleProperties.h:

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

5 years agoFix build.
darin@apple.com [Sun, 10 May 2015 20:28:16 +0000 (20:28 +0000)]
Fix build.

* Platform/mac/MenuUtilities.mm: Added includes that were somehow omitted in what
I committed before.

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

5 years agoRemove unnecessary AtomicStringImpl* hash specification in PropertyNameArray.
akling@apple.com [Sun, 10 May 2015 20:19:11 +0000 (20:19 +0000)]
Remove unnecessary AtomicStringImpl* hash specification in PropertyNameArray.

Follow up to r184050 suggested by Darin.

* runtime/PropertyNameArray.h:

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

5 years agoRemove unused things from PropertyNameArray.
akling@apple.com [Sun, 10 May 2015 20:03:57 +0000 (20:03 +0000)]
Remove unused things from PropertyNameArray.
<https://webkit.org/b/144834>

Reviewed by Filip Pizlo.

PropertyNameArray had a bunch of bells and whistles added to it when for-in iteration
was refactored and optimized last year. Then more refactoring happened and this class
doesn't need to ring and toot anymore.

The RefCountedIdentifierSet class disappears since the JSPropertyNameEnumerator wasn't
actually using it for anything and we were just wasting time creating these.

Also made the member functions take AtomicStringImpl* instead of plain StringImpl*.

* runtime/JSObject.cpp:
(JSC::JSObject::getPropertyNames):
* runtime/JSPropertyNameEnumerator.cpp:
(JSC::JSPropertyNameEnumerator::create):
(JSC::JSPropertyNameEnumerator::JSPropertyNameEnumerator):
* runtime/JSPropertyNameEnumerator.h:
* runtime/PropertyNameArray.cpp:
(JSC::PropertyNameArray::add):
(JSC::PropertyNameArray::setPreviouslyEnumeratedProperties): Deleted.
* runtime/PropertyNameArray.h:
(JSC::PropertyNameArray::PropertyNameArray):
(JSC::PropertyNameArray::add):
(JSC::PropertyNameArray::addKnownUnique):
(JSC::PropertyNameArray::canAddKnownUniqueForStructure):
(JSC::RefCountedIdentifierSet::contains): Deleted.
(JSC::RefCountedIdentifierSet::size): Deleted.
(JSC::RefCountedIdentifierSet::add): Deleted.
(JSC::PropertyNameArray::identifierSet): Deleted.
(JSC::PropertyNameArray::numCacheableSlots): Deleted.
(JSC::PropertyNameArray::setNumCacheableSlotsForObject): Deleted.
(JSC::PropertyNameArray::setBaseObject): Deleted.
(JSC::PropertyNameArray::setPreviouslyEnumeratedLength): Deleted.

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

5 years ago[Cocoa] Fix paths and resort WebCore project file
darin@apple.com [Sun, 10 May 2015 19:28:08 +0000 (19:28 +0000)]
[Cocoa] Fix paths and resort WebCore project file
https://bugs.webkit.org/show_bug.cgi?id=144838

Reviewed by Dan Bernstein.

* WebCore.xcodeproj/project.pbxproj: Re-sorted this file with the
sort-Xcode-project-file script and fixed the paths in the platform/ios directory.

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

5 years ago[Streams API] Refactor ReadableStreamReader close promise callback cleaning
youenn.fablet@crf.canon.fr [Sun, 10 May 2015 18:33:33 +0000 (18:33 +0000)]
[Streams API] Refactor ReadableStreamReader close promise callback cleaning
https://bugs.webkit.org/show_bug.cgi?id=144799

Reviewed by Darin Adler.

Moved close callback cleaning to releaseStream, which is now releaseStreamAndClean.
Moved that method to private as it is no longer needed by subclasses.

No behavior changes.

* Modules/streams/ReadableStreamReader.cpp:
(WebCore::ReadableStreamReader::releaseStreamAndClean):
(WebCore::ReadableStreamReader::changeStateToClosed):
(WebCore::ReadableStreamReader::changeStateToErrored):
* Modules/streams/ReadableStreamReader.h:

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

5 years ago[Cocoa] Don't soft link DataDetectorsCore
darin@apple.com [Sun, 10 May 2015 18:29:59 +0000 (18:29 +0000)]
[Cocoa] Don't soft link DataDetectorsCore
https://bugs.webkit.org/show_bug.cgi?id=144837

Reviewed by Dan Bernstein.

Source/WebCore:

Linking this in the normal way should slightly speed up the web process
startup time. We don't need to soft link it: It's present in the
OS X base system and there is no reference cycle with WebKit.

* Configurations/WebCore.xcconfig: Added PrivateFrameworks to
FRAMEWORK_SEARCH_PATHS for Mac and added DataDetectorsCore to
OTHER_LDFLAGS_PLATFORM for Mac. We may want to do this later for iOS too.

* WebCore.xcodeproj/project.pbxproj: Added DataDetectorsCoreSPI.h.

* editing/mac/DataDetection.mm:
(WebCore::DataDetection::detectItemAroundHitTestResult): Removed check to see
if DataDetectorsCore is available.

* page/mac/ServicesOverlayController.h: Simplified a forward declaration to
only declare what we actually use.
* page/mac/ServicesOverlayController.mm: Moved SOFT_LINK from here to the
DataDetectorsSPI.h header.

* platform/spi/cocoa/DataDetectorsCoreSPI.h: Added. This is the low level
DataDetectorsCore framework, which has no reference cycle with WebKit, and
which we can link to normally. Moved the content here from DataDetectorsSPI.h,
added a USE(APPLE_INTERNAL_SDK) path that uses the system headers, and fixed
the incorrect return type on DDScannerScanQuery, which was detected when
using the system headers in conjunction with this file.

* platform/spi/mac/DataDetectorsSPI.h: Removed the content of this file that
was actually about DataDetectorsCore. Also added a USE(APPLE_INTERNAL_SDK)
path that uses the system headers and moved a few stray DataDetectors SPI
definitions from elsewhere into this header.

Source/WebKit2:

* Platform/mac/MenuUtilities.mm: Use DataDetectorsSPI.h instead of doing it here.

* WebProcess/WebPage/mac/WebPageMac.mm: Removed unneeded include of unused header,
DataDetectorsSPI.h.

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

5 years agoAX: Don't expose elements as data tables just because they use display: table
cfleizach@apple.com [Sun, 10 May 2015 14:52:50 +0000 (14:52 +0000)]
AX: Don't expose elements as data tables just because they use display: table
https://bugs.webkit.org/show_bug.cgi?id=144804

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Elements will create RenderTable objects if they have display:table. We shouldn't assume these are accessibility tables.

Test: accessibility/css-table-ignored.html

* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::isDataTable):

LayoutTests:

* accessibility/css-table-ignored-expected.txt: Added.
* accessibility/css-table-ignored.html: Added.

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

5 years agoWeb Inspector: In the console, show function name next to the source link
nvasilyev@apple.com [Sun, 10 May 2015 12:23:07 +0000 (12:23 +0000)]
Web Inspector: In the console, show function name next to the source link
https://bugs.webkit.org/show_bug.cgi?id=144372

Introduce CallFrameView to display counsole message source links. It looks like this:

    [f] functionName - filename.js:42

Reviewed by Timothy Hatcher.

* UserInterface/Base/Main.js:
(WebInspector.createSourceCodeLocationLink):
(WebInspector.linkifyLocation):
(.showSourceCodeLocation):
(WebInspector.linkifyElement):
Abstract this out as it's used in WebInspector.CallFrameView and WebInspector.createSourceCodeLocationLink.

(WebInspector.sourceCodeForURL):
Move this code from Timeline to Main.js as it's used by Console too.

(WebInspector.linkifyURLAsNode):
Remove tooltipText argument as it is never used.

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype._callFramesFromPayload):
* UserInterface/Main.html:
* UserInterface/Models/CallFrame.js:
(WebInspector.CallFrame.fromPayload):
Abstract this out as it's used in WebInspector.TimelineManager.prototype._callFramesFromPayload and
WebInspector.ConsoleMessageView._appendLocationLink.

(WebInspector.CallFrame):
* UserInterface/Views/CallFrameTreeElement.js:
(WebInspector.CallFrameTreeElement):
Move it to WebInspector.CallFrameView.iconForCallFrame.

* UserInterface/Views/CallFrameView.css: Added.
(.call-frame):
(.call-frame .icon):
(.call-frame .titles):
(.call-frame .title):
(.call-frame .source-link):
(.call-frame .title + .subtitle > .source-link):
(.call-frame .subtitle .source-link):
(.call-frame:focus .subtitle .source-link):
(.call-frame .subtitle:empty):
(.call-frame .subtitle):
(.call-frame .colon):
(.call-frame .title + .subtitle::before):
* UserInterface/Views/CallFrameView.js: Added.
(WebInspector.CallFrameView):
(WebInspector.CallFrameView.iconClassNameForCallFrame):
* UserInterface/Views/ConsoleMessageView.css:
(.console-message .console-message-location):
(.console-message .call-frame):
(.console-message .go-to-link):
(.console-message .go-to-link:focus):
(.console-message .console-message-url::before):
(.console-saved-variable): Deleted.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._appendLocationLink):
* UserInterface/Views/DebuggerDashboardView.js:
* UserInterface/Views/Main.css:
(.hidden): Deleted.
* UserInterface/Views/ProfileNodeTreeElement.js:
(WebInspector.ProfileNodeTreeElement):
* UserInterface/Views/TimelineDataGridNode.js:
(WebInspector.TimelineDataGridNode.prototype.createCellContent):

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

5 years agoMake arguments of run-benchmark more user friendly
rniwa@webkit.org [Sun, 10 May 2015 06:46:33 +0000 (06:46 +0000)]
Make arguments of run-benchmark more user friendly
https://bugs.webkit.org/show_bug.cgi?id=144835

Reviewed by Darin Adler.

Made --build-directory optional since I don't expect a typical WebKit developer to have a local build
of Chrome and Firefox. Also made --plan accept just a filename so that we can just say "speedometer"
instead of "Tools/Scripts/webkitpy/benchmark_runner/data/plans/speedometer.plan". Finally, removed
default values from --platform and --browser as they are required arguments.

* Scripts/run-benchmark:
(main): Made --build-directory optional, and removed default values from --platform and --browser.
Also added help text for --build-directory and --plan. In addition, the list of platforms and browsers
are not dynamically obtained via BrowserDriverFactory.
* Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
(BenchmarkRunner.__init__): Raise when we can't find the plan file or the plan file is not a valid JSON
file instead of suppressing the error here and blowing up later mysteriously since we won't be able to
run any benchmark in that case.
(BenchmarkRunner._findPlanFile): Added. Look for the plan in webkitpy/benchmark_runner/data/plans if
the specified file isn't a valid relative or an absolute path.
* Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver_factory.py:
(BrowserDriverFactory.available_platforms): Added. Used in main to provide the list of valid platforms
and browsers.
(BrowserDriverFactory.available_browsers): Ditto.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py:
(OSXChromeDriver.launchUrl): browserBuildPath is never optional since BenchmarkRunner.execute always
calls launchUrl with this argument so removed the default value. Also added a fallback path for when
browserBuildPath was None.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
(OSXSafariDriver.launchUrl): Ditto. We also fallback when the build directory doesn't contain Safari
so that we can use locally built WebKit to launch Safari.

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

5 years agoDeployment-target __NSi_ and __NSd_ definitions in WKFoundation.h are redundant
mitz@apple.com [Sun, 10 May 2015 03:58:20 +0000 (03:58 +0000)]
Deployment-target __NSi_ and __NSd_ definitions in WKFoundation.h are redundant
https://bugs.webkit.org/show_bug.cgi?id=144831

Reviewed by Sam Weinig.

Reverted r182846 and r182904.

* Shared/API/Cocoa/WKFoundation.h:
* WebKit2.xcodeproj/project.pbxproj:

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

5 years agoIntroduce ParentNode.idl / NonDocumentTypeChildNode.idl
cdumez@apple.com [Sun, 10 May 2015 03:22:21 +0000 (03:22 +0000)]
Introduce ParentNode.idl / NonDocumentTypeChildNode.idl
https://bugs.webkit.org/show_bug.cgi?id=144825

Reviewed by Sam Weinig.

Source/WebCore:

Introduce ParentNode.idl / NonDocumentTypeChildNode.idl as per DOM
specification and to avoid IDL code duplication:
- https://dom.spec.whatwg.org/#interface-parentnode
- https://dom.spec.whatwg.org/#interface-nondocumenttypechildnode

No Web-Exposed behavior change.

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* dom/CharacterData.idl:
* dom/Document.idl:
* dom/DocumentFragment.idl:
* dom/Element.idl:
* dom/NonDocumentTypeChildNode.idl: Copied from Source/WebCore/dom/DocumentFragment.idl.
* dom/ParentNode.idl: Copied from Source/WebCore/dom/DocumentFragment.idl.

LayoutTests:

Rebaseline test as the order of the methods changed when iterating.

* js/dom/dom-static-property-for-in-iteration-expected.txt:

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

5 years agoInvalidate the FontCache on WebProcess suspension / critical memory pressure
cdumez@apple.com [Sat, 9 May 2015 17:37:16 +0000 (17:37 +0000)]
Invalidate the FontCache on WebProcess suspension / critical memory pressure
https://bugs.webkit.org/show_bug.cgi?id=144821

Reviewed by Antti Koivisto.

Invalidate the FontCache on WebProcess suspension / critical memory
pressure to free a bit more memory (an extra 4-16Kb per WebProcess on
the pages I tested). We already purge inactive font data on
non-critical memory warning but invalidating the whole FontCache takes
care of clearing the FontCascade cache and the fontPlatformData cache
as well.

* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseCriticalMemory):

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

5 years agoRemove the PICTURE_SIZES build flag
yoav@yoav.ws [Sat, 9 May 2015 08:39:23 +0000 (08:39 +0000)]
Remove the PICTURE_SIZES build flag
https://bugs.webkit.org/show_bug.cgi?id=144679

Reviewed by Benjamin Poulain.

Removed the PICTURE_SIZES build time flag.

.:

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsMac.cmake:
* Source/cmake/OptionsWindows.cmake:
* Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

No new tests, since there's no functionality change.

* Configurations/FeatureDefines.xcconfig:
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::detectAtToken):
* css/CSSParser.h:
* css/SourceSizeList.cpp:
(WebCore::parseSizesAttribute): Deleted.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
* html/HTMLImageElement.h:
(WebCore::HTMLImageElement::currentSrc):
* html/HTMLImageElement.idl:
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
* html/parser/HTMLSrcsetParser.cpp:
(WebCore::parseDescriptors):
(WebCore::pickBestImageCandidate):

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/FeatureDefines.h:

Tools:

* Scripts/webkitperl/FeatureList.pm:

WebKitLibraries:

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

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

5 years agoLayout tests broke due to unexpected simctl output
ddkilzer@apple.com [Sat, 9 May 2015 08:20:33 +0000 (08:20 +0000)]
Layout tests broke due to unexpected simctl output

* Scripts/webkitpy/xcode/simulator.py:
(Simulator._parse_devices): Handle new Device Pairs header.
* Scripts/webkitpy/xcode/simulator_unittest.py:
(test_device_pairs): Add unit test for Device Pairs header.

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

5 years agostreams/reference-implementation/readable-stream-reader.html and streams/reference...
youenn.fablet@crf.canon.fr [Sat, 9 May 2015 06:40:33 +0000 (06:40 +0000)]
streams/reference-implementation/readable-stream-reader.html and streams/reference-implementation/bad-underlying-sources.html are flaky
https://bugs.webkit.org/show_bug.cgi?id=144813

Reviewed by Alexey Proskuryakov.

Removed small timeouts for tests that went from TIMEOUT to PASS thanks to other patches.

* streams/reference-implementation/bad-underlying-sources.html:
* streams/reference-implementation/readable-stream-reader.html:

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

5 years agoRemove convenience constructors for TextRun
mmaxfield@apple.com [Sat, 9 May 2015 06:33:02 +0000 (06:33 +0000)]
Remove convenience constructors for TextRun
https://bugs.webkit.org/show_bug.cgi?id=144752

Source/WebCore:

These convenience constructors are unnecessary. Moving the code that makes the StringView
back to the call site will also help us make things more elegant in future refactoring.

Reviewed by Darin Adler.

No new tests because there is no behavior change.

* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Remove ambiguous call.
* platform/graphics/StringTruncator.cpp:
(WebCore::stringWidth):
* platform/graphics/TextRun.h:
(WebCore::TextRun::TextRun):
* platform/mac/DragImageMac.mm:
(WebCore::widthWithFont):
(WebCore::drawAtPoint):
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
(WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):
* rendering/TextPainter.cpp:
(WebCore::TextPainter::paintText):

Source/WebKit/mac:

These convenience constructors are unnecessary. Moving the code that makes the StringView
back to the call site will also help us make things more elegant in future refactoring.

Reviewed by Darin Adler.

No new tests because there is no behavior change.

* Misc/WebKitNSStringExtras.mm:
(-[NSString _web_drawAtPoint:font:textColor:allowingFontSmoothing:]):
(-[NSString _web_widthWithFont:]):

Source/WTF:

Reviewed by Anders Carlsson.

No reason why StringView shouldn't have a StringImpl* constructor.

Test: StringView8Bit in TestWebKitAPI

* wtf/text/StringView.h: Add the constructor.

Tools:

Reviewed by Anders Carlsson.

Test the StringView which takes a StringImpl*.

* TestWebKitAPI/Tests/WTF/StringView.cpp:
(StringView8Bit): Testing is8Bit() on StringView

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

5 years agoUpdate results after Sam's patch, the order of properties changed.
ap@apple.com [Sat, 9 May 2015 05:35:02 +0000 (05:35 +0000)]
Update results after Sam's patch, the order of properties changed.

* js/dom/dom-static-property-for-in-iteration-expected.txt:

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

5 years ago[GTK] [CMake] Check for required X libraries
mcatanzaro@igalia.com [Sat, 9 May 2015 03:26:23 +0000 (03:26 +0000)]
[GTK] [CMake] Check for required X libraries
https://bugs.webkit.org/show_bug.cgi?id=144823

Reviewed by Martin Robinson.

Error out if missing libXcomposite, libXdamage, libXrender, or libXt.

* Source/cmake/OptionsGTK.cmake:

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

5 years agoElement Traversal is not just Elements anymore
weinig@apple.com [Sat, 9 May 2015 01:14:17 +0000 (01:14 +0000)]
Element Traversal is not just Elements anymore
https://bugs.webkit.org/show_bug.cgi?id=144822

Reviewed by Simon Fraser.

Source/WebCore:

Match other browsers and the new DOM spec at https://dom.spec.whatwg.org by
exposing the element traversal methods on non-Elements.

- Makes firstElementChild, lastElementChild and childElementCount available on
  Document and DocumentFragment in addition to Element.
- Makes nextElementSibling and previousElementSibling available on CharacterData
  in addition to Element.

Tests: fast/dom/element-traversal-on-character-data.html
       fast/dom/element-traversal-on-document-fragment.html
       fast/dom/element-traversal-on-document.html

* dom/CharacterData.idl:
Expose nextElementSibling and previousElementSibling.

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::firstElementChild):
(WebCore::ContainerNode::lastElementChild):
(WebCore::ContainerNode::childElementCount):
* dom/ContainerNode.h:
Move implementations of firstElementChild, lastElementChild and childElementCount here
from Element to make them shareable.

* dom/Document.idl:
* dom/DocumentFragment.idl:
Expose firstElementChild, lastElementChild and childElementCount.

* dom/Element.cpp:
(WebCore::Element::firstElementChild): Deleted.
(WebCore::Element::lastElementChild): Deleted.
(WebCore::Element::previousElementSibling): Deleted.
(WebCore::Element::nextElementSibling): Deleted.
(WebCore::Element::childElementCount): Deleted.
* dom/Element.h:
Move element traversal functions down to Node and ContainerNode.

* dom/Element.idl:
Update comments to indicate where these functions are defined now.

* dom/Node.cpp:
(WebCore::Node::previousElementSibling):
(WebCore::Node::nextElementSibling):
* dom/Node.h:
Move implementations of nextElementSibling and previousElementSibling here
from Element to make them shareable.

LayoutTests:

Add new tests for element traversal functions on Document, DocumentFragment and CharacterData.

* fast/dom/element-traversal-on-character-data-expected.txt: Added.
* fast/dom/element-traversal-on-character-data.html: Added.
* fast/dom/element-traversal-on-document-expected.txt: Added.
* fast/dom/element-traversal-on-document-fragment-expected.txt: Added.
* fast/dom/element-traversal-on-document-fragment.html: Added.
* fast/dom/element-traversal-on-document.html: Added.

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

5 years ago[Content Extensions] Add simple tester that takes an extension and compiles it
weinig@apple.com [Sat, 9 May 2015 00:33:37 +0000 (00:33 +0000)]
[Content Extensions] Add simple tester that takes an extension and compiles it
https://bugs.webkit.org/show_bug.cgi?id=144781

Reviewed by Dan Bates.

* ContentExtensionTester: Added.
* ContentExtensionTester/Configurations: Added.
* ContentExtensionTester/Configurations/Base.xcconfig: Copied from Source/bmalloc/Configurations/Base.xcconfig.
* ContentExtensionTester/Configurations/ContentExtensionTester.xcconfig: Copied from Source/bmalloc/Configurations/bmalloc.xcconfig.
* ContentExtensionTester/Configurations/DebugRelease.xcconfig: Copied from Source/bmalloc/Configurations/DebugRelease.xcconfig.
* ContentExtensionTester/ContentExtensionTester.xcodeproj: Added.
* ContentExtensionTester/ContentExtensionTester.xcodeproj/project.pbxproj: Added.
* ContentExtensionTester/Makefile: Copied from Tools/TestWebKitAPI/Makefile.
* ContentExtensionTester/main.m: Added.
* Scripts/run-content-extension-tester: Copied from Tools/Scripts/run-webkit-tests.

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

5 years agoExtend the SaneChain optimization to Contiguous arrays
fpizlo@apple.com [Sat, 9 May 2015 00:18:43 +0000 (00:18 +0000)]
Extend the SaneChain optimization to Contiguous arrays
https://bugs.webkit.org/show_bug.cgi?id=144664

Reviewed by Mark Lam.

Previously if you loaded from a hole, you'd either have to take slow path for the array
load (which means C++ calls and prototype chain walks) or you'd exit (if you hadn't
gathered the necessary profiling yet). But that's unnecessary if we know that the
prototype chain is sane - i.e. has no indexed properties. Then we can just return
Undefined for the hole.

Making this change requires setting more watchpoints on the array prototype chain. But
that hit a horrible bug: ArrayPrototype still uses the static lookup tables and builds
itself up lazily. This means that this increased the number of recompilations we'd get
due to the array prototype chain being built up.

So, this change also removes the laziness and static tables from ArrayPrototype.

But to make that change, I also had to add a helper for eagerly building up a prototype
that has builtin functions.

* CMakeLists.txt:
* DerivedSources.make:
* dfg/DFGArrayMode.h:
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileGetByVal):
* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::finishCreation):
(JSC::ArrayPrototype::getOwnPropertySlot): Deleted.
* runtime/ArrayPrototype.h:
* runtime/JSObject.h:

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

5 years agoUnreviewed GTK+ gardening
mrobinson@webkit.org [Sat, 9 May 2015 00:13:52 +0000 (00:13 +0000)]
Unreviewed GTK+ gardening

* platform/gtk/TestExpectations: Unskip a test that was failing only because the shared
baseline had a failure in it.
* platform/gtk/fast/events/event-attribute-expected.txt: Added.

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

5 years agoUnreviewed GTK+ gardening
mrobinson@webkit.org [Sat, 9 May 2015 00:01:28 +0000 (00:01 +0000)]
Unreviewed GTK+ gardening

* platform/gtk/TestExpectations: Un-expectation some tests that are now passing.

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

5 years agoUnreviewed GTK+ gardening
mrobinson@webkit.org [Fri, 8 May 2015 23:55:36 +0000 (23:55 +0000)]
Unreviewed GTK+ gardening

Remove expectations for tests that are also skipped for all WebKit2
ports. This will more easily allow us to handle them when they are
eventually (if at all) unskipped for WebKit2.

* platform/gtk/TestExpectations:

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

5 years agoShuffle touch-related code to keep the internal builds working
bdakin@apple.com [Fri, 8 May 2015 23:18:21 +0000 (23:18 +0000)]
Shuffle touch-related code to keep the internal builds working
https://bugs.webkit.org/show_bug.cgi?id=144812

Reviewed by Benjamin Poulain.

* Shared/NativeWebTouchEvent.h:
* Shared/WebEvent.h:
* Shared/WebEventConversion.cpp:
* Shared/ios/NativeWebTouchEventIOS.mm:
(WebKit::NativeWebTouchEvent::extractWebTouchPoint):
(WebKit::extractWebTouchPoint): Deleted.
* Shared/ios/WebPlatformTouchPointIOS.cpp:

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

5 years ago<rdar://problem/20757196> NSInternalInconsistencyException raised in -[NSString encod...
mitz@apple.com [Fri, 8 May 2015 23:13:36 +0000 (23:13 +0000)]
<rdar://problem/20757196> NSInternalInconsistencyException raised in -[NSString encodeWithCoder:] beneath createEncodedObject when using WKRemoteObjectEncoder for Safari AutoFill
https://bugs.webkit.org/show_bug.cgi?id=144818

Reviewed by Anders Carlsson.

Allow NSString instances that contain unpaired surrogates to be encoded by
WKRemoteObjectCoder by encoding them directly rather than using
-[NSString encodeWithCoder:].

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeString): Added. Sets an API::String as the object to encode.
(encodeObject): Changed to use encodeString for NSString instances.
(decodeString): Added. Gets an API::String from the dictionary and returns it as an
NSString.
(decodeObject): Changed to use decodeString for NSString instances.

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

5 years agoFix the build.
timothy_horton@apple.com [Fri, 8 May 2015 23:11:56 +0000 (23:11 +0000)]
Fix the build.

* Platform/mac/LayerHostingContext.mm:
(WebKit::LayerHostingContext::createFencePort):

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

5 years agoPeriodically repaint during resize while using the DynamicSizeWithMinimumViewSize...
timothy_horton@apple.com [Fri, 8 May 2015 23:04:29 +0000 (23:04 +0000)]
Periodically repaint during resize while using the DynamicSizeWithMinimumViewSize layout strategy
https://bugs.webkit.org/show_bug.cgi?id=144816

Reviewed by Simon Fraser.

* UIProcess/mac/WKViewLayoutStrategy.mm:
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy initWithPage:view:mode:]):
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy _updateTransientScale:]):
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
Factor out _updateTransientScale from updateLayout.
Keep track of the last viewScaleFactor that we know is being displayed
(_lastCommittedViewScale) and use that for computing the transient scale,
so that we can recompute the transient scale while the UI process's notion
of the actual view scale might have moved ahead of what the Web process has
painted.

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

5 years agoCreating a large MarkedBlock sometimes results in more than one cell in the block
msaboff@apple.com [Fri, 8 May 2015 22:54:24 +0000 (22:54 +0000)]
Creating a large MarkedBlock sometimes results in more than one cell in the block
https://bugs.webkit.org/show_bug.cgi?id=144815

Reviewed by Mark Lam.

Large MarkedBlocks should have one and only one cell.  Changed the calculation of
m_endAtom for large blocks to use the location of the first cell + 1.  This
assures that large blocks only have one cell.

* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::MarkedBlock):

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

5 years agoBuild fix.
ap@apple.com [Fri, 8 May 2015 22:11:30 +0000 (22:11 +0000)]
Build fix.

Reviewed by Dan Bernstein.

* DumpRenderTree/mac/DumpRenderTreeDraggingInfo.h:
* DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm:
(-[DumpRenderTreeDraggingInfo springLoadingHighlight]):
(-[DumpRenderTreeDraggingInfo resetSpringLoading]):
* WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.h:
* WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.mm:
(-[WebKitTestRunnerDraggingInfo springLoadingHighlight]):
(-[WebKitTestRunnerDraggingInfo resetSpringLoading]):

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

5 years agoFix the build.
timothy_horton@apple.com [Fri, 8 May 2015 21:48:37 +0000 (21:48 +0000)]
Fix the build.

* UIProcess/WebPageProxy.cpp:

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

5 years ago[GTK] Some tests fail because they do not assume the popup menu captures click events
mrobinson@webkit.org [Fri, 8 May 2015 21:21:32 +0000 (21:21 +0000)]
[GTK] Some tests fail because they do not assume the popup menu captures click events
https://bugs.webkit.org/show_bug.cgi?id=40601

Reviewed by Carlos Garcia Campos.

Tools:

Popdown all attached menus when moving between tests and between each new
event sent to the WebView. This prevents context and popup menus from eating
events.

* WebKitTestRunner/PlatformWebView.h: Added a helper method to do menu popdown.
* WebKitTestRunner/TestController.cpp: Add a specialization of these methods for GTK+.
* WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
(WTR::dispatchEvent): Popdown all menus between dispatching events.
(WTR::EventSenderProxy::replaySavedEvents): Pass the view when dispatching events.
(WTR::EventSenderProxy::sendOrQueueEvent): Pass the view when dispatching events.
* WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
(WTR::PlatformWebView::hideAllPopupMenus): Added this helper.
* WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::platformConfigureViewForTest): Added this stub, which is no
longer in the platform-independent file.
(WTR::TestController::platformResetPreferencesToConsistentValues): Popdown menus.

LayoutTests:

* platform/gtk/TestExpectations: Unskip tests that are passing now
and classify remaining failures.
* platform/gtk/editing/selection/5354455-2-expected.txt: Rebaselined.
* platform/gtk/editing/selection/doubleclick-crash-expected.png: Rebaseline.
* platform/gtk/editing/selection/doubleclick-crash-expected.txt: Rebaseline.
* platform/gtk/editing/selection/user-select-all-image-with-single-click-expected.txt: Rebaselined.
* platform/gtk/editing/selection/user-select-all-with-single-click-expected.txt: Rebaselined.
* platform/gtk/fast/events/mouseup-from-button2-expected.txt: Rebaseline.
* platform/gtk/fast/events/shadow-event-path-2-expected.txt: Rebaseline.
* platform/gtk/fast/events/shadow-event-path-expected.txt: Rebaseline.
* platform/gtk/fast/events/updateLayoutForHitTest-expected.txt: Rebaselined.

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

5 years agoFix the build.
timothy_horton@apple.com [Fri, 8 May 2015 20:57:49 +0000 (20:57 +0000)]
Fix the build.

* Platform/mac/LayerHostingContext.mm:
(WebKit::LayerHostingContext::createFencePort):

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

5 years ago[WK2] Scroll-snap tests timeout intermittently for overflow scroll cases
bfulgham@apple.com [Fri, 8 May 2015 20:50:28 +0000 (20:50 +0000)]
[WK2] Scroll-snap tests timeout intermittently for overflow scroll cases
https://bugs.webkit.org/show_bug.cgi?id=144811

* platform/mac-wk2/TestExpectations: Mark tests as flaky.

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

5 years agoFix the build.
timothy_horton@apple.com [Fri, 8 May 2015 20:43:12 +0000 (20:43 +0000)]
Fix the build.

* Platform/mac/LayerHostingContext.mm:
(WebKit::LayerHostingContext::createFencePort):

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

5 years agoFlip the direction of the fence in scaleViewAndUpdateGeometryFenced
timothy_horton@apple.com [Fri, 8 May 2015 20:40:32 +0000 (20:40 +0000)]
Flip the direction of the fence in scaleViewAndUpdateGeometryFenced
https://bugs.webkit.org/show_bug.cgi?id=144810

Reviewed by Simon Fraser.

Send the fence from the Web process to the UI process, instead of vice versa.
This means that we won't keep the UI process CAContext blocked for the whole
time that the Web process is doing layout/painting/etc. Instead, we'll start
blocking the Web process CAContext immediately after flushing and before committing,
and send the fence to the UI process to be applied immediately. This minimizes
the amount of time in both processes spent blocked on the fence.

* Platform/mac/LayerHostingContext.h:
* Platform/mac/LayerHostingContext.mm:
(WebKit::LayerHostingContext::createFencePort):
Add createFencePort, which creates a MachSendRight wrapping a CA fence port.
Note that you must setFencePort() with this port if you want the LayerHostingContext's
CAContext to block on it!

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::scaleViewAndUpdateGeometryFenced):
(WebKit::WebPageProxy::machSendRightCallback):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
Create a callback and send it to the Web process along with scaleViewAndUpdateGeometryFenced.

* UIProcess/mac/WKViewLayoutStrategy.mm:
(-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
When called back, install the fence port in our CAContext; when the commit goes through,
remove the transient scale as we did previously.

* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::replyWithFenceAfterNextFlush):
(WebKit::DrawingArea::updateGeometry): Deleted.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaleViewAndUpdateGeometryFenced):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Instead of installing a fence created in the UI process, tell the DrawingArea
to create one and reply to the UI process with it after the next flush.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
(WebKit::TiledCoreAnimationDrawingArea::replyWithFenceAfterNextFlush):
After flushing, before committing, create a fence and reply to any
callbacks that requested fences, and install it in our context.

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

5 years ago.:
mrobinson@webkit.org [Fri, 8 May 2015 20:29:45 +0000 (20:29 +0000)]
.:
015-05-08  Michael Catanzaro  <mcatanzaro@igalia.com>, Martin Robinson <mrobinson@igalia.com>

[GTK] Checks for DEVELOPMENT_BUILD are all wrong
https://bugs.webkit.org/show_bug.cgi?id=144746

Reviewed by Carlos Garcia Campos.

Don't set DEVELOPMENT_BUILD. We check whether it is defined for conditional compilation, not
what it is defined to, so defining it to 0 effectively turned it on always. Instead set
ENABLE_DEVELOPER_MODE so that we can use the ENABLE macro inside WebKit source code.

* Source/cmake/OptionsGTK.cmake:

Source/WebCore:
[GTK] Checks for DEVELOPMENT_BUILD are all wrong
https://bugs.webkit.org/show_bug.cgi?id=144746

Reviewed by Carlos Garcia Campos.

Use ENABLE(DEVELOPER_MODE) rather than DEVELOPMENT_BUILD.

* platform/gtk/GtkUtilities.cpp:
* platform/gtk/GtkUtilities.h:
* platform/text/gtk/HyphenationLibHyphen.cpp:
(WebCore::availableLocales):

Source/WebKit2:
[GTK] Checks for DEVELOPMENT_BUILD are all wrong
https://bugs.webkit.org/show_bug.cgi?id=144746

Reviewed by Carlos Garcia Campos.

Use ENABLE(DEVELOPER_MODE) rather than DEVELOPMENT_BUILD.

* Shared/gtk/ProcessExecutablePathGtk.cpp:
(WebKit::findWebKitProcess):
* UIProcess/API/gtk/WebKitWebContext.cpp:
(injectedBundleDirectory):
* UIProcess/gtk/TextCheckerGtk.cpp:
(WebKit::enchantTextChecker):

Tools:
015-05-08  Michael Catanzaro  <mcatanzaro@igalia.com>, Martin Robinson <mrobinson@igalia.com>

[GTK] Checks for DEVELOPMENT_BUILD are all wrong
https://bugs.webkit.org/show_bug.cgi?id=144746

Reviewed by Carlos Garcia Campos.

Use ENABLE_DEVELOPER_MODE rather than DEVELOPMENT_BUILD.

* MiniBrowser/gtk/main.c:
(main):

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

5 years agoMapDataImpl::add() shouldn't do the same hash lookup twice.
oliver@apple.com [Fri, 8 May 2015 20:07:29 +0000 (20:07 +0000)]
MapDataImpl::add() shouldn't do the same hash lookup twice.
https://bugs.webkit.org/show_bug.cgi?id=144759

Reviewed by Gavin Barraclough.

We don't actually need to do a double lookup here, all we need to
do is update the index to point to the correct m_size.

* runtime/MapDataInlines.h:
(JSC::JSIterator>::add):

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

5 years agoMicro-optimize JSON serialization of string primitives.
akling@apple.com [Fri, 8 May 2015 19:23:25 +0000 (19:23 +0000)]
Micro-optimize JSON serialization of string primitives.
<https://webkit.org/b/144800>

Reviewed by Sam Weinig.

Don't use the out-of-line JSValue::getString() to grab at string primitives
in serialization. Just check if it's a JSString and then downcast to grab at
the WTF::String inside.

2% progression on Kraken/json-stringify-tinderbox.

* runtime/JSONObject.cpp:
(JSC::Stringifier::appendStringifiedValue):

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

5 years agoCrashes in SocketStreamHandleBase::close
ap@apple.com [Fri, 8 May 2015 19:14:43 +0000 (19:14 +0000)]
Crashes in SocketStreamHandleBase::close
https://bugs.webkit.org/show_bug.cgi?id=144767
rdar://problem/20486538

Reviewed by Brady Eidson.

This is a speculative fix, I could not reproduce the crash.

* Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::processFrame):
Normally, processOutgoingFrameQueue() closes the handle in the end when called in
OutgoingFrameQueueClosing state. But there is no definitive protection against
processing two CLOSE frames, in which case we'd try to close the handle twice.

* platform/network/cf/SocketStreamHandleCFNet.cpp:
(WebCore::SocketStreamHandle::readStreamCallback): Passing empty data to the client
results in the socket being closed, which makes no sense here.

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

5 years agoFix ProcessLauncher port leak
andersca@apple.com [Fri, 8 May 2015 19:07:01 +0000 (19:07 +0000)]
Fix ProcessLauncher port leak
https://bugs.webkit.org/show_bug.cgi?id=144807
rdar://problem/20593291

Reviewed by Sam Weinig.

* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService):
xpc_dictionary_set_mach_send increments the send right count so make sure to
balance it with a call to mach_port_deallocate.

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