WebKit-https.git
4 years agoTest expectations gardening for rdar://problem/26960385
ap@apple.com [Thu, 23 Jun 2016 00:14:45 +0000 (00:14 +0000)]
Test expectations gardening for rdar://problem/26960385

* platform/mac/TestExpectations:

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

4 years agoDatabaseProcess doesn't handle WebProcesses going away uncleanly.
beidson@apple.com [Wed, 22 Jun 2016 23:46:05 +0000 (23:46 +0000)]
DatabaseProcess doesn't handle WebProcesses going away uncleanly.
https://bugs.webkit.org/show_bug.cgi?id=158894

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Covered by additions to existing API test).

* Modules/indexeddb/server/IDBConnectionToClient.cpp:
(WebCore::IDBServer::IDBConnectionToClient::registerDatabaseConnection):
(WebCore::IDBServer::IDBConnectionToClient::unregisterDatabaseConnection):
(WebCore::IDBServer::IDBConnectionToClient::connectionToClientClosed):
* Modules/indexeddb/server/IDBConnectionToClient.h:

* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::unregisterConnection): Call connectionToClientClosed() on
  the connection, which cleans up after it in the server.

* Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection):
(WebCore::IDBServer::UniqueIDBDatabaseConnection::~UniqueIDBDatabaseConnection):

Source/WebKit2:

* DatabaseProcess/DatabaseToWebProcessConnection.cpp:
(WebKit::DatabaseToWebProcessConnection::didClose):

* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
(WebKit::WebIDBConnectionToClient::disconnectedFromWebProcess): Actually unregister this connection
  from the IDBServer so it can clean up.
(WebKit::WebIDBConnectionToClient::~WebIDBConnectionToClient):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBMultiProcess-2.html:
* TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBMultiProcess-3.html: Added.
* TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBMultiProcess.mm:

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

4 years agoAX: Add support for CSS4 :focus-within pseudo
commit-queue@webkit.org [Wed, 22 Jun 2016 23:35:25 +0000 (23:35 +0000)]
AX: Add support for CSS4 :focus-within pseudo
https://bugs.webkit.org/show_bug.cgi?id=140144

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-06-22
Reviewed by Antti Koivisto.

Source/WebCore:

Tests: fast/css/pseudo-focus-within-basics.html
       fast/css/pseudo-focus-within-inside-shadow-dom.html
       fast/css/pseudo-focus-within-style-sharing-1.html
       fast/css/pseudo-focus-within-style-sharing-2.html
       fast/selectors/focus-within-style-update.html

* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):
* css/CSSSelector.h:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/SelectorPseudoClassAndCompatibilityElementMap.in:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasFocusWithin):
* dom/ContainerNode.cpp:
(WebCore::destroyRenderTreeIfNeeded):
* dom/Element.cpp:
(WebCore::Element::~Element):
(WebCore::Element::setFocus):
(WebCore::Element::unregisterNamedFlowContentElement):
(WebCore::Element::setIsNamedFlowContentElement):
(WebCore::Element::clearIsNamedFlowContentElement):
(WebCore::Element::setStyleAffectedByFocusWithin):
(WebCore::Element::rareDataStyleAffectedByFocusWithin):
(WebCore::Element::rareDataIsNamedFlowContentElement):
* dom/Element.h:
(WebCore::Element::hasFocusWithin):
(WebCore::Element::styleAffectedByFocusWithin):
(WebCore::Element::isNamedFlowContentElement):
(WebCore::Element::setHasFocusWithin):
* dom/ElementRareData.h:
(WebCore::ElementRareData::styleAffectedByFocusWithin):
(WebCore::ElementRareData::setStyleAffectedByFocusWithin):
(WebCore::ElementRareData::isNamedFlowContentElement):
(WebCore::ElementRareData::setIsNamedFlowContentElement):
(WebCore::ElementRareData::ElementRareData):
(WebCore::ElementRareData::resetComputedStyle):
* dom/Node.h:
(WebCore::Node::flagHasFocusWithin):
(WebCore::Node::isNamedFlowContentNode): Deleted.
(WebCore::Node::setIsNamedFlowContentNode): Deleted.
(WebCore::Node::clearIsNamedFlowContentNode): Deleted.
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::clearContentElements):
(WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
(WebCore::RenderNamedFlowThread::unregisterNamedFlowContentElement):
(WebCore::nextNodeInsideContentElement):
* style/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::updateElementRenderer):
* style/StyleRelations.cpp:
(WebCore::Style::commitRelationsToRenderStyle):
(WebCore::Style::commitRelations):
* style/StyleRelations.h:
* style/StyleSharingResolver.cpp:
(WebCore::Style::SharingResolver::canShareStyleWithElement):

LayoutTests:

* fast/css/css-selector-text-expected.txt:
* fast/css/css-selector-text.html:
* fast/css/css-set-selector-text-expected.txt:
* fast/css/css-set-selector-text.html:
* fast/css/pseudo-focus-within-basics-expected.html: Added.
* fast/css/pseudo-focus-within-basics.html: Added.
* fast/css/pseudo-focus-within-inside-shadow-dom-expected.html: Added.
* fast/css/pseudo-focus-within-inside-shadow-dom.html: Added.
* fast/css/pseudo-focus-within-style-sharing-1-expected.html: Added.
* fast/css/pseudo-focus-within-style-sharing-1.html: Added.
* fast/css/pseudo-focus-within-style-sharing-2-expected.html: Added.
* fast/css/pseudo-focus-within-style-sharing-2.html: Added.
* fast/selectors/focus-within-style-update-expected.txt: Added.
* fast/selectors/focus-within-style-update.html: Added.

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

4 years agoStop using PassRefPtr in ShareableResource
cdumez@apple.com [Wed, 22 Jun 2016 23:31:42 +0000 (23:31 +0000)]
Stop using PassRefPtr in ShareableResource
https://bugs.webkit.org/show_bug.cgi?id=159043

Reviewed by Alex Christensen.

Stop using PassRefPtr in ShareableResource.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::store):
* NetworkProcess/cache/NetworkCacheEntry.cpp:
(WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord):
* Shared/ShareableResource.cpp:
(WebKit::shareableResourceDeallocate):
(WebKit::ShareableResource::wrapInSharedBuffer):
(WebKit::ShareableResource::Handle::tryWrapInSharedBuffer):
(WebKit::ShareableResource::create):
(WebKit::ShareableResource::map):
(WebKit::ShareableResource::ShareableResource):
* Shared/ShareableResource.h:

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

4 years agoIntegrate WebKit's CFURLConnection with App Transport Security
oliver@apple.com [Wed, 22 Jun 2016 23:23:46 +0000 (23:23 +0000)]
Integrate WebKit's CFURLConnection with App Transport Security
https://bugs.webkit.org/show_bug.cgi?id=159039
<rdar://problem/26953685>

Reviewed by Alex Christensen.

Pass additional options to NSURLConnect initialiser to identify that
this connection is for WebKit content loading.

* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::createNSURLConnection):

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

4 years agoUpdate animometer.plan
jonlee@apple.com [Wed, 22 Jun 2016 22:56:56 +0000 (22:56 +0000)]
Update animometer.plan
https://bugs.webkit.org/show_bug.cgi?id=159012

Reviewed by Ryosuke Niwa.

* Scripts/webkitpy/benchmark_runner/data/plans/animometer.plan: Update to r202318.

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

4 years agoREGRESSION: Double tap to zoom does not work on yahoo finance
dino@apple.com [Wed, 22 Jun 2016 22:52:00 +0000 (22:52 +0000)]
REGRESSION: Double tap to zoom does not work on yahoo finance
https://bugs.webkit.org/show_bug.cgi?id=158886
<rdar://problem/24917760>

Reviewed by Simon Fraser.

Source/WebKit2:

We shouldn't enable fast click on pages that have
had to shrink to fit. In other words, we should enable
double-tap-to-zoom if the page has already zoomed.

Test: fast/events/ios/viewport-shrink-to-fit-allows-double-tap.html

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _allowsDoubleTapGestures]):

LayoutTests:

* fast/events/ios/viewport-shrink-to-fit-allows-double-tap-expected.txt: Added.
* fast/events/ios/viewport-shrink-to-fit-allows-double-tap.html: Added.

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

4 years agoWeb Inspector: don't start auto capturing if the Inspector window is not visible
bburg@apple.com [Wed, 22 Jun 2016 22:19:22 +0000 (22:19 +0000)]
Web Inspector: don't start auto capturing if the Inspector window is not visible
https://bugs.webkit.org/show_bug.cgi?id=159014

Reviewed by Joseph Pecoraro.
<rdar://problem/26931269>

Followup, add a missing super.closed() call mentioned in review comments.

* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.prototype.closed):

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

4 years agoWeb Inspector: don't start auto capturing if the Inspector window is not visible
bburg@apple.com [Wed, 22 Jun 2016 22:05:40 +0000 (22:05 +0000)]
Web Inspector: don't start auto capturing if the Inspector window is not visible
https://bugs.webkit.org/show_bug.cgi?id=159014
<rdar://problem/26931269>

Reviewed by Joseph Pecoraro.

TimelineTabContentView should not tell the timeline manager to enable
auto-capturing unless the Web Inspector UI is visible. If it is preloaded
but not shown to the user, then auto-capturing may inadvertently disable
the debugger, causing it to miss `debugger` statements and not bring the
inspector to front.

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.set autoCaptureOnPageLoad):
Bail out if nothing changed. Coerce to a boolean since the backend requires a boolean.

* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView): Listen for UI visibility changes.
(WebInspector.TimelineTabContentView.prototype.shown):
Enable auto-capturing if the UI is visible.

(WebInspector.TimelineTabContentView.prototype.closed): Added.
Remove listeners on global objects so this tab doesn't leak.

(WebInspector.TimelineTabContentView.prototype._inspectorVisibilityChanged):
Update the auto-capturing setting if the UI became visible or not visible.

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

4 years agoWeb Automation: Automation.inspectBrowsingContext should have an option to enable...
bburg@apple.com [Wed, 22 Jun 2016 21:41:01 +0000 (21:41 +0000)]
Web Automation: Automation.inspectBrowsingContext should have an option to enable timeline auto-capturing
https://bugs.webkit.org/show_bug.cgi?id=159004
<rdar://problem/26931269>

Reviewed by Joseph Pecoraro.

Automation.inspectBrowsingContext was added to make it easier to hit breakpoints inside of
code evaluated using Automation.evaluateJavaScriptFunction. I recently changed the behavior
of this command to automatically start profiling the page as soon as the inspector attached
so that a full timeline recording could be obtained. However, starting a timeline recording
turns off the debugger, so this command is not so useful for debugging right now.

Add a new option, enableAutoCapturing, to the inspectBrowsingContext command. Don't toggle
profiling automatically unless this optional flag is present and set to true.

* UIProcess/Automation/Automation.json:
* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::inspectBrowsingContext):
(WebKit::WebAutomationSession::inspectorFrontendLoaded): Deleted.
* UIProcess/Automation/WebAutomationSession.h:

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

4 years agoAdopt commitPriority to get rid of the 2 AVPL solution for PiP
jeremyj-wk@apple.com [Wed, 22 Jun 2016 21:17:29 +0000 (21:17 +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@202350 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years agoTest gardening for css3/line-break-language-sensitive
mmaxfield@apple.com [Wed, 22 Jun 2016 21:06:16 +0000 (21:06 +0000)]
Test gardening for css3/line-break-language-sensitive
https://bugs.webkit.org/show_bug.cgi?id=159017

Unreviewed.

Some reftests had content which ended up outside of the viewport. This patch
splits that extra content out into separate tests.

In addition, this test migrates these tests to using a web font, so the results
of this test are not sensitive to platform-specific font fallback.

Because of the migration to the web font, css3/line-break-language-sensitive is
no longer needed.

* TestExpectations:
* css3/line-break-language-sensitive/line-break-auto-centered-expected.html: Removed.
* css3/line-break-language-sensitive/line-break-auto-centered.html: Removed.
* css3/line-break-language-sensitive/line-break-auto-half-kana-expected.html: Removed.
* css3/line-break-language-sensitive/line-break-auto-half-kana.html: Removed.
* css3/line-break-language-sensitive/line-break-auto-hyphens.html: Removed.
* css3/line-break-language-sensitive/line-break-auto-inseparables-expected.html: Removed.
* css3/line-break-language-sensitive/line-break-auto-inseparables.html: Removed.
* css3/line-break-language-sensitive/line-break-auto-iteration-marks-expected.html: Removed.
* css3/line-break-language-sensitive/line-break-auto-iteration-marks.html: Removed.
* css3/line-break-language-sensitive/line-break-auto-postfixes.html: Removed.
* css3/line-break-language-sensitive/line-break-auto-prefixes-expected.html: Removed.
* css3/line-break-language-sensitive/line-break-auto-prefixes.html: Removed.
* css3/line-break-language-sensitive/line-break-auto-sound-marks-expected.html: Removed.
* css3/line-break-language-sensitive/line-break-auto-sound-marks.html: Removed.
* css3/line-break-language-sensitive/line-break-loose-centered.html: Removed.
* css3/line-break-language-sensitive/line-break-loose-half-kana-expected.html: Removed.
* css3/line-break-language-sensitive/line-break-loose-half-kana.html: Removed.
* css3/line-break-language-sensitive/line-break-loose-hyphens.html: Removed.
* css3/line-break-language-sensitive/line-break-loose-inseparables-expected.html: Removed.
* css3/line-break-language-sensitive/line-break-loose-inseparables.html: Removed.
* css3/line-break-language-sensitive/line-break-loose-iteration-marks.html: Removed.
* css3/line-break-language-sensitive/line-break-loose-postfixes.html: Removed.
* css3/line-break-language-sensitive/line-break-loose-prefixes-expected.html: Removed.
* css3/line-break-language-sensitive/line-break-loose-prefixes.html: Removed.
* css3/line-break-language-sensitive/line-break-loose-sound-marks-expected.html: Removed.
* css3/line-break-language-sensitive/line-break-loose-sound-marks.html: Removed.
* css3/line-break-language-sensitive/line-break-normal-centered-expected.html: Removed.
* css3/line-break-language-sensitive/line-break-normal-centered.html: Removed.
* css3/line-break-language-sensitive/line-break-normal-half-kana-expected.html: Removed.
* css3/line-break-language-sensitive/line-break-normal-half-kana.html: Removed.
* css3/line-break-language-sensitive/line-break-normal-hyphens-expected.html: Removed.
* css3/line-break-language-sensitive/line-break-normal-hyphens.html: Removed.
* css3/line-break-language-sensitive/line-break-normal-inseparables-expected.html: Removed.
* css3/line-break-language-sensitive/line-break-normal-inseparables.html: Removed.
* css3/line-break-language-sensitive/line-break-normal-iteration-marks.html: Removed.
* css3/line-break-language-sensitive/line-break-normal-postfixes.html: Removed.
* css3/line-break-language-sensitive/line-break-normal-prefixes-expected.html: Removed.
* css3/line-break-language-sensitive/line-break-normal-prefixes.html: Removed.
* css3/line-break-language-sensitive/line-break-normal-sound-marks-expected.html: Removed.
* css3/line-break-language-sensitive/line-break-normal-sound-marks.html: Removed.
* css3/line-break-language-sensitive/line-break-strict-centered-expected.html: Removed.
* css3/line-break-language-sensitive/line-break-strict-centered.html: Removed.
* css3/line-break-language-sensitive/line-break-strict-half-kana-expected.html: Removed.
* css3/line-break-language-sensitive/line-break-strict-half-kana.html: Removed.
* css3/line-break-language-sensitive/line-break-strict-hyphens.html: Removed.
* css3/line-break-language-sensitive/line-break-strict-inseparables-expected.html: Removed.
* css3/line-break-language-sensitive/line-break-strict-inseparables.html: Removed.
* css3/line-break-language-sensitive/line-break-strict-iteration-marks-expected.html: Removed.
* css3/line-break-language-sensitive/line-break-strict-iteration-marks.html: Removed.
* css3/line-break-language-sensitive/line-break-strict-postfixes.html: Removed.
* css3/line-break-language-sensitive/line-break-strict-prefixes-expected.html: Removed.
* css3/line-break-language-sensitive/line-break-strict-prefixes.html: Removed.
* css3/line-break-language-sensitive/line-break-strict-sound-marks-expected.html: Removed.
* css3/line-break-language-sensitive/line-break-strict-sound-marks.html: Removed.
* css3/line-break/line-break-auto-centered-2-expected.html: Renamed from LayoutTests/css3/line-break-language-sensitive/line-break-strict-hyphens-expected.html.
* css3/line-break/line-break-auto-centered-2.html: Added.
* css3/line-break/line-break-auto-centered-expected.html:
* css3/line-break/line-break-auto-centered.html:
* css3/line-break/line-break-auto-half-kana-2-expected.html: Copied from LayoutTests/css3/line-break-language-sensitive/line-break-loose-postfixes-expected.html.
* css3/line-break/line-break-auto-half-kana-2.html: Added.
* css3/line-break/line-break-auto-half-kana-3-expected.html: Copied from LayoutTests/css3/line-break-language-sensitive/line-break-loose-postfixes-expected.html.
* css3/line-break/line-break-auto-half-kana-3.html: Added.
* css3/line-break/line-break-auto-half-kana-4-expected.html: Copied from LayoutTests/css3/line-break-language-sensitive/line-break-strict-postfixes-expected.html.
* css3/line-break/line-break-auto-half-kana-4.html: Added.
* css3/line-break/line-break-auto-half-kana-5-expected.html: Renamed from LayoutTests/css3/line-break-language-sensitive/line-break-auto-postfixes-expected.html.
* css3/line-break/line-break-auto-half-kana-5.html: Added.
* css3/line-break/line-break-auto-half-kana-expected.html:
* css3/line-break/line-break-auto-half-kana.html:
* css3/line-break/line-break-auto-hyphens-expected.html:
* css3/line-break/line-break-auto-hyphens.html:
* css3/line-break/line-break-auto-inseparables-expected.html:
* css3/line-break/line-break-auto-inseparables.html:
* css3/line-break/line-break-auto-iteration-marks-expected.html:
* css3/line-break/line-break-auto-iteration-marks.html:
* css3/line-break/line-break-auto-postfixes-expected.html:
* css3/line-break/line-break-auto-postfixes.html:
* css3/line-break/line-break-auto-prefixes-expected.html:
* css3/line-break/line-break-auto-prefixes.html:
* css3/line-break/line-break-auto-sound-marks-expected.html:
* css3/line-break/line-break-auto-sound-marks.html:
* css3/line-break/line-break-loose-centered-2-expected.html: Renamed from LayoutTests/css3/line-break-language-sensitive/line-break-loose-hyphens-expected.html.
* css3/line-break/line-break-loose-centered-2.html: Added.
* css3/line-break/line-break-loose-centered-expected.html:
* css3/line-break/line-break-loose-centered.html:
* css3/line-break/line-break-loose-half-kana-2-expected.html: Copied from LayoutTests/css3/line-break-language-sensitive/line-break-loose-postfixes-expected.html.
* css3/line-break/line-break-loose-half-kana-2.html: Added.
* css3/line-break/line-break-loose-half-kana-3-expected.html: Copied from LayoutTests/css3/line-break-language-sensitive/line-break-loose-postfixes-expected.html.
* css3/line-break/line-break-loose-half-kana-3.html: Added.
* css3/line-break/line-break-loose-half-kana-4-expected.html: Renamed from LayoutTests/css3/line-break-language-sensitive/line-break-loose-centered-expected.html.
* css3/line-break/line-break-loose-half-kana-4.html: Added.
* css3/line-break/line-break-loose-half-kana-5-expected.html: Renamed from LayoutTests/css3/line-break-language-sensitive/line-break-loose-iteration-marks-expected.html.
* css3/line-break/line-break-loose-half-kana-5.html: Added.
* css3/line-break/line-break-loose-half-kana-expected.html:
* css3/line-break/line-break-loose-half-kana.html:
* css3/line-break/line-break-loose-hyphens-expected.html:
* css3/line-break/line-break-loose-hyphens.html:
* css3/line-break/line-break-loose-inseparables-expected.html:
* css3/line-break/line-break-loose-inseparables.html:
* css3/line-break/line-break-loose-iteration-marks-expected.html:
* css3/line-break/line-break-loose-iteration-marks.html:
* css3/line-break/line-break-loose-postfixes-expected.html:
* css3/line-break/line-break-loose-postfixes.html:
* css3/line-break/line-break-loose-prefixes-expected.html:
* css3/line-break/line-break-loose-prefixes.html:
* css3/line-break/line-break-loose-sound-marks-expected.html:
* css3/line-break/line-break-loose-sound-marks.html:
* css3/line-break/line-break-normal-centered-2-expected.html: Renamed from LayoutTests/css3/line-break-language-sensitive/line-break-normal-iteration-marks-expected.html.
* css3/line-break/line-break-normal-centered-2.html: Added.
* css3/line-break/line-break-normal-centered-expected.html:
* css3/line-break/line-break-normal-centered.html:
* css3/line-break/line-break-normal-half-kana-2-expected.html: Copied from LayoutTests/css3/line-break-language-sensitive/line-break-loose-postfixes-expected.html.
* css3/line-break/line-break-normal-half-kana-2.html: Added.
* css3/line-break/line-break-normal-half-kana-3-expected.html: Copied from LayoutTests/css3/line-break-language-sensitive/line-break-loose-postfixes-expected.html.
* css3/line-break/line-break-normal-half-kana-3.html: Added.
* css3/line-break/line-break-normal-half-kana-4-expected.html: Renamed from LayoutTests/css3/line-break-language-sensitive/line-break-loose-postfixes-expected.html.
* css3/line-break/line-break-normal-half-kana-4.html: Added.
* css3/line-break/line-break-normal-half-kana-5-expected.html: Copied from LayoutTests/css3/line-break/line-break-loose-postfixes-expected.html.
* css3/line-break/line-break-normal-half-kana-5.html: Added.
* css3/line-break/line-break-normal-half-kana-expected.html:
* css3/line-break/line-break-normal-half-kana.html:
* css3/line-break/line-break-normal-hyphens-expected.html:
* css3/line-break/line-break-normal-hyphens.html:
* css3/line-break/line-break-normal-inseparables-expected.html:
* css3/line-break/line-break-normal-inseparables.html:
* css3/line-break/line-break-normal-iteration-marks-expected.html:
* css3/line-break/line-break-normal-iteration-marks.html:
* css3/line-break/line-break-normal-postfixes-expected.html:
* css3/line-break/line-break-normal-postfixes.html:
* css3/line-break/line-break-normal-prefixes-expected.html:
* css3/line-break/line-break-normal-prefixes.html:
* css3/line-break/line-break-normal-sound-marks-expected.html:
* css3/line-break/line-break-normal-sound-marks.html:
* css3/line-break/line-break-strict-centered-2-expected.html: Renamed from LayoutTests/css3/line-break-language-sensitive/line-break-auto-hyphens-expected.html.
* css3/line-break/line-break-strict-centered-2.html: Added.
* css3/line-break/line-break-strict-centered-expected.html:
* css3/line-break/line-break-strict-centered.html:
* css3/line-break/line-break-strict-half-kana-2-expected.html: Copied from LayoutTests/css3/line-break-language-sensitive/line-break-normal-postfixes-expected.html.
* css3/line-break/line-break-strict-half-kana-2.html: Added.
* css3/line-break/line-break-strict-half-kana-3-expected.html: Renamed from LayoutTests/css3/line-break-language-sensitive/line-break-strict-postfixes-expected.html.
* css3/line-break/line-break-strict-half-kana-3.html: Added.
* css3/line-break/line-break-strict-half-kana-4-expected.html: Copied from LayoutTests/css3/line-break-language-sensitive/line-break-normal-postfixes-expected.html.
* css3/line-break/line-break-strict-half-kana-4.html: Added.
* css3/line-break/line-break-strict-half-kana-5-expected.html: Renamed from LayoutTests/css3/line-break-language-sensitive/line-break-normal-postfixes-expected.html.
* css3/line-break/line-break-strict-half-kana-5.html: Added.
* css3/line-break/line-break-strict-half-kana-expected.html:
* css3/line-break/line-break-strict-half-kana.html:
* css3/line-break/line-break-strict-hyphens-expected.html:
* css3/line-break/line-break-strict-hyphens.html:
* css3/line-break/line-break-strict-inseparables-expected.html:
* css3/line-break/line-break-strict-inseparables.html:
* css3/line-break/line-break-strict-iteration-marks-expected.html:
* css3/line-break/line-break-strict-iteration-marks.html:
* css3/line-break/line-break-strict-postfixes-expected.html:
* css3/line-break/line-break-strict-postfixes.html:
* css3/line-break/line-break-strict-prefixes-expected.html:
* css3/line-break/line-break-strict-prefixes.html:
* css3/line-break/line-break-strict-sound-marks-expected.html:
* css3/line-break/line-break-strict-sound-marks.html:
* css3/line-break/resources/AllAhem.svg: Added.
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:

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

4 years agoREGRESSION (r201629): Weird button glitching on github.com
simon.fraser@apple.com [Wed, 22 Jun 2016 20:44:26 +0000 (20:44 +0000)]
REGRESSION (r201629): Weird button glitching on github.com
https://bugs.webkit.org/show_bug.cgi?id=159031
rdar://problem/26880332

Reviewed by Tim Horton.

Source/WebCore:

r201629 changed the logic slightly when creating an image buffer for a scaled context;
it set the buffer context's scale to the scale in the source context, but this failed
to take into account the rounding up of the buffer size, which the old code did.

Fix by reverting to the old behavior.

Since buffer sizes can only be integral, changed compatibleBufferSize() to return
an IntSize.

Test: fast/backgrounds/scaled-gradient-background.html

* platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::createCompatibleBuffer):
(WebCore::ImageBuffer::compatibleBufferSize):
* platform/graphics/ImageBuffer.h:
* platform/graphics/IntRect.h:
(WebCore::IntRect::area):
* platform/graphics/IntSize.h:
(WebCore::IntSize::area): Make this return an unsigned.

LayoutTests:

* fast/backgrounds/scaled-gradient-background-expected.html: Added.
* fast/backgrounds/scaled-gradient-background.html: Added.

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

4 years agoMail snapshot has black webview in multitasking switcher
timothy_horton@apple.com [Wed, 22 Jun 2016 20:39:49 +0000 (20:39 +0000)]
Mail snapshot has black webview in multitasking switcher
https://bugs.webkit.org/show_bug.cgi?id=159036
<rdar://problem/25972938>

Reviewed by Simon Fraser.

There is a window of time between an application going into the background
and SpringBoard's snapshotting mechanism completing where it is possible
(though difficult, timing-wise) for RemoteLayerBackingStoreCollection to
make still-needed surfaces volatile (and, even worse, for them to get emptied).

UIKit suggested instead waiting for the window context teardown notification,
which does indeed seem to fire after the snapshotting is complete.
This may have the convenient side effect of making the volatility timer
repeat fewer times in general, because it is now started closer to the
last time that the surfaces will be in-use.

* UIProcess/ApplicationStateTracker.h:
* UIProcess/ApplicationStateTracker.mm:
(WebKit::ApplicationStateTracker::ApplicationStateTracker):
(WebKit::ApplicationStateTracker::~ApplicationStateTracker):
(WebKit::ApplicationStateTracker::applicationDidFinishSnapshottingAfterEnteringBackground):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didMoveToWindow]):
(-[WKContentView _applicationDidFinishSnapshottingAfterEnteringBackground]):
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView didMoveToWindow]):
(-[WKPDFView _applicationDidFinishSnapshottingAfterEnteringBackground]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::applicationDidFinishSnapshottingAfterEnteringBackground):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::applicationDidEnterBackground):
(WebKit::WebPage::applicationDidFinishSnapshottingAfterEnteringBackground):

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

4 years agoMove the WebKitLegacy Apple Pay code to the open source repository
andersca@apple.com [Wed, 22 Jun 2016 20:38:15 +0000 (20:38 +0000)]
Move the WebKitLegacy Apple Pay code to the open source repository
https://bugs.webkit.org/show_bug.cgi?id=159035

Reviewed by Tim Horton.

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

* WebCoreSupport/WebPaymentCoordinatorClient.h: Added.
* WebCoreSupport/WebPaymentCoordinatorClient.mm: Added.
(WebPaymentCoordinatorClient::WebPaymentCoordinatorClient):
(WebPaymentCoordinatorClient::~WebPaymentCoordinatorClient):
(WebPaymentCoordinatorClient::supportsVersion):
(WebPaymentCoordinatorClient::canMakePayments):
(WebPaymentCoordinatorClient::canMakePaymentsWithActiveCard):
(WebPaymentCoordinatorClient::showPaymentUI):
(WebPaymentCoordinatorClient::completeMerchantValidation):
(WebPaymentCoordinatorClient::completeShippingMethodSelection):
(WebPaymentCoordinatorClient::completeShippingContactSelection):
(WebPaymentCoordinatorClient::completePaymentMethodSelection):
(WebPaymentCoordinatorClient::completePaymentSession):
(WebPaymentCoordinatorClient::abortPaymentSession):
(WebPaymentCoordinatorClient::mainFrameDestroyed):
* WebKitAdditions.mm: Removed.
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):

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

4 years agoInline the last of the Apple Pay WebCore code
andersca@apple.com [Wed, 22 Jun 2016 20:00:03 +0000 (20:00 +0000)]
Inline the last of the Apple Pay WebCore code
https://bugs.webkit.org/show_bug.cgi?id=159032

Reviewed by Tim Horton.

* loader/EmptyClients.cpp:
(WebCore::fillWithEmptyClients):
* page/MainFrame.cpp:
(WebCore::MainFrame::MainFrame):
* page/MainFrame.h:
* page/PageConfiguration.h:
* platform/cocoa/ThemeCocoa.mm:
(WebCore::passKitBundle):
(WebCore::loadPassKitPDFPage):
(WebCore::applePayButtonLogoBlack):
(WebCore::applePayButtonLogoWhite):
(WebCore::drawApplePayButton):
(WebCore::ThemeCocoa::drawNamedImage):

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

4 years agoTest expectation gardening for rdar://problem/26950065
ap@apple.com [Wed, 22 Jun 2016 19:36:35 +0000 (19:36 +0000)]
Test expectation gardening for rdar://problem/26950065

* platform/mac/TestExpectations:

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

4 years agoTest expectation gardening.
ap@apple.com [Wed, 22 Jun 2016 19:25:35 +0000 (19:25 +0000)]
Test expectation gardening.

* platform/mac/TestExpectations:

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

4 years agoException is not thrown when shipping method is an invalid amount
andersca@apple.com [Wed, 22 Jun 2016 19:10:00 +0000 (19:10 +0000)]
Exception is not thrown when shipping method is an invalid amount
https://bugs.webkit.org/show_bug.cgi?id=159030
rdar://problem/26700413

Reviewed by Tim Horton.

* Modules/applepay/ApplePaySession.cpp:
(WebCore::createShippingMethods):
Bail if createShippingMethod returns Nullopt.

(WebCore::createPaymentRequest):
Bail if createShippingMethods returns Nullopt.

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

4 years agoException is not thrown when shipping method is an invalid amount
andersca@apple.com [Wed, 22 Jun 2016 18:43:18 +0000 (18:43 +0000)]
Exception is not thrown when shipping method is an invalid amount
https://bugs.webkit.org/show_bug.cgi?id=159029
rdar://problem/26700413

Reviewed by Tim Horton.

* Modules/applepay/PaymentRequest.h:
Change ShippingMethod::amount to be a signed 64-bit integer.

* Modules/applepay/PaymentRequestValidator.cpp:
(WebCore::PaymentRequestValidator::validate):
Call validateShippingMethods.

(WebCore::PaymentRequestValidator::validateShippingMethods):
Validate all the shipping methods.

(WebCore::PaymentRequestValidator::validateShippingMethod):
Check that the amount is >= 0.

* Modules/applepay/PaymentRequestValidator.h:
Add new members.

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

4 years agoW3C test importer should generate files to ignore by WebKit SCM
commit-queue@webkit.org [Wed, 22 Jun 2016 18:20:31 +0000 (18:20 +0000)]
W3C test importer should generate files to ignore by WebKit SCM
https://bugs.webkit.org/show_bug.cgi?id=142743

Patch by Youenn Fablet <youenn.fablet@crf.canon.fr> on 2016-06-22
Reviewed by Darin Adler.

LayoutTests/imported/w3c:

* resources/TestRepositories: Added the option to generate .gitignore and __init__.py for wpt repo.
* web-platform-tests/.gitignore: Regeneration changes the order of the ignored files and removes the __init__.py which is now committed to WebKit trunk.
* web-platform-tests/__init__.py: Added.

Tools:

TestDownloader generates the .gitignore file according submodules git repository information.
TestImporter requests the generation of .gitignore and the main __init__.py according LayoutTests/imported/w3c/resources/TestRepositories options.

* Scripts/webkitpy/w3c/test_downloader.py:
(TestDownloader.generate_gitignore): Generating .gitignore according submodules description.
* Scripts/webkitpy/w3c/test_importer.py:
(TestImporter.process_test_repositories_import_options): Added the generation of .gitignore/__init__.py if the repo has the right option.
(TestImporter):
(TestImporter.write_init_py): Writing not empty __init__.py files.
(TestImporter.import_tests): Using  of write_init_py.
* Scripts/webkitpy/w3c/test_importer_unittest.py:
(TestImporterTest.test_git_ignore_generation): Added .gitignore test.
(TestImporterTest):
(TestImporterTest.test_initpy_generation): Added __init__.py test.

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

4 years agoWebRTC: Add support for the negotiationneeded event in MediaEndpointPeerConnection
adam.bergkvist@ericsson.com [Wed, 22 Jun 2016 18:15:40 +0000 (18:15 +0000)]
WebRTC: Add support for the negotiationneeded event in MediaEndpointPeerConnection
https://bugs.webkit.org/show_bug.cgi?id=158985

Source/WebCore:

Reviewed by Eric Carlson.

Implement MediaEndpointPeerConnection's isNegotiationNeeded, markAsNeedingNegotiation and
clearNegotiationNeededState functions. The calls to these functions are already up-to-date.

Test: fast/mediastream/RTCPeerConnection-more-media-to-negotiate.html

* Modules/mediastream/MediaEndpointPeerConnection.cpp:
(WebCore::MediaEndpointPeerConnection::markAsNeedingNegotiation):
* Modules/mediastream/MediaEndpointPeerConnection.h:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::scheduleNegotiationNeededEvent):

LayoutTests:

Add tests for the RTCPeerConnection negotiationneeded event.

Reviewed by Eric Carlson.

* fast/mediastream/RTCPeerConnection-more-media-to-negotiate-expected.txt: Added.
* fast/mediastream/RTCPeerConnection-more-media-to-negotiate.html: Added.
Verify that a negotiationneeded event is fired when not all local media can be included in
an answer. (The answerer cannot reply with more m-lines than the offer had to begin with.)
* fast/mediastream/RTCPeerConnection-onnegotiationneeded-expected.txt:
* fast/mediastream/RTCPeerConnection-onnegotiationneeded.html:
Verify that a negotiationneeded event is fired when tracks are added and removed from an
RTCPeerConnection.
* platform/gtk/TestExpectations:
Unskip fast/mediastream/RTCPeerConnection-onnegotiationneeded.html.
* platform/mac/TestExpectations:
The mac port does not build with WEB_RTC enabled yet.

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

4 years agoimported/w3c/web-platform-tests/streams/readable-streams/general.https.html is a...
commit-queue@webkit.org [Wed, 22 Jun 2016 18:14:10 +0000 (18:14 +0000)]
imported/w3c/web-platform-tests/streams/readable-streams/general.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=155760

Patch by Youenn Fablet <youennf@gmail.com> on 2016-06-22
Reviewed by Alexey Proskuryakov.

Making test more predictable.
Upstreamed to w3c repository as https://github.com/w3c/web-platform-tests/pull/3203.

* web-platform-tests/streams/readable-streams/general.js:
(promise_test):

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

4 years agoWebRTC: Replace RTCPeerConnection custom constructor with a JS built-in constructor
adam.bergkvist@ericsson.com [Wed, 22 Jun 2016 18:12:46 +0000 (18:12 +0000)]
WebRTC: Replace RTCPeerConnection custom constructor with a JS built-in constructor
https://bugs.webkit.org/show_bug.cgi?id=158832

Reviewed by Eric Carlson and Youenn Fablet.

Use a JS built-in constructor instead of a custom constructor. This makes it easier to
initialize private fields for functions implemented as JS built-ins. The constructor
behavior is in need of updating, but that is left to a follow-up change [1].

[1] http://webkit.org/b/158936
No change in behavior.

* CMakeLists.txt:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::create):
(WebCore::RTCPeerConnection::RTCPeerConnection):
(WebCore::RTCPeerConnection::~RTCPeerConnection):
(WebCore::RTCPeerConnection::initializeWith):
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCPeerConnection.js:
(initializeRTCPeerConnection):
Add JS built-in constructor function.
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSRTCPeerConnectionCustom.cpp: Removed.
(WebCore::constructJSRTCPeerConnection): Deleted.

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

4 years agoCrossOriginPreflightChecker should call DocumentThreadableLoader preflightFailure...
commit-queue@webkit.org [Wed, 22 Jun 2016 18:11:00 +0000 (18:11 +0000)]
CrossOriginPreflightChecker should call DocumentThreadableLoader preflightFailure instead of didFailLoading
https://bugs.webkit.org/show_bug.cgi?id=158984

Patch by Youenn Fablet <youenn@apple.com> on 2016-06-22
Reviewed by Darin Adler.

No change of behavior.

Calling DocumentThreadableLoader preflightFailure instead of didFailLoading for any preflight error case.

* loader/CrossOriginPreflightChecker.cpp:
(WebCore::CrossOriginPreflightChecker::notifyFinished): Directly calling preflightFailure callback.
(WebCore::CrossOriginPreflightChecker::doPreflight): Ditto.
(WebCore::CrossOriginPreflightChecker::handleLoadingFailure): Deleted.
(WebCore::CrossOriginPreflightChecker::redirectReceived): Deleted (should have been removed as part of
https://bugs.webkit.org/show_bug.cgi?id=111008).
* loader/CrossOriginPreflightChecker.h:

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

4 years agoWeb Inspector: Simplify CSS rule for ContentBrowser navigation bar items
nvasilyev@apple.com [Wed, 22 Jun 2016 18:10:45 +0000 (18:10 +0000)]
Web Inspector: Simplify CSS rule for ContentBrowser navigation bar items
https://bugs.webkit.org/show_bug.cgi?id=159000

Reviewed by Timothy Hatcher.

* UserInterface/Views/ContentBrowser.css:
(.content-browser > .navigation-bar > .item):
Both these values result in 28px, but `100%` is simplier.

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

4 years agoJSDOMIterator forEach should support second optional parameter
cdumez@apple.com [Wed, 22 Jun 2016 17:50:15 +0000 (17:50 +0000)]
JSDOMIterator forEach should support second optional parameter
https://bugs.webkit.org/show_bug.cgi?id=159020

Patch by Youenn Fablet <youennf@gmail.com> on 2016-06-22
Reviewed by Chris Dumez.

Source/WebCore:

Covered by beefed up test.

* bindings/js/JSDOMIterator.h:
(WebCore::iteratorForEach): Setting callback thisValue to the second argument passed to forEach.

LayoutTests:

* fast/dom/nodeListIterator-expected.txt:
* fast/dom/nodeListIterator.html: Adding 'thisValue' various checks.

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

4 years agoMedia controls stop working after exiting PiP
jer.noble@apple.com [Wed, 22 Jun 2016 17:16:27 +0000 (17:16 +0000)]
Media controls stop working after exiting PiP
https://bugs.webkit.org/show_bug.cgi?id=159026
<rdar://problem/26753579>

Reviewed by Eric Carlson.

Do not slave setting WebVideoFullscreenModelVideoElement::setVideoElement() to
WebPlaybackSessionModelVideoElement::setMediaElement(). After all, someone else
(i.e., the media controls) may still be using it.

* platform/cocoa/WebVideoFullscreenModelVideoElement.mm:
(WebVideoFullscreenModelVideoElement::setVideoElement): Deleted.
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(WebVideoFullscreenControllerContext::didCleanupFullscreen):
(WebVideoFullscreenControllerContext::setUpFullscreen):

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

4 years agoUpdate document's isPlayingMedia() state whenever media element's media state changes
jer.noble@apple.com [Wed, 22 Jun 2016 17:14:02 +0000 (17:14 +0000)]
Update document's isPlayingMedia() state whenever media element's media state changes
https://bugs.webkit.org/show_bug.cgi?id=159018
<rdar://problem/26586630>

Reviewed by Beth Dakin.

The Document can end up with a stale m_mediaState if its own value isn't updated when
its constituent HTMLMediaElement's m_mediaStates change.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateMediaState):

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

4 years agoAdd logging related to process assertions to help debug process suspension issues
cdumez@apple.com [Wed, 22 Jun 2016 17:00:23 +0000 (17:00 +0000)]
Add logging related to process assertions to help debug process suspension issues
https://bugs.webkit.org/show_bug.cgi?id=159001

Reviewed by Antti Koivisto.

Add logging related to process assertions to help debug process suspension issues.

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::didChangeIsLoading):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::fetchWebsiteData):
(WebKit::NetworkProcessProxy::deleteWebsiteData):
(WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcessProxy::setIsHoldingLockedFiles):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::updateActivityToken):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::setIsHoldingLockedFiles):

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

4 years agoCrash under GraphicsLayerCA::recursiveCommitChanges() with deep layer trees
simon.fraser@apple.com [Wed, 22 Jun 2016 16:58:17 +0000 (16:58 +0000)]
Crash under GraphicsLayerCA::recursiveCommitChanges() with deep layer trees
https://bugs.webkit.org/show_bug.cgi?id=159023
rdar://problem/25377842

Reviewed by Tim Horton.

Having an on-stack DisplayList::Recorder increased the stack frame size significantly,
causing stack exhaustion with deep layer trees, despite the existing depth check.

Make the Recorder heap-allocated to fix this.

Tested by LayoutTests/compositing//layer-creation/deep-tree.html.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::recursiveCommitChanges):

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

4 years agoWKWebView with no WKNavigationDelegate does not follow universal links
weinig@apple.com [Wed, 22 Jun 2016 16:55:49 +0000 (16:55 +0000)]
WKWebView with no WKNavigationDelegate does not follow universal links
<rdar://problem/24374110>
https://bugs.webkit.org/show_bug.cgi?id=158997

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.

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@202329 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[GTK] Add support for variadic parameters to GObject DOM bindings
carlosgc@webkit.org [Wed, 22 Jun 2016 08:59:31 +0000 (08:59 +0000)]
[GTK] Add support for variadic parameters to GObject DOM bindings
https://bugs.webkit.org/show_bug.cgi?id=158942

Reviewed by Michael Catanzaro.

Generate code for functions having variadic parameters.

* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateFunction):
(SkipFunction):
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_variadic_string_method):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:

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

4 years ago[Win] Implement modal dialog support in MiniBrowser.
pvollan@apple.com [Wed, 22 Jun 2016 08:35:03 +0000 (08:35 +0000)]
[Win] Implement modal dialog support in MiniBrowser.
https://bugs.webkit.org/show_bug.cgi?id=158976

Reviewed by Brent Fulgham.

* MiniBrowser/win/PrintWebUIDelegate.cpp:
(PrintWebUIDelegate::createWebViewWithRequest):
(getHandleFromWebView):
(PrintWebUIDelegate::webViewClose):
(PrintWebUIDelegate::setFrame):
(PrintWebUIDelegate::webViewFrame):
(PrintWebUIDelegate::canRunModal):
(findTopLevelParent):
(PrintWebUIDelegate::runModal):
(PrintWebUIDelegate::createModalDialog):
* MiniBrowser/win/PrintWebUIDelegate.h:
(PrintWebUIDelegate::webViewClose):
(PrintWebUIDelegate::setFrame):
(PrintWebUIDelegate::webViewFrame):
(PrintWebUIDelegate::canRunModal):
(PrintWebUIDelegate::runModal):

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

4 years agowindow.showModalDialog doesn't work in DumpRenderTree on Windows
pvollan@apple.com [Wed, 22 Jun 2016 07:48:15 +0000 (07:48 +0000)]
window.showModalDialog doesn't work in DumpRenderTree on Windows
https://bugs.webkit.org/show_bug.cgi?id=53675

Reviewed by Brent Fulgham.

Tools:

Implement modal dialog support in DumpRenderTree.

* DumpRenderTree/win/UIDelegate.cpp:
(UIDelegate::canRunModal):
(getHandleFromWebView):
(UIDelegate::createModalDialog):
(findTopLevelParent):
(UIDelegate::runModal):
(UIDelegate::webViewClose):
* DumpRenderTree/win/UIDelegate.h:

LayoutTests:

Update test expectations for modal dialog tests.

* platform/win/TestExpectations:

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

4 years agoLand test expectations for rdar://problem/26422051.
ap@apple.com [Wed, 22 Jun 2016 05:52:52 +0000 (05:52 +0000)]
Land test expectations for rdar://problem/26422051.

* platform/mac-wk1/TestExpectations:

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

4 years ago:hover CSS pseudo-class sometimes keeps matching ever after mouse has left the element
commit-queue@webkit.org [Wed, 22 Jun 2016 05:52:05 +0000 (05:52 +0000)]
:hover CSS pseudo-class sometimes keeps matching ever after mouse has left the element
https://bugs.webkit.org/show_bug.cgi?id=158340

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-06-21
Reviewed by Simon Fraser.

Source/WebCore:

When removing a hovered subtree from the document, we were getting
into an inconsistent state where m_hoveredElement is in the detached
subtree and we have no way of clearing the existing IsHovered flags.

What happens is:
-The root "a" has an child "b" that is hovered.
-"a" starts being removed from the tree, its renderer is destroyed.
-RenderTreeUpdater::tearDownRenderers() pushes "a" on the teardownStack
 and calls hoveredElementDidDetach().
-hoveredElementDidDetach() is called with "a". "a" is not the hovered
 element, the function does nothing.
-RenderTreeUpdater::tearDownRenderers() pushes "b" on the teardownStack
 and calls hoveredElementDidDetach().
-hoveredElementDidDetach() is called with "b". The next parent with a renderer
 is "a", m_hoveredElement is set to "a".
-"a"'s parent is set to nullptr.

-> We have a m_hoveredElement on the root of a detached tree, making
   it impossible to clear the real dirty tree.

This patch changes the order in which we clear the flags.
It is done in the order in which we clear the renderers to ensure
the last element with a dead renderer is the last to update m_hoveredElement.

Tests: fast/css/ancestor-of-hovered-element-detached.html
       fast/css/ancestor-of-hovered-element-removed.html

* Source/WebCore/style/RenderTreeUpdater.cpp:

LayoutTests:

* fast/css/ancestor-of-hovered-element-detached-expected.txt: Added.
* fast/css/ancestor-of-hovered-element-detached.html: Added.
* fast/css/ancestor-of-hovered-element-removed-expected.txt: Added.
* fast/css/ancestor-of-hovered-element-removed.html: Added.

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

4 years ago[Fetch API] Rename 'origin-only' referrer policy to 'origin'
commit-queue@webkit.org [Wed, 22 Jun 2016 05:47:58 +0000 (05:47 +0000)]
[Fetch API] Rename 'origin-only' referrer policy to 'origin'
https://bugs.webkit.org/show_bug.cgi?id=158982

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

LayoutTests/imported/w3c:

Renaming origin-only to origin.

* web-platform-tests/fetch/api/cors/cors-preflight-referrer-expected.txt:
* web-platform-tests/fetch/api/cors/cors-preflight-referrer-worker-expected.txt:
* web-platform-tests/fetch/api/cors/cors-preflight-referrer.js:
* web-platform-tests/fetch/api/request/request-clone.sub.html:
* web-platform-tests/fetch/api/request/request-idl.html:
* web-platform-tests/fetch/api/request/request-init-001.sub-expected.txt:
* web-platform-tests/fetch/api/request/request-init-001.sub.html:
* web-platform-tests/fetch/api/request/request-init-003.sub.html:

Source/WebCore:

Covered by updated tests.

* Modules/fetch/FetchRequest.cpp:
(WebCore::setReferrerPolicy): Renaming origin-only to origin.
* Modules/fetch/FetchRequest.idl: Ditto.
* loader/FetchOptions.h: Ditto.

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

4 years agoTest expectations gardening.
ap@apple.com [Wed, 22 Jun 2016 05:42:01 +0000 (05:42 +0000)]
Test expectations gardening.

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

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

4 years agoLet the compiler generate the move constructor and assignment operator for ScriptExec...
cdumez@apple.com [Wed, 22 Jun 2016 05:00:16 +0000 (05:00 +0000)]
Let the compiler generate the move constructor and assignment operator for ScriptExecutionContext::Task
https://bugs.webkit.org/show_bug.cgi?id=159013

Reviewed by Brady Eidson.

Let the compiler generate the move constructor and assignment operator for
ScriptExecutionContext::Task. We previously manually defined the move
constructor but there is no need as it doesn't do anything special.

* dom/ScriptExecutionContext.h:

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

4 years agoDumpRenderTree crashed in com.apple.WebCore: WebCore::HTMLSelectElement::updateSelect...
dino@apple.com [Wed, 22 Jun 2016 03:53:47 +0000 (03:53 +0000)]
DumpRenderTree crashed in com.apple.WebCore: WebCore::HTMLSelectElement::updateSelectedState
https://bugs.webkit.org/show_bug.cgi?id=159009
<rdar://problem/23454623>

Reviewed by Jon Lee.

It seems we can get bogus indices from UIKit's implementation
of UIWebSelectMultiplePicker. Guard against this situation.

Covered by running the existing tests in WebKit1 with Guard Malloc,
such as fast/spatial-navigation/snav-multiple-select-optgroup.html

* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::updateSelectedState): Early return
if we get an index out of range.

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

4 years agoFix formatting issues reported by check-webkit-style
aakash_jain@apple.com [Wed, 22 Jun 2016 03:34:05 +0000 (03:34 +0000)]
Fix formatting issues reported by check-webkit-style
https://bugs.webkit.org/show_bug.cgi?id=159008

Reviewed by Alexey Proskuryakov.

Fixed the formatting issues as reported by check-webkit-style in webkitpy/tool folder.
There is no functionality change.

* Scripts/webkitpy/tool/bot/irc_command.py:
(Restart.execute):
(Rollout):
* Scripts/webkitpy/tool/bot/ircbot_unittest.py:
(IRCBotTest.test_exception_during_command):
(IRCBotTest.test_exception_during_command.CommandWithException):
(IRCBotTest.test_exception_during_command.CommandWithException.execute):
* Scripts/webkitpy/tool/bot/layouttestresultsreader_unittest.py:
(test_missing_unit_test_results_path):
(test_layout_test_results):
* Scripts/webkitpy/tool/bot/queueengine.py:
* Scripts/webkitpy/tool/bot/queueengine_unittest.py:
* Scripts/webkitpy/tool/commands/abstractsequencedcommand.py:
(AbstractSequencedCommand):
(AbstractSequencedCommand.__init__):
* Scripts/webkitpy/tool/commands/download.py:
(Land):
* Scripts/webkitpy/tool/commands/openbugs.py:
* Scripts/webkitpy/tool/commands/openbugs_unittest.py:
(OpenBugsTest):
* Scripts/webkitpy/tool/commands/queries.py:
(PatchesToCommitQueue):
(PatchesToCommitQueue.__init__):
(PatchesToCommitQueue._needs_commit_queue):
* Scripts/webkitpy/tool/commands/queries_unittest.py:
(PrintExpectationsTest.test_platform):
(PrintBaselinesTest):
(PrintBaselinesTest.setUp):
* Scripts/webkitpy/tool/commands/queues.py:
(AbstractQueue):
(AbstractQueue.__init__):
(AbstractQueue.execute):
* Scripts/webkitpy/tool/commands/queues_unittest.py:
(test_auto_retry):
* Scripts/webkitpy/tool/commands/rebaseline.py:
(AbstractParallelRebaselineCommand._files_to_add):
(AbstractParallelRebaselineCommand):
(AbstractParallelRebaselineCommand._rebaseline):
* Scripts/webkitpy/tool/commands/setupgitclone.py:
(SetupGitClone):
* Scripts/webkitpy/tool/commands/sheriffbot.py:
* Scripts/webkitpy/tool/commands/stepsequence.py:
* Scripts/webkitpy/tool/commands/upload.py:
(PostCommits._comment_text_for_commit):
(PostCommits):
(PostCommits.execute):
(MarkBugFixed):
(MarkBugFixed.__init__):
* Scripts/webkitpy/tool/commands/upload_unittest.py:
(UploadCommandsTest):
(UploadCommandsTest.test_commit_message_for_current_diff):
* Scripts/webkitpy/tool/grammar_unittest.py:
(GrammarTest):
(GrammarTest.test_join_with_separators):
* Scripts/webkitpy/tool/multicommandtool.py:
(HelpCommand.__init__):
(HelpCommand):
(HelpCommand._help_epilog):
(HelpCommand._remove_help_options):
(MultiCommandTool):
(MultiCommandTool.__init__):
(MultiCommandTool.main):
* Scripts/webkitpy/tool/multicommandtool_unittest.py:
(TrivialCommand):
(TrivialCommand.__init__):
(MultiCommandToolTest):
(MultiCommandToolTest._assert_tool_main_outputs):
(MultiCommandToolTest.test_retry):
(test_command_help):
* Scripts/webkitpy/tool/steps/__init__.py:
* Scripts/webkitpy/tool/steps/abstractstep.py:
* Scripts/webkitpy/tool/steps/applypatch.py:
* Scripts/webkitpy/tool/steps/applypatchwithlocalcommit.py:
(ApplyPatchWithLocalCommit):
(ApplyPatchWithLocalCommit.options):
* Scripts/webkitpy/tool/steps/build.py:
* Scripts/webkitpy/tool/steps/checkstyle.py:
(CheckStyle):
(CheckStyle.options):
* Scripts/webkitpy/tool/steps/cleanworkingdirectory.py:
* Scripts/webkitpy/tool/steps/closebug.py:
* Scripts/webkitpy/tool/steps/closebugforlanddiff.py:
* Scripts/webkitpy/tool/steps/closebugforlanddiff_unittest.py:
(CloseBugForLandDiffTest):
(CloseBugForLandDiffTest.test_empty_state):
* Scripts/webkitpy/tool/steps/closepatch.py:
* Scripts/webkitpy/tool/steps/commit.py:
(Commit.run):
* Scripts/webkitpy/tool/steps/confirmdiff.py:
* Scripts/webkitpy/tool/steps/editchangelog.py:
* Scripts/webkitpy/tool/steps/ensurelocalcommitifneeded.py:
* Scripts/webkitpy/tool/steps/metastep.py:
(MetaStep):
(MetaStep.__init__):
(MetaStep.run):
* Scripts/webkitpy/tool/steps/obsoletepatches.py:
* Scripts/webkitpy/tool/steps/options.py:
(Options):
* Scripts/webkitpy/tool/steps/postdiff.py:
* Scripts/webkitpy/tool/steps/postdiffforcommit.py:
* Scripts/webkitpy/tool/steps/postdiffforrevert.py:
* Scripts/webkitpy/tool/steps/preparechangelog.py:
* Scripts/webkitpy/tool/steps/preparechangelog_unittest.py:
(PrepareChangeLogTest):
(PrepareChangeLogTest.test_resolve_existing_entry):
* Scripts/webkitpy/tool/steps/preparechangelogforrevert.py:
* Scripts/webkitpy/tool/steps/promptforbugortitle.py:
* Scripts/webkitpy/tool/steps/reopenbugafterrollout.py:
* Scripts/webkitpy/tool/steps/revertrevision.py:
* Scripts/webkitpy/tool/steps/runtests.py:
* Scripts/webkitpy/tool/steps/runtests_unittest.py:
* Scripts/webkitpy/tool/steps/steps_unittest.py:
(StepsTest):
(StepsTest._step_options):
* Scripts/webkitpy/tool/steps/update.py:
* Scripts/webkitpy/tool/steps/updatechangelogswithreview_unittest.py:
(UpdateChangeLogsWithReviewerTest):
(UpdateChangeLogsWithReviewerTest.test_guess_reviewer_from_bug):
* Scripts/webkitpy/tool/steps/updatechangelogswithreviewer.py:
* Scripts/webkitpy/tool/steps/validatereviewer.py:

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

4 years agoUpdate canvas size when benchmark begins
jonlee@apple.com [Wed, 22 Jun 2016 03:26:57 +0000 (03:26 +0000)]
Update canvas size when benchmark begins
https://bugs.webkit.org/show_bug.cgi?id=159010

Reviewed by Dean Jackson.

Previously we would evaluate the media queries and assign the canvas size to the test
on body.onload. Instead, do it once the user starts the benchmark.

* Animometer/resources/debug-runner/animometer.js: Move benchmarkController.determineCanvasSize()
to benchmarkController._startBenchmark.
* Animometer/resources/runner/animometer.js: Ditto.

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

4 years agoAdd new timestamp option
jonlee@apple.com [Wed, 22 Jun 2016 03:26:24 +0000 (03:26 +0000)]
Add new timestamp option
https://bugs.webkit.org/show_bug.cgi?id=159006

Reviewed by Dean Jackson.

Add a new option to take timestamps from the rAF callback.

* Animometer/developer.html: Added option.
* Animometer/tests/resources/main.js:
(Benchmark): Fall back to using the rAF timestamp if performance.now()
is not available.
(Benchmark._animateLoop): Update how timestamp is set. Prefer to use
local var instead of accessing private var.

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

4 years agoUnreviewed, rolling out r202296.
cdumez@apple.com [Wed, 22 Jun 2016 03:16:14 +0000 (03:16 +0000)]
Unreviewed, rolling out r202296.

Broke basic browsing in Safari

Reverted changeset:

"WKWebView with no WKNavigationDelegate does not follow
universal links"
https://bugs.webkit.org/show_bug.cgi?id=158997
http://trac.webkit.org/changeset/202296

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

4 years agoImprovements to Animometer benchmark
jonlee@apple.com [Wed, 22 Jun 2016 03:12:26 +0000 (03:12 +0000)]
Improvements to Animometer benchmark
https://bugs.webkit.org/show_bug.cgi?id=157738

Reviewed by Dean Jackson.
Provisionally reviewed by Said Abou-Hallawa.

Update tests.

* Animometer/tests/master/text.html: Ensure only three text sizes for
the three canvases.
* Animometer/tests/master/focus.html: Reduce the text size to fit with smaller
particle sizes.
* Animometer/tests/master/resources/focus.js: Remove the quadratic distribution for
particle sizes, and make it linear. Reduce the size variance. Shuffle the math to
reduce some calculations per frame. Fix the placement of the particles which might
otherwise be culled.
* Animometer/tests/master/resources/image-data.js: Reduce the particle size
to encourage larger scores.

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

4 years agoImprovements to Animometer benchmark
jonlee@apple.com [Wed, 22 Jun 2016 03:11:15 +0000 (03:11 +0000)]
Improvements to Animometer benchmark
https://bugs.webkit.org/show_bug.cgi?id=157738

Reviewed by Dean Jackson.
Provisionally reviewed by Said Abou-Hallawa.

Include confidence interval for the final score, and store the canvas
size in the serialization so that it is accurately shown in results.

* Animometer/developer.html: Add a "confidence" div.
* Animometer/index.html: Ditto. Convert "mean" to "confidence".
* Animometer/resources/debug-runner/animometer.js: Look at options, and
if the configuration is included, update the body class based on it
(similar to what we do when we first load the page). That way, if you
drag-and-drop previous results in, that configuration is reflected in
the dashboard. Show the full confidence interval.

* Animometer/resources/debug-runner/animometer.css:
* Animometer/resources/debug-runner/animometer.js: Style update.
* Animometer/resources/runner/animometer.css:

* Animometer/resources/runner/animometer.js:
(_processData): Propagate the confidence interval values out and calculate
the lower and upper bounds. For now, shortcut the aggregate calculation,
since we only go through one iteration.
(this._processData.calculateScore): Propagate the confidence interval out
to be next to the score. Depending on the controller these values are
calculated differently.
(this._processData._getResultsProperty): Convenience function.
(this._processData.get score): Refactor.
(this._processData.get scoreLowerBound): Get the aggregate lower bound.
(this._processData.get scoreUpperBound): Get the aggregate upper bound.
(window.sectionsManager.setSectionScore):
(window.benchmarkController._startBenchmark): When the benchmark starts, note
the canvas size and add it to options. That way it will be automatically be
serialized.
(window.benchmarkController.showResults): Include the maximum deviation
percentage.
* Animometer/resources/runner/lines.svg: Make the background line up with the
skew.
* Animometer/resources/runner/tests.js:
(Headers.details.text): Refactor.
* Animometer/resources/statistics.js:
(Statistics.largestDeviationPercentage): Convenience function to calculate
the deviation percentage on either end and return the largest deviation.
* Animometer/resources/strings.js:

Allow specifying a regression profile to use instead of taking the one
with the lowest error.

Address an issue in the focus test when the regression calculated ends
up overestimating the change point, causing a cascade of tougher
ramps. The reason behind this is that at max complexity of an initial
ramp, the frame length is very high, and it influences the second
segment of the piecewise regression strongly, causing it to be very
steep. As a result, the first segment, expected to be flat, ends up
covering a higher range of complexity. That makes the change point
much higher than it should be. To avoid this, we will add a sanity
check on the maximum value of the ramp. If the regression's projected
value at the maximum complexity of the current ramp is very slow (less
than 20 fps), 1) reduce the maximum complexity by 20%, and 2) do not
include the regression's change point in the change point estimator.
That estimator is used as the midpoint of the next ramp, and including
the change point from a poor regression can bake in the error. The
controller already knows how to adjust for ramps that are too easy for
the system.

* Animometer/resources/runner/animometer.js:
(this._processData.findRegression): Takes a preferred profile and gives that to
Regression.
(this._processData.calculateScore): With the ramp controller, take the profile
of the ramp that was used the most when calculating the ramp's regression. That
profile is what is used for the test's score.
* Animometer/resources/statistics.js:
(Regression.Utilities.createClass): Update to take an options object which can
specify a profile to calculate with. Otherwise it will continue to use both and
select the one with the lower error.
(_calculateRegression): Fix an issue where we claim 0 error if the regression
calculation fails due to divide-by-zero. Instead reject that regression calculation
by giving it Number.MAX_VALUE.
* Animometer/resources/strings.js: New strings for marking a regression as flat
or slope.
* Animometer/tests/resources/main.js:
(RampController): Rename the thresholds for clarity. Add a threshold that, if
exceeded, will lower the maximum complexity of the next ramp.
(tune): Relax the cdf check to consider whether the interval definitely falls in
the desired frame length threshold.
(processSamples): Include the profile in the ramp.

Update ramp controller test. Increase the length of the test to 30 seconds, and extend
the interval to 120 ms during sampling. Improve the estimation of the ramp parameters.

* Animometer/developer.html: Change default to 30 seconds, and don't show the progress bar
by default.
* Animometer/resources/runner/animometer.js: Change default to 30 seconds.
* Animometer/tests/resources/main.js: A number of improvements to the ramp controller, in
the order in which they appear in the patch:

- With a longer test length use longer ramps with longer intervals to get more data at each
complexity. Keep the 100 ms interval length during the ramp up phase since we don't need to
spend more time there to find the right order of magnitude, but increase it during the
ramps to 120 ms.
- The ramp linearly interpolates the complexity to render based on its timestamp, but it would
never sample the minimum complexity. Instead of lerping max to min complexity from time
0 to t where t is the ramp length, instead lerp from 0 to (t - intervalSampleLength) so that
we can have at least one interval sample at the min complexity for that ramp.
- Some regression calculations only come out with one line segment rather than the two
we expect. This could be due to a noisy ramp or the ramp's range is too narrow. If that's the
case, influence the minimum complexity of the next ramp towards the lowest bound of 1, so that
we ensure that at least part of the ramp is covering a complexity range that the system can
handle at full 60.
- Remove an assignment to interpolatedFrameLength since that is never subsequently used.

Update the format used to serialize the results for analysis.

Each data point used to have named properties for fields like complexity and frame rate.
In addition the serialized numbers had rounding errors that took up many characters.
Update the format by introducing a new data container called SampleData, which contains a
field map. The map maps a string to an array index. Each data point is an array, so, to
get a stat, use the field map to get the array index into the data point. This allows future
versions to track other data, and reduces the size of the output string by two-thirds.

* Animometer/resources/extensions.js:
(Utilities.toFixedNumber): Add convenience function that truncates the number to a fixed
precision, and converts it back to a number.
(SampleData): New class that contains sample data and a field map that maps properties to
an array index.
(get length): Number of data points.
(addField): Add a field to the field map.
(push): Add a data point.
(sort): Sort the data.
(slice): Return new SampleData object with sliced data.
(forEach): Iterate over the data with provided function.
(createDatum):
(getFieldInDatum): Returns the data point associated with the field name by looking it up
in the field map in the datum provided, which can be the datum object itself (an array) or
an index into the data member variable.
(setFieldInDatum): Sets the data point associated with the field name.
(at): Returns the data point at the provided index.
(toArray): Serializes the data where the field map serves as property names for each point.

* Animometer/resources/debug-runner/graph.js:
(updateGraphData): Remove unused _testData. Convert the data to the old array format for the
graph to use, since the old format was much easier to work with when displaying the graphs.
(onGraphTypeChanged): For some controllers, no alternative score or mean is provided.
* Animometer/resources/runner/animometer.css:
* Animometer/resources/runner/animometer.js: Refactor to use SampleData. Update JSON output
to only go to 3 digits of precision for purposes of reducing the data size.
* Animometer/resources/strings.js: Add new strings to put into the field maps.
* Animometer/tests/resources/main.js: Refactor to use SampleData.

* Animometer/developer.html:
* Animometer/index.html: Restructure results table for both pages. Add charset attribute to
tests.js include.
* Animometer/resources/debug-runner/animometer.css: Clear out styles from release runner.
* Animometer/resources/debug-runner/graph.js:
(onGraphTypeChanged): Update score and mean if bootstrap results are available from the
controller, since not all controllers do bootstrapping.
* Animometer/resources/debug-runner/tests.js: Update header text.
* Animometer/resources/runner/animometer.css: Include confidence interval in results.
* Animometer/resources/runner/animometer.js:
(ResultsTable._addHeader): Header contents can be HTML, so use innerHTML instead.
(ResultsTable._addBody): Add tbody element.
(ResultsTable._addTest): Allow a data cell to invoke a JS function to get its contents.
(window.benchmarkController.showResults): Add table that includes tests' confidence intervals.
* Animometer/resources/runner/tests.js:
(Headers.details.text): Add new details table that includes bootstrap confidence interval.
The interval can be asymmetric, but for simplicity, report the maximum deviation percentage
on either side of the bootstrap median.
* Animometer/resources/statistics.js:
(bootstrap): Include the confidence percentage in the return object.

Report canvas size in results.

* Animometer/developer.html: Add markup to indicate whether a small, medium, or large
canvas was used.
* Animometer/index.html: Ditto.
* Animometer/resources/debug-runner/animometer.js: Call determineCanvasSize().
* Animometer/resources/runner/animometer.css: Update styles to set the canvas based on the
body class size.
* Animometer/resources/runner/animometer.js:
(window.benchmarkController.initialize): Update styles to set the canvas based on the
body class size.
(window.benchmarkController.determineCanvasSize): Run various media queries and set the body
class based on the size of the device.

* Animometer/developer.html: Refactor to include the main CSS file, and redo
the layout so that it doesn't rely on flexbox.
* Animometer/resources/debug-runner/animometer.css:
* Animometer/resources/debug-runner/animometer.js:
(updateDisplay): Since various parts of the script alter the body class, we can't
replace the className directly. Instead, remove all display-based values and then add
the one that was selected.
* Animometer/resources/debug-runner/graph.js:
(updateGraphData): To set the size of the graph, use window.innerHeight.
* Animometer/resources/runner/animometer.js:
(window.sectionsManager.showSection): Since various parts of the script alter the body
class, we can't replace the className directly. Remove all of the section classes
individually and then add the one desired.
* Animometer/tests/resources/stage.css: Remove -apple-system as a font to use in the
stage.

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

4 years agoPass ScriptExecutionContext::Task as rvalue reference
cdumez@apple.com [Wed, 22 Jun 2016 03:06:36 +0000 (03:06 +0000)]
Pass ScriptExecutionContext::Task as rvalue reference
https://bugs.webkit.org/show_bug.cgi?id=159007

Reviewed by Anders Carlsson.

Pass ScriptExecutionContext::Task as rvalue reference since its non-copyable
and has to be moved in.

* workers/WorkerLoaderProxy.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::postTaskToLoader):
(WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
* workers/WorkerMessagingProxy.h:
* workers/WorkerRunLoop.cpp:
(WebCore::WorkerRunLoop::postTask):
(WebCore::WorkerRunLoop::postTaskAndTerminate):
(WebCore::WorkerRunLoop::postTaskForMode):
(WebCore::WorkerRunLoop::Task::Task):
* workers/WorkerRunLoop.h:

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

4 years agoInclude IdentifierInlines.h.
andersca@apple.com [Wed, 22 Jun 2016 02:52:46 +0000 (02:52 +0000)]
Include IdentifierInlines.h.

* bindings/js/JSApplePayShippingMethodSelectedEventCustom.cpp:

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

4 years agoAdd PaymentHeaders.h file.
andersca@apple.com [Wed, 22 Jun 2016 02:02:54 +0000 (02:02 +0000)]
Add PaymentHeaders.h file.

* Modules/applepay/PaymentHeaders.h: Added.
* WebCore.xcodeproj/project.pbxproj:

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

4 years agoMake a bunch of Apple Pay headers private instead of project.
andersca@apple.com [Wed, 22 Jun 2016 01:36:56 +0000 (01:36 +0000)]
Make a bunch of Apple Pay headers private instead of project.

* WebCore.xcodeproj/project.pbxproj:

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

4 years agoMove the last Apple Pay WebCore files to the open source repository
andersca@apple.com [Wed, 22 Jun 2016 01:05:31 +0000 (01:05 +0000)]
Move the last Apple Pay WebCore files to the open source repository
https://bugs.webkit.org/show_bug.cgi?id=159005

Reviewed by Tim Horton.

* DerivedSources.make:
* Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp: Added.
* Modules/applepay/ApplePayPaymentAuthorizedEvent.h: Added.
* Modules/applepay/ApplePayPaymentAuthorizedEvent.idl: Added.
* Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp: Added.
* Modules/applepay/ApplePayPaymentMethodSelectedEvent.h: Added.
* Modules/applepay/ApplePayPaymentMethodSelectedEvent.idl: Added.
* Modules/applepay/ApplePaySession.cpp: Added.
* Modules/applepay/ApplePaySession.h: Added.
* Modules/applepay/ApplePaySession.idl: Added.
* Modules/applepay/ApplePayShippingContactSelectedEvent.cpp: Added.
* Modules/applepay/ApplePayShippingContactSelectedEvent.h: Added.
* Modules/applepay/ApplePayShippingContactSelectedEvent.idl: Added.
* Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp: Added.
* Modules/applepay/ApplePayShippingMethodSelectedEvent.h: Added.
* Modules/applepay/ApplePayShippingMethodSelectedEvent.idl: Added.
* Modules/applepay/ApplePayValidateMerchantEvent.cpp: Added.
* Modules/applepay/ApplePayValidateMerchantEvent.h: Added.
* Modules/applepay/ApplePayValidateMerchantEvent.idl: Added.
* Modules/applepay/Payment.h: Added.
* Modules/applepay/PaymentAuthorizationStatus.h: Added.
* Modules/applepay/PaymentContact.h: Added.
* Modules/applepay/PaymentMerchantSession.h: Added.
* Modules/applepay/PaymentMethod.h: Added.
* Modules/applepay/PaymentRequestValidator.cpp: Added.
* Modules/applepay/PaymentRequestValidator.h: Added.
* Modules/applepay/cocoa/PaymentContactCocoa.mm: Added.
* Modules/applepay/cocoa/PaymentMethodCocoa.mm: Added.
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSApplePayPaymentAuthorizedEventCustom.cpp: Added.
* bindings/js/JSApplePayPaymentMethodSelectedEventCustom.cpp: Added.
* bindings/js/JSApplePaySessionCustom.cpp: Added.
* bindings/js/JSApplePayShippingContactSelectedEventCustom.cpp: Added.
* bindings/js/JSApplePayShippingMethodSelectedEventCustom.cpp: Added.
* dom/EventNames.in:
* dom/EventTargetFactory.in:

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

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