WebKit-https.git
4 years agoFix build.
andersca@apple.com [Wed, 22 Jun 2016 00:08:10 +0000 (00:08 +0000)]
Fix build.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

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

4 years agoUnreviewed, rolling out r202302, r202303, r202305, and
jiewen_tan@apple.com [Wed, 22 Jun 2016 00:04:48 +0000 (00:04 +0000)]
Unreviewed, rolling out r202302, r202303, r202305, and
r202306.

Roll out the rollouts because of breaking the build.

Reverted changesets:

"Unreviewed, rolling out r200678."
https://bugs.webkit.org/show_bug.cgi?id=157453
http://trac.webkit.org/changeset/202302

"Unreviewed, rolling out r200619."
https://bugs.webkit.org/show_bug.cgi?id=131443
http://trac.webkit.org/changeset/202303

"Unreviewed, attempt to fix the build after r202303."
http://trac.webkit.org/changeset/202305

"Unreviewed, attempt to fix the build after r202303."
http://trac.webkit.org/changeset/202306

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

4 years agoUnreviewed, attempt to fix the build after r202303.
cdumez@apple.com [Tue, 21 Jun 2016 23:52:50 +0000 (23:52 +0000)]
Unreviewed, attempt to fix the build after r202303.

* bindings/js/JSDOMIterator.h:
(WebCore::IteratorInspector::decltype):
(WebCore::IteratorInspector::test):

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

4 years agoUnreviewed, attempt to fix the build after r202303.
cdumez@apple.com [Tue, 21 Jun 2016 23:47:55 +0000 (23:47 +0000)]
Unreviewed, attempt to fix the build after r202303.

* bindings/js/JSDOMIterator.h:
(WebCore::toJS):

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

4 years agoLayoutTest tiled-drawing/scrolling/latched-div-with-scroll-snap.html is flaky
zalan@apple.com [Tue, 21 Jun 2016 23:32:34 +0000 (23:32 +0000)]
LayoutTest tiled-drawing/scrolling/latched-div-with-scroll-snap.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=158320

Reviewed by Simon Fraser.

This test case is flaky because:
1. There are multiple mouseScrollByWithWheelAndMomentumPhases() event bundles and they all need their own
callbacks. (see additional eventSender.callAfterScrollingCompletes()) -> fail
2. When the test fails, the testFailed() function is called with undefined variables. -> timeout

* platform/mac-wk2/TestExpectations:
* tiled-drawing/scrolling/latched-div-with-scroll-snap.html:

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

4 years agoUnreviewed, rolling out r200619.
jiewen_tan@apple.com [Tue, 21 Jun 2016 23:24:37 +0000 (23:24 +0000)]
Unreviewed, rolling out r200619.

This incompleted feature broke http://m.yahoo.co.jp. Roll it
out together with r200678.

Reverted changeset:

"NodeList should be iterable"
https://bugs.webkit.org/show_bug.cgi?id=131443
http://trac.webkit.org/changeset/200619

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

4 years agoUnreviewed, rolling out r200678.
jiewen_tan@apple.com [Tue, 21 Jun 2016 23:21:14 +0000 (23:21 +0000)]
Unreviewed, rolling out r200678.

This incompleted feature broke http://m.yahoo.co.jp. Roll it
out together with r200619.

Reverted changeset:

"Ensure DOM iterators remain done"
https://bugs.webkit.org/show_bug.cgi?id=157453
http://trac.webkit.org/changeset/200678

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

4 years agoSkip HeapSnapshot test on WebKit1. Shared VM skews the data.
joepeck@webkit.org [Tue, 21 Jun 2016 23:09:50 +0000 (23:09 +0000)]
Skip HeapSnapshot test on WebKit1. Shared VM skews the data.

Unreviewed gardening.

In this case, snapshots with snapshots with snapshots in the same VM
causes the test to run out of memory. This does not happen in WebKit2.

* platform/mac-wk1/TestExpectations:

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

4 years agoTest gardening for platform-specific font-fallback on macOS Sierra
mmaxfield@apple.com [Tue, 21 Jun 2016 23:07:31 +0000 (23:07 +0000)]
Test gardening for platform-specific font-fallback on macOS Sierra
https://bugs.webkit.org/show_bug.cgi?id=159003
<rdar://problem/25807529>

Unreviewed.

* fast/text/font-cursive-italic-cjk-2-expected.html: Added.
* fast/text/font-cursive-italic-cjk-2.html: Added.
* platform/mac/TestExpectations:

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

4 years agoOptions::useImmortalObjects is not safe for conservative GC
ggaren@apple.com [Tue, 21 Jun 2016 23:06:08 +0000 (23:06 +0000)]
Options::useImmortalObjects is not safe for conservative GC
https://bugs.webkit.org/show_bug.cgi?id=158999

Reviewed by Geoffrey Garen.

useImmortalObjects set the mark bit to keep an object from being
reallocated. This had the negative side-effect of convincing the
conservative marker that the object was a valid and live cell, which
would cause us to visit garbage.

* heap/Heap.cpp:
(JSC::Heap::didFinishCollection):
(JSC::Heap::resumeCompilerThreads):
(JSC::Heap::setFullActivityCallback):
(JSC::Heap::markDeadObjects): Deleted.
* heap/Heap.h: Don't set the mark bit on a dead object. That's a bug in
a conservative GC.

* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::retire): New helper.

(JSC::MarkedAllocator::reset): Automatically retire old blocks when
we're doing the immortal objects thing. This has the effect of
preserving memory for debugging because we never recycle a previously
allocated block.

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

4 years agoBegin moving the Apple Pay code to the open source repository
andersca@apple.com [Tue, 21 Jun 2016 22:46:16 +0000 (22:46 +0000)]
Begin moving the Apple Pay code to the open source repository
https://bugs.webkit.org/show_bug.cgi?id=158998

Reviewed by Tim Horton.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:
Add ENABLE_APPLE_PAY.

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:
Add ENABLE_APPLE_PAY.

* Modules/applepay/PaymentCoordinator.cpp: Added.
* Modules/applepay/PaymentCoordinator.h: Added.
* Modules/applepay/PaymentCoordinatorClient.h: Added.
* Modules/applepay/PaymentRequest.cpp: Added.
* Modules/applepay/PaymentRequest.h: Added.
* Modules/applepay/cocoa/PaymentCocoa.mm: Added.
* WebCore.xcodeproj/project.pbxproj:
Add new files.

* dom/EventNames.h:
Add new event names.

* page/MainFrame.h:
Use a forward declaration.

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:
Add ENABLE_APPLE_PAY.

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:
Add ENABLE_APPLE_PAY.

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
Add ENABLE_APPLE_PAY.

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

4 years agoAdd system tracing points for requestAnimationFrame() workflow
commit-queue@webkit.org [Tue, 21 Jun 2016 22:29:57 +0000 (22:29 +0000)]
Add system tracing points for requestAnimationFrame() workflow
https://bugs.webkit.org/show_bug.cgi?id=158723

Patch by Said Abou-Hallawa <sabouhallawa@apple,com> on 2016-06-21
Reviewed by Simon Fraser.

Source/WebCore:

Add trace points for requestAnimationFrame().

* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::requestAnimationFrameEnabled):
(WebCore::ScriptedAnimationController::serviceScriptedAnimations):
(WebCore::ScriptedAnimationController::windowScreenDidChange):
(WebCore::ScriptedAnimationController::scheduleAnimation):
* dom/ScriptedAnimationController.h:
* platform/graphics/ios/DisplayRefreshMonitorIOS.mm:
(WebCore::DisplayRefreshMonitorIOS::requestRefreshCallback):
(WebCore::DisplayRefreshMonitorIOS::displayLinkFired):

Source/WebKit2:

Add trace points for requestAnimationFrame().

* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::buildTransaction):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::didUpdate):
(WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::flush):

Source/WTF:

Define new trace score codes for requestAnimationFrame().

* wtf/SystemTracing.h:
(WTF::TracePoint):
(WTF::TraceScope::TraceScope):
(WTF::TraceScope::~TraceScope):

Tools:

Add new plist entries to be used by kdebug_trace() viewing tools.

* Tracing/SystemTracePoints.plist:

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

4 years agoWKWebView with no WKNavigationDelegate does not follow universal links
commit-queue@webkit.org [Tue, 21 Jun 2016 22:26:57 +0000 (22:26 +0000)]
WKWebView with no WKNavigationDelegate does not follow universal links
<rdar://problem/24374110>
https://bugs.webkit.org/show_bug.cgi?id=158997

Patch by Sam Weinig <sam@webkit.org> on 2016-06-21
Reviewed by Dan Bernstein.

Source/WebKit2:

API Test:
     WKWebView.DefaultNavigationDelegate

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
When initializing the WKWebView, set a default navigation client.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setLoaderClient):
Be sure to clear out a navigation client, if present, when setting a loader client,
as they are mutually exclusive.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/WKWebViewDefaultNavigationDelegate.mm: Added.
Add a new test that shows that we have a default navigation delegate by swizzling
-[NSWorkspace openURL:]. This will only be called if there is a default client.

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

4 years ago[iOS] Typing text into a text field or text area causes screen to scroll down (hiding...
simon.fraser@apple.com [Tue, 21 Jun 2016 22:19:37 +0000 (22:19 +0000)]
[iOS] Typing text into a text field or text area causes screen to scroll down (hiding text entry)
https://bugs.webkit.org/show_bug.cgi?id=158970

Reviewed by Ryosuke Niwa.

Source/WebCore:

insertTextWithoutSendingTextEvent() should only reveal the selection up to the main frame on iOS,
since the UI process can zoom and scroll the view to the text input.

Test: fast/forms/ios/typing-in-input-in-iframe.html

* editing/Editor.cpp:
(WebCore::Editor::insertTextWithoutSendingTextEvent):

LayoutTests:

Test that focuses an input in a frame and then types a character, then checks for scrolling.

* fast/forms/ios/typing-in-input-in-iframe-expected.txt: Added.
* fast/forms/ios/typing-in-input-in-iframe.html: Added.

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

4 years agoREGRESSION(r201177): Web Inspector: ContentBrowser navigation bar should fit on a...
nvasilyev@apple.com [Tue, 21 Jun 2016 21:11:21 +0000 (21:11 +0000)]
REGRESSION(r201177): Web Inspector: ContentBrowser navigation bar should fit on a single line
https://bugs.webkit.org/show_bug.cgi?id=158700
<rdar://problem/26772058>

Reviewed by Joseph Pecoraro.

* UserInterface/Views/ContentBrowser.css:
(.content-browser > .navigation-bar > .item):
Set the height to 28px, as it was before r201177.
Make it one pixel shorter than the navigation bar for better vertical alignment.

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

4 years agoWebRTC: Remove unused MediaEndpointClient::gotRemoteSource function
adam.bergkvist@ericsson.com [Tue, 21 Jun 2016 20:58:27 +0000 (20:58 +0000)]
WebRTC: Remove unused MediaEndpointClient::gotRemoteSource function
https://bugs.webkit.org/show_bug.cgi?id=158986

Reviewed by Eric Carlson.

Remote sources are explicitly created with MediaEndpoint::createMutedRemoteSource so the
MediaEndpointClient::gotRemoteSource can be removed.

No change in behavior.

* Modules/mediastream/MediaEndpointPeerConnection.cpp:
(WebCore::MediaEndpointPeerConnection::gotRemoteSource): Deleted.
* Modules/mediastream/MediaEndpointPeerConnection.h:
* platform/mediastream/MediaEndpoint.h:

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

4 years agoFocus event dispatched in iframe causes parent document to scroll incorrectly
simon.fraser@apple.com [Tue, 21 Jun 2016 20:57:29 +0000 (20:57 +0000)]
Focus event dispatched in iframe causes parent document to scroll incorrectly
https://bugs.webkit.org/show_bug.cgi?id=158629
rdar://problem/26521616

Reviewed by Tim Horton.
Source/WebCore:

When focussing elements in iframes, the page could scroll to an incorrect location.
This happened because code in Element::focus() tried to disable scrolling on focus,
but did so only for the current frame, so ancestor frames got programmatically scrolled.
On iOS we handle the scrolling in the UI process, so never want the web process to
do programmatic scrolling.

Fix by changing the focus and cache restore code to use SelectionRevealMode::DoNotReveal,
rather than manually prohibiting frame scrolling. Pass SelectionRevealMode through various callers,
and use RevealUpToMainFrame for iOS, allowing the UI process to do the zoomToRect: for the main frame.

Tests: fast/forms/ios/focus-input-in-iframe.html
       fast/forms/ios/programmatic-focus-input-in-iframe.html

* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::scrollIntoView):
(WebCore::Element::scrollIntoViewIfNeeded):
(WebCore::Element::scrollIntoViewIfNotVisible):
(WebCore::Element::focus):
(WebCore::Element::updateFocusAppearance):
* dom/Element.h:
* editing/Editor.cpp:
(WebCore::Editor::insertTextWithoutSendingTextEvent):
(WebCore::Editor::revealSelectionAfterEditingOperation):
(WebCore::Editor::findStringAndScrollToVisible):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::updateAndRevealSelection):
(WebCore::FrameSelection::revealSelection):
(WebCore::FrameSelection::FrameSelection): Deleted.
* editing/FrameSelection.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateFocusAppearance):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::updateFocusAppearance):
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::contextMenuItemSelected):
* page/FrameView.cpp:
(WebCore::FrameView::scrollToAnchor):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollRectToVisible):
(WebCore::RenderLayer::autoscroll):
* rendering/RenderLayer.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::scrollRectToVisible):
* rendering/RenderObject.h:

Source/WebKit/mac:

Pass SelectionRevealMode::Reveal in existing code.

* WebView/WebFrame.mm:
(-[WebFrame _scrollDOMRangeToVisible:]):
(-[WebFrame _scrollDOMRangeToVisible:withInset:]):
(-[WebFrame revealSelectionAtExtent:]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView jumpToSelection:]):
(-[WebHTMLView centerSelectionInVisibleArea:]):

Source/WebKit2:

Pass SelectionRevealMode::Reveal in existing code.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::centerSelectionInVisibleArea):

LayoutTests:

* fast/forms/ios/focus-input-in-iframe-expected.txt: Added.
* fast/forms/ios/focus-input-in-iframe.html: Added.
* fast/forms/ios/programmatic-focus-input-in-iframe-expected.txt: Added.
* fast/forms/ios/programmatic-focus-input-in-iframe.html: Added.

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

4 years ago[iOS][WK2] When an animation frame is missed, the UI process should immediately notif...
commit-queue@webkit.org [Tue, 21 Jun 2016 20:53:45 +0000 (20:53 +0000)]
[iOS][WK2] When an animation frame is missed, the UI process should immediately notify the Web process once a frame is committed
https://bugs.webkit.org/show_bug.cgi?id=158933

Patch by Said Abou-Hallawa <sabouhallawa@apple,com> on 2016-06-21
Reviewed by Simon Fraser.

When a frame is committed, the UI process schedules a CADisplayLink and waits until
the next didRefreshDisplay event is fired. This causes more delay in the scenario
where there are frames are dropped. didRefreshDisplay() should be called immediately
when commitLayerTree message is received and the last frame was dropped.

The fix is to have the CADisplayLink active all the times. It should be paused
only when we detect at least one frame is dropped. In this case we should not
send a message to the UI process since it has not sent the last requested LayerTree.
Also we should not waste the CPU time by scheduling a new CADisplayLink since we
have not processed the last event. We should resume CADisplayLink timer once a
commitLayerTree message is received.

* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(-[WKOneShotDisplayLinkHandler pause]):
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
(-[WKOneShotDisplayLinkHandler displayLinkFired:]):

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

4 years agoAdd an expectation for another copy of fast/canvas/webgl/premultiplyalpha-test.html
ap@apple.com [Tue, 21 Jun 2016 20:47:17 +0000 (20:47 +0000)]
Add an expectation for another copy of fast/canvas/webgl/premultiplyalpha-test.html

* platform/mac/TestExpectations:

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

4 years agoUpdate Sierra test expectations for fast/canvas/webgl/premultiplyalpha-test.html
ap@apple.com [Tue, 21 Jun 2016 20:18:03 +0000 (20:18 +0000)]
Update Sierra test expectations for fast/canvas/webgl/premultiplyalpha-test.html

* platform/mac/TestExpectations:

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

4 years agoCodeBlock::shrinkToFit is racy
sbarati@apple.com [Tue, 21 Jun 2016 20:14:00 +0000 (20:14 +0000)]
CodeBlock::shrinkToFit is racy
https://bugs.webkit.org/show_bug.cgi?id=158994
<rdar://problem/26920212>

Reviewed by Filip Pizlo.

To see why this is racy, consider the following scenario:
- CodeBlock A is link()ing its baseline compile.
- CodeBlock B is inlining A, and asks A for a result profile in DFGBytecodeParser.
- The race occurs when the link() step of the baseline compile calls shrinkToFit
  on its m_resultProfiles field without grabbing a lock. This leads to a bad
  time because the DFG compile will be reading from that vector as it's getting
  changed by the baseline link() method.

This race has always existed, though the move to a concurrent baseline
JIT has made it more likely to occur. The solution is to have CodeBlock::shrinkToFit
grab its lock before shrinking the vector.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::shrinkToFit):

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

4 years agoMigrate testair & testb3 settings from Xcode project to ToolExecutable.xcconfig
ddkilzer@apple.com [Tue, 21 Jun 2016 19:06:59 +0000 (19:06 +0000)]
Migrate testair & testb3 settings from Xcode project to ToolExecutable.xcconfig
<https://webkit.org/b/158989>

Reviewed by Andy Estes.

* Configurations/ToolExecutable.xcconfig:
(CODE_SIGN_ENTITLEMENTS_ios_testair): Add from Xcode project.
* JavaScriptCore.xcodeproj/project.pbxproj:
(CODE_SIGN_ENTITLEMENTS_ios_testair): Move to
ToolExecutable.xcconfig.
(PRODUCT_NAME): Remove.  This variable is already set for both
testair and testb3 since those build configurations use
ToolExecutable.xcconfig as a base.

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

4 years agoLLInt doesn't throw stack exception overflow from parent frame
sbarati@apple.com [Tue, 21 Jun 2016 19:03:22 +0000 (19:03 +0000)]
LLInt doesn't throw stack exception overflow from parent frame
https://bugs.webkit.org/show_bug.cgi?id=158962
<rdar://problem/26902188>

Reviewed by Filip Pizlo.

All JIT tiers will throw stack overflow exceptions from the parent frame.
The LLInt, on the other hand, did not use to. I've changed the LLInt to be
consistent with the JITs. The reason I found this bug is because we had a
test that would give different results depending on if the function was compiled
in the baseline or the LLInt. Since Filip recently landed the concurrent baseline
JIT patch, this otherwise deterministic test became dependent on it being compiled
in the LLInt or one of the JIT tiers. I've added a new test that is deterministic
because it runs the test with --useJIT=false.

* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* tests/stress/llint-stack-overflow-location.js: Added.
(stackTraceDescription):
(foo):
(catch):

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

4 years agoCODE_SIGN_ENTITLEMENTS should be applied to iOS Simulator builds
ddkilzer@apple.com [Tue, 21 Jun 2016 18:54:29 +0000 (18:54 +0000)]
CODE_SIGN_ENTITLEMENTS should be applied to iOS Simulator builds
<https://webkit.org/b/158990>
<rdar://problem/26906273>

Reviewed by Dan Bernstein.

* Configurations/JSC.xcconfig:
(CODE_SIGN_ENTITLEMENTS): Change [sdk=iphoneos*] to
[sdk=iphone*] to apply setting to iOS Simulator as well.
* Configurations/ToolExecutable.xcconfig:
(CODE_SIGN_ENTITLEMENTS): Ditto.

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

4 years agoImplement RenderMathMLOperator::layoutBlock
fred.wang@free.fr [Tue, 21 Jun 2016 18:34:35 +0000 (18:34 +0000)]
Implement RenderMathMLOperator::layoutBlock
https://bugs.webkit.org/show_bug.cgi?id=157521

Patch by Frederic Wang <fwang@igalia.com> on 2016-06-21
Reviewed by Brent Fulgham.

Source/WebCore:

No new tests, already covered by existing tests.

Add an initial implementation of RenderMathMLOperator::layoutBlock, which will perform
special layout when the MathOperator is used. We also improved how the logical height is
calculated and avoid updating the style when stretchTo is called.

* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::stretchTo):
(WebCore::RenderMathMLOperator::layoutBlock):
(WebCore::RenderMathMLOperator::computeLogicalHeight): Deleted.
* rendering/mathml/RenderMathMLOperator.h:

LayoutTests:

Update some tests to take into account improved width computation and how the anonymous text
node of operators using MathOperator is layout.

* platform/gtk/mathml/opentype/horizontal-expected.txt:
* platform/gtk/mathml/opentype/horizontal-munderover-expected.txt:
* platform/gtk/mathml/opentype/large-operators-expected.txt:
* platform/gtk/mathml/opentype/opentype-stretchy-expected.txt:
* platform/gtk/mathml/opentype/opentype-stretchy-horizontal-expected.txt:
* platform/gtk/mathml/opentype/vertical-expected.png:
* platform/gtk/mathml/opentype/vertical-expected.txt:
* platform/gtk/mathml/presentation/mo-stretch-expected.png:
* platform/gtk/mathml/presentation/mo-stretch-expected.txt:
* platform/mac/mathml/opentype/large-operators-expected.txt:
* platform/mac/mathml/opentype/opentype-stretchy-expected.txt:
* platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.txt:
* platform/mac/mathml/opentype/vertical-expected.txt:
* platform/ios-simulator/mathml/opentype/horizontal-munderover-expected.txt:
* platform/ios-simulator/mathml/opentype/opentype-stretchy-expected.txt:

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

4 years agorun-javascriptcore-tests should have flag to skip mozilla tests
aakash_jain@apple.com [Tue, 21 Jun 2016 18:26:53 +0000 (18:26 +0000)]
run-javascriptcore-tests should have flag to skip mozilla tests
https://bugs.webkit.org/show_bug.cgi?id=158963
rdar://problem/25838924

Reviewed by Alexey Proskuryakov.

* Scripts/run-javascriptcore-tests:
(runJSCStressTests): Added flag to skip mozilla tests.

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

4 years agoUnreviewed, rolling out r202277.
commit-queue@webkit.org [Tue, 21 Jun 2016 18:15:48 +0000 (18:15 +0000)]
Unreviewed, rolling out r202277.
https://bugs.webkit.org/show_bug.cgi?id=158992

imported/w3c/web-platform-tests/tools actually does exist, so
documentation files got executed as tests (Requested by ap on
#webkit).

Reverted changeset:

"Unskip non-existing imported/w3c/web-platform-tests/tools."
http://trac.webkit.org/changeset/202277

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

4 years agoUnreviewed, roll out r202268 as it looks like it was a ~50% regression on Dromaeo...
cdumez@apple.com [Tue, 21 Jun 2016 17:57:05 +0000 (17:57 +0000)]
Unreviewed, roll out r202268 as it looks like it was a ~50% regression on Dromaeo DOM Core

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GeneratePrototypeDeclaration):
* bindings/scripts/test/JS/JSInterfaceName.cpp:
(WebCore::JSInterfaceNamePrototype::finishCreation):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::JSTestActiveDOMObjectPrototype::finishCreation):
(WebCore::JSTestActiveDOMObject::createPrototype): Deleted.
(WebCore::JSTestActiveDOMObject::prototype): Deleted.
* bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
(WebCore::JSTestClassWithJSBuiltinConstructorPrototype::finishCreation):
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
(WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::finishCreation):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::JSTestCustomNamedGetterPrototype::finishCreation):
(WebCore::JSTestCustomNamedGetter::JSTestCustomNamedGetter): Deleted.
(WebCore::JSTestCustomNamedGetter::createPrototype): Deleted.
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructorPrototype::finishCreation):
(WebCore::JSTestEventConstructor::createPrototype): Deleted.
(WebCore::JSTestEventConstructor::prototype): Deleted.
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTargetPrototype::finishCreation):
(WebCore::JSTestEventTarget::JSTestEventTarget): Deleted.
(WebCore::JSTestEventTarget::createPrototype): Deleted.
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::JSTestExceptionPrototype::finishCreation):
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
(WebCore::JSTestGenerateIsReachablePrototype::finishCreation):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfacePrototype::finishCreation):
(WebCore::jsTestInterfaceImplementsStr2): Deleted.
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
(WebCore::JSTestJSBuiltinConstructorPrototype::finishCreation):
(WebCore::JSTestJSBuiltinConstructor::JSTestJSBuiltinConstructor): Deleted.
(WebCore::JSTestJSBuiltinConstructor::createPrototype): Deleted.
(WebCore::JSTestJSBuiltinConstructor::destroy): Deleted.
(WebCore::jsTestJSBuiltinConstructorTestAttributeCustom): Deleted.
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::JSTestMediaQueryListListenerPrototype::finishCreation):
(WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener): Deleted.
(WebCore::JSTestMediaQueryListListener::createPrototype): Deleted.
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorPrototype::finishCreation):
* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::JSTestNodePrototype::finishCreation):
(WebCore::JSTestNode::JSTestNode): Deleted.
(WebCore::JSTestNode::prototype): Deleted.
(WebCore::jsTestNodeName): Deleted.
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
(WebCore::JSTestNondeterministicPrototype::finishCreation):
(WebCore::JSTestNondeterministic::JSTestNondeterministic): Deleted.
(WebCore::JSTestNondeterministic::prototype): Deleted.
(WebCore::JSTestNondeterministic::destroy): Deleted.
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjPrototype::finishCreation):
(WebCore::JSTestObj::JSTestObj): Deleted.
(WebCore::JSTestObj::createPrototype): Deleted.
(WebCore::JSTestObj::prototype): Deleted.
(WebCore::JSTestObj::destroy): Deleted.
(WebCore::JSTestObj::getOwnPropertySlot): Deleted.
(WebCore::JSTestObj::getOwnPropertySlotByIndex): Deleted.
(WebCore::jsTestObjReadOnlyLongAttr): Deleted.
(WebCore::jsTestObjReadOnlyStringAttr): Deleted.
(WebCore::jsTestObjReadOnlyTestObjAttr): Deleted.
(WebCore::jsTestObjConstructorStaticReadOnlyLongAttr): Deleted.
(WebCore::jsTestObjConstructorStaticStringAttr): Deleted.
(WebCore::jsTestObjConstructorTestSubObj): Deleted.
(WebCore::jsTestObjTestSubObjEnabledBySettingConstructor): Deleted.
(WebCore::jsTestObjEnumAttr): Deleted.
(WebCore::jsTestObjByteAttr): Deleted.
(WebCore::jsTestObjOctetAttr): Deleted.
(WebCore::jsTestObjShortAttr): Deleted.
(WebCore::jsTestObjClampedShortAttr): Deleted.
(WebCore::jsTestObjEnforceRangeShortAttr): Deleted.
(WebCore::jsTestObjUnsignedShortAttr): Deleted.
(WebCore::jsTestObjLongAttr): Deleted.
(WebCore::jsTestObjLongLongAttr): Deleted.
(WebCore::jsTestObjReflectedCustomBooleanAttr): Deleted.
(WebCore::jsTestObjReflectedCustomURLAttr): Deleted.
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::JSTestOverloadedConstructorsPrototype::finishCreation):
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
(WebCore::JSTestOverrideBuiltinsPrototype::finishCreation):
(WebCore::JSTestOverrideBuiltins::JSTestOverrideBuiltins): Deleted.
(WebCore::JSTestOverrideBuiltins::createPrototype): Deleted.
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterfacePrototype::finishCreation):
(WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface): Deleted.
(WebCore::JSTestSerializedScriptValueInterface::prototype): Deleted.
(WebCore::JSTestSerializedScriptValueInterface::destroy): Deleted.
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefsPrototype::finishCreation):
(WebCore::JSTestTypedefs::JSTestTypedefs): Deleted.
(WebCore::JSTestTypedefs::createPrototype): Deleted.
(WebCore::JSTestTypedefs::prototype): Deleted.
(WebCore::JSTestTypedefs::destroy): Deleted.
(WebCore::jsTestTypedefsUnsignedLongLongAttr): Deleted.
(WebCore::jsTestTypedefsImmutableSerializedScriptValue): Deleted.
(WebCore::jsTestTypedefsAttrWithGetterException): Deleted.
* bindings/scripts/test/JS/JSattribute.cpp:
(WebCore::JSattributePrototype::finishCreation):
* bindings/scripts/test/JS/JSreadonly.cpp:
(WebCore::JSreadonlyPrototype::finishCreation):

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

4 years agoIt should be easy to add a private global helper function for builtins
keith_miller@apple.com [Tue, 21 Jun 2016 17:54:33 +0000 (17:54 +0000)]
It should be easy to add a private global helper function for builtins
https://bugs.webkit.org/show_bug.cgi?id=158893

Reviewed by Mark Lam.

Source/JavaScriptCore:

This patch does two things. First it moves all the builtin names
out of CommonIdentifiers and into BuiltinNames. This means that
adding a new function to the Builtins does not require rebuilding
all of JavaScriptCore. This patch also adds a new decorator to our
builtins @privateGlobal that will automatically put the function
on the global object. The name of the property will be the same as
the private name of the function.

This patch, also, removes the JSArrayIterator.h/.cpp files
as they no longer appear to be used in any real way. Finally,
the builtins tests have been rebaselined. It appears this has
not been done for a while so the expected files contain other
changes.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Scripts/builtins/builtins_generate_combined_header.py:
(BuiltinsCombinedHeaderGenerator.generate_output):
(generate_section_for_code_name_macro):
(generate_section_for_global_private_code_name_macro):
* Scripts/builtins/builtins_model.py:
(BuiltinFunction.__init__):
(BuiltinFunction.fromString):
* Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Combined.js-result:
* Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Separate.js-result:
* Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Combined.js-result:
* Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Separate.js-result:
* Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Combined.js-result:
* Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Separate.js-result:
* Scripts/tests/builtins/expected/JavaScriptCore-InternalClashingNames-Combined.js-result:
* Scripts/tests/builtins/expected/WebCore-ArbitraryConditionalGuard-Separate.js-result:
* Scripts/tests/builtins/expected/WebCore-GuardedBuiltin-Separate.js-result:
* Scripts/tests/builtins/expected/WebCore-GuardedInternalBuiltin-Separate.js-result:
* Scripts/tests/builtins/expected/WebCore-UnguardedBuiltin-Separate.js-result:
* Scripts/tests/builtins/expected/WebCore-xmlCasingTest-Separate.js-result:
* builtins/ArrayIteratorPrototype.js:
* builtins/ArrayPrototype.js:
* builtins/BuiltinNames.h:
* builtins/GeneratorPrototype.js:
* builtins/GlobalObject.js:
* builtins/PromiseOperations.js:
* builtins/RegExpPrototype.js:
* builtins/StringPrototype.js:
* bytecode/BytecodeIntrinsicRegistry.cpp:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::initializeArrowFunctionContextScopeIfNeeded):
(JSC::BytecodeGenerator::expectedFunctionForIdentifier):
(JSC::BytecodeGenerator::emitGetTemplateObject):
(JSC::BytecodeGenerator::emitLoadNewTargetFromArrowFunctionLexicalEnvironment):
(JSC::BytecodeGenerator::emitLoadDerivedConstructorFromArrowFunctionLexicalEnvironment):
(JSC::BytecodeGenerator::emitPutNewTargetToArrowFunctionContextScope):
(JSC::BytecodeGenerator::emitPutDerivedConstructorToArrowFunctionContextScope):
(JSC::BytecodeGenerator::emitGeneratorStateChange):
* bytecompiler/NodesCodegen.cpp:
(JSC::emitHomeObjectForCallee):
(JSC::emitPutHomeObject):
(JSC::FunctionNode::emitBytecode):
* dfg/DFGOperations.cpp:
* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::subtype):
(Inspector::JSInjectedScriptHost::getInternalProperties): Deleted.
* parser/Lexer.cpp:
(JSC::Lexer<LChar>::parseIdentifier):
(JSC::Lexer<UChar>::parseIdentifier):
* parser/Nodes.h:
* parser/Parser.cpp:
(JSC::Parser<LexerType>::createGeneratorParameters):
(JSC::Parser<LexerType>::parseExportDeclaration):
* runtime/ArrayIteratorPrototype.cpp:
* runtime/ArrayIteratorPrototype.h:
* runtime/ArrayPrototype.cpp:
* runtime/CommonIdentifiers.cpp:
(JSC::CommonIdentifiers::CommonIdentifiers): Deleted.
* runtime/CommonIdentifiers.h:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/IntlDateTimeFormat.cpp:
* runtime/IntlDateTimeFormatPrototype.cpp:
(JSC::IntlDateTimeFormatPrototypeGetterFormat):
(JSC::IntlDateTimeFormatPrototypeFuncResolvedOptions):
* runtime/IntlNumberFormatPrototype.cpp:
(JSC::IntlNumberFormatPrototypeGetterFormat):
(JSC::IntlNumberFormatPrototypeFuncResolvedOptions):
* runtime/IntlObjectInlines.h:
(JSC::constructIntlInstanceWithWorkaroundForLegacyIntlConstructor):
* runtime/JSArrayIterator.cpp: Removed.
(JSC::JSArrayIterator::finishCreation): Deleted.
(JSC::JSArrayIterator::kind): Deleted.
(JSC::JSArrayIterator::iteratedValue): Deleted.
* runtime/JSArrayIterator.h: Removed.
(JSC::JSArrayIterator::createStructure): Deleted.
(JSC::JSArrayIterator::create): Deleted.
(JSC::JSArrayIterator::JSArrayIterator): Deleted.
* runtime/JSGenericTypedArrayViewConstructorInlines.h:
(JSC::JSGenericTypedArrayViewConstructor<ViewClass>::finishCreation):
* runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSInternalPromise.cpp:
* runtime/JSInternalPromiseDeferred.cpp:
(JSC::JSInternalPromiseDeferred::create):
* runtime/JSPromise.cpp:
(JSC::JSPromise::finishCreation):
(JSC::JSPromise::result):
* runtime/JSPromiseDeferred.cpp:
(JSC::JSPromiseDeferred::create):
* runtime/JSStringIterator.cpp:
(JSC::JSStringIterator::finishCreation):
(JSC::JSStringIterator::iteratedValue):
(JSC::JSStringIterator::clone):
* runtime/MapPrototype.cpp:
(JSC::MapPrototype::finishCreation):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::finishCreation):
* runtime/ReflectObject.cpp:
(JSC::ReflectObject::finishCreation):
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::finishCreation):
* runtime/TypedArrayInlines.h:

Source/WebCore:

Add JSCJSValueInlines.h to fix build issues.

* platform/mock/mediasource/MockBox.cpp:

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

4 years agoUpstream WKHTTPCookiesForURL from WebKitSystemInterface to OpenSource
commit-queue@webkit.org [Tue, 21 Jun 2016 17:20:08 +0000 (17:20 +0000)]
Upstream WKHTTPCookiesForURL from WebKitSystemInterface to OpenSource
https://bugs.webkit.org/show_bug.cgi?id=158967

Patch by Amir Alavi <aalavi@apple.com> on 2016-06-21
Reviewed by Brent Fulgham.

Source/WebCore:

* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
* platform/network/mac/CookieJarMac.mm:
(WebCore::httpCookiesForURL): Upstreamed from WebKitSystemInterface.
(WebCore::cookiesForURL): Changed to call httpCookiesForURL.
(WebCore::deleteCookie): Ditto.
* platform/spi/cf/CFNetworkSPI.h:

Source/WebKit/mac:

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Deleted.

Source/WebKit2:

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Deleted.

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

4 years agoUnreviewed, rolling out r202231.
cdumez@apple.com [Tue, 21 Jun 2016 17:05:48 +0000 (17:05 +0000)]
Unreviewed, rolling out r202231.

Seems to have regressed PLT on both iOS and Mac (very obvious
on iOS Warm PLT)

Reverted changeset:

"When navigating, discard decoded image data that is only live
due to page cache."
https://bugs.webkit.org/show_bug.cgi?id=158941
http://trac.webkit.org/changeset/202231

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

4 years agoUnskip non-existing imported/w3c/web-platform-tests/tools.
annulen@yandex.ru [Tue, 21 Jun 2016 16:43:55 +0000 (16:43 +0000)]
Unskip non-existing imported/w3c/web-platform-tests/tools.

Unreviewed fix after r191043.

* TestExpectations:

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

4 years agoCorrect which test is marked as flaky, copy/paste mistake.
ap@apple.com [Tue, 21 Jun 2016 16:21:29 +0000 (16:21 +0000)]
Correct which test is marked as flaky, copy/paste mistake.

* platform/mac-wk2/TestExpectations:

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

4 years agoAdd bindings generator support to add a native JS function to both a 'name' and a...
commit-queue@webkit.org [Tue, 21 Jun 2016 15:44:50 +0000 (15:44 +0000)]
Add bindings generator support to add a native JS function to both a 'name' and a private '@name' slot
https://bugs.webkit.org/show_bug.cgi?id=158777

Patch by Youenn Fablet <youennf@gmail.com> on 2016-06-21
Reviewed by Eric Carlson.

Adding a new PublicIdentifier keyword to cover the case of the same function exposed publicly and privately.
Renaming Private keyword to PrivateIdentifier.
Functions exposed both publicly and privately should set both keywords.
By default, functions are publically exposed.

Updated binding generator to generate public exposure except if PrivateIdentifer is set and PublicIdentifier is
not set.

Keeping skipping of ObjC/GObject binding for PrivateIdentifier-only functions.

Covered by rebased binding tests.

* Modules/fetch/FetchHeaders.idl:
* Modules/fetch/FetchResponse.idl:
* Modules/mediastream/MediaDevices.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* bindings/scripts/CodeGeneratorGObject.pm:
(SkipFunction):
* bindings/scripts/CodeGeneratorJS.pm:
(GeneratePropertiesHashTable):
(GenerateImplementation):
* bindings/scripts/CodeGeneratorObjC.pm:
(SkipFunction):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_private_also_method):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjPrototype::finishCreation):
(WebCore::jsTestObjPrototypeFunctionPrivateMethod):
(WebCore::jsTestObjPrototypeFunctionPrivateAlsoMethod):
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj privateAlsoMethod:]):
* bindings/scripts/test/TestObj.idl:

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

4 years agoInlined some picture-in-picture code.
mitz@apple.com [Tue, 21 Jun 2016 13:15:40 +0000 (13:15 +0000)]
Inlined some picture-in-picture code.
https://bugs.webkit.org/show_bug.cgi?id=158977

Reviewed by Eric Carlsson.

This code was written primarily by Ada Chan, and originally reviewed by Alex Christensen,
Anders Carlsson, Conrad Shultz, Dan Bernstein, Eric Carlson, Jer Noble, Jeremy Jones,
Jon Lee, Remy Demarest, and Zach Li.

Source/WebCore:

* English.lproj/Localizable.strings:
  Updated using update-webkit-localizable-strings.

* Modules/mediacontrols/mediaControlsApple.css:
(video:-webkit-full-screen::-webkit-media-controls-panel .picture-in-picture-button):

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

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

* html/HTMLMediaElement.cpp: Inlined code from HTMLMediaElementAdditions.cpp.

* html/HTMLVideoElement.cpp: Inlined code from HTMLVideoElementSupportsFullscreenAdditions.cpp.

* platform/LocalizedStrings.cpp:
(WebCore::contextMenuItemTagEnterVideoEnhancedFullscreen): Brought in from ContextMenuLocalizedStringsAdditions.cpp.
(WebCore::contextMenuItemTagExitVideoEnhancedFullscreen): Ditto.
(WebCore::AXARIAContentGroupText): Made updates that should have been part of r198543.

* platform/mac/WebVideoFullscreenInterfaceMac.h: Removed USE(APPLE_INTERNAL_SDK) guards.
* platform/mac/WebVideoFullscreenInterfaceMac.mm: Inlined WebVideoFullscreenInterfaceMacAdditions.mm.

* platform/spi/mac/PIPSPI.h: Added.

* rendering/HitTestResult.cpp: Inlined HitTestResultAdditions.cpp.

* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::mediaControlsStyleSheet): Removed include of
  RenderThemeMacMediaControlsStyleSheetAdditions.mm now that the content is in
  mediaControlsApple.css.
(WebCore::RenderThemeMac::mediaControlsScript): Removed include of
  RenderThemeMacMediaControlsScriptAdditions.mm now that the content is in mediaControlsApple.js.

Source/WebKit2:

* Shared/WebPreferencesStoreDefaultsAdditions.cpp:
  Define and use DEFAULT_ALLOWS_PICTURE_IN_PICTURE_MEDIA_PLAYBACK.

* Shared/WebPreferencesStore.cpp:
(WebKit::defaults): Removed include of WebPreferencesStoreDefaultsAdditions.cpp now that the
  default is defined correctly in WebPreferencesStoreDefaultsAdditions.cpp.

* UIProcess/API/C/WKPreferences.cpp: Inlined WKPreferencesAdditions.cpp.
* UIProcess/API/C/WKPreferencesRefPrivate.h: Ditto.

* WebProcess/cocoa/WebVideoFullscreenManager.mm: Inlined WebVideoFullscreenManagerSupportsVideoFullscreenMac.mm.

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

4 years ago[GTK] Web view is not redrawn when reparented in force compositing mode
carlosgc@webkit.org [Tue, 21 Jun 2016 11:04:53 +0000 (11:04 +0000)]
[GTK] Web view is not redrawn when reparented in force compositing mode
https://bugs.webkit.org/show_bug.cgi?id=158689

Reviewed by Žan Doberšek.

When the web view is reparented in accelerated compositing mode, the UI process always exits the accelerated
mode when the view is unrealized, because the native surface handle for compositing is destroyed, but it doesn't
enter again when the view is realized and a new native surface handle for compositing is used. This happens
because the UI and Web processes are not in sync regarding whether the page is in accelerated compositing or
not. The Web process never exits accelerated mode when compositing mode is forced, but the UI process doesn't
check that setting at all.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseResizeRedirectedWindow): Helper function to ensure the redirected window size is properly updated.
(webkitWebViewBaseRealize): Resize the redirected window if the view is already in AC mode when realized.
(webkitWebViewRenderAcceleratedCompositingResults): Use webkitWebViewBaseResizeRedirectedWindow().
(webkitWebViewBaseSizeAllocate): Ditto.
(webkitWebViewBaseWillEnterAcceleratedCompositingMode): Ditto.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::alwaysUseCompositing): Return true in force compositing mode.
(WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode): Update assert.
(WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode): Do not exit AC mode compositing mode is always enabled.
* UIProcess/DrawingAreaProxyImpl.h:
(WebKit::DrawingAreaProxyImpl::isInAcceleratedCompositingMode): Return true also in force compositing mode.
* UIProcess/gtk/RedirectedXCompositeWindow.cpp:
(WebKit::RedirectedXCompositeWindow::surface): Ensure we never return an uninitialized surface to prevent
rendering artifacts in in force compositing mode when waiting for the first update on the redirected window.

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

4 years ago[GStreamer] video orientation support
commit-queue@webkit.org [Tue, 21 Jun 2016 08:32:06 +0000 (08:32 +0000)]
[GStreamer] video orientation support
https://bugs.webkit.org/show_bug.cgi?id=148524

Patch by Miguel Gomez <magomez@igalia.com> on 2016-06-21
Reviewed by Philippe Normand.

Source/WebCore:

Rotate video frames to follow the orientation metadata in the video file.
When accelerated compositing is disabled, the rotation is performed by a videoflip element added
to the playbin.
When accelerated compositing is enabled, the rotation is peformed by the TextureMapper in response
to a rotation flag set on the frame buffers.

Test: media/video-orientation.html

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
Handle the GST_MESSAGE_TAG message from the bin.
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
Add the videflip element to the bin when accelerated compositing is disabled.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
Receive and use extra flags for the TextureMapper.
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
When using accelerated compositing, transpose the video size if the rotation is 90 or 270 degrees.
(WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
Add rotation flag to frame holder and layer buffer.
(WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
Use rotation flag when requesting the TextureMapper to draw.
(WebCore::MediaPlayerPrivateGStreamerBase::setVideoSourceRotation):
Function to store the video rotation.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
Add bits to store the video rotation.
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::drawTexturedQuadWithProgram):
Modify the patternTransform according to the rotation flag passed.
* platform/graphics/texmap/TextureMapperGL.h:
Add new flags to handle the video souce rotation.
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
(WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper):
Change the drawTexture method used so custom flags can be passed.
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
(WebCore::TextureMapperPlatformLayerBuffer::setExtraFlags):
New method to set TextureMapper flags.

LayoutTests:

Test whether the video is properly being displayed by checking the video
element size.

* media/content/no-rotation.mp4: Added.
* media/content/rotation-180.mp4: Added.
* media/content/rotation-270.mp4: Added.
* media/content/rotation-90.mp4: Added.
* media/video-orientation-expected.txt: Added.
* media/video-orientation.html: Added.

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

4 years agoUse the MathOperator to handle some non-stretchy operators
fred.wang@free.fr [Tue, 21 Jun 2016 06:28:38 +0000 (06:28 +0000)]
Use the MathOperator to handle some non-stretchy operators
https://bugs.webkit.org/show_bug.cgi?id=157519

Patch by Frederic Wang <fwang@igalia.com> on 2016-06-20
Reviewed by Brent Fulgham.

Source/WebCore:

To prepare for the removal of anonymous text node from the render classes of token elements
we use MathOperator to handle two cases where the actual text to display may not be
available in the DOM: mfenced and minus operators. This change removes support for the
case of mfenced operators with multiple characters since that it is not supported by
MathOperator. It is a edge case that is not used in practice since fences and separators are
only made of a single character. However, it would still be possible to duplicate some
code/logic to add it back if that turns out to be necessary.

No new tests, already covered by existing tests.

* rendering/mathml/MathOperator.cpp:
(WebCore::MathOperator::MathOperator): Rename UndefinedOperator.
(WebCore::RenderMathMLOperator::firstLineBaseline): Improve rounding of ascent so that mfenced operators are correctly aligned.
* rendering/mathml/MathOperator.h: Rename UndefinedOperator, since it can now be used to draw non-stretchy operators.
(WebCore::MathOperator::isStretched): Deleted. This function is no longer used by RenderMathMLOperator.
(WebCore::MathOperator::unstretch): Deleted. This function is no longer used by RenderMathMLOperator.
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Use useMathOperator.
(WebCore::RenderMathMLOperator::rebuildTokenContent): Set the MathOperator when useMathOperator() is true.
When the operator is not likely to stretch we just leave its type as NormalOperator.
(WebCore::RenderMathMLOperator::useMathOperator): Helper function to determine when MathOperator should be used.
(WebCore::RenderMathMLOperator::firstLineBaseline): Use useMathOperator.
(WebCore::RenderMathMLOperator::computeLogicalHeight): Ditto.
(WebCore::RenderMathMLOperator::paint): Ditto.
(WebCore::RenderMathMLOperator::paintChildren): Ditto.
* rendering/mathml/RenderMathMLOperator.h: Declare useMathOperator.

LayoutTests:

We adjust fenced-mi.html to handle one edge case that we no longer support.
We also update some test references on Mac and iOS.

* mathml/presentation/fenced-mi-expected.html: Indicate that this is no longer supported.
* mathml/presentation/fenced-mi.html: Adjust the reference since no text is shown.
* platform/mac/mathml/opentype/large-operators-expected.txt: Update reference.
* platform/mac/mathml/opentype/opentype-stretchy-expected.txt: Ditto.
* platform/mac/mathml/opentype/vertical-expected.txt: Ditto.
* platform/ios-simulator/mathml/opentype/horizontal-munderover-expected.txt: Ditto.
* platform/ios-simulator/mathml/opentype/opentype-stretchy-expected.txt: Ditto.

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

4 years agoTest expectation update for media/click-placeholder-not-pausing.html
ap@apple.com [Tue, 21 Jun 2016 06:16:20 +0000 (06:16 +0000)]
Test expectation update for media/click-placeholder-not-pausing.html

* platform/mac-wk2/TestExpectations:

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

4 years agoTest expectation update for
ap@apple.com [Tue, 21 Jun 2016 06:08:30 +0000 (06:08 +0000)]
Test expectation update for
https://bugs.webkit.org/show_bug.cgi?id=158320
REGRESSION (r201476?): LayoutTest tiled-drawing/scrolling/latched-div-with-scroll-snap.html is flaky

* platform/mac-wk2/TestExpectations:

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

4 years agoDon't eagerly reify DOM Prototype properties
barraclough@apple.com [Tue, 21 Jun 2016 04:56:23 +0000 (04:56 +0000)]
Don't eagerly reify DOM Prototype properties
https://bugs.webkit.org/show_bug.cgi?id=158557

Reviewed by Andreas Kling.

We were eagerly reifying these properties to avoid virtualizing getOwnPropertySlot,
but since bug #158059 this does not require a method table call in any case.
Eagerly reifying these values likely has some CPU and memory cost on page load.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
    - should generate compressed index for hashtable,
      prototype object ClassInfo should contain static table,
      don't reifyStaticProperties for prototype objects.
(GeneratePrototypeDeclaration):
    - Set HasStaticPropertyTable for DOM prototype objects.
* bindings/scripts/test/JS/JSInterfaceName.cpp:
(WebCore::JSInterfaceNamePrototype::JSInterfaceNamePrototype):
(WebCore::JSInterfaceNamePrototype::finishCreation):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::JSTestActiveDOMObjectPrototype::JSTestActiveDOMObjectPrototype):
(WebCore::JSTestActiveDOMObjectPrototype::finishCreation):
* bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
(WebCore::JSTestClassWithJSBuiltinConstructorPrototype::JSTestClassWithJSBuiltinConstructorPrototype):
(WebCore::JSTestClassWithJSBuiltinConstructorPrototype::finishCreation):
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
(WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::JSTestCustomConstructorWithNoInterfaceObjectPrototype):
(WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::finishCreation):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::JSTestCustomNamedGetterPrototype::JSTestCustomNamedGetterPrototype):
(WebCore::JSTestCustomNamedGetterPrototype::finishCreation):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructorPrototype::JSTestEventConstructorPrototype):
(WebCore::JSTestEventConstructorPrototype::finishCreation):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTargetPrototype::JSTestEventTargetPrototype):
(WebCore::JSTestEventTargetPrototype::finishCreation):
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::JSTestExceptionPrototype::JSTestExceptionPrototype):
(WebCore::JSTestExceptionPrototype::finishCreation):
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
(WebCore::JSTestGenerateIsReachablePrototype::JSTestGenerateIsReachablePrototype):
(WebCore::JSTestGenerateIsReachablePrototype::finishCreation):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype):
(WebCore::JSTestInterfacePrototype::finishCreation):
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
(WebCore::JSTestJSBuiltinConstructorPrototype::JSTestJSBuiltinConstructorPrototype):
(WebCore::JSTestJSBuiltinConstructorPrototype::finishCreation):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype):
(WebCore::JSTestMediaQueryListListenerPrototype::finishCreation):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorPrototype::JSTestNamedConstructorPrototype):
(WebCore::JSTestNamedConstructorPrototype::finishCreation):
* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::JSTestNodePrototype::JSTestNodePrototype):
(WebCore::JSTestNodePrototype::finishCreation):
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
(WebCore::JSTestNondeterministicPrototype::JSTestNondeterministicPrototype):
(WebCore::JSTestNondeterministicPrototype::finishCreation):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjPrototype::JSTestObjPrototype):
(WebCore::JSTestObjPrototype::finishCreation):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::JSTestOverloadedConstructorsPrototype::JSTestOverloadedConstructorsPrototype):
(WebCore::JSTestOverloadedConstructorsPrototype::finishCreation):
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
(WebCore::JSTestOverrideBuiltinsPrototype::JSTestOverrideBuiltinsPrototype):
(WebCore::JSTestOverrideBuiltinsPrototype::finishCreation):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype):
(WebCore::JSTestSerializedScriptValueInterfacePrototype::finishCreation):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefsPrototype::JSTestTypedefsPrototype):
(WebCore::JSTestTypedefsPrototype::finishCreation):
* bindings/scripts/test/JS/JSattribute.cpp:
(WebCore::JSattributePrototype::JSattributePrototype):
(WebCore::JSattributePrototype::finishCreation):
* bindings/scripts/test/JS/JSreadonly.cpp:
(WebCore::JSreadonlyPrototype::JSreadonlyPrototype):
(WebCore::JSreadonlyPrototype::finishCreation):

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

4 years agoWebRTC: RTCIceCandidate init dictionary don't handle explicit null or undefined value...
adam.bergkvist@ericsson.com [Tue, 21 Jun 2016 04:51:49 +0000 (04:51 +0000)]
WebRTC: RTCIceCandidate init dictionary don't handle explicit null or undefined values correctly
https://bugs.webkit.org/show_bug.cgi?id=158873

Reviewed by Alejandro G. Castro.

Source/WebCore:

Prevent explicit null and undefined values from being converted to "null" and "undefined"
strings.

Test: Extended fast/mediastream/RTCIceCandidate.html

* Modules/mediastream/RTCIceCandidate.cpp:
(WebCore::RTCIceCandidate::create):

LayoutTests:

Updated test to verify that explicit null and undefined values, passed to the
RTCIceCandidate init dictionary, are handled correctly.

* fast/mediastream/RTCIceCandidate-expected.txt:
* fast/mediastream/RTCIceCandidate.html:

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

4 years agoWeb Inspector: UncaughtExceptionReporter should handle null event.error
commit-queue@webkit.org [Tue, 21 Jun 2016 03:48:50 +0000 (03:48 +0000)]
Web Inspector: UncaughtExceptionReporter should handle null event.error
https://bugs.webkit.org/show_bug.cgi?id=158971

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-06-20
Reviewed by Brian Burg.

* UserInterface/Debug/UncaughtExceptionReporter.js:
Since `typeof null === "object"` handle uncaught exceptions where the
Error object itself is null.

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

4 years agoUnreviewed, rolling out r202252.
commit-queue@webkit.org [Tue, 21 Jun 2016 03:26:57 +0000 (03:26 +0000)]
Unreviewed, rolling out r202252.
https://bugs.webkit.org/show_bug.cgi?id=158974

See rdar://problem/26867866 for details (Requested by ap on
#webkit).

Reverted changeset:

"Adopt commitPriority to get rid of the 2 AVPL solution for
PiP"
https://bugs.webkit.org/show_bug.cgi?id=158949
http://trac.webkit.org/changeset/202252

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

4 years agoREGRESSION(r202253): Broke inspector/unit-tests/heap-snapshot-collection-event.html
joepeck@webkit.org [Tue, 21 Jun 2016 03:22:53 +0000 (03:22 +0000)]
REGRESSION(r202253): Broke inspector/unit-tests/heap-snapshot-collection-event.html
https://bugs.webkit.org/show_bug.cgi?id=158973

Unreviewed fix after r202253.

* inspector/unit-tests/heap-snapshot-collection-event-expected.txt:
* inspector/unit-tests/heap-snapshot-collection-event.html:
Update the method name.

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

4 years agoUnreviewed, rolling out r202243.
commit-queue@webkit.org [Tue, 21 Jun 2016 03:07:58 +0000 (03:07 +0000)]
Unreviewed, rolling out r202243.
https://bugs.webkit.org/show_bug.cgi?id=158972

Broke Windows build and iOS tests (Requested by ap on
#webkit).

Reverted changeset:

"Focus event dispatched in iframe causes parent document to
scroll incorrectly"
https://bugs.webkit.org/show_bug.cgi?id=158629
http://trac.webkit.org/changeset/202243

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

4 years agoSimplify / Optimize DataDetector's searchForLinkRemovingExistingDDLinks()
cdumez@apple.com [Tue, 21 Jun 2016 03:01:02 +0000 (03:01 +0000)]
Simplify / Optimize DataDetector's searchForLinkRemovingExistingDDLinks()
https://bugs.webkit.org/show_bug.cgi?id=158968

Reviewed by Ryosuke Niwa.

Simplify / Optimize DataDetector's searchForLinkRemovingExistingDDLinks():
- Use modern ancestorsOfType<HTMLAnchorElement>() to traverse anchor ancestors
  instead of traversing by hand.
- Use NodeTraversal::next() to traverse the tree until we find endNode and
  use a for loop instead of a while loop. Previously, the logic the determine
  the next node was at the end of the loop and was identical behavior-wise
  to NodeTraversal::next(). However, the previous code for a lot less efficient
  because it was calling Node::childNodes() to get a NodeList of the children,
  then calling length() on it to check if we had children and finally use
  the first item in the list as next node. This was very inefficient because
  NodeList::length() would need to traverse all children to figure out the
  length and would cache all the children in a Vector in CollectionIndexCache.

* dom/ElementAncestorIterator.h:
(WebCore::ancestorsOfType):
* dom/ElementIterator.h:
(WebCore::findElementAncestorOfType):
(WebCore::findElementAncestorOfType<Element>):
Update ancestorsOfType() to take a Node instead of an Element. There are no
performance benefits to taking an Element here and it is a valid use case to
want an Element ancestor of a non-Element node.

* editing/cocoa/DataDetection.mm:
(WebCore::searchForLinkRemovingExistingDDLinks):
(WebCore::dataDetectorTypeForCategory): Deleted.

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

4 years ago[JSC] Use bytecode intrinsic to expose Module's loading status to builtin JS
utatane.tea@gmail.com [Tue, 21 Jun 2016 01:48:53 +0000 (01:48 +0000)]
[JSC] Use bytecode intrinsic to expose Module's loading status to builtin JS
https://bugs.webkit.org/show_bug.cgi?id=158871

Reviewed by Sam Weinig.

Now JSC has bytecode intrinsic system. Use it instead of exposing status values through the loader's properties.

* builtins/ModuleLoaderObject.js:
(newRegistryEntry):
(fulfillFetch):
(fulfillTranslate):
(commitInstantiated):
(requestFetch):
(requestTranslate):
(requestInstantiate):
(requestResolveDependencies.):
(requestResolveDependencies):
(requestLink):
(link):
(provide):
* bytecode/BytecodeIntrinsicRegistry.cpp:
(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):
* bytecode/BytecodeIntrinsicRegistry.h:
* runtime/ModuleLoaderObject.cpp:
(JSC::ModuleLoaderObject::finishCreation): Deleted.

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

4 years agoUnreviewed, rolling out r202248.
commit-queue@webkit.org [Tue, 21 Jun 2016 00:26:59 +0000 (00:26 +0000)]
Unreviewed, rolling out r202248.
https://bugs.webkit.org/show_bug.cgi?id=158960

breaks builds on the simulator (Requested by keith_mi_ on
#webkit).

Reverted changeset:

"It should be easy to add a private global helper function for
builtins"
https://bugs.webkit.org/show_bug.cgi?id=158893
http://trac.webkit.org/changeset/202248

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

4 years agoUnreviewed, rolling out r202136.
rniwa@webkit.org [Tue, 21 Jun 2016 00:24:32 +0000 (00:24 +0000)]
Unreviewed, rolling out r202136.
https://bugs.webkit.org/show_bug.cgi?id=158932

JSBench wasn't regressed by r202002 and r202111 on iOS after
all (Requested by rniwa_ on #webkit).

Reverted changeset:

"Unreviewed, rolling out r202002 and r202111."
https://bugs.webkit.org/show_bug.cgi?id=158638
http://trac.webkit.org/changeset/202136

Patch by Commit Queue <commit-queue@webkit.org> on 2016-06-20

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

4 years agoWeb Inspector: Snapshot List should show the total size and the total live size
commit-queue@webkit.org [Tue, 21 Jun 2016 00:01:32 +0000 (00:01 +0000)]
Web Inspector: Snapshot List should show the total size and the total live size
https://bugs.webkit.org/show_bug.cgi?id=157904
<rdar://problem/26372833>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-06-20
Reviewed by Brian Burg.

Include the live size of a snapshot in the snapshot list.

* Localizations/en.lproj/localizedStrings.js:
New "Live Size" string.

* UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
(HeapSnapshot):
(HeapSnapshot.updateCategoriesAndMetadata):
(HeapSnapshot.prototype.update):
(HeapSnapshot.prototype.serialize):
(HeapSnapshotDiff):
(HeapSnapshotDiff.prototype.update):
(HeapSnapshot.buildCategories): Deleted.
(HeapSnapshot.prototype.updateCategories): Deleted.
(HeapSnapshotDiff.prototype.updateCategories): Deleted.
* UserInterface/Proxies/HeapSnapshotDiffProxy.js:
(WebInspector.HeapSnapshotDiffProxy.prototype.updateForCollectionEvent):
(WebInspector.HeapSnapshotDiffProxy.prototype.update):
(WebInspector.HeapSnapshotDiffProxy.prototype.updateCategories): Deleted.
* UserInterface/Proxies/HeapSnapshotProxy.js:
(WebInspector.HeapSnapshotProxy):
(WebInspector.HeapSnapshotProxy.deserialize):
(WebInspector.HeapSnapshotProxy.prototype.get liveSize):
(WebInspector.HeapSnapshotProxy.prototype.updateForCollectionEvent):
(WebInspector.HeapSnapshotProxy.prototype.update):
(WebInspector.HeapSnapshotProxy.prototype.updateCategories): Deleted.
Rename "updateCategories" to "update" and update both categories
and metadata, like the liveSize.

* UserInterface/Views/HeapAllocationsTimelineDataGridNode.js:
(WebInspector.HeapAllocationsTimelineDataGridNode):
(WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCellContent):
(WebInspector.HeapAllocationsTimelineDataGridNode.prototype._heapSnapshotCollectedNodes):
Update live size after collection.

* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView):
Include a live size column in the DataGrid.
(WebInspector.HeapAllocationsTimelineView.prototype.closed):
Cleanup listeners appropriately.

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

4 years agoAdopt commitPriority to get rid of the 2 AVPL solution for PiP
jeremyj-wk@apple.com [Mon, 20 Jun 2016 23:26:52 +0000 (23:26 +0000)]
Adopt commitPriority to get rid of the 2 AVPL solution for PiP
https://bugs.webkit.org/show_bug.cgi?id=158949
rdar://problem/26867866

Reviewed by Simon Fraser.

No new tests because there is no behavior change. This reverts changes from
https://bugs.webkit.org/show_bug.cgi?id=158148 and instead uses -[CAContext commitPriority:]
to prevent flicker when moving a layer between contexts.
commitPriority allows the layer to be added to the destination context before it is
removed from the source context.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: remove m_secondaryVideoLayer.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: ditto
(WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenGravity): ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::syncTextTrackBounds): ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer): ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity): ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: ditto
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer): ditto
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: ditto
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createPreviewLayers):ditto
* platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.h: ditto
* platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm: ditto
(WebCore::VideoFullscreenLayerManager::setVideoLayer): ditto
(WebCore::VideoFullscreenLayerManager::setVideoFullscreenLayer): ditto and adopt commitPriority.
(WebCore::VideoFullscreenLayerManager::setVideoFullscreenFrame): ditto
(WebCore::VideoFullscreenLayerManager::setVideoLayers): Deleted.
(WebCore::VideoFullscreenLayerManager::didDestroyVideoLayer): remove m_secondaryVideoLayer.
* platform/spi/cocoa/QuartzCoreSPI.h: Add commitPriority.

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

4 years agoSet the end position on the placeholder BidiRun properly.
zalan@apple.com [Mon, 20 Jun 2016 23:24:59 +0000 (23:24 +0000)]
Set the end position on the placeholder BidiRun properly.
https://bugs.webkit.org/show_bug.cgi?id=158958

Reviewed by Myles C. Maxfield.
rdar://problem/26609266

The second paramenter for BidiRun indicates the end position and not the length of the run.
This was regressed at r102875 where only the start position was changed from 0 to pos.

Source/WebCore:

Test: fast/text/international/bidi-style-in-isolate-crash.html

* rendering/InlineIterator.h:
(WebCore::addPlaceholderRunForIsolatedInline):

LayoutTests:

* fast/text/international/bidi-style-in-isolate-crash-expected.txt: Added.
* fast/text/international/bidi-style-in-isolate-crash.html: Added.

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

4 years agoA composition underline is placed to wrong position in RTL
commit-queue@webkit.org [Mon, 20 Jun 2016 23:23:16 +0000 (23:23 +0000)]
A composition underline is placed to wrong position in RTL
https://bugs.webkit.org/show_bug.cgi?id=158602

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2016-06-20
Reviewed by Myles C. Maxfield.

Source/WebCore:

InlineTextBox::paintCompositionUnderline does not take RTL into
account.  The position of composition underline should be
mirrored in RTL.

Test: editing/input/composition-underline-rtl.html

* rendering/InlineTextBox.cpp:
(WebCore::mirrorRTLSegment): New helper function to convert RTL start position to LTR.
(WebCore::InlineTextBox::paintDecoration): Use mirrorRTLSegment.
(WebCore::InlineTextBox::paintCompositionUnderline): Ditto.

LayoutTests:

* editing/input/composition-underline-rtl-expected.html: Added.
* editing/input/composition-underline-rtl.html: Added.

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

4 years agoAllow Spotlight suggestions to be read by any process
bfulgham@apple.com [Mon, 20 Jun 2016 22:41:24 +0000 (22:41 +0000)]
Allow Spotlight suggestions to be read by any process
https://bugs.webkit.org/show_bug.cgi?id=158950
<rdar://problem/26865374>

Reviewed by Alexey Proskuryakov.

Extend sandbox to allow all web processes to read Spotlight results.

* Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
* WebProcess/com.apple.WebProcess.sb.in:

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

4 years agoIt should be easy to add a private global helper function for builtins
keith_miller@apple.com [Mon, 20 Jun 2016 22:38:45 +0000 (22:38 +0000)]
It should be easy to add a private global helper function for builtins
https://bugs.webkit.org/show_bug.cgi?id=158893

Reviewed by Mark Lam.

Source/JavaScriptCore:

This patch does two things. First it moves all the builtin names
out of CommonIdentifiers and into BuiltinNames. This means that
adding a new function to the Builtins does not require rebuilding
all of JavaScriptCore. This patch also adds a new decorator to our
builtins @privateGlobal that will automatically put the function
on the global object. The name of the property will be the same as
the private name of the function.

This patch, also, removes the JSArrayIterator.h/.cpp files
as they no longer appear to be used in any real way. Finally,
the builtins tests have been rebaselined. It appears this has
not been done for a while so the expected files contain other
changes.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Scripts/builtins/builtins_generate_combined_header.py:
(BuiltinsCombinedHeaderGenerator.generate_output):
(generate_section_for_code_name_macro):
(generate_section_for_global_private_code_name_macro):
* Scripts/builtins/builtins_model.py:
(BuiltinFunction.__init__):
(BuiltinFunction.fromString):
* Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Combined.js-result:
* Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Separate.js-result:
* Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Combined.js-result:
* Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Separate.js-result:
* Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Combined.js-result:
* Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Separate.js-result:
* Scripts/tests/builtins/expected/JavaScriptCore-InternalClashingNames-Combined.js-result:
* Scripts/tests/builtins/expected/WebCore-ArbitraryConditionalGuard-Separate.js-result:
* Scripts/tests/builtins/expected/WebCore-GuardedBuiltin-Separate.js-result:
* Scripts/tests/builtins/expected/WebCore-GuardedInternalBuiltin-Separate.js-result:
* Scripts/tests/builtins/expected/WebCore-UnguardedBuiltin-Separate.js-result:
* Scripts/tests/builtins/expected/WebCore-xmlCasingTest-Separate.js-result:
* builtins/ArrayIteratorPrototype.js:
* builtins/ArrayPrototype.js:
* builtins/BuiltinNames.h:
* builtins/GeneratorPrototype.js:
* builtins/GlobalObject.js:
* builtins/PromiseOperations.js:
* builtins/RegExpPrototype.js:
* builtins/StringPrototype.js:
* bytecode/BytecodeIntrinsicRegistry.cpp:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::initializeArrowFunctionContextScopeIfNeeded):
(JSC::BytecodeGenerator::expectedFunctionForIdentifier):
(JSC::BytecodeGenerator::emitGetTemplateObject):
(JSC::BytecodeGenerator::emitLoadNewTargetFromArrowFunctionLexicalEnvironment):
(JSC::BytecodeGenerator::emitLoadDerivedConstructorFromArrowFunctionLexicalEnvironment):
(JSC::BytecodeGenerator::emitPutNewTargetToArrowFunctionContextScope):
(JSC::BytecodeGenerator::emitPutDerivedConstructorToArrowFunctionContextScope):
(JSC::BytecodeGenerator::emitGeneratorStateChange):
* bytecompiler/NodesCodegen.cpp:
(JSC::emitHomeObjectForCallee):
(JSC::emitPutHomeObject):
(JSC::FunctionNode::emitBytecode):
* dfg/DFGOperations.cpp:
* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::subtype):
(Inspector::JSInjectedScriptHost::getInternalProperties): Deleted.
* parser/Lexer.cpp:
(JSC::Lexer<LChar>::parseIdentifier):
(JSC::Lexer<UChar>::parseIdentifier):
* parser/Nodes.h:
* parser/Parser.cpp:
(JSC::Parser<LexerType>::createGeneratorParameters):
(JSC::Parser<LexerType>::parseExportDeclaration):
* runtime/ArrayIteratorPrototype.cpp:
* runtime/ArrayIteratorPrototype.h:
* runtime/ArrayPrototype.cpp:
* runtime/CommonIdentifiers.cpp:
(JSC::CommonIdentifiers::CommonIdentifiers): Deleted.
* runtime/CommonIdentifiers.h:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/IntlDateTimeFormat.cpp:
* runtime/IntlDateTimeFormatPrototype.cpp:
(JSC::IntlDateTimeFormatPrototypeGetterFormat):
(JSC::IntlDateTimeFormatPrototypeFuncResolvedOptions):
* runtime/IntlNumberFormatPrototype.cpp:
(JSC::IntlNumberFormatPrototypeGetterFormat):
(JSC::IntlNumberFormatPrototypeFuncResolvedOptions):
* runtime/IntlObjectInlines.h:
(JSC::constructIntlInstanceWithWorkaroundForLegacyIntlConstructor):
* runtime/JSArrayIterator.cpp: Removed.
(JSC::JSArrayIterator::finishCreation): Deleted.
(JSC::JSArrayIterator::kind): Deleted.
(JSC::JSArrayIterator::iteratedValue): Deleted.
* runtime/JSArrayIterator.h: Removed.
(JSC::JSArrayIterator::createStructure): Deleted.
(JSC::JSArrayIterator::create): Deleted.
(JSC::JSArrayIterator::JSArrayIterator): Deleted.
* runtime/JSGenericTypedArrayViewConstructorInlines.h:
(JSC::JSGenericTypedArrayViewConstructor<ViewClass>::finishCreation):
* runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSInternalPromise.cpp:
* runtime/JSInternalPromiseDeferred.cpp:
(JSC::JSInternalPromiseDeferred::create):
* runtime/JSPromise.cpp:
(JSC::JSPromise::finishCreation):
(JSC::JSPromise::result):
* runtime/JSPromiseDeferred.cpp:
(JSC::JSPromiseDeferred::create):
* runtime/JSStringIterator.cpp:
(JSC::JSStringIterator::finishCreation):
(JSC::JSStringIterator::iteratedValue):
(JSC::JSStringIterator::clone):
* runtime/MapPrototype.cpp:
(JSC::MapPrototype::finishCreation):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::finishCreation):
* runtime/ReflectObject.cpp:
(JSC::ReflectObject::finishCreation):
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::finishCreation):
* runtime/TypedArrayInlines.h:

Source/WebCore:

Add JSCJSValueInlines.h to fix build issues.

* platform/mock/mediasource/MockBox.cpp:

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

4 years agoTest expectations gardening for
ap@apple.com [Mon, 20 Jun 2016 22:30:32 +0000 (22:30 +0000)]
Test expectations gardening for
https://bugs.webkit.org/show_bug.cgi?id=155196

* platform/mac-wk1/TestExpectations:

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

4 years agoTest result gardening.
ap@apple.com [Mon, 20 Jun 2016 21:37:48 +0000 (21:37 +0000)]
Test result gardening.

* platform/mac-wk2/TestExpectations:

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

4 years ago:default CSS pseudo-class should match checkboxes+radios with a `checked` attribute
benjamin@webkit.org [Mon, 20 Jun 2016 21:30:36 +0000 (21:30 +0000)]
:default CSS pseudo-class should match checkboxes+radios with a `checked` attribute
https://bugs.webkit.org/show_bug.cgi?id=156230

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/html/semantics/selectors/pseudo-classes/default-expected.txt:

Source/WebCore:

This patch update the :default pseudo class matching to be closer to the spec:
https://html.spec.whatwg.org/multipage/scripting.html#selector-default

The main remaining difference with the spec is the definition of "default button".
This is an unrelated problem that should be addressed separately.

The implementation was missing support for:
-input elements of type "checkbox" or "radio" with the "checked" attribute defined.
-option elements with the "selected" attribute defined.

The existing support for default button was pretty bad, I fixed that too.
The owner form now has a resetDefaultButton() API. When a Form Associated Element
becomes a submit button or loses that property, the element calls its form
to update the style as needed.

Whenever the submit button changes, 2 elements needs to have their style invalidated:
-The former default button.
-The new default button.
To invalidate the former button, FormElement now caches the computed
default button. When the default button changes, the cached value is invalidated
in addition to the new value.

Computing the new default button takes linear time in the number of form associated element.
To mitigate that, resetDefaultButton() is only called when changes are related
to submit buttons. Since those changes are rare, I don't expect the invalidation
to be a problem.

Tests: fast/css/pseudo-default-basics.html
       fast/selectors/default-style-update.html

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/SelectorCheckerTestFunctions.h:
(WebCore::matchesDefaultPseudoClass):
(WebCore::isDefaultButtonForForm): Deleted.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
* dom/Element.cpp:
(WebCore::Element::matchesValidPseudoClass):
(WebCore::Element::matchesInvalidPseudoClass):
(WebCore::Element::matchesDefaultPseudoClass):
* dom/Element.h:
(WebCore::Element::matchesValidPseudoClass): Deleted.
(WebCore::Element::matchesInvalidPseudoClass): Deleted.
(WebCore::Element::isDefaultButtonForForm): Deleted.
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::parseAttribute):
(WebCore::HTMLButtonElement::matchesDefaultPseudoClass):
* html/HTMLButtonElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::isDefaultButtonForForm): Deleted.
* html/HTMLFormControlElement.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::~HTMLFormElement):
(WebCore::HTMLFormElement::registerFormElement):
(WebCore::HTMLFormElement::removeFormElement):
(WebCore::HTMLFormElement::defaultButton):
(WebCore::HTMLFormElement::resetDefaultButton):
* html/HTMLFormElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):
(WebCore::HTMLInputElement::parseAttribute):
(WebCore::HTMLInputElement::matchesDefaultPseudoClass):
* html/HTMLInputElement.h:
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::matchesDefaultPseudoClass):
(WebCore::HTMLOptionElement::parseAttribute):
* html/HTMLOptionElement.h:
* style/StyleSharingResolver.cpp:
(WebCore::Style::SharingResolver::canShareStyleWithElement):
(WebCore::Style::canShareStyleWithControl): Deleted.

LayoutTests:

* fast/css/pseudo-default-basics-expected.html: Added.
* fast/css/pseudo-default-basics.html: Added.
* fast/selectors/default-style-update-expected.txt: Added.
* fast/selectors/default-style-update.html: Added.

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

4 years agoLLInt64 Float64 get_by_val doesn't purify NaN
fpizlo@apple.com [Mon, 20 Jun 2016 21:25:33 +0000 (21:25 +0000)]
LLInt64 Float64 get_by_val doesn't purify NaN
https://bugs.webkit.org/show_bug.cgi?id=158956

Reviewed by Michael Saboff.

* llint/LowLevelInterpreter64.asm: Fix the bug.
* tests/stress/float64-array-nan-inlined.js: Make this test also run in LLInt-only mode to catch this bug.

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

4 years agoFocus event dispatched in iframe causes parent document to scroll incorrectly
simon.fraser@apple.com [Mon, 20 Jun 2016 21:22:54 +0000 (21:22 +0000)]
Focus event dispatched in iframe causes parent document to scroll incorrectly
https://bugs.webkit.org/show_bug.cgi?id=158629
rdar://problem/26521616

Reviewed by Tim Horton.
Source/WebCore:

When focussing elements in iframes, the page could scroll to an incorrect location.
This happened because code in Element::focus() tried to disable scrolling on focus,
but did so only for the current frame, so ancestor frames got programmatically scrolled.
On iOS we handle the scrolling in the UI process, so never want the web process to
do programmatic scrolling.

Fix by changing the focus and cache restore code to use SelectionRevealMode::DoNotReveal,
rather than manually prohibiting frame scrolling. Pass SelectionRevealMode through various callers,
and use RevealUpToMainFrame for iOS, allowing the UI process to do the zoomToRect: for the main frame.

Tests: fast/forms/ios/focus-input-in-iframe.html
       fast/forms/ios/programmatic-focus-input-in-iframe.html

* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::scrollIntoView):
(WebCore::Element::scrollIntoViewIfNeeded):
(WebCore::Element::scrollIntoViewIfNotVisible):
(WebCore::Element::focus):
(WebCore::Element::updateFocusAppearance):
* dom/Element.h:
* editing/Editor.cpp:
(WebCore::Editor::insertTextWithoutSendingTextEvent):
(WebCore::Editor::revealSelectionAfterEditingOperation):
(WebCore::Editor::findStringAndScrollToVisible):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::updateAndRevealSelection):
(WebCore::FrameSelection::revealSelection):
(WebCore::FrameSelection::FrameSelection): Deleted.
* editing/FrameSelection.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateFocusAppearance):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::updateFocusAppearance):
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::contextMenuItemSelected):
* page/FrameView.cpp:
(WebCore::FrameView::scrollToAnchor):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollRectToVisible):
(WebCore::RenderLayer::autoscroll):
* rendering/RenderLayer.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::scrollRectToVisible):
* rendering/RenderObject.h:

Source/WebKit/mac:

Pass SelectionRevealMode::Reveal in existing code.

* WebView/WebFrame.mm:
(-[WebFrame _scrollDOMRangeToVisible:]):
(-[WebFrame _scrollDOMRangeToVisible:withInset:]):
(-[WebFrame revealSelectionAtExtent:]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView jumpToSelection:]):
(-[WebHTMLView centerSelectionInVisibleArea:]):

Source/WebKit2:

Pass SelectionRevealMode::Reveal in existing code.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::centerSelectionInVisibleArea):

LayoutTests:

* fast/forms/ios/focus-input-in-iframe-expected.txt: Added.
* fast/forms/ios/focus-input-in-iframe.html: Added.
* fast/forms/ios/programmatic-focus-input-in-iframe-expected.txt: Added.
* fast/forms/ios/programmatic-focus-input-in-iframe.html: Added.

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

4 years agoRemove RefPtr::release() and change calls sites to use WTFMove()
krollin@apple.com [Mon, 20 Jun 2016 20:52:45 +0000 (20:52 +0000)]
Remove RefPtr::release() and change calls sites to use WTFMove()
https://bugs.webkit.org/show_bug.cgi?id=158369

Reviewed by Chris Dumez.

RefPtr::release() releases its managed pointer awkwardly. It's more
direct and clearer to use WTFMove to transfer ownership of the managed
pointer.

As part of this cleanup, also change a lot of explicit data types to
'auto'.

Source/JavaScriptCore:

* API/JSObjectRef.cpp:
(JSClassCreate):
* API/JSScriptRef.cpp:
* API/JSValueRef.cpp:
(JSValueToStringCopy):
* bytecompiler/StaticPropertyAnalyzer.h:
(JSC::StaticPropertyAnalyzer::newObject):
(JSC::StaticPropertyAnalyzer::mov):
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::invalidate):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):
* inspector/InspectorValues.cpp:
(Inspector::InspectorValue::parseJSON):
* inspector/agents/InspectorAgent.cpp:
(Inspector::InspectorAgent::activateExtraDomain):
(Inspector::InspectorAgent::activateExtraDomains):
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::breakpointActionProbe):
* inspector/remote/RemoteInspector.mm:
(Inspector::RemoteInspector::receivedSetupMessage):
* jit/Repatch.cpp:
(JSC::linkPolymorphicCall):
* runtime/GenericTypedArrayViewInlines.h:
(JSC::GenericTypedArrayView<Adaptor>::create):
(JSC::GenericTypedArrayView<Adaptor>::createUninitialized):
* runtime/JSArrayBufferConstructor.cpp:
(JSC::constructArrayBuffer):
* runtime/PropertyNameArray.h:
(JSC::PropertyNameArray::releaseData):
* runtime/Structure.cpp:
(JSC::Structure::toStructureShape):
* runtime/TypeSet.cpp:
(JSC::StructureShape::merge):
* tools/FunctionOverrides.cpp:
(JSC::initializeOverrideInfo):

Source/WebCore:

No new tests: there's no new functionality, just a refactoring of
existing code.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::removeSamplesFromTrackBuffer):
(WebCore::SourceBuffer::provideMediaData):
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::start):
* Modules/webdatabase/SQLCallbackWrapper.h:
(WebCore::SQLCallbackWrapper::clear):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::handlePostMessage):
* bindings/js/JSHistoryCustom.cpp:
(WebCore::JSHistory::pushState):
(WebCore::JSHistory::replaceState):
* bindings/js/JSMessagePortCustom.h:
(WebCore::handlePostMessage):
* bindings/js/ScriptControllerMac.mm:
(WebCore::ScriptController::createScriptInstanceForWidget):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::readTerminal):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::copyPropertiesInSet):
* css/SVGCSSParser.cpp:
(WebCore::CSSParser::parseSVGValue):
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertShapeValue):
* css/StyleProperties.cpp:
(WebCore::StyleProperties::copyPropertiesInSet):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingImages):
* dom/InlineStyleSheetOwner.cpp:
(WebCore::InlineStyleSheetOwner::clearSheet):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::removeChildrenInRange):
(WebCore::CompositeEditCommand::removeNodeAndPruneAncestors):
(WebCore::CompositeEditCommand::prune):
(WebCore::CompositeEditCommand::replaceSelectedTextInNode):
(WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring):
* editing/CreateLinkCommand.cpp:
(WebCore::CreateLinkCommand::doApply):
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::mergeStyle):
(WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
* editing/Editor.cpp:
(WebCore::ClearTextCommand::CreateAndApply):
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
* editing/EditorCommand.cpp:
(WebCore::executeInsertNode):
* editing/InsertTextCommand.cpp:
(WebCore::InsertTextCommand::performOverwrite):
(WebCore::InsertTextCommand::insertTab):
* editing/RemoveNodePreservingChildrenCommand.cpp:
(WebCore::RemoveNodePreservingChildrenCommand::doApply):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::removeNodePreservingChildren):
(WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor):
* html/FTPDirectoryDocument.cpp:
(WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
* html/HTMLFontElement.cpp:
(WebCore::HTMLFontElement::collectStyleForPresentationAttribute):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::prepareForSubmission):
* html/HTMLTableElement.cpp:
(WebCore::leakBorderStyle):
(WebCore::leakGroupBorderStyle):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder):
* html/track/InbandDataTextTrack.cpp:
(WebCore::InbandDataTextTrack::addDataCue):
* html/track/InbandGenericTextTrack.cpp:
(WebCore::InbandGenericTextTrack::newCuesParsed):
* html/track/InbandWebVTTTextTrack.cpp:
(WebCore::InbandWebVTTTextTrack::newCuesParsed):
* html/track/TextTrackCueList.cpp:
(WebCore::TextTrackCueList::add):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getInlineStylesForNode):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
* inspector/InspectorIndexedDBAgent.cpp:
* inspector/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::loadResource):
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::buildObjectForSelectorList):
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::create):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURLIntoChildFrame):
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadPostRequest):
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::finalProgressComplete):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::disassociateDocumentLoader):
(WebCore::ApplicationCacheGroup::didFinishLoading):
(WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::loadCacheGroup):
(WebCore::ApplicationCacheStorage::cacheGroupForURL):
(WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
(WebCore::ApplicationCacheStorage::loadCache):
* loader/archive/ArchiveResourceCollection.cpp:
(WebCore::ArchiveResourceCollection::popSubframeArchive):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::extract):
(WebCore::LegacyWebArchive::create):
(WebCore::LegacyWebArchive::createFromSelection):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::createImage):
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::setIconDataForIconURL):
(WebCore::IconDatabase::getOrCreateIconRecord):
(WebCore::IconDatabase::readFromDatabase):
(WebCore::IconDatabase::getImageDataForIconURLFromSQLDatabase):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::sessionStorage):
(WebCore::DOMWindow::localStorage):
* page/EventHandler.cpp:
(WebCore::EventHandler::updateDragAndDrop):
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::updateTransitions):
* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::reportViolation):
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::createOverlayIfNeeded):
(WebCore::ServicesOverlayController::determineActiveHighlight):
* page/scrolling/AsyncScrollingCoordinator.h:
(WebCore::AsyncScrollingCoordinator::releaseScrollingTree):
* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::cloneAndReset):
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::attachNode):
* platform/audio/HRTFElevation.cpp:
(WebCore::getConcatenatedImpulseResponsesForSubject):
* platform/graphics/DisplayRefreshMonitorManager.cpp:
(WebCore::DisplayRefreshMonitorManager::createMonitorForClient):
* platform/graphics/FontCascadeFonts.cpp:
(WebCore::FontCascadeFonts::glyphDataForSystemFallback):
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processAttributedStrings):
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
(WebCore::MediaSelectionGroupAVFObjC::updateOptions):
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::processCodedFrame):
* platform/graphics/ca/GraphicsLayerCA.cpp:
* platform/graphics/ca/PlatformCALayer.cpp:
(WebCore::PlatformCALayer::createCompatibleLayerOrTakeFromPool):
* platform/graphics/cg/ImageBufferDataCG.cpp:
(WebCore::ImageBufferData::getData):
* platform/graphics/filters/FilterEffect.cpp:
(WebCore::FilterEffect::asUnmultipliedImage):
(WebCore::FilterEffect::asPremultipliedImage):
* platform/graphics/mac/ImageMac.mm:
(WebCore::Image::loadPlatformResource):
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::createForCurrentGLContext):
(WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
(WebCore::RealtimeMediaSourceCenterMac::createMediaStream):
* platform/mock/MockRealtimeMediaSourceCenter.cpp:
(WebCore::MockRealtimeMediaSourceCenter::validateRequestConstraints):
(WebCore::MockRealtimeMediaSourceCenter::createMediaStream):
* platform/network/BlobRegistryImpl.cpp:
(WebCore::BlobRegistryImpl::registerBlobURL):
(WebCore::BlobRegistryImpl::registerBlobURLForSlice):
* platform/network/ResourceHandle.cpp:
(WebCore::ResourceHandle::create):
* platform/network/cf/FormDataStreamCFNet.cpp:
(WebCore::formCreate):
* platform/text/BidiContext.cpp:
(WebCore::BidiContext::copyStackRemovingUnicodeEmbeddingContexts):
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::build):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::createScrollbar):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::createScrollbar):
* rendering/RenderMenuList.cpp:
(RenderMenuList::createScrollbar):
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::createScrollbar):
* replay/ReplayController.cpp:
(WebCore::ReplayController::unloadSegment):
* svg/SVGFEDiffuseLightingElement.cpp:
(WebCore::SVGFEDiffuseLightingElement::build):
* svg/SVGFESpecularLightingElement.cpp:
(WebCore::SVGFESpecularLightingElement::build):
* svg/properties/SVGListProperty.h:
(WebCore::SVGListProperty::getItemValuesAndWrappers):
(WebCore::SVGListProperty::insertItemBeforeValuesAndWrappers):
(WebCore::SVGListProperty::removeItemValuesAndWrappers):
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::workerThread):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::internalAbort):
* xml/XPathStep.cpp:
(WebCore::XPath::Step::nodesInAxis):

Source/WebKit:

* Storage/StorageAreaImpl.cpp:
(WebCore::StorageAreaImpl::setItem):
(WebCore::StorageAreaImpl::removeItem):

Source/WebKit/mac:

* Plugins/Hosted/NetscapePluginHostManager.mm:
(WebKit::NetscapePluginHostManager::instantiatePlugin):
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::create):
(WebKit::NetscapePluginInstanceProxy::loadRequest):
(WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
* WebCoreSupport/WebFrameLoaderClient.mm:
(-[WebFramePolicyListener receivedPolicyDecision:]):
* WebCoreSupport/WebSecurityOrigin.mm:
(-[WebSecurityOrigin initWithURL:]):
* WebView/WebArchive.mm:
(-[WebArchive initWithMainResource:subresources:subframeArchives:]):
(-[WebArchive initWithData:]):
* WebView/WebDataSource.mm:
(-[WebDataSource mainResource]):
* WebView/WebFrame.mm:
(-[WebFrame _documentFragmentWithNodesAsParagraphs:]):

Source/WebKit2:

* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::createDatabaseToWebProcessConnection):
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
* NetworkProcess/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::decode):
* NetworkProcess/cache/NetworkCacheEntry.cpp:
(WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord):
* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::allocate):
(WebKit::SharedMemory::create):
(WebKit::SharedMemory::map):
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::createWebProcessConnection):
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeToObjectStream):
* Shared/API/c/WKImage.cpp:
(WKImageCreate):
* Shared/API/c/WKNumber.cpp:
(WKBooleanCreate):
(WKDoubleCreate):
(WKUInt64Create):
* Shared/API/c/WKSecurityOriginRef.cpp:
(WKSecurityOriginCreate):
* Shared/API/c/WKSerializedScriptValue.cpp:
(WKSerializedScriptValueCreate):
(WKSerializedScriptValueCreateWithInternalRepresentation):
* Shared/API/c/cairo/WKImageCairo.cpp:
(WKImageCreateFromCairoSurface):
* Shared/API/c/cg/WKImageCG.cpp:
(WKImageCreateFromCGImage):
* Shared/API/c/mac/WKCertificateInfoMac.mm:
(WKCertificateInfoCreateWithCertficateChain):
* Shared/API/c/mac/WKObjCTypeWrapperRef.mm:
(WKObjCTypeWrapperCreate):
* Shared/API/c/mac/WKWebArchive.cpp:
(WKWebArchiveCreate):
(WKWebArchiveCreateWithData):
(WKWebArchiveCreateFromRange):
(WKWebArchiveCopyMainResource):
(WKWebArchiveCopySubresources):
(WKWebArchiveCopySubframeArchives):
* Shared/API/c/mac/WKWebArchiveResource.cpp:
(WKWebArchiveResourceCreate):
* Shared/APIWebArchive.mm:
(API::WebArchive::WebArchive):
* Shared/Plugins/Netscape/NetscapePluginModule.cpp:
(WebKit::NetscapePluginModule::getOrCreate):
* Shared/ShareableBitmap.cpp:
(WebKit::ShareableBitmap::create):
* Shared/ShareableResource.cpp:
(WebKit::ShareableResource::map):
* Shared/gtk/ArgumentCodersGtk.cpp:
(IPC::ArgumentCoder<DragData>::decode):
* UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
(WKViewCreate):
* UIProcess/API/C/WKBatteryStatus.cpp:
(WKBatteryStatusCreate):
* UIProcess/API/C/WKGeolocationPosition.cpp:
(WKGeolocationPositionCreate_b):
* UIProcess/API/C/WKGrammarDetail.cpp:
(WKGrammarDetailCreate):
* UIProcess/API/C/WKPage.cpp:
(WKPageCopySessionState):
* UIProcess/API/C/WKPageGroup.cpp:
(WKPageGroupCreateWithIdentifier):
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesCreate):
(WKPreferencesCreateWithIdentifier):
(WKPreferencesCreateCopy):
* UIProcess/API/C/WKSessionRef.cpp:
(WKSessionCreate):
* UIProcess/API/C/WKSessionStateRef.cpp:
(WKSessionStateCopyData):
* UIProcess/API/C/mac/WKContextPrivateMac.mm:
(WKContextCopyPlugInInfoForBundleIdentifier):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView loadRequest:]):
(-[WKWebView loadFileURL:allowingReadAccessToURL:]):
(-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
(-[WKWebView goToBackForwardListItem:]):
(-[WKWebView goBack]):
(-[WKWebView goForward]):
(-[WKWebView reload]):
(-[WKWebView reloadFromOrigin]):
(-[WKWebView _loadData:MIMEType:characterEncodingName:baseURL:userData:]):
(-[WKWebView _reloadWithoutContentBlockers]):
(-[WKWebView _sessionStateData]):
(-[WKWebView _restoreSessionState:andNavigate:]):
* UIProcess/API/efl/ewk_database_manager.cpp:
(EwkDatabaseManager::createOriginList):
* UIProcess/API/efl/ewk_storage_manager.cpp:
(EwkStorageManager::createOriginList):
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewCreateNewPage):
(webkitWebViewPrintFrame):
(getContentsAsMHTMLDataCallback):
* UIProcess/Cocoa/SessionStateCoding.mm:
(WebKit::encodeSessionState):
* UIProcess/GenericCallback.h:
(WebKit::CallbackMap::take):
* UIProcess/GeolocationPermissionRequestManagerProxy.cpp:
(WebKit::GeolocationPermissionRequestManagerProxy::createRequest):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didReceiveAuthenticationChallenge):
* UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp:
(WebKit::NotificationPermissionRequestManagerProxy::createRequest):
* UIProcess/Plugins/PluginProcessManager.cpp:
(WebKit::PluginProcessManager::getOrCreatePluginProcess):
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::StorageArea::setItem):
(WebKit::StorageManager::StorageArea::removeItem):
(WebKit::StorageManager::createLocalStorageMap):
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::addItem):
(WebKit::WebBackForwardList::clear):
* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
(WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::installViewStateChangeCompletionHandler):
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::createWithLegacyDefaults):
(WebKit::WebPreferences::copy):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::~WebProcessPool):
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::recordSnapshot):
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _webHitTestResult]):
* UIProcess/mac/WKPrintingView.mm:
(-[WKPrintingView _askPageToComputePageRects]):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::setDragImage):
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
(-[WKWebProcessPlugInFrame hitTest:]):
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.mm:
(-[WKWebProcessPlugInHitTestResult nodeHandle]):
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
(+[WKWebProcessPlugInNodeHandle nodeHandleWithJSValue:inContext:]):
(-[WKWebProcessPlugInNodeHandle htmlIFrameElementContentFrame]):
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.mm:
(+[WKWebProcessPlugInScriptWorld world]):
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundlePostSynchronousMessage):
* WebProcess/InjectedBundle/API/c/WKBundleDOMWindowExtension.cpp:
(WKBundleDOMWindowExtensionCreate):
* WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
(WKBundleHitTestResultCopyNodeHandle):
(WKBundleHitTestResultCopyURLElementHandle):
* WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp:
(WKBundleNavigationActionCopyHitTestResult):
(WKBundleNavigationActionCopyFormElement):
* WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
(WKBundleNodeHandleCreate):
(WKBundleNodeHandleCopyDocument):
(WKBundleNodeHandleCopySnapshotWithOptions):
(WKBundleNodeHandleCopyVisibleRange):
(WKBundleNodeHandleCopyHTMLTableCellElementCellAbove):
(WKBundleNodeHandleCopyDocumentFrame):
(WKBundleNodeHandleCopyHTMLFrameElementContentFrame):
(WKBundleNodeHandleCopyHTMLIFrameElementContentFrame):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageCreateSnapshotWithOptions):
(WKBundlePageCreateSnapshotInViewCoordinates):
(WKBundlePageCreateSnapshotInDocumentCoordinates):
(WKBundlePageCreateScaledSnapshotInDocumentCoordinates):
(WKBundlePagePostSynchronousMessageForTesting):
* WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.cpp:
(WKBundleRangeHandleCreate):
(WKBundleRangeHandleCopySnapshotWithOptions):
* WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
(WKBundleScriptWorldCreateWorld):
* WebProcess/InjectedBundle/API/mac/WKDOMNode.mm:
(-[WKDOMNode _copyBundleNodeHandleRef]):
* WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
(-[WKDOMRange _copyBundleRangeHandleRef]):
* WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.cpp:
(WebKit::InjectedBundleCSSStyleDeclarationHandle::getOrCreate):
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::imageForRect):
(WebKit::InjectedBundleNodeHandle::renderedImage):
* WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
(WebKit::InjectedBundleRangeHandle::getOrCreate):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::create):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::loadURL):
* WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
(WebKit::PDFPlugin::createScrollbar):
* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::applyChange):
* WebProcess/WebCoreSupport/SessionStateConversion.cpp:
(WebKit::toFormData):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::createPlugin):
(WebKit::WebFrameLoaderClient::recreatePlugin):
(WebKit::WebFrameLoaderClient::createJavaAppletWidget):
(WebKit::WebFrameLoaderClient::createNetworkingContext):
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::highlight):
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::convertImageToBitmap):
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindUIAfterPageScroll):
* WebProcess/WebPage/VisitedLinkTableController.cpp:
(WebKit::VisitedLinkTableController::getOrCreate):
(WebKit::VisitedLinkTableController::setVisitedLinkTable):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::createWithCoreMainFrame):
(WebKit::WebFrame::createSubframe):
(WebKit::WebFrame::create):
(WebKit::WebFrame::createSelectionSnapshot):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
(WebKit::WebPage::snapshotAtSize):
(WebKit::WebPage::snapshotNode):
(WebKit::WebPage::willPerformLoadDragDestinationAction):
(WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad):
(WebKit::WebPage::SandboxExtensionTracker::didCommitProvisionalLoad):
(WebKit::WebPage::drawRectToImage):
* WebProcess/WebPage/WebPageGroupProxy.cpp:
(WebKit::WebPageGroupProxy::create):
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
(WebKit::PlatformCAAnimationRemote::Properties::decode):
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::create):
(WebKit::PlatformCALayerRemote::clone):
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
(WebKit::PlatformCALayerRemoteCustom::create):
(WebKit::PlatformCALayerRemoteCustom::clone):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::createDisplayRefreshMonitor):

Tools:

* DumpRenderTree/mac/PixelDumpSupportMac.mm:
(createBitmapContextFromWebView):
(createPagedBitmapContext):
* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::setMockGeolocationPosition):
* TestWebKitAPI/Tests/WTF/HashCountedSet.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/HashMap.cpp:
(TestWebKitAPI::TEST):

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

4 years agoUnreviewed, rolling out r202179.
ap@apple.com [Mon, 20 Jun 2016 20:40:03 +0000 (20:40 +0000)]
Unreviewed, rolling out r202179.
https://bugs.webkit.org/show_bug.cgi?id=158946

The test either fails or times out 100% of the time (Requested
by ap on #webkit).

Reverted changeset:

"REGRESSION: Double tap to zoom does not work on yahoo
finance"
https://bugs.webkit.org/show_bug.cgi?id=158886
http://trac.webkit.org/changeset/202179

Patch by Commit Queue <commit-queue@webkit.org> on 2016-06-20

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

4 years agoCrash in PlatformMediaSession::clientWillPausePlayback
eric.carlson@apple.com [Mon, 20 Jun 2016 20:38:41 +0000 (20:38 +0000)]
Crash in PlatformMediaSession::clientWillPausePlayback
https://bugs.webkit.org/show_bug.cgi?id=158953
<rdar://problem/26121125>

Reviewed by Jer Noble.

No new tests, I have not been able to reproduce this in a test.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::stop): Ref the element before calling stopWithoutDestroyingMediaPlayer
  because updatePlaybackControlsManager can release the last reference and cause the
  destructor to be called.
(WebCore::HTMLMediaElement::suspend): Ditto.

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

4 years agoFix a run-webkit-tests --lint warning.
ap@apple.com [Mon, 20 Jun 2016 20:35:07 +0000 (20:35 +0000)]
Fix a run-webkit-tests --lint warning.

* platform/mac/TestExpectations:

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

4 years agoClean up ResourceResponseBase after r201943
commit-queue@webkit.org [Mon, 20 Jun 2016 20:34:36 +0000 (20:34 +0000)]
Clean up ResourceResponseBase after r201943
https://bugs.webkit.org/show_bug.cgi?id=158706

Patch by Alex Christensen <achristensen@webkit.org> on 2016-06-20
Reviewed by Michael Catanzaro.

* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::ResourceResponseBase):
(WebCore::ResourceResponseBase::asResourceResponse): Deleted.
* platform/network/ResourceResponseBase.h:
(WebCore::ResourceResponseBase::platformCompare):

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

4 years agoTest expectations gardening for
ap@apple.com [Mon, 20 Jun 2016 20:30:56 +0000 (20:30 +0000)]
Test expectations gardening for
https://bugs.webkit.org/show_bug.cgi?id=155196

Marked the tests as flaky instead of skipping, to make the results visible on the
flakiness dashboard. Also added video-with-data-url-allowed-by-media-src-star.html,
which is very flaky too.

* platform/mac-wk1/TestExpectations:
* platform/mac/TestExpectations:

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

4 years agoWeb Inspector: console.profile should use the new Sampling Profiler
joepeck@webkit.org [Mon, 20 Jun 2016 19:12:42 +0000 (19:12 +0000)]
Web Inspector: console.profile should use the new Sampling Profiler
https://bugs.webkit.org/show_bug.cgi?id=153499
<rdar://problem/24352431>

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

Currently console.profile/profileEnd behave slightly differently
between JSContext and Web inspection. Unifying will be part of:
<https://webkit.org/b/158753> Generalize the concept of Instruments on the backend

Both JSContext and Web inspection keep track of active
profiles started and stopped via console.profile/profileEnd.

JSContext inspection sends its programmatic start/stop
via the ScriptProfiler domain.

Web inspection sends its programmatic start/stop
via the Timeline domain, and also will start/stop backend
list of Instruments.

The functional differences between these is that for JSContext
inspection, console.profile only starts/stops the ScriptProfiler
domain, and does not auto-start other instruments. This isn't really
a problem right now given the instruments available for JSContext
inspection; but it will be nice to unify as we add more instruments.
Also, JSContext inspection won't have "Profile (name)" records in
its Events view, since those are currently generated only by the
Web's Timeline domain.

* inspector/protocol/ScriptProfiler.json:
* inspector/protocol/Timeline.json:
Events to inform the frontend of programmatic start/stop.

* debugger/Debugger.h:
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::breakpointsActive):
(Inspector::InspectorDebuggerAgent::isPaused):
* inspector/agents/InspectorDebuggerAgent.h:
Expose breakpoints active state, since programmatic recording
will temporarily disabled breakpoints if needed.

* inspector/JSGlobalObjectConsoleClient.cpp:
(Inspector::JSGlobalObjectConsoleClient::JSGlobalObjectConsoleClient):
(Inspector::JSGlobalObjectConsoleClient::profile):
(Inspector::JSGlobalObjectConsoleClient::profileEnd):
(Inspector::JSGlobalObjectConsoleClient::startConsoleProfile):
(Inspector::JSGlobalObjectConsoleClient::stopConsoleProfile):
* inspector/JSGlobalObjectConsoleClient.h:
* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
* inspector/agents/InspectorScriptProfilerAgent.cpp:
(Inspector::InspectorScriptProfilerAgent::programmaticCaptureStarted):
(Inspector::InspectorScriptProfilerAgent::programmaticCaptureStopped):
* inspector/agents/InspectorScriptProfilerAgent.h:
JSContext implementation of console.profile/profileEnd.

Source/WebCore:

Test: inspector/timeline/setInstruments-programmatic-capture.html

* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::startFromConsole):
(WebCore::InspectorTimelineAgent::stopFromConsole):
(WebCore::InspectorTimelineAgent::mainFrameStartedLoading):
(WebCore::InspectorTimelineAgent::startProgrammaticCapture):
(WebCore::InspectorTimelineAgent::stopProgrammaticCapture):
(WebCore::InspectorTimelineAgent::toggleInstruments):
(WebCore::InspectorTimelineAgent::toggleScriptProfilerInstrument):
(WebCore::InspectorTimelineAgent::toggleHeapInstrument):
(WebCore::InspectorTimelineAgent::toggleMemoryInstrument):
(WebCore::InspectorTimelineAgent::toggleTimelineInstrument):
* inspector/InspectorTimelineAgent.h:
Web implementation of console.profile/profileEnd.
Make helpers for startings / stopping instruments.

Source/WebInspectorUI:

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.programmaticCaptureStarted):
(WebInspector.TimelineManager.prototype.programmaticCaptureStopped):
(WebInspector.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStarted):
(WebInspector.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStopped):
For programmatic captures, automatically show the Script Timeline, since
that is guarenteed to have been started by the backend. Start capturing
without creating a new recording.

* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording.prototype.stop):
(WebInspector.TimelineRecording.prototype.addScriptInstrumentForProgrammaticCapture):
When stopping for programmatic capture we don't need to disable
instruments, the backend would have already done this.

* UserInterface/Protocol/ScriptProfilerObserver.js:
(WebInspector.ScriptProfilerObserver.prototype.programmaticCaptureStarted):
(WebInspector.ScriptProfilerObserver.prototype.programmaticCaptureStopped):
(WebInspector.ScriptProfilerObserver):
* UserInterface/Protocol/TimelineObserver.js:
(WebInspector.TimelineObserver.prototype.programmaticCaptureStarted):
(WebInspector.TimelineObserver.prototype.programmaticCaptureStopped):
(WebInspector.TimelineObserver):
Pass through Web and JSContext programmatic capture events.

LayoutTests:

* inspector/timeline/setInstruments-programmatic-capture-expected.txt: Added.
* inspector/timeline/setInstruments-programmatic-capture.html: Added.
New test that the backend auto-starts instruments during programmatic capture.

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

4 years agoUnreviewed, rebaseline test now that TouchEvent has a constructor.
cdumez@apple.com [Mon, 20 Jun 2016 19:10:00 +0000 (19:10 +0000)]
Unreviewed, rebaseline test now that TouchEvent has a constructor.

* fast/events/touch/document-create-touch-list-ios-expected.txt:

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

4 years agoAdd a API test for *DeferringViewInWindowChanges as fixed in r202230
timothy_horton@apple.com [Mon, 20 Jun 2016 18:52:40 +0000 (18:52 +0000)]
Add a API test for *DeferringViewInWindowChanges as fixed in r202230
https://bugs.webkit.org/show_bug.cgi?id=158947

Reviewed by Simon Fraser.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/DeferredViewInWindowStateChange.mm: Added.
(TestWebKitAPI::didFinishLoadForFrame):
(TestWebKitAPI::setPageLoaderClient):
(TestWebKitAPI::TEST):
Add a test ensuring that in-window state changes are deferred when using
the SPI for deferring them, as fixed in r202230.

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

4 years agoWhen navigating, discard decoded image data that is only live due to page cache.
akling@apple.com [Mon, 20 Jun 2016 17:23:49 +0000 (17:23 +0000)]
When navigating, discard decoded image data that is only live due to page cache.
<https://webkit.org/b/158941>

Reviewed by Antti Koivisto.

A resource is "live" if it's currently in use by a web page, and "dead" if it's
only kept alive by the memory cache.

This patch adds a mechanism that looks at CachedImage resources to see if all the
clients that make them appear "live" are actually pages in the page cache.

If so, we let the "jettison expensive objects on top-level navigation" mechanism
discard the decoded data for such half-live images. This can reduce the peak
memory usage during navigations quite a bit.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad): Move the call to MemoryPressureHandler
before we add the outgoing page to the page cache. This allows the jettisoning code
to make decisions based on which pages were cached *before* the navigation.

* loader/cache/CachedImageClient.h:
(WebCore::CachedImageClient::inPageCache):
* loader/ImageLoader.h:
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::inPageCache):
* rendering/RenderObject.h:
(WebCore::RenderObject::inPageCache): Added a CachedImageClient::inPageCache() virtual
to determine which clients are currently in page cache (answered by their Document.)

* loader/cache/CachedImage.h:
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::areAllClientsInPageCache): Walks all CachedImageClient clients
and returns true if all of them are inPageCache().

* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::jettisonExpensiveObjectsOnTopLevelNavigation):
Walk all the known CachedImages and nuke decoded data for those that have some but
are only considered live due to clients in the page cache.

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

4 years agoREGRESSION (r191499): Tab content "jumps" down when focusing tabs that load in the...
timothy_horton@apple.com [Mon, 20 Jun 2016 17:13:02 +0000 (17:13 +0000)]
REGRESSION (r191499): Tab content "jumps" down when focusing tabs that load in the background
https://bugs.webkit.org/show_bug.cgi?id=158904
<rdar://problem/26025831>

Reviewed by Sam Weinig.

* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::viewDidMoveToWindow):
During the large refactor that was r191499, we somehow ended up with two
different members for the same thing - one that got written, and one that
got read. We should only have one.

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

4 years agoTry to fix the iOS build after r202142 and r202224.
timothy_horton@apple.com [Mon, 20 Jun 2016 17:10:00 +0000 (17:10 +0000)]
Try to fix the iOS build after r202142 and r202224.

* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):

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

4 years agoUnreviewed, fix post-landing review comment from Darin on r202188.
cdumez@apple.com [Mon, 20 Jun 2016 16:10:33 +0000 (16:10 +0000)]
Unreviewed, fix post-landing review comment from Darin on r202188.

* platform/network/CacheValidation.cpp:
(WebCore::parseCacheHeader):

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

4 years agoUpdating class name of a shadow host does not update the style applied by :host()
antti@apple.com [Mon, 20 Jun 2016 08:52:10 +0000 (08:52 +0000)]
Updating class name of a shadow host does not update the style applied by :host()
https://bugs.webkit.org/show_bug.cgi?id=158900
<rdar://problem/26883707>

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/shadow-dom/shadow-host-style-update.html

Teach style invalidation optimization code about :host.

* style/AttributeChangeInvalidation.cpp:
(WebCore::Style::mayBeAffectedByHostStyle):
(WebCore::Style::AttributeChangeInvalidation::invalidateStyle):
* style/ClassChangeInvalidation.cpp:
(WebCore::Style::computeClassChange):
(WebCore::Style::mayBeAffectedByHostStyle):
(WebCore::Style::ClassChangeInvalidation::invalidateStyle):
* style/IdChangeInvalidation.cpp:
(WebCore::Style::mayBeAffectedByHostStyle):
(WebCore::Style::IdChangeInvalidation::invalidateStyle):

LayoutTests:

* fast/shadow-dom/shadow-host-style-update-expected.html: Added.
* fast/shadow-dom/shadow-host-style-update.html: Added.

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

4 years agoWebKitTestRunner: Missing \n at the line of "#PROCESS UNRESPONSIVE"
commit-queue@webkit.org [Mon, 20 Jun 2016 07:07:04 +0000 (07:07 +0000)]
WebKitTestRunner: Missing \n at the line of "#PROCESS UNRESPONSIVE"
https://bugs.webkit.org/show_bug.cgi?id=158931

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2016-06-20
Reviewed by Alexey Proskuryakov.

* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::dumpWebProcessUnresponsiveness): Appended missing \n at the end of line.

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

4 years agoUpdate Brotli to version 0.4.0
fred.wang@free.fr [Mon, 20 Jun 2016 06:56:22 +0000 (06:56 +0000)]
Update Brotli to version 0.4.0
https://bugs.webkit.org/show_bug.cgi?id=158907

Reviewed by Michael Catanzaro.

* brotli/README.webkit:
* brotli/dec/bit_reader.h:
* brotli/dec/decode.c:
* brotli/dec/decode.h:
* brotli/dec/huffman.c:
* brotli/dec/huffman.h:
* brotli/dec/port.h:
(BrotliDump):
* brotli/dec/state.c:
* brotli/dec/state.h:

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

4 years agoFix erroneously commented line added in r202142.
simon.fraser@apple.com [Mon, 20 Jun 2016 05:53:20 +0000 (05:53 +0000)]
Fix erroneously commented line added in r202142.

* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):

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

4 years agoTest expectation gardening.
ap@apple.com [Mon, 20 Jun 2016 03:57:37 +0000 (03:57 +0000)]
Test expectation gardening.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:

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

4 years agoTest expectation gardening.
ap@apple.com [Mon, 20 Jun 2016 02:35:56 +0000 (02:35 +0000)]
Test expectation gardening.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:

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

4 years ago[EFL] Mark shadow-dom tests to pass because it was enabled by r202091
gyuyoung.kim@webkit.org [Mon, 20 Jun 2016 01:59:06 +0000 (01:59 +0000)]
[EFL] Mark shadow-dom tests to pass because it was enabled by r202091
https://bugs.webkit.org/show_bug.cgi?id=158930

Unreviewed EFL gardening.

* platform/efl/TestExpectations:

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

4 years ago[GTK] Unreviewed test gardening
mcatanzaro@igalia.com [Mon, 20 Jun 2016 01:19:50 +0000 (01:19 +0000)]
[GTK] Unreviewed test gardening

* fast/forms/select-non-native-rendering-direction-expected.txt: Added.
* fast/text/hyphenate-avoid-orphaned-word-expected.txt: Added.
* platform/gtk/TestExpectations:

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

4 years agoAdd test expectations for macOS Sierra
ap@apple.com [Mon, 20 Jun 2016 00:17:05 +0000 (00:17 +0000)]
Add test expectations for macOS Sierra
https://bugs.webkit.org/show_bug.cgi?id=158903

Reviewed by Alex Christensen.

Tools:

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Sierra.png: Added.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Sierra@2x.png: Added.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
Added dashboard support.

* BuildSlaveSupport/build.webkit.org-config/wkbuild.py:
* BuildSlaveSupport/build.webkit.org-config/wkbuild_unittest.py:
Trigger the right build queues on check-in.

* Scripts/webkitpy/common/system/platforminfo.py:
* Scripts/webkitpy/common/system/platforminfo_unittest.py:
* Scripts/webkitpy/layout_tests/models/test_expectations.py:
* Scripts/webkitpy/port/mac.py:
* Scripts/webkitpy/port/mac_unittest.py:
* TestResultServer/static-dashboards/flakiness_dashboard.js:
Added cases for Sierra, and updated tests for new baseline search paths.

LayoutTests:

* TestExpectations:
* media/click-placeholder-not-pausing-expected.txt: Added.
* media/click-placeholder-not-pausing.html: Added.
* media/controls/picture-in-picture-expected.txt: Added.
* media/controls/picture-in-picture.html: Added.
* media/element-containing-pip-video-going-into-fullscreen-expected.txt: Added.
* media/element-containing-pip-video-going-into-fullscreen.html: Added.
* media/fullscreen-api-enabled-media-with-presentation-mode-expected.txt: Added.
* media/fullscreen-api-enabled-media-with-presentation-mode.html: Added.
* media/fullscreen-video-going-into-pip-expected.txt: Added.
* media/fullscreen-video-going-into-pip.html: Added.
* media/navigate-with-pip-should-not-crash-expected.txt: Added.
* media/navigate-with-pip-should-not-crash.html: Added.
* media/pip-video-going-into-fullscreen-expected.txt: Added.
* media/pip-video-going-into-fullscreen.html: Added.
* media/video-contained-in-fullscreen-element-going-into-pip-expected.txt: Added.
* media/video-contained-in-fullscreen-element-going-into-pip.html: Added.
* platform/mac-elcapitan: Added.
* platform/mac-elcapitan/compositing: Added.
* platform/mac-elcapitan/compositing/rtl: Added.
* platform/mac-elcapitan/compositing/rtl/rtl-overflow-scrolling-expected.txt: Copied from LayoutTests/platform/mac/compositing/rtl/rtl-overflow-scrolling-expected.txt.
* platform/mac-elcapitan/fast: Added.
* platform/mac-elcapitan/fast/block: Added.
* platform/mac-elcapitan/fast/block/float: Added.
* platform/mac-elcapitan/fast/block/float/026-expected.png: Copied from LayoutTests/platform/mac/fast/block/float/026-expected.png.
* platform/mac-elcapitan/fast/block/float/026-expected.txt: Copied from LayoutTests/platform/mac/fast/block/float/026-expected.txt.
* platform/mac-elcapitan/fast/block/float/028-expected.png: Copied from LayoutTests/platform/mac/fast/block/float/028-expected.png.
* platform/mac-elcapitan/fast/block/float/028-expected.txt: Copied from LayoutTests/platform/mac/fast/block/float/028-expected.txt.
* platform/mac-elcapitan/fast/overflow: Added.
* platform/mac-elcapitan/fast/overflow/unreachable-overflow-rtl-bug-expected.png: Copied from LayoutTests/platform/mac/fast/overflow/unreachable-overflow-rtl-bug-expected.png.
* platform/mac-elcapitan/fast/overflow/unreachable-overflow-rtl-bug-expected.txt: Copied from LayoutTests/platform/mac/fast/overflow/unreachable-overflow-rtl-bug-expected.txt.
* platform/mac-elcapitan/fast/ruby: Added.
* platform/mac-elcapitan/fast/ruby/bopomofo-expected.png: Copied from LayoutTests/platform/mac/fast/ruby/bopomofo-expected.png.
* platform/mac-elcapitan/fast/ruby/bopomofo-expected.txt: Copied from LayoutTests/platform/mac/fast/ruby/bopomofo-expected.txt.
* platform/mac-elcapitan/fast/ruby/bopomofo-letter-spacing-expected.png: Copied from LayoutTests/platform/mac/fast/ruby/bopomofo-letter-spacing-expected.png.
* platform/mac-elcapitan/fast/ruby/bopomofo-letter-spacing-expected.txt: Copied from LayoutTests/platform/mac/fast/ruby/bopomofo-letter-spacing-expected.txt.
* platform/mac-elcapitan/fast/ruby/bopomofo-rl-expected.png: Copied from LayoutTests/platform/mac/fast/ruby/bopomofo-rl-expected.png.
* platform/mac-elcapitan/fast/ruby/bopomofo-rl-expected.txt: Copied from LayoutTests/platform/mac/fast/ruby/bopomofo-rl-expected.txt.
* platform/mac-elcapitan/fast/text: Added.
* platform/mac-elcapitan/fast/text/crash-complex-text-surrogate-expected.txt: Copied from LayoutTests/platform/mac/fast/text/crash-complex-text-surrogate-expected.txt.
* platform/mac-elcapitan/fast/text/justify-ideograph-complex-expected.png: Copied from LayoutTests/platform/mac/fast/text/justify-ideograph-complex-expected.png.
* platform/mac-elcapitan/fast/text/justify-ideograph-complex-expected.txt: Copied from LayoutTests/platform/mac/fast/text/justify-ideograph-complex-expected.txt.
* platform/mac-elcapitan/fast/text/line-initial-and-final-swashes-expected.png: Copied from LayoutTests/platform/mac/fast/text/line-initial-and-final-swashes-expected.png.
* platform/mac-elcapitan/fast/text/line-initial-and-final-swashes-expected.txt: Copied from LayoutTests/platform/mac/fast/text/line-initial-and-final-swashes-expected.txt.
* platform/mac-elcapitan/http: Added.
* platform/mac-elcapitan/http/tests: Added.
* platform/mac-elcapitan/http/tests/cookies: Added.
* platform/mac-elcapitan/http/tests/cookies/third-party-cookie-relaxing-expected.txt: Copied from LayoutTests/http/tests/cookies/third-party-cookie-relaxing-expected.txt.
* platform/mac-elcapitan/http/tests/security: Added.
* platform/mac-elcapitan/http/tests/security/mixedContent: Added.
* platform/mac-elcapitan/http/tests/security/mixedContent/insecure-audio-video-in-main-frame-expected.txt: Copied from LayoutTests/platform/mac/http/tests/security/mixedContent/insecure-audio-video-in-main-frame-expected.txt.
* platform/mac-elcapitan/media: Added.
* platform/mac-elcapitan/media/controls-strict-expected.png: Copied from LayoutTests/platform/mac/media/controls-strict-expected.png.
* platform/mac-elcapitan/media/controls-strict-expected.txt: Copied from LayoutTests/platform/mac/media/controls-strict-expected.txt.
* platform/mac-elcapitan/media/controls-without-preload-expected.png: Copied from LayoutTests/platform/mac/media/controls-without-preload-expected.png.
* platform/mac-elcapitan/media/controls-without-preload-expected.txt: Copied from LayoutTests/platform/mac/media/controls-without-preload-expected.txt.
* platform/mac-elcapitan/media/track: Added.
* platform/mac-elcapitan/media/track/video-track-alternate-groups-expected.txt: Copied from LayoutTests/platform/mac/media/track/video-track-alternate-groups-expected.txt.
* platform/mac-elcapitan/media/video-controls-rendering-expected.txt: Copied from LayoutTests/platform/mac/media/video-controls-rendering-expected.txt.
* platform/mac-elcapitan/media/video-display-toggle-expected.png: Copied from LayoutTests/platform/mac/media/video-display-toggle-expected.png.
* platform/mac-elcapitan/media/video-display-toggle-expected.txt: Copied from LayoutTests/platform/mac/media/video-display-toggle-expected.txt.
* platform/mac-elcapitan/media/video-no-audio-expected.txt: Copied from LayoutTests/platform/mac/media/video-no-audio-expected.txt.
* platform/mac-elcapitan/media/video-volume-slider-expected.txt: Copied from LayoutTests/platform/mac/media/video-volume-slider-expected.txt.
* platform/mac-wk1/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/mac-wk2/fast/scrolling: Added.
* platform/mac-wk2/fast/scrolling/rtl-scrollbars-animation-property-expected.txt: Added.
* platform/mac/TestExpectations:
* platform/mac/compositing/rtl/rtl-overflow-scrolling-expected.png: Added.
* platform/mac/compositing/rtl/rtl-overflow-scrolling-expected.txt:
* platform/mac/fast/block/float/026-expected.png:
* platform/mac/fast/block/float/026-expected.txt:
* platform/mac/fast/block/float/028-expected.png:
* platform/mac/fast/block/float/028-expected.txt:
* platform/mac/fast/overflow/unreachable-overflow-rtl-bug-expected.png:
* platform/mac/fast/overflow/unreachable-overflow-rtl-bug-expected.txt:
* platform/mac/fast/ruby/bopomofo-expected.png:
* platform/mac/fast/ruby/bopomofo-expected.txt:
* platform/mac/fast/ruby/bopomofo-letter-spacing-expected.png:
* platform/mac/fast/ruby/bopomofo-letter-spacing-expected.txt:
* platform/mac/fast/ruby/bopomofo-rl-expected.png:
* platform/mac/fast/ruby/bopomofo-rl-expected.txt:
* platform/mac/fast/text/crash-complex-text-surrogate-expected.txt:
* platform/mac/fast/text/justify-ideograph-complex-expected.png:
* platform/mac/fast/text/justify-ideograph-complex-expected.txt:
* platform/mac/fast/text/line-initial-and-final-swashes-expected.png:
* platform/mac/fast/text/line-initial-and-final-swashes-expected.txt:
* platform/mac/http/tests/cookies/third-party-cookie-relaxing-expected.txt: Added.
* platform/mac/http/tests/security/mixedContent/insecure-audio-video-in-main-frame-expected.txt:
* platform/mac/media/controls-strict-expected.png: Removed.
* platform/mac/media/controls-without-preload-expected.png: Removed.
* platform/mac/media/track/video-track-alternate-groups-expected.txt:
* platform/mac/media/video-controls-rendering-expected.png: Removed.
* platform/mac/media/video-display-toggle-expected.png: Removed.
* platform/mac/media/video-no-audio-expected.png: Removed.
* platform/mac/media/video-volume-slider-expected.png: Removed.

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

4 years agoRemove hasStaticPropertyTable (part 5: done!)
barraclough@apple.com [Mon, 20 Jun 2016 00:03:50 +0000 (00:03 +0000)]
Remove hasStaticPropertyTable (part 5: done!)
https://bugs.webkit.org/show_bug.cgi?id=158431

Reviewed by Chris Dumez.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
    - remove hasStaticPropertyTable.
* bindings/scripts/test/JS/JSInterfaceName.h:
(WebCore::JSInterfaceName::create):
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
(WebCore::JSTestActiveDOMObject::create):
* bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
(WebCore::JSTestClassWithJSBuiltinConstructor::create):
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
(WebCore::JSTestCustomConstructorWithNoInterfaceObject::create):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
(WebCore::JSTestCustomNamedGetter::create):
* bindings/scripts/test/JS/JSTestEventConstructor.h:
(WebCore::JSTestEventConstructor::create):
* bindings/scripts/test/JS/JSTestEventTarget.h:
(WebCore::JSTestEventTarget::create):
* bindings/scripts/test/JS/JSTestException.h:
(WebCore::JSTestException::create):
* bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
(WebCore::JSTestGenerateIsReachable::create):
* bindings/scripts/test/JS/JSTestGlobalObject.h:
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
(WebCore::JSTestJSBuiltinConstructor::create):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
(WebCore::JSTestMediaQueryListListener::create):
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
(WebCore::JSTestNamedConstructor::create):
* bindings/scripts/test/JS/JSTestNode.h:
* bindings/scripts/test/JS/JSTestNondeterministic.h:
(WebCore::JSTestNondeterministic::create):
* bindings/scripts/test/JS/JSTestObj.h:
(WebCore::JSTestObj::create):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
(WebCore::JSTestOverloadedConstructors::create):
* bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
(WebCore::JSTestOverrideBuiltins::create):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
(WebCore::JSTestSerializedScriptValueInterface::create):
* bindings/scripts/test/JS/JSTestTypedefs.h:
(WebCore::JSTestTypedefs::create):
* bindings/scripts/test/JS/JSattribute.h:
(WebCore::JSattribute::create):
* bindings/scripts/test/JS/JSreadonly.h:
(WebCore::JSreadonly::create):

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

4 years agoWeb Inspector: Remove Sidebar z-index:0 workaround for scrollbars and position:sticky...
nvasilyev@apple.com [Sun, 19 Jun 2016 22:19:53 +0000 (22:19 +0000)]
Web Inspector: Remove Sidebar z-index:0 workaround for scrollbars and position:sticky section headers
https://bugs.webkit.org/show_bug.cgi?id=158882

Reviewed by Darin Adler.

The z-index:0 workaround is no longer needed as it doesn't change anything.

* UserInterface/Views/Sidebar.css:
(.sidebar > .panel): Deleted.

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

4 years agoAnother buid fix for master.cfg.
ap@apple.com [Sun, 19 Jun 2016 20:49:28 +0000 (20:49 +0000)]
Another buid fix for master.cfg.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(CompileWebKit.start):

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

4 years agoAnother buid fix for master.cfg.
ap@apple.com [Sun, 19 Jun 2016 20:35:03 +0000 (20:35 +0000)]
Another buid fix for master.cfg.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(CompileWebKit.start):

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

4 years agoWe should be able to generate more types of ICs inline
sbarati@apple.com [Sun, 19 Jun 2016 19:42:18 +0000 (19:42 +0000)]
We should be able to generate more types of ICs inline
https://bugs.webkit.org/show_bug.cgi?id=158719
<rdar://problem/26825641>

Reviewed by Filip Pizlo.

This patch changes how we emit code for *byId ICs inline.
We no longer keep data labels to patch structure checks, etc.
Instead, we just regenerate the entire IC into a designated
region of code that the Baseline/DFG/FTL JIT will emit inline.
This makes it much simpler to patch inline ICs. All that's
needed to patch an inline IC is to memcpy the code from
a macro assembler inline using LinkBuffer. This architecture
will be easy to extend into other forms of ICs, such as one
for add, in the future.

To support this change, I've reworked the fields inside
StructureStubInfo. It now has one field that is the CodeLocationLabel
of the start of the inline IC. Then it has a few ints that track deltas
to other locations in the IC such as the slow path start, slow path call, the
ICs 'done' location. We used to perform math on these ints in a bunch of different
places. I've consolidated that math into methods inside StructureStubInfo.

To generate inline ICs, I've implemented a new class called InlineAccess.
InlineAccess is stateless: it just has a bunch of static methods for
generating code into the inline region specified by StructureStubInfo.
Repatch will now decide when it wants to generate such an inline
IC, and it will ask InlineAccess to do so.

I've implemented three types of inline ICs to begin with (extending
this in the future should be easy):
- Self property loads (both inline and out of line offsets).
- Self property replace (both inline and out of line offsets).
- Array length on specific array types.
(An easy extension would be to implement JSString length.)

To know how much inline space to reserve, I've implemented a
method that stubs out the various inline cache shapes and
dumps their size. This is used to determine how much space
to save inline. When InlineAccess ends up generating more
code than can fit inline, we will fall back to generating
code with PolymorphicAccess instead.

To make generating code into already allocated executable memory
efficient, I've made AssemblerData have 128 bytes of inline storage.
This saves us a malloc when splatting code into the inline region.

This patch also tidies up LinkBuffer's API for generating
into already allocated executable memory. Now, when generating
code that has less size than the already allocated space, LinkBuffer
will fill the extra space with nops. Also, if branch compaction shrinks
the code, LinkBuffer will add a nop sled at the end of the shrunken
code to take up the entire allocated size.

This looks like it could be a 1% octane progression.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::nop):
(JSC::ARM64Assembler::fillNops):
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::nopw):
(JSC::ARMv7Assembler::nopPseudo16):
(JSC::ARMv7Assembler::nopPseudo32):
(JSC::ARMv7Assembler::fillNops):
(JSC::ARMv7Assembler::dmbSY):
* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::addLinkTask):
(JSC::AbstractMacroAssembler::emitNops):
(JSC::AbstractMacroAssembler::AbstractMacroAssembler):
* assembler/AssemblerBuffer.h:
(JSC::AssemblerData::AssemblerData):
(JSC::AssemblerData::operator=):
(JSC::AssemblerData::~AssemblerData):
(JSC::AssemblerData::buffer):
(JSC::AssemblerData::grow):
(JSC::AssemblerData::isInlineBuffer):
(JSC::AssemblerBuffer::AssemblerBuffer):
(JSC::AssemblerBuffer::ensureSpace):
(JSC::AssemblerBuffer::codeSize):
(JSC::AssemblerBuffer::setCodeSize):
(JSC::AssemblerBuffer::label):
(JSC::AssemblerBuffer::debugOffset):
(JSC::AssemblerBuffer::releaseAssemblerData):
* assembler/LinkBuffer.cpp:
(JSC::LinkBuffer::copyCompactAndLinkCode):
(JSC::LinkBuffer::linkCode):
(JSC::LinkBuffer::allocate):
(JSC::LinkBuffer::performFinalization):
(JSC::LinkBuffer::shrink): Deleted.
* assembler/LinkBuffer.h:
(JSC::LinkBuffer::LinkBuffer):
(JSC::LinkBuffer::debugAddress):
(JSC::LinkBuffer::size):
(JSC::LinkBuffer::wasAlreadyDisassembled):
(JSC::LinkBuffer::didAlreadyDisassemble):
(JSC::LinkBuffer::applyOffset):
(JSC::LinkBuffer::code):
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::patchableBranch32):
(JSC::MacroAssemblerARM64::patchableBranch64):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::patchableBranch32):
(JSC::MacroAssemblerARMv7::patchableBranchPtrWithPatch):
* assembler/X86Assembler.h:
(JSC::X86Assembler::nop):
(JSC::X86Assembler::fillNops):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::printGetByIdCacheStatus):
* bytecode/InlineAccess.cpp: Added.
(JSC::InlineAccess::dumpCacheSizesAndCrash):
(JSC::linkCodeInline):
(JSC::InlineAccess::generateSelfPropertyAccess):
(JSC::getScratchRegister):
(JSC::hasFreeRegister):
(JSC::InlineAccess::canGenerateSelfPropertyReplace):
(JSC::InlineAccess::generateSelfPropertyReplace):
(JSC::InlineAccess::isCacheableArrayLength):
(JSC::InlineAccess::generateArrayLength):
(JSC::InlineAccess::rewireStubAsJump):
* bytecode/InlineAccess.h: Added.
(JSC::InlineAccess::sizeForPropertyAccess):
(JSC::InlineAccess::sizeForPropertyReplace):
(JSC::InlineAccess::sizeForLengthAccess):
* bytecode/PolymorphicAccess.cpp:
(JSC::PolymorphicAccess::regenerate):
* bytecode/StructureStubInfo.cpp:
(JSC::StructureStubInfo::initGetByIdSelf):
(JSC::StructureStubInfo::initArrayLength):
(JSC::StructureStubInfo::initPutByIdReplace):
(JSC::StructureStubInfo::deref):
(JSC::StructureStubInfo::aboutToDie):
(JSC::StructureStubInfo::propagateTransitions):
(JSC::StructureStubInfo::containsPC):
* bytecode/StructureStubInfo.h:
(JSC::StructureStubInfo::considerCaching):
(JSC::StructureStubInfo::slowPathCallLocation):
(JSC::StructureStubInfo::doneLocation):
(JSC::StructureStubInfo::slowPathStartLocation):
(JSC::StructureStubInfo::patchableJumpForIn):
(JSC::StructureStubInfo::valueRegs):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::link):
* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::reifyInlinedCallFrames):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::cachedGetById):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::cachedGetById):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileIn):
(JSC::FTL::DFG::LowerDFGToB3::getById):
* jit/JITInlineCacheGenerator.cpp:
(JSC::JITByIdGenerator::finalize):
(JSC::JITByIdGenerator::generateFastCommon):
(JSC::JITGetByIdGenerator::JITGetByIdGenerator):
(JSC::JITGetByIdGenerator::generateFastPath):
(JSC::JITPutByIdGenerator::JITPutByIdGenerator):
(JSC::JITPutByIdGenerator::generateFastPath):
(JSC::JITPutByIdGenerator::slowPathFunction):
(JSC::JITByIdGenerator::generateFastPathChecks): Deleted.
* jit/JITInlineCacheGenerator.h:
(JSC::JITByIdGenerator::reportSlowPathCall):
(JSC::JITByIdGenerator::slowPathBegin):
(JSC::JITByIdGenerator::slowPathJump):
(JSC::JITGetByIdGenerator::JITGetByIdGenerator):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitGetByValWithCachedId):
(JSC::JIT::emit_op_try_get_by_id):
(JSC::JIT::emit_op_get_by_id):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emitGetByValWithCachedId):
(JSC::JIT::emit_op_try_get_by_id):
(JSC::JIT::emit_op_get_by_id):
* jit/Repatch.cpp:
(JSC::repatchCall):
(JSC::tryCacheGetByID):
(JSC::repatchGetByID):
(JSC::appropriateGenericPutByIdFunction):
(JSC::tryCachePutByID):
(JSC::repatchPutByID):
(JSC::tryRepatchIn):
(JSC::repatchIn):
(JSC::linkSlowFor):
(JSC::resetGetByID):
(JSC::resetPutByID):
(JSC::resetIn):
(JSC::repatchByIdSelfAccess): Deleted.
(JSC::resetGetByIDCheckAndLoad): Deleted.
(JSC::resetPutByIDCheckAndLoad): Deleted.
(JSC::replaceWithJump): Deleted.

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

4 years agoFix master.cfg
lforschler@apple.com [Sun, 19 Jun 2016 18:26:52 +0000 (18:26 +0000)]
Fix master.cfg

Unreviewed build fix.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(CompileWebKit.start):

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

4 years agoTest another commit.
lforschler@apple.com [Sun, 19 Jun 2016 18:02:55 +0000 (18:02 +0000)]
Test another commit.

Unreviewed.

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

4 years agoThe JSBuiltinConstructor feature can't handle a JS interface extending an other JS...
youenn.fablet@crf.canon.fr [Sun, 19 Jun 2016 17:51:51 +0000 (17:51 +0000)]
The JSBuiltinConstructor feature can't handle a JS interface extending an other JS interface
https://bugs.webkit.org/show_bug.cgi?id=158834

Reviewed by Eric Carlson.

No change of behavior.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader): Explicitly setting DOMWrapped type definition from
JSXX class deriving from another JSYY class.
* bindings/scripts/test/JS/JSTestEventTarget.h: Rebased.
* bindings/scripts/test/JS/JSTestNode.h: Ditto.

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

4 years agoTest commit.
lforschler@apple.com [Sun, 19 Jun 2016 17:48:54 +0000 (17:48 +0000)]
Test commit.

Unreviewed.

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

4 years agoTest another commit.
lforschler@apple.com [Sun, 19 Jun 2016 17:35:43 +0000 (17:35 +0000)]
Test another commit.

Unreviewed.

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

4 years agoTest commit.
lforschler@apple.com [Sun, 19 Jun 2016 17:31:07 +0000 (17:31 +0000)]
Test commit.

Unreviewed.

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

4 years agoTest yet another commit.
lforschler@apple.com [Sun, 19 Jun 2016 17:19:56 +0000 (17:19 +0000)]
Test yet another commit.

Unreviewed.

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

4 years agoTest another commit.
lforschler@apple.com [Sun, 19 Jun 2016 17:01:30 +0000 (17:01 +0000)]
Test another commit.

Unreviewed.

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

4 years agoREGRESSION(concurrent baseline JIT): Kraken/ai-astar runs 20% slower
fpizlo@apple.com [Sun, 19 Jun 2016 16:42:18 +0000 (16:42 +0000)]
REGRESSION(concurrent baseline JIT): Kraken/ai-astar runs 20% slower
https://bugs.webkit.org/show_bug.cgi?id=158906

Reviewed by Benjamin Poulain.

The concurrent baseline JIT was a 2-3% progression on JSBench, possibly a 1% progression
on PLT3, but a 2-5% regression on Kraken. This patch fixes the Kraken regression without
affecting the other tests.

The problem is that Kraken/ai-astar's initialization code had a ginormous piece of init
code that took about 16ms to compile in baseline. There's no good way to avoid letting it
tier-up into baseline since it has a compute loop. The time it takes to run this code is
never measured. The concurrent baseline JIT caused us to schedule the compilation of this
huge code rather than doing it eagerly. This meant that after initialization was done and
we started actually running real stuff, all of the real stuff's compiles would be convoyed
behind this super-expensive baseline compile. Note that DFG and FTL compiles convoy behind
baseline compiles, since you can't schedule a DFG compile for a code block until that code
block is in baseline.

This uses the simplest fix: if we are thinking about scheduling some compile and the
thread is busy, do the compile on the main thread instead. This doesn't completely
eliminate the ai-astar regression (we still have a 4% regression on that test) but it now
results in concurrent baseline JIT being an overall progression on Kraken as a whole (1%
on my machine). This is because concurrent baseline appears to help on other tests.

In the future, we could fix this even better by allowing the JITWorklist to spawn more
threads or by being smarter about baseline compilation. I think it's nasty that if a giant
piece of initialization code ends in a compute loop, we compile all of the code instead of
just the loop. It's also gross that a constant-like object creation expression will result
in so much code. It would result in less code if we allowed ourselves to do a bit more
static reasoning about object literals.

But for now, I think that this is a great way to recover the Kraken regression while still
keeping the other progressions from concurrent baseline.

* jit/JITWorklist.cpp:
(JSC::JITWorklist::Plan::Plan):
(JSC::JITWorklist::Plan::compileInThread):
(JSC::JITWorklist::Plan::finalize):
(JSC::JITWorklist::Plan::codeBlock):
(JSC::JITWorklist::Plan::isFinishedCompiling):
(JSC::JITWorklist::Plan::compileNow):
(JSC::JITWorklist::JITWorklist):
(JSC::JITWorklist::compileLater):
(JSC::JITWorklist::compileNow):
(JSC::JITWorklist::runThread):
(JSC::JITWorklist::Plan::isFinalized): Deleted.
* jit/JITWorklist.h:

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

4 years agoTest commit.
lforschler@apple.com [Sun, 19 Jun 2016 16:28:49 +0000 (16:28 +0000)]
Test commit.

Unreviewed.

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

4 years agoTest post-commit after apache restart.
lforschler@apple.com [Sun, 19 Jun 2016 15:54:46 +0000 (15:54 +0000)]
Test post-commit after apache restart.

Unreviewed.

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

4 years agoTesting yet another fix for trac-mirror.
lforschler@apple.com [Sun, 19 Jun 2016 15:22:21 +0000 (15:22 +0000)]
Testing yet another fix for trac-mirror.

Unreviewed.

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