WebKit-https.git
4 years agoUnindent some code in Watchdog::shouldTerminate().
mark.lam@apple.com [Wed, 10 May 2017 00:03:10 +0000 (00:03 +0000)]
Unindent some code in Watchdog::shouldTerminate().
https://bugs.webkit.org/show_bug.cgi?id=171896

Rubber stamped by Keith Miller.

I should have done this before I landed r213107, but I forgot.  Unindenting it now.

* runtime/Watchdog.cpp:
(JSC::Watchdog::shouldTerminate):

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

4 years agoMark webrtc/audio-replace-track.html as flaky.
jlewis3@apple.com [Tue, 9 May 2017 23:27:53 +0000 (23:27 +0000)]
Mark webrtc/audio-replace-track.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=171895

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

4 years agowebkitpy: Remove unneeded crash log retrieval, refactor Darwin crash retrieval
jbedard@apple.com [Tue, 9 May 2017 23:19:07 +0000 (23:19 +0000)]
webkitpy: Remove unneeded crash log retrieval, refactor Darwin crash retrieval
https://bugs.webkit.org/show_bug.cgi?id=170857
<rdar://problem/31635373>

Reviewed by Aakash Jain.

Since LayoutTestRelay has been removed, iOS Simulators and Macs can use the same
code to search for crash logs.

* Scripts/webkitpy/port/darwin.py:
(DarwinPort._get_crash_log): Moved from MacPort.
* Scripts/webkitpy/port/darwin_testcase.py:
(DarwinTest.test_get_crash_log): Moved from MacTest.
* Scripts/webkitpy/port/ios_device.py:
(IOSDevicePort._get_crash_log): Implement pass-through for iOS device, since iOS
devices must search for crash-logs remotely.
* Scripts/webkitpy/port/ios_simulator.py:
(IOSSimulatorPort._get_crash_log): Deleted.
* Scripts/webkitpy/port/ios_simulator_unittest.py:
(IOSSimulatorTest.test_get_crash_log): Deleted.
* Scripts/webkitpy/port/mac.py:
(MacPort._get_crash_log): Moved to DarwinPort
* Scripts/webkitpy/port/mac_unittest.py:
(MacTest.test_get_crash_log): Moved to DarwinTest.

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

4 years agoBuffer media in NetworkProcess to reduce IPC overhead
commit-queue@webkit.org [Tue, 9 May 2017 23:14:33 +0000 (23:14 +0000)]
Buffer media in NetworkProcess to reduce IPC overhead
https://bugs.webkit.org/show_bug.cgi?id=171834
<rdar://problem/31485485>

Patch by Alex Christensen <achristensen@webkit.org> on 2017-05-09
Reviewed by Jer Noble.

I have measured a significant CPU usage reduction when buffering media data in the NetworkProcess,
especially on arm64 processors.  Buffering data in the NetworkProcess introduces no additional data
copies after r215686, and it reduces the number of messages sent from the NetworkProcess to the WebProcess,
each of which must also be forwarded to mediaserverd by AVFoundation.  This reduces the number of messages
from thousands per second to a maximum of 20 per second.  This adds 1/20 second additional latency in
media loading, which will probably not be noticed by most users.  This also adds the possibility of large
allocations when decoding IPC messages in the WebProcess, and if that becomes the source of crashes we can
add a maximum buffered amount in addition to a maximum buffered time, but we are likely not to receive
so much data in 1/20 second to have problems allocating the buffer.

* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::maximumBufferingTime):
Buffer data in the NetworkProcess for up to 50ms before sending it to the WebProcess in one message.
This value is used in NetworkResourceLoader::didReceiveBuffer to append to m_bufferedData instead of
sending the small chunks immediately.

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

4 years agoFix Windows build.
dino@apple.com [Tue, 9 May 2017 23:00:10 +0000 (23:00 +0000)]
Fix Windows build.

* Plugins/PluginView.h:
* Plugins/PluginViewWin.cpp:
(WebCore::PluginView::paint):

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

4 years agoLayoutTests/imported/w3c:
weinig@apple.com [Tue, 9 May 2017 22:53:13 +0000 (22:53 +0000)]
LayoutTests/imported/w3c:
Implement Subresource Integrity (SRI)
https://bugs.webkit.org/show_bug.cgi?id=148363
<rdar://problem/18945879>

Reviewed by Youenn Fablet.

* web-platform-tests/fetch/api/basic/integrity-expected.txt:
* web-platform-tests/fetch/api/basic/integrity-worker-expected.txt:
Update results now that integrity is implemented.

Source/WebCore:
Implement Subresource Integrity (SRI) [Part 2 - Fetch]
https://bugs.webkit.org/show_bug.cgi?id=148363
<rdar://problem/18945879>

Reviewed by Youenn Fablet.

Tests: http/tests/subresource-integrity/sri-fetch-worker.html
       http/tests/subresource-integrity/sri-fetch.html

* loader/FetchOptions.h:
* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoaderOptions::isolatedCopy):
* loader/ThreadableLoader.h:
* loader/WorkerThreadableLoader.cpp:
(WebCore::LoaderTaskOptions::LoaderTaskOptions):
Add integrity metadata to the fetch options, and fix the implementation of
ThreadableLoaderOptions::isolatedCopy to work correctly (it was missing isolated
copy derivedCachedDataTypesToRetrieve).

* Modules/fetch/FetchRequest.cpp:
(WebCore::buildOptions):
(WebCore::FetchRequest::initializeOptions):
* Modules/fetch/FetchRequest.h:
Switch to using the integrity metadata on the fetchOptions, removing the need to
store them directly on the internal request.

* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
(WebCore::DocumentThreadableLoader::didReceiveResponse):
(WebCore::DocumentThreadableLoader::didReceiveData):
(WebCore::DocumentThreadableLoader::didFinishLoading):
(WebCore::DocumentThreadableLoader::loadRequest):
(WebCore::DocumentThreadableLoader::reportIntegrityMetadataError):
* loader/DocumentThreadableLoader.h:
Add a new flag, m_delayCallbacksForIntegrityCheck, which is used when integrity metadata
is present, so we can implement the 'wait' concept from the fetch spec, and delay informing
the clients until we have validated the integrity metadata.

LayoutTests:
Implement Subresource Integrity (SRI)
https://bugs.webkit.org/show_bug.cgi?id=148363
<rdar://problem/18945879>

Reviewed by Youenn Fablet.

Add tests for Subresource Integrity for Fetch based off the ones from Web
Platform Tests. Additional tests for more CORS combinations have been added.

* http/tests/subresource-integrity/resources/crossorigin-anon-resource.txt: Added.
* http/tests/subresource-integrity/resources/crossorigin-creds-resource.txt: Added.
* http/tests/subresource-integrity/resources/crossorigin-ineligible-resource.txt: Added.
* http/tests/subresource-integrity/resources/resource.txt: Added.
* http/tests/subresource-integrity/sri-fetch-expected.txt: Added.
* http/tests/subresource-integrity/sri-fetch-worker-expected.txt: Added.
* http/tests/subresource-integrity/sri-fetch-worker.html: Added.
* http/tests/subresource-integrity/sri-fetch.html: Added.
* http/tests/subresource-integrity/sri-fetch.js: Added.

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

4 years agoMarked webrtc/captureCanvas-webrtc.html as flaky.
jlewis3@apple.com [Tue, 9 May 2017 22:52:05 +0000 (22:52 +0000)]
Marked webrtc/captureCanvas-webrtc.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=170870

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

4 years agoCap the number of FTL compilation threads on iOS to 2
msaboff@apple.com [Tue, 9 May 2017 22:38:41 +0000 (22:38 +0000)]
Cap the number of FTL compilation threads on iOS to 2
https://bugs.webkit.org/show_bug.cgi?id=171887

Reviewed by Filip Pizlo.

Set an iOS specific max of 2 threads.

* runtime/Options.h:

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

4 years agoUnreviewed, rolling out r216545.
commit-queue@webkit.org [Tue, 9 May 2017 22:35:58 +0000 (22:35 +0000)]
Unreviewed, rolling out r216545.
https://bugs.webkit.org/show_bug.cgi?id=171889

Caused a test failure (Requested by eric_carlson on #webkit).

Reverted changeset:

"[MediaStream] deviceId constraint doesn't work with
getUserMedia"
https://bugs.webkit.org/show_bug.cgi?id=171877
http://trac.webkit.org/changeset/216545

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

4 years agoresetFlowThreadContainingBlockAndChildInfoIncludingDescendants should not ignore...
zalan@apple.com [Tue, 9 May 2017 22:30:11 +0000 (22:30 +0000)]
resetFlowThreadContainingBlockAndChildInfoIncludingDescendants should not ignore RenderElement subtrees.
https://bugs.webkit.org/show_bug.cgi?id=171873
<rdar://problem/32004954>

Reviewed by Simon Fraser.

Source/WebCore:

Normally a RenderBlock's parent is another RenderBlock, but In some cases (e.g. tables) a RenderBlock can
have a non-RenderBlock(RenderBox) ancestor.
While updating the flow thread state on a subtree, we should descent into subtrees with RenderElement
roots and not just RenderBlocks so that we clear the state on the entire subtree.

Test: fast/multicol/crash-when-column-inside-table.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::resetFlowThreadContainingBlockAndChildInfoIncludingDescendants):
* rendering/RenderBlock.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::resetFlowThreadContainingBlockAndChildInfoIncludingDescendants):
* rendering/RenderElement.h:

LayoutTests:

* fast/multicol/crash-when-column-inside-table-expected.txt: Added.
* fast/multicol/crash-when-column-inside-table.html: Added.

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

4 years ago[iOS Simulator] Flaky failure LayoutTest/webrtc/libwebrtc/release-while-setting-local...
ryanhaddad@apple.com [Tue, 9 May 2017 22:28:36 +0000 (22:28 +0000)]
[iOS Simulator] Flaky failure LayoutTest/webrtc/libwebrtc/release-while-setting-local-description.html
https://bugs.webkit.org/show_bug.cgi?id=171742

Reviewed by Youenn Fablet.

Silence the console messages for unhandled rejections in this test.

* webrtc/libwebrtc/release-while-setting-local-description-expected.txt:
* webrtc/libwebrtc/release-while-setting-local-description.html:

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

4 years agoHeap::heap() should behave gracefully for null pointers
fpizlo@apple.com [Tue, 9 May 2017 22:27:06 +0000 (22:27 +0000)]
Heap::heap() should behave gracefully for null pointers
https://bugs.webkit.org/show_bug.cgi?id=171888
<rdar://problem/32005315>

Reviewed by Mark Lam.

Some callers of Heap::heap() can pass a null cell and they will behave gracefully if we
return a null Heap. So, let's do that.

This fixes a crash and it does not hurt performance. I'm seeing a possible 0.5% regression
with 74% probability. That's a neutral result by our usual 95% standard.

* heap/HeapInlines.h:
(JSC::Heap::heap):

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

4 years agoWeb Inspector: Assertion failed: Cannot select item with unexpected parent bar. ...
bburg@apple.com [Tue, 9 May 2017 22:18:53 +0000 (22:18 +0000)]
Web Inspector: Assertion failed: Cannot select item with unexpected parent bar. (at NavigationBar.js:132)
https://bugs.webkit.org/show_bug.cgi?id=171885

Reviewed by Matt Baker.

This new assertion revealed a real misuse of the NavigationBar API.

* UserInterface/Views/NavigationBar.js:
(WebInspector.NavigationBar.prototype.set selectedNavigationItem):
Improve this to be an assertion so it can be paused at using the debugger.

* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.prototype._changeViewMode):
We need to set a NavigationItem as the selected item, not its identifier.
Look up the corresponding item for the identifier that we received (the view mode).

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

4 years ago[MediaStream] deviceId constraint doesn't work with getUserMedia
eric.carlson@apple.com [Tue, 9 May 2017 22:06:13 +0000 (22:06 +0000)]
[MediaStream] deviceId constraint doesn't work with getUserMedia
https://bugs.webkit.org/show_bug.cgi?id=171877
<rdar://problem/31899730>

Reviewed by Jer Noble.

Source/WebCore:

Test: fast/mediastream/get-user-media-device-id.html

* Modules/mediastream/MediaConstraintsImpl.h:
(WebCore::MediaConstraintsData::MediaConstraintsData): Add a constructor that
takes a const MediaConstraints&.

* Modules/mediastream/MediaDevicesEnumerationRequest.cpp:
(WebCore::MediaDevicesEnumerationRequest::topLevelDocumentOrigin): Don't return
NULL for the main frame so the origin matches that returned for a UserMediaRequest.

* Modules/mediastream/UserMediaController.h:
(WebCore::UserMediaController::setDeviceIDHashSalt): Deleted, not used.
(WebCore::UserMediaController::deviceIDHashSalt): Deleted, not used.

* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::allow): Add device ID hash salt parameter, set it on
constraints.
* Modules/mediastream/UserMediaRequest.h:

* platform/mediastream/MediaConstraints.h:
* platform/mediastream/RealtimeMediaSource.cpp:
(WebCore::RealtimeMediaSource::fitnessDistance): ASSERT if called for DeviceId.
(WebCore::RealtimeMediaSource::selectSettings): Special case DeviceId because it
we have to hash the device ID before comparing, and because the DeviceId can't be
changed so it should never be added to the flattened constraints.

* platform/mediastream/RealtimeMediaSourceSupportedConstraints.cpp:
(WebCore::RealtimeMediaSourceSupportedConstraints::nameForConstraint): Deleted, unused.
(WebCore::RealtimeMediaSourceSupportedConstraints::constraintFromName): Deleted, unused.
* platform/mediastream/RealtimeMediaSourceSupportedConstraints.h:

* platform/mediastream/mac/AVVideoCaptureSource.mm:
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
(WebCore::RealtimeMediaSourceCenterMac::bestSourcesForTypeAndConstraints): Pass device
id, not empty string.

Source/WebKit2:

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<MediaConstraintsData>::encode): Encode deviceIDHashSalt.
(IPC::ArgumentCoder<MediaConstraintsData>::decode): Decode deviceIDHashSalt.

* UIProcess/UserMediaPermissionCheckProxy.cpp:
(WebKit::UserMediaPermissionCheckProxy::UserMediaPermissionCheckProxy): Initialize
completion handler, frame ID, and security origins.
(WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo): Complete by calling
completion handler because we now sometimes request access info before calling gUM.
(WebKit::UserMediaPermissionCheckProxy::invalidate): Clear completion handler.
* UIProcess/UserMediaPermissionCheckProxy.h:

* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::FrameAuthorizationState::FrameAuthorizationState): Take security origins, not
UserMediaPermissionRequestProxy, so it can be constructed with a UserMediaPermissionCheckProxy.
(WebKit::FrameAuthorizationState::ensureSecurityOriginsAreEqual): Ditto. Clear has salt
when origins don't match.
(WebKit::UserMediaPermissionRequestManagerProxy::stateForRequest): Templatize.
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied): Fix typo.
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Ditto.
Don't set state for empty UIDs. Pass hash salt to web process.
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
The device ID hash salt is now required to validate constraints, so get it first.
(WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo): Helper
method used to get the device ID hash salt.
(WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): Restructure
to use getUserMediaPermissionInfo.
(WebKit::UserMediaPermissionRequestManagerProxy::didCompleteUserMediaPermissionCheck): Deleted.
* UIProcess/UserMediaPermissionRequestManagerProxy.h:

* WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
(WebKit::UserMediaPermissionRequestManager::userMediaAccessWasGranted): Add device ID
hash salt parameter.
* WebProcess/MediaStream/UserMediaPermissionRequestManager.h:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::userMediaAccessWasGranted): Ditto.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

* WebProcess/cocoa/UserMediaCaptureManager.cpp:
(WebKit::UserMediaCaptureManager::createCaptureSource): Use new MediaConstraintsData
constructor.

LayoutTests:

* fast/mediastream/get-user-media-device-id-expected.txt: Added.
* fast/mediastream/get-user-media-device-id.html: Added.

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

4 years ago[Modern Media Controls] Localized strings aren't loaded
commit-queue@webkit.org [Tue, 9 May 2017 21:52:53 +0000 (21:52 +0000)]
[Modern Media Controls] Localized strings aren't loaded
https://bugs.webkit.org/show_bug.cgi?id=171884

Patch by Antoine Quint <graouts@apple.com> on 2017-05-09
Reviewed by Dean Jackson.

Remove the extraneous file extension in the file name.

* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::mediaControlsScript):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::mediaControlsScript):

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

4 years agoMarked multiple test flaky.
jlewis3@apple.com [Tue, 9 May 2017 21:49:27 +0000 (21:49 +0000)]
Marked multiple test flaky.
https://bugs.webkit.org/show_bug.cgi?id=171886

Unreviewed test gardening.

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

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

4 years agoIntroduce DocumentAndElementEventHandlers IDL interface
cdumez@apple.com [Tue, 9 May 2017 21:40:11 +0000 (21:40 +0000)]
Introduce DocumentAndElementEventHandlers IDL interface
https://bugs.webkit.org/show_bug.cgi?id=171879

Reviewed by Simon Fraser and Ryosuke Niwa.

Source/WebCore:

Introduce DocumentAndElementEventHandlers IDL interface:
- https://html.spec.whatwg.org/#documentandelementeventhandlers

This avoids duplication between Document.idl and Element.idl.

Also mark oncopy / oncut / onpaste EventHandlers as enumerable to match
the specification.

Test: fast/events/DocumentAndElementEventHandlers.html

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.idl:
* dom/DocumentAndElementEventHandlers.idl: Added.
* dom/Element.idl:

LayoutTests:

* fast/events/DocumentAndElementEventHandlers-expected.txt: Added.
* fast/events/DocumentAndElementEventHandlers.html: Added.
Add layout test coverage.

* js/dom/dom-static-property-for-in-iteration-expected.txt:
Rebaseline now that those event handlers are enumerable.

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

4 years agoRestrict SVG filters to accessible security origins
dino@apple.com [Tue, 9 May 2017 21:35:55 +0000 (21:35 +0000)]
Restrict SVG filters to accessible security origins
https://bugs.webkit.org/show_bug.cgi?id=118689
<rdar://problem/27362159>

Reviewed by Brent Fulgham.

Source/WebCore:

Certain SVG filters should only be allowed to operate
on content that is has SecurityOrigin access to. Implement
this by including a flag in PaintInfo and LayerPaintingInfo,
and have RenderWidget make sure the documents have acceptable
SecurityOrigins as it goes to paint.

This could be used as the first step in a "safe painting"
strategy, allowing some content to be rendered into a
canvas or via the element() CSS function... but it is only
a small first step.

Test: http/tests/css/filters-on-iframes.html

* page/FrameView.cpp:
(WebCore::FrameView::paintContents):
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::paint):
* platform/ScrollView.h:
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::paint):
* platform/Scrollbar.h:
* platform/Widget.h:
* platform/graphics/filters/FilterOperation.h:
(WebCore::FilterOperation::shouldBeRestrictedBySecurityOrigin):
* platform/graphics/filters/FilterOperations.cpp:
(WebCore::FilterOperations::hasFilterThatShouldBeRestrictedBySecurityOrigin):
* platform/graphics/filters/FilterOperations.h:
* platform/mac/WidgetMac.mm:
(WebCore::Widget::paint):
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::build):
* rendering/FilterEffectRenderer.h:
* rendering/PaintInfo.h:
(WebCore::PaintInfo::PaintInfo):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paint):
(WebCore::RenderLayer::setupFilters):
(WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
* rendering/RenderLayer.h:
* rendering/RenderScrollbar.cpp:
(WebCore::RenderScrollbar::paint):
* rendering/RenderScrollbar.h:
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::paintContents):

Source/WebKit2:

Update parameter lists.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::paint):
* WebProcess/Plugins/PluginView.h:

LayoutTests:

Add a test that shows safe frames, unsafe frames, and
then a safe frame that itself has an unsafe frame, to
show that the security requirements are being forwarded
down the tree.

* http/tests/css/filters-on-iframes-expected.html: Added.
* http/tests/css/filters-on-iframes.html: Added.
* http/tests/css/resources/blank.html: Added.
* http/tests/css/resources/references-external.html: Added.
* http/tests/css/resources/solid-red.html: Added.

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

4 years agoMove onanimation* EventHandlers to GlobalEventHandlers
cdumez@apple.com [Tue, 9 May 2017 21:21:04 +0000 (21:21 +0000)]
Move onanimation* EventHandlers to GlobalEventHandlers
https://bugs.webkit.org/show_bug.cgi?id=171874

Reviewed by Simon Fraser.

Source/WebCore:

Move onanimation* EventHandlers to GlobalEventHandlers to match the specification:
- https://drafts.csswg.org/css-animations/#interface-globaleventhandlers-idl

We previously have those on Window and Element only. Firefox complies with the
specification.

Test: fast/css/onanimation-eventhandlers.html

* dom/Element.idl:
* dom/GlobalEventHandlers.idl:
* page/DOMWindow.idl:

LayoutTests:

* fast/css/onanimation-eventhandlers-expected.txt: Added.
* fast/css/onanimation-eventhandlers.html: Added.
Add layout test coverage.

* fast/dom/event-handler-attributes-expected.txt:
* fast/dom/event-handler-attributes.html:
* js/dom/dom-static-property-for-in-iteration-expected.txt:
Rebaseline existing tests to reflect behavior change.

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

4 years agoFixed a typo in expectations file.
jlewis3@apple.com [Tue, 9 May 2017 21:04:31 +0000 (21:04 +0000)]
Fixed a typo in expectations file.
https://bugs.webkit.org/show_bug.cgi?id=162710

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

4 years ago[ARES6] Improved the running test indicator
jond@apple.com [Tue, 9 May 2017 21:01:57 +0000 (21:01 +0000)]
[ARES6] Improved the running test indicator
https://bugs.webkit.org/show_bug.cgi?id=171400

Running tests show a triangle before the test title and the titles are white.

Reviewed by Joseph Pecoraro.

* ARES-6/index.html:
* ARES-6/styles.css:
(.test .running):
(.test .running:before):
(.test .indicator): Deleted.
(.test .indicator.running): Deleted.
(@keyframes test-running): Deleted.

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

4 years agoRefresh webrtc WPT tests
commit-queue@webkit.org [Tue, 9 May 2017 20:58:04 +0000 (20:58 +0000)]
Refresh webrtc WPT tests
https://bugs.webkit.org/show_bug.cgi?id=171878

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-09
Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

* resources/import-expectations.json:
* web-platform-tests/webrtc/OWNERS:
* web-platform-tests/webrtc/RTCConfiguration-iceCandidatePoolSize-expected.txt: Added.
* web-platform-tests/webrtc/RTCConfiguration-iceCandidatePoolSize.html: Added.
* web-platform-tests/webrtc/RTCDataChannel-id-expected.txt: Added.
* web-platform-tests/webrtc/RTCDataChannel-id.html: Added.
* web-platform-tests/webrtc/RTCPeerConnection-canTrickleIceCandidates-expected.txt: Added.
* web-platform-tests/webrtc/RTCPeerConnection-canTrickleIceCandidates.html: Added.
* web-platform-tests/webrtc/RTCPeerConnection-constructor-expected.txt: Added.
* web-platform-tests/webrtc/RTCPeerConnection-constructor.html: Added.
* web-platform-tests/webrtc/RTCPeerConnection-createDataChannel-expected.txt: Added.
* web-platform-tests/webrtc/RTCPeerConnection-createDataChannel.html: Added.
* web-platform-tests/webrtc/RTCPeerConnection-iceGatheringState-expected.txt: Added.
* web-platform-tests/webrtc/RTCPeerConnection-iceGatheringState.html: Added.
* web-platform-tests/webrtc/RTCPeerConnection-idl-expected.txt: Added.
* web-platform-tests/webrtc/RTCPeerConnection-idl.html: Added.
* web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-expected.txt: Added.
* web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription.html: Added.
* web-platform-tests/webrtc/datachannel-idlharness-expected.txt: Added.
* web-platform-tests/webrtc/datachannel-idlharness.html: Added.
* web-platform-tests/webrtc/getstats-expected.txt: Added.
* web-platform-tests/webrtc/getstats.html: Added.
* web-platform-tests/webrtc/interfaces-expected.txt: Added.
* web-platform-tests/webrtc/interfaces.html: Added.
* web-platform-tests/webrtc/no-media-call.html:
* web-platform-tests/webrtc/promises-call.html:
* web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl-expected.txt:
* web-platform-tests/webrtc/simplecall.html:
* web-platform-tests/webrtc/w3c-import.log:

Source/WebCore:

Tests: imported/w3c/web-platform-tests/webrtc/RTCConfiguration-iceCandidatePoolSize.html
       imported/w3c/web-platform-tests/webrtc/RTCDataChannel-id.html
       imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-canTrickleIceCandidates.html
       imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-constructor.html
       imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-createDataChannel.html
       imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-iceGatheringState.html
       imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-idl.html
       imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription.html
       imported/w3c/web-platform-tests/webrtc/datachannel-idlharness.html
       imported/w3c/web-platform-tests/webrtc/getstats.html
       imported/w3c/web-platform-tests/webrtc/interfaces.html

* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::LibWebRTCMediaEndpoint::createDataChannel): exiting early if libwebrtc is not creating a data channel.

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

4 years agospace-evenly misbehaves with flexbox
jfernandez@igalia.com [Tue, 9 May 2017 20:48:20 +0000 (20:48 +0000)]
space-evenly misbehaves with flexbox
https://bugs.webkit.org/show_bug.cgi?id=170445

Reviewed by David Hyatt.

Source/WebCore:

The CSS Box Alignment specification defines the <content-distribution>
set as some of the allowed values for the Content Distribution
properties, align-content and justify-content. The 'space-evenly' value
is not among the ones allowed for these properties according to the CSS
Flexible Box specification.

The CSS Flexbible box specification states that it must follow the CSS
Box Alignment specification, so this new value must be considered as
part of an upgraded level of the spec, which should be implemented
eventually.

Since we have already shipped an implementation of the new CSS Box
Alignment values for CSS Grid Layout, we need to implement it for
Flexbox as well.

No new tests, but several new test cases added.

* rendering/RenderFlexibleBox.cpp:
(WebCore::initialJustifyContentOffset):
(WebCore::justifyContentSpaceBetweenChildren):
(WebCore::initialAlignContentOffset):
(WebCore::alignContentSpaceBetweenChildren):

LayoutTests:

Added test cases for the 'space-evenly' value for align-content and justify-content.

* css3/flexbox/alignContent-applies-with-flexWrap-wrap-with-single-line-expected.txt:
* css3/flexbox/alignContent-applies-with-flexWrap-wrap-with-single-line.html:
* css3/flexbox/css-properties-expected.txt:
* css3/flexbox/css-properties.html:
* css3/flexbox/flex-justify-content-expected.txt:
* css3/flexbox/flex-justify-content.html:
* css3/flexbox/multiline-align-content-expected.txt:
* css3/flexbox/multiline-align-content-horizontal-column-expected.txt:
* css3/flexbox/multiline-align-content-horizontal-column.html:
* css3/flexbox/multiline-align-content.html:
* css3/flexbox/resources/flexbox.css:
(.align-content-space-around):
(.justify-content-space-around):
* css3/flexbox/true-centering-expected.txt:
* css3/flexbox/true-centering.html:

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

4 years agoAvoid -Wformat warnings in RenderLayerCompositor.cpp and RenderLayerBacking.cpp
mcatanzaro@igalia.com [Tue, 9 May 2017 20:24:36 +0000 (20:24 +0000)]
Avoid -Wformat warnings in RenderLayerCompositor.cpp and RenderLayerBacking.cpp
https://bugs.webkit.org/show_bug.cgi?id=171875

Reviewed by Simon Fraser.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::logLayerInfo):
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):

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

4 years agoDrop custom bindings code for Window.location setter
cdumez@apple.com [Tue, 9 May 2017 20:01:05 +0000 (20:01 +0000)]
Drop custom bindings code for Window.location setter
https://bugs.webkit.org/show_bug.cgi?id=171846

Reviewed by Sam Weinig.

Drop custom bindings code for Window.location setter as the custom code was merely needed
to address a very old Mac widget that has long been fixed (rdar://problem/5695330).

No new tests, no Web-facing behavior change.

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::setLocation): Deleted.
Drop custom code.

* page/DOMWindow.idl:
Align Window.location with https://html.spec.whatwg.org/#the-window-object:
- Mark property as readonly.
- Add [PutsForward=href] IDL extended attribute.
Also, we need to mark the atribute as nullable as this reflects our current implementation.
We currently return null if the associated Window does not have a frame. This does not match
the specification and we should update our implementation in the future to never return null.

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

4 years agoUnreviewed, rolling out r216508.
jlewis3@apple.com [Tue, 9 May 2017 19:15:31 +0000 (19:15 +0000)]
Unreviewed, rolling out r216508.

The layout test enabled in this change is failing on Sierra.

Reverted changeset:

"Invalid MediaSource duration value should throw TyperError
instead of InvalidStateError"
https://bugs.webkit.org/show_bug.cgi?id=171653
http://trac.webkit.org/changeset/216508

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

4 years agoUpdate Chrome and Firefox versions in user agent quirks
mcatanzaro@igalia.com [Tue, 9 May 2017 18:44:34 +0000 (18:44 +0000)]
Update Chrome and Firefox versions in user agent quirks
https://bugs.webkit.org/show_bug.cgi?id=171823

Reviewed by Carlos Alberto Lopez Perez.

* platform/UserAgentQuirks.cpp:
(WebCore::UserAgentQuirks::stringForQuirk):
(WebCore::UserAgentQuirks::firefoxRevisionString):

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

4 years agoRealtimeOutgoingAudioSource is crashing when given data with more than two channels
commit-queue@webkit.org [Tue, 9 May 2017 18:42:47 +0000 (18:42 +0000)]
RealtimeOutgoingAudioSource is crashing when given data with more than two channels
https://bugs.webkit.org/show_bug.cgi?id=171868

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-09
Reviewed by Eric Carlson.

Manual testing.

* platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp:
(WebCore::libwebrtcAudioFormat): Capping the number of channels to 2.
(WebCore::RealtimeOutgoingAudioSource::audioSamplesAvailable):

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

4 years agoMarked media/element-containing-pip-video-going-into-fullscreen.html as flaky.
jlewis3@apple.com [Tue, 9 May 2017 18:34:27 +0000 (18:34 +0000)]
Marked media/element-containing-pip-video-going-into-fullscreen.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=162710

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

4 years agobuild ImageDiff with host SDK from Make
jbedard@apple.com [Tue, 9 May 2017 18:07:19 +0000 (18:07 +0000)]
build ImageDiff with host SDK from Make
https://bugs.webkit.org/show_bug.cgi?id=171835

Reviewed by Alexey Proskuryakov.

ImageDiff should be built for the default SDK and default architecture when
the SDKROOT is set to either iOS device or iOS simulator. Check the
DO_NOT_BUILD_IMAGE_DIFF flag to skip the ImageDiff build.

* ImageDiff/Makefile: Use Mac SDK when building for iOS Simulator or iOS device.
* Makefile: Do not build ImageDiff if the DO_NOT_BUILD_IMAGE_DIFF flag is set.

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

4 years agofont-stretch: normal selects expanded fonts instead of condensed fonts
mmaxfield@apple.com [Tue, 9 May 2017 18:02:12 +0000 (18:02 +0000)]
font-stretch: normal selects expanded fonts instead of condensed fonts
https://bugs.webkit.org/show_bug.cgi?id=171838
<rdar://problem/31005481>

Reviewed by Jon Lee.

Source/WebCore:

CSS Fonts level 3 says: "If the value of ‘font-stretch’ is ‘normal’ or one of the condensed
values, narrower width values are checked first, then wider values."

CSS Fonts level 4 erroneously was incompatible with this, but was updated in
https://github.com/w3c/csswg-drafts/commit/4559389d183bbaaf3321af5ba1c924caa7c488bb
to be consistent with this.

Now, CSS Fonts level 4 states: "If the desired stretch value is less than or equal to100,
stretch values below the desired stretch value are checked in descending order followed by
stretch values above the desired stretch value in ascending order"

Test: fast/text/font-width-100.html

* platform/graphics/FontSelectionAlgorithm.cpp:

LayoutTests:

* fast/text/font-width-100-expected.html: Added.
* fast/text/font-width-100.html: Added.

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

4 years agoMark storage/indexeddb/modern/idbtransaction-objectstore-failures.html as flaky.
jlewis3@apple.com [Tue, 9 May 2017 17:36:37 +0000 (17:36 +0000)]
Mark storage/indexeddb/modern/idbtransaction-objectstore-failures.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=171862

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

4 years agoUnreviewed, adding myself to contributors.json
jlewis3@apple.com [Tue, 9 May 2017 17:34:16 +0000 (17:34 +0000)]
Unreviewed, adding myself to contributors.json

* Scripts/webkitpy/common/config/contributors.json:

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

4 years ago[Readable Streams API] Enable creation of ReadableStreamBYOBReader
commit-queue@webkit.org [Tue, 9 May 2017 17:15:40 +0000 (17:15 +0000)]
[Readable Streams API] Enable creation of ReadableStreamBYOBReader
https://bugs.webkit.org/show_bug.cgi?id=171665

Patch by Romain Bellessort <romain.bellessort@crf.canon.fr> on 2017-05-09
Reviewed by Youenn Fablet.
LayoutTests/imported/w3c:

Updated expectations.

* web-platform-tests/streams/readable-byte-streams/general-expected.txt:
* web-platform-tests/streams/readable-byte-streams/general.dedicatedworker-expected.txt:

Source/WebCore:

Enabled the creation of ReadableStreamBYOBReader.

Test: streams/readable-stream-byob-reader.html

* CMakeLists.txt: Updated to support ReadableStreamBYOBReader.
* DerivedSources.cpp: Updated to support ReadableStreamBYOBReader.
* DerivedSources.make: Updated to support ReadableStreamBYOBReader.
* Modules/streams/ReadableByteStreamInternals.js: Updated to support ReadableStreamBYOBReader.
(privateInitializeReadableStreamBYOBReader):
(isReadableStreamBYOBReader):
* Modules/streams/ReadableStream.js: Updated to support ReadableStreamBYOBReader.
(getReader):
* Modules/streams/ReadableStreamBYOBReader.idl: Added.
* Modules/streams/ReadableStreamBYOBReader.js: Added.
(cancel): To be implemented.
(read): To be implemented.
(releaseLock): To be implemented.
(closed): To be implemented.
* WebCore.xcodeproj/project.pbxproj: Updated to support ReadableStreamBYOBReader.
* bindings/js/JSDOMGlobalObject.cpp: Updated to support ReadableStreamBYOBReader.
(WebCore::JSDOMGlobalObject::addBuiltinGlobals):
* bindings/js/JSReadableStreamPrivateConstructors.cpp: Updated to support ReadableStreamBYOBReader.
(WebCore::constructJSReadableStreamReaderGeneric):
(WebCore::constructJSReadableStreamDefaultReader):
(WebCore::constructJSReadableStreamBYOBReader):
(WebCore::JSBuiltinReadableStreamBYOBReaderPrivateConstructor::initializeExecutable):
(WebCore::createReadableStreamBYOBReaderPrivateConstructor):
* bindings/js/JSReadableStreamPrivateConstructors.h: Updated to support ReadableStreamBYOBReader.
* bindings/js/WebCoreBuiltinNames.h: Updated to support ReadableStreamBYOBReader.

LayoutTests:

Added test to check the creation of ReadableStreamBYOBReader. Also check
that created object has the right methods and properties.

* streams/readable-stream-byob-reader-expected.txt: Added.
* streams/readable-stream-byob-reader.html: Added.
* streams/readable-stream-byob-reader.js: Added.

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

4 years agoForce StaticStringImpl constructor to use the constexpr versions of StringImplShape...
mark.lam@apple.com [Tue, 9 May 2017 17:11:27 +0000 (17:11 +0000)]
Force StaticStringImpl constructor to use the constexpr versions of StringImplShape constructors.
https://bugs.webkit.org/show_bug.cgi?id=171861

Reviewed by Yusuke Suzuki.

This is strictly necessary for correctness of the StaticStringImpl implementation.
We force the constructor selection by adding an extra dummy argument to the
constexpr versions of the StringImplShape constructors to disambiguate them from
the non-constexpr versions.

* wtf/text/StringImpl.h:
(WTF::StringImplShape::StringImplShape):
(WTF::StringImpl::StaticStringImpl::StaticStringImpl):

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

4 years agoPrint more properties in the output of scrolling trees
commit-queue@webkit.org [Tue, 9 May 2017 17:10:58 +0000 (17:10 +0000)]
Print more properties in the output of scrolling trees
https://bugs.webkit.org/show_bug.cgi?id=171858

Patch by Frederic Wang <fwang@igalia.com> on 2017-05-09
Reviewed by Simon Fraser.

Source/WebCore:

No new tests, no behavior changes.

* page/scrolling/ScrollingCoordinator.cpp: Implement << operator to print ScrollableAreaParameters.
(WebCore::operator<<):
* page/scrolling/ScrollingCoordinator.h: Declare new << operator.
* page/scrolling/ScrollingStateFrameScrollingNode.cpp: Print new properties.
(WebCore::ScrollingStateFrameScrollingNode::dumpProperties):
* page/scrolling/ScrollingStateScrollingNode.cpp: ditto.
(WebCore::ScrollingStateScrollingNode::dumpProperties):
* page/scrolling/ScrollingTreeScrollingNode.cpp: ditto.
(WebCore::ScrollingTreeScrollingNode::dumpProperties):

LayoutTests:

Update text expectations to include new properties.

* fast/scrolling/ios/remove-scrolling-role-expected.txt:
* fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-expected.txt:
* fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-then-up-expected.txt:
* fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolling-layers-state-expected.txt:
* tiled-drawing/scrolling/clamp-out-of-bounds-scrolls-expected.txt:
* tiled-drawing/scrolling/fixed/absolute-inside-fixed-expected.txt:
* tiled-drawing/scrolling/fixed/absolute-inside-out-of-view-fixed-expected.txt:
* tiled-drawing/scrolling/fixed/fixed-in-overflow-expected.txt:
* tiled-drawing/scrolling/fixed/fixed-position-out-of-view-expected.txt:
* tiled-drawing/scrolling/fixed/fixed-position-out-of-view-negative-zindex-expected.txt:
* tiled-drawing/scrolling/fixed/four-bars-expected.txt:
* tiled-drawing/scrolling/fixed/four-bars-with-header-and-footer-expected.txt:
* tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt:
* tiled-drawing/scrolling/fixed/negative-scroll-offset-expected.txt:
* tiled-drawing/scrolling/fixed/negative-scroll-offset-in-view-expected.txt:
* tiled-drawing/scrolling/fixed/nested-fixed-expected.txt:
* tiled-drawing/scrolling/fixed/percentage-inside-fixed-expected.txt:
* tiled-drawing/scrolling/frames/coordinated-frame-expected.txt:
* tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor-expected.txt:
* tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt:
* tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor-expected.txt:
* tiled-drawing/scrolling/frames/fixed-inside-frame-expected.txt:
* tiled-drawing/scrolling/frames/remove-coordinated-frame-expected.txt:
* tiled-drawing/scrolling/frames/scroll-region-after-frame-layout-expected.txt:
* tiled-drawing/scrolling/scrolling-tree-after-scroll-expected.txt:
* tiled-drawing/scrolling/scrolling-tree-slow-scrolling-expected.txt:
* tiled-drawing/scrolling/sticky/negative-scroll-offset-expected.txt:
* tiled-drawing/scrolling/sticky/sticky-horizontal-expected.txt:
* tiled-drawing/scrolling/sticky/sticky-vertical-expected.txt:

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

4 years agoontransitionend eventHandler should be in GlobalEventHandlers
cdumez@apple.com [Tue, 9 May 2017 16:51:00 +0000 (16:51 +0000)]
ontransitionend eventHandler should be in GlobalEventHandlers
https://bugs.webkit.org/show_bug.cgi?id=171836

Reviewed by Ryosuke Niwa.

Source/WebCore:

ontransitionend eventHandler should be in GlobalEventHandlers:
- https://drafts.csswg.org/css-transitions/#interface-globaleventhandlers-idl

WebKit currently has in on Window and Element only. Firefox matches the specification.

Test: fast/css/ontransitionend-eventhandler.html

* dom/Element.idl:
* dom/GlobalEventHandlers.idl:
* page/DOMWindow.idl:

LayoutTests:

* fast/css/ontransitionend-eventhandler-expected.txt: Added.
* fast/css/ontransitionend-eventhandler.html: Added.
Add layout test coverage.

* fast/dom/event-handler-attributes-expected.txt:
* fast/dom/event-handler-attributes.html:
* js/dom/dom-static-property-for-in-iteration-expected.txt:
Rebaseline existing tests to reflect behavior change.

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

4 years agoMediaSource.readyState should use an IDL enum
nael.ouedraogo@crf.canon.fr [Tue, 9 May 2017 16:00:22 +0000 (16:00 +0000)]
MediaSource.readyState should use an IDL enum
https://bugs.webkit.org/show_bug.cgi?id=171672

Reviewed by Eric Carlson and Chris Dumez.

MediaSource.readyState should use an IDL enum as per specification
(https://www.w3.org/TR/2016/CR-media-source-20160503/#idl-def-ReadyState).

No new tests required since no behavior change.

* Modules/mediasource/MediaSource.cpp:
(WebCore::toString):
(WebCore::MediaSource::MediaSource):
(WebCore::MediaSource::setPrivateAndOpen):
(WebCore::MediaSource::buffered):
(WebCore::MediaSource::setReadyState):
(WebCore::MediaSource::streamEndedWithError):
(WebCore::MediaSource::isOpen):
(WebCore::MediaSource::isClosed):
(WebCore::MediaSource::isEnded):
(WebCore::MediaSource::detachFromElement):
(WebCore::MediaSource::openIfInEndedState):
(WebCore::MediaSource::stop):
(WebCore::MediaSource::onReadyStateChange):
* Modules/mediasource/MediaSource.h:
* Modules/mediasource/MediaSource.idl:

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

4 years agoInvalid MediaSource duration value should throw TyperError instead of InvalidStateError
nael.ouedraogo@crf.canon.fr [Tue, 9 May 2017 15:58:09 +0000 (15:58 +0000)]
Invalid MediaSource duration value should throw TyperError instead of InvalidStateError
https://bugs.webkit.org/show_bug.cgi?id=171653

Reviewed by Youenn Fablet.

Modify MediaSource::setDuration to throw a TypeError when duration value is invalid as per MSE specification
(https://www.w3.org/TR/2016/REC-media-source-20161117/#dom-mediasource-duration).

Update expectation of corresponding WPT test.

Source/WebCore:

* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::setDuration):
(WebCore::MediaSource::setDurationInternal):

LayoutTests:

* platform/gtk/TestExpectations:
* platform/gtk/imported/w3c/web-platform-tests/media-source/mediasource-duration-boundaryconditions-expected.txt: Added.
* platform/mac/TestExpectations:
* platform/mac/imported/w3c/web-platform-tests/media-source/mediasource-duration-boundaryconditions-expected.txt: Added.

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

4 years agoUnreviewed, update binding-tests results
utatane.tea@gmail.com [Tue, 9 May 2017 15:06:28 +0000 (15:06 +0000)]
Unreviewed, update binding-tests results
https://bugs.webkit.org/show_bug.cgi?id=166752

* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:

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

4 years agoUpdate DocumentOrShadowRoot.idl to match specifications
cdumez@apple.com [Tue, 9 May 2017 15:04:12 +0000 (15:04 +0000)]
Update DocumentOrShadowRoot.idl to match specifications
https://bugs.webkit.org/show_bug.cgi?id=171845

Reviewed by Ryosuke Niwa.

Update DocumentOrShadowRoot.idl to match specifications:
- https://dom.spec.whatwg.org/#mixin-documentorshadowroot
- https://w3c.github.io/webcomponents/spec/shadow/#extensions-to-the-documentorshadowroot-mixin
- https://w3c.github.io/pointerlock/#extensions-to-the-documentorshadowroot-mixin

No Web-facing behavior change. Things that do not match the specification were merely
annotated with FIXME comments.

* dom/Document.idl:
* dom/DocumentOrShadowRoot.idl:

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

4 years agoREGRESSION: ImageDiff not building with make
jbedard@apple.com [Tue, 9 May 2017 14:53:01 +0000 (14:53 +0000)]
REGRESSION: ImageDiff not building with make
https://bugs.webkit.org/show_bug.cgi?id=171788

Reviewed by Alex Christensen.

* Makefile: Build ImageDiff for all platforms.

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

4 years ago[Win] ImageDiff isn't built since Bug 168945
commit-queue@webkit.org [Tue, 9 May 2017 14:50:54 +0000 (14:50 +0000)]
[Win] ImageDiff isn't built since Bug 168945
https://bugs.webkit.org/show_bug.cgi?id=171847

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-05-09
Reviewed by Alex Christensen.

* CMakeLists.txt: Add 'ImageDiff' sub-directory to build if WIN32.
* ImageDiff/ImageDiff.cpp: Include some header files to fix compilation errors.
* ImageDiff/PlatformWin.cmake: Define USE_CAIRO if WinCairo port.

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

4 years agoUnreviewed, attempt to fix macOS ports using ApplePay
utatane.tea@gmail.com [Tue, 9 May 2017 13:00:57 +0000 (13:00 +0000)]
Unreviewed, attempt to fix macOS ports using ApplePay
https://bugs.webkit.org/show_bug.cgi?id=166752

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):

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

4 years ago[Coordinated Graphics] Debug Visuals don't hide
commit-queue@webkit.org [Tue, 9 May 2017 12:38:43 +0000 (12:38 +0000)]
[Coordinated Graphics] Debug Visuals don't hide
https://bugs.webkit.org/show_bug.cgi?id=162704

Patch by Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com> on 2017-05-09
Reviewed by Žan Doberšek.

Source/WebCore:

* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::setShowDebugBorder):
(WebCore::CoordinatedGraphicsLayer::setShowRepaintCounter):
(WebCore::CoordinatedGraphicsLayer::syncLayerState):
(WebCore::CoordinatedGraphicsLayer::setDebugBorder):
showDebugBorders() and showRepaintCounter() of CoordinatedGraphicsLayer should reflect
the "show" argument to the layer state.

* platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
(WebCore::DebugVisuals::DebugVisuals):
(WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
To set the debug visuals of a layer, the visibility flags of the borders and the repaint
counters as well as the border width and color are needed. Thus a new bundle struct
DebugVisuals and its change flag debugVisualsChanged have been introduced in order to
send the information at once.

Source/WebKit2:

* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::encode):
(IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::decode):
(IPC::ArgumentCoder<DebugVisuals>::encode):
(IPC::ArgumentCoder<DebugVisuals>::decode):
The encoder and decoder for DebugVisuals have been added.

* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::setLayerState):
Update the debug visuals of a layer according to the DebugVisuals information
if the debugVisualsChanged flag is set to true.

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

4 years agoHandle IDLPromise<> properly
utatane.tea@gmail.com [Tue, 9 May 2017 12:17:21 +0000 (12:17 +0000)]
Handle IDLPromise<> properly
https://bugs.webkit.org/show_bug.cgi?id=166752

Reviewed by Youenn Fablet.

Source/JavaScriptCore:

Add JSPromise::resolve static function.
This applies `Promise.resolve()` conversion to a given value.

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::promiseResolveFunction):
* runtime/JSPromise.cpp:
(JSC::JSPromise::resolve):
* runtime/JSPromise.h:

Source/WebCore:

This patch implements WebIDL Promise type conversion. According to the spec,
Promise takes a value and convert it to Promise by using Promise.resolve function.
We implement JSPromise::resolve in JSC and use it in JSDOMConvertPromise.

In conversion phase, we just convert the value to JSC::JSPromise* and hold it in
PromiseRejectionEvent. On the other hand, In this patch, we newly introduce a new
type DOMPromise and use it in RejectedPromiseTracker. And we also rename the previous
DOMPromise to DOMPromiseDeferred since it is corresponding to JSPromiseDeferred.
DOMPromise is DOMGuarded object. So it is strongly referenced from ScriptExecutionContext
and it is weakly referenced from the object itself. This is important since Strong<JSPromise>
reference in C++ object that has a wrapper (in this case, PromiseRejectionEvent) easily causes
cyclic reference. We hold it as DOMPromise instead of Strong<JSPromise> in RejectedPromiseTracker
to break the cyclic reference edge with weak reference.

In the meantime, we still use JSC::Strong<> in PromiseRejectionEvent. It leaks memory if promise
refers the wrapper object of PromiseRejectionEvent. CustomEvent also has the same problem.
This is a general problem that `attribute any` can create cyclic reference. And they should be
fixed in a different patch.

Currently, we do not take the following approach. e.g. There is C++ object that represents Promise.
And its wrapper object is JSPromise thing. When exposing the C++ object, it will be converted to a
wrapper object. We do not take this approach because PromiseRejectionEvent can take user-provided promise.
For example, users can create PromiseRejectionEvent in a form
`new PromiseRejectionEvent("...", { promise: promise })`. In this case, `event.promise === promise`
is required. And this is not suitable for the above C++ object model.

Large part of this patch is mechanical one to replace DOMPromise with DOMPromiseDeferred.

* CMakeLists.txt:
* Modules/applepay/ApplePaySession.cpp:
* Modules/encryptedmedia/MediaKeySession.h:
* Modules/encryptedmedia/MediaKeySystemAccess.h:
* Modules/encryptedmedia/MediaKeys.h:
* Modules/encryptedmedia/NavigatorEME.h:
* Modules/fetch/DOMWindowFetch.h:
* Modules/fetch/FetchBody.h:
* Modules/fetch/FetchBodyConsumer.h:
* Modules/fetch/FetchResponse.h:
* Modules/fetch/WorkerGlobalScopeFetch.h:
* Modules/mediastream/MediaDevices.h:
* Modules/mediastream/MediaEndpointPeerConnection.cpp:
(WebCore::MediaEndpointPeerConnection::replaceTrack):
(WebCore::MediaEndpointPeerConnection::replaceTrackTask):
* Modules/mediastream/MediaEndpointPeerConnection.h:
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::applyConstraints):
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/PeerConnectionBackend.cpp:
(WebCore::PeerConnectionBackend::setLocalDescription):
(WebCore::PeerConnectionBackend::setRemoteDescription):
(WebCore::PeerConnectionBackend::addIceCandidate):
* Modules/mediastream/PeerConnectionBackend.h:
(WebCore::PeerConnectionBackend::endOfIceCandidates):
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::queuedSetLocalDescription):
(WebCore::RTCPeerConnection::queuedSetRemoteDescription):
(WebCore::RTCPeerConnection::queuedAddIceCandidate):
(WebCore::RTCPeerConnection::enqueueReplaceTrackTask):
(WebCore::RTCPeerConnection::replaceTrack):
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/RTCRtpSender.cpp:
(WebCore::RTCRtpSender::replaceTrack):
* Modules/mediastream/RTCRtpSender.h:
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::start):
(WebCore::UserMediaRequest::UserMediaRequest):
* Modules/mediastream/UserMediaRequest.h:
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
(WebCore::LibWebRTCPeerConnectionBackend::replaceTrack):
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
* Modules/streams/ReadableStreamSource.h:
(WebCore::ReadableStreamSource::start):
(WebCore::ReadableStreamSource::pull):
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::addReaction):
(WebCore::AudioContext::setState):
(WebCore::AudioContext::suspend):
(WebCore::AudioContext::resume):
(WebCore::AudioContext::close):
* Modules/webaudio/AudioContext.h:
* WebCore.xcodeproj/project.pbxproj:
* bindings/IDLTypes.h:
* bindings/js/CachedModuleScriptLoaderClient.h:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSCustomElementRegistryCustom.cpp:
* bindings/js/JSDOMConvertPromise.h:
(WebCore::Converter<IDLPromise<T>>::convert):
(WebCore::JSConverter<IDLPromise<T>>::convert):
* bindings/js/JSDOMExceptionHandling.cpp:
* bindings/js/JSDOMGlobalObject.cpp:
* bindings/js/JSDOMGuardedObject.h:
* bindings/js/JSDOMPromise.h:
(WebCore::DOMPromise::create):
(WebCore::DOMPromise::promise):
(WebCore::DOMPromise::DOMPromise):
(WebCore::DeferredPromise::create): Deleted.
(WebCore::DeferredPromise::resolve): Deleted.
(WebCore::DeferredPromise::resolveWithNewlyCreated): Deleted.
(WebCore::DeferredPromise::reject): Deleted.
(WebCore::DeferredPromise::resolveWithCallback): Deleted.
(WebCore::DeferredPromise::rejectWithCallback): Deleted.
(WebCore::DeferredPromise::DeferredPromise): Deleted.
(WebCore::DeferredPromise::deferred): Deleted.
(WebCore::DOMPromiseBase::DOMPromiseBase): Deleted.
(WebCore::DOMPromiseBase::operator=): Deleted.
(WebCore::DOMPromiseBase::reject): Deleted.
(WebCore::DOMPromiseBase::rejectType): Deleted.
(WebCore::DOMPromiseBase::promise): Deleted.
(WebCore::DOMPromise::resolve): Deleted.
(WebCore::DOMPromise<void>::resolve): Deleted.
(WebCore::callPromiseFunction): Deleted.
(WebCore::bindingPromiseFunctionAdapter): Deleted.
* bindings/js/JSDOMPromiseDeferred.cpp: Renamed from Source/WebCore/bindings/js/JSDOMPromise.cpp.
(WebCore::DeferredPromise::promise):
(WebCore::DeferredPromise::callFunction):
(WebCore::DeferredPromise::reject):
(WebCore::rejectPromiseWithExceptionIfAny):
(WebCore::createDeferredPromise):
(WebCore::createRejectedPromiseWithTypeError):
(WebCore::parseAsJSON):
(WebCore::fulfillPromiseWithJSON):
(WebCore::fulfillPromiseWithArrayBuffer):
* bindings/js/JSDOMPromiseDeferred.h: Copied from Source/WebCore/bindings/js/JSDOMPromise.h.
(WebCore::DeferredPromise::create):
(WebCore::DeferredPromise::resolve):
(WebCore::DeferredPromise::resolveWithNewlyCreated):
(WebCore::DeferredPromise::reject):
(WebCore::DeferredPromise::resolveWithCallback):
(WebCore::DeferredPromise::rejectWithCallback):
(WebCore::DeferredPromise::DeferredPromise):
(WebCore::DeferredPromise::deferred):
(WebCore::DOMPromiseDeferredBase::DOMPromiseDeferredBase):
(WebCore::DOMPromiseDeferredBase::operator=):
(WebCore::DOMPromiseDeferredBase::reject):
(WebCore::DOMPromiseDeferredBase::rejectType):
(WebCore::DOMPromiseDeferredBase::promise):
(WebCore::DOMPromiseDeferred::resolve):
(WebCore::DOMPromiseDeferred<void>::resolve):
(WebCore::callPromiseFunction):
(WebCore::bindingPromiseFunctionAdapter):
* bindings/js/JSSubtleCryptoCustom.cpp:
* bindings/js/JSWebGPUCommandBufferCustom.cpp:
* bindings/js/JSWebKitSubtleCryptoCustom.cpp:
* bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp: Added.
(WebCore::convertDictionary<TestPromiseRejectionEvent::Init>):
(WebCore::JSTestPromiseRejectionEventPrototype::create):
(WebCore::JSTestPromiseRejectionEventPrototype::createStructure):
(WebCore::JSTestPromiseRejectionEventPrototype::JSTestPromiseRejectionEventPrototype):
(WebCore::JSTestPromiseRejectionEventConstructor::construct):
(WebCore::JSTestPromiseRejectionEventConstructor::prototypeForStructure):
(WebCore::JSTestPromiseRejectionEventConstructor::initializeProperties):
(WebCore::JSTestPromiseRejectionEventPrototype::finishCreation):
(WebCore::JSTestPromiseRejectionEvent::JSTestPromiseRejectionEvent):
(WebCore::JSTestPromiseRejectionEvent::finishCreation):
(WebCore::JSTestPromiseRejectionEvent::createPrototype):
(WebCore::JSTestPromiseRejectionEvent::prototype):
(WebCore::BindingCaller<JSTestPromiseRejectionEvent>::castForAttribute):
(WebCore::jsTestPromiseRejectionEventPromise):
(WebCore::jsTestPromiseRejectionEventPromiseGetter):
(WebCore::jsTestPromiseRejectionEventReason):
(WebCore::jsTestPromiseRejectionEventReasonGetter):
(WebCore::jsTestPromiseRejectionEventConstructor):
(WebCore::setJSTestPromiseRejectionEventConstructor):
(WebCore::JSTestPromiseRejectionEvent::getConstructor):
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestPromiseRejectionEvent.h: Added.
(WebCore::JSTestPromiseRejectionEvent::create):
(WebCore::JSTestPromiseRejectionEvent::createStructure):
(WebCore::JSTestPromiseRejectionEvent::wrapped):
(WebCore::toJS):
(WebCore::toJSNewlyCreated):
* bindings/scripts/test/TestPromiseRejectionEvent.idl: Copied from Source/WebCore/bindings/js/CachedModuleScriptLoaderClient.h.
* css/FontFace.h:
* css/FontFaceSet.h:
* dom/CustomElementRegistry.h:
* dom/PromiseRejectionEvent.h:
* dom/RejectedPromiseTracker.cpp:
(WebCore::UnhandledPromise::UnhandledPromise):
(WebCore::UnhandledPromise::callStack):
(WebCore::UnhandledPromise::promise):
(WebCore::RejectedPromiseTracker::promiseRejected):
(WebCore::RejectedPromiseTracker::promiseHandled):
(WebCore::RejectedPromiseTracker::reportUnhandledRejections):
(WebCore::RejectedPromiseTracker::reportRejectionHandled):
(WebCore::RejectedPromise::RejectedPromise): Deleted.
(WebCore::RejectedPromise::globalObject): Deleted.
(WebCore::RejectedPromise::promise): Deleted.
* dom/RejectedPromiseTracker.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::rejectPendingPlayPromises):
(WebCore::HTMLMediaElement::resolvePendingPlayPromises):
(WebCore::HTMLMediaElement::play):
* html/HTMLMediaElement.h:
* platform/graphics/gpu/GPUCommandBuffer.h:
* testing/Internals.h:

LayoutTests:

* js/dom/promise-rejection-event-should-follow-webidl-promise-conversion-rule-expected.txt: Added.
* js/dom/promise-rejection-event-should-follow-webidl-promise-conversion-rule.html: Added.

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

4 years agoUnreviewed. Landing the WPE layout test baselines.
zandobersek@gmail.com [Tue, 9 May 2017 12:03:49 +0000 (12:03 +0000)]
Unreviewed. Landing the WPE layout test baselines.

Baseline filenames are omitted for brevity.

* platform/wpe/TestExpectations: Added.
* platform/wpe/animations/: Added.
* platform/wpe/css1/: Added.
* platform/wpe/css2.1/: Added.
* platform/wpe/css3/: Added.
* platform/wpe/fast/: Added.
* platform/wpe/ietestcenter/: Added.
* platform/wpe/js/: Added.
* platform/wpe/scrollbars/: Added.
* platform/wpe/security/: Added.
* platform/wpe/sputnik/: Added.
* platform/wpe/tables/: Added.
* platform/wpe/transforms/: Added.
* platform/wpe/transitions/: Added.

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

4 years agoUpstream the WPE port
zandobersek@gmail.com [Tue, 9 May 2017 11:07:57 +0000 (11:07 +0000)]
Upstream the WPE port
https://bugs.webkit.org/show_bug.cgi?id=171110

Reviewed by Alex Christensen.

.:

webkit-dev thread:
https://lists.webkit.org/pipermail/webkit-dev/2017-April/028923.html

* CMakeLists.txt: Add the WPE port identifier.
* Source/cmake/FindLibGBM.cmake: Added.
* Source/cmake/FindWPEBackend-mesa.cmake: Added.
* Source/cmake/FindWPEBackend.cmake: Added.
* Source/cmake/OptionsWPE.cmake: Added.

Source/JavaScriptCore:

* PlatformWPE.cmake: Added.
* shell/PlatformWPE.cmake: Added.

Source/ThirdParty/ANGLE:

* include/EGL/eglplatform.h:
Allow building WPE on platforms that don't provide X11 libraries.

Source/WebCore:

webkit-dev thread:
https://lists.webkit.org/pipermail/webkit-dev/2017-April/028923.html

Existing files mostly changed to properly use PLATFORM(WPE) build guards.
In-file changes removed from this ChangeLog entry for brevity.

* CMakeLists.txt:
* PlatformWPE.cmake: Added.
* accessibility/AccessibilityObject.h:
* accessibility/wpe/AXObjectCacheWPE.cpp: Added.
* accessibility/wpe/AccessibilityObjectWPE.cpp: Copied from Source/WebCore/platform/audio/glib/AudioBusGLib.cpp.
* config.h:
* crypto/keys/CryptoKeyEC.h:
* crypto/keys/CryptoKeyRSA.h:
* editing/Editor.cpp:
* editing/Editor.h:
* editing/wpe/EditorWPE.cpp: Added.
* page/EventHandler.cpp:
* page/wpe/EventHandlerWPE.cpp: Added.
* platform/Cursor.h:
* platform/DragData.h:
* platform/DragImage.h:
* platform/FileSystem.h:
* platform/MainThreadSharedTimer.cpp:
* platform/MainThreadSharedTimer.h:
* platform/Pasteboard.h:
* platform/PasteboardStrategy.h:
* platform/PlatformPasteboard.h:
* platform/SchemeRegistry.cpp:
* platform/Widget.h:
* platform/audio/glib/AudioBusGLib.cpp:
* platform/glib/FileSystemGlib.cpp:
* platform/graphics/ANGLEWebKitBridge.h:
* platform/graphics/GLContext.cpp:
* platform/graphics/GLContext.h:
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/OpenGLESShims.h:
* platform/graphics/PlatformDisplay.cpp:
* platform/graphics/PlatformDisplay.h:
* platform/graphics/egl/GLContextEGL.cpp:
* platform/graphics/egl/GLContextEGL.h:
* platform/graphics/egl/GLContextEGLWPE.cpp: Copied from Source/WebCore/platform/audio/glib/AudioBusGLib.cpp.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
* platform/graphics/wpe/IconWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* platform/graphics/wpe/ImageWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* platform/graphics/wpe/PlatformDisplayWPE.cpp: Added.
* platform/graphics/wpe/PlatformDisplayWPE.h: Added.
* platform/wpe/CursorWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* platform/wpe/LocalizedStringsWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* platform/wpe/PasteboardWPE.cpp: Added.
* platform/wpe/PlatformKeyboardEventWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* platform/wpe/PlatformPasteboardWPE.cpp: Added.
* platform/wpe/PlatformScreenWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* platform/wpe/RenderThemeWPE.cpp: Copied from Source/WebKit2/Shared/NativeWebWheelEvent.h.
* platform/wpe/RenderThemeWPE.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* platform/wpe/ScrollbarThemeWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* platform/wpe/ScrollbarThemeWPE.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* platform/wpe/SoundWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* platform/wpe/ThemeWPE.cpp: Added.
* platform/wpe/ThemeWPE.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* platform/wpe/WidgetWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.

Source/WebCore/PAL:

* pal/PlatformWPE.cmake: Added.

Source/WebKit2:

webkit-dev thread:
https://lists.webkit.org/pipermail/webkit-dev/2017-April/028923.html

Existing files changed to properly use PLATFORM(WPE) build guards or other
WPE-specific additions (e.g. pasteboard support).
In-file changes removed from this ChangeLog entry for brevity.

* Platform/IPC/glib/GSocketMonitor.cpp:
* PlatformWPE.cmake: Added.
* Scripts/generate-forwarding-headers.pl:
* Shared/API/c/WKBase.h:
* Shared/API/c/wpe/WKBaseWPE.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* Shared/API/c/wpe/WebKit.h: Added.
* Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
* Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
* Shared/DrawingAreaInfo.h:
* Shared/NativeWebKeyboardEvent.h:
* Shared/NativeWebMouseEvent.h:
* Shared/NativeWebTouchEvent.h:
* Shared/NativeWebWheelEvent.h:
* Shared/WebCoreArgumentCoders.cpp:
* Shared/WebCoreArgumentCoders.h:
* Shared/WebPreferencesDefinitions.h:
* Shared/wpe/NativeWebKeyboardEventWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* Shared/wpe/NativeWebMouseEventWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* Shared/wpe/NativeWebTouchEventWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* Shared/wpe/NativeWebWheelEventWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* Shared/wpe/ProcessExecutablePathWPE.cpp: Added.
* Shared/wpe/WebEventFactory.cpp: Added.
* Shared/wpe/WebEventFactory.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/wpe/WKAPICastWPE.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* UIProcess/API/C/wpe/WKView.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* UIProcess/API/C/wpe/WKView.h: Copied from Source/WebKit2/Shared/NativeWebWheelEvent.h.
* UIProcess/API/wpe/CompositingManagerProxy.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* UIProcess/API/wpe/CompositingManagerProxy.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* UIProcess/API/wpe/CompositingManagerProxy.messages.in: Added.
* UIProcess/API/wpe/DrawingAreaProxyWPE.cpp: Added.
* UIProcess/API/wpe/DrawingAreaProxyWPE.h: Copied from Source/WebKit2/Shared/NativeWebWheelEvent.h.
* UIProcess/API/wpe/PageClientImpl.cpp: Added.
* UIProcess/API/wpe/PageClientImpl.h: Added.
* UIProcess/API/wpe/ScrollGestureController.cpp: Added.
* UIProcess/API/wpe/ScrollGestureController.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* UIProcess/API/wpe/WPEView.cpp: Added.
* UIProcess/API/wpe/WPEView.h: Added.
* UIProcess/API/wpe/WPEViewClient.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* UIProcess/API/wpe/WPEViewClient.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* UIProcess/API/wpe/WebKit2InspectorGResourceBundle.xml: Added.
* UIProcess/ChildProcessProxy.cpp:
* UIProcess/Launcher/ProcessLauncher.h:
* UIProcess/Launcher/wpe/ProcessLauncherWPE.cpp: Added.
* UIProcess/WebInspectorProxy.h:
* UIProcess/WebPasteboardProxy.h:
* UIProcess/WebPasteboardProxy.messages.in:
* UIProcess/WebProcessPool.cpp:
* UIProcess/wpe/TextCheckerWPE.cpp: Added.
* UIProcess/wpe/WebInspectorProxyWPE.cpp: Added.
* UIProcess/wpe/WebPageProxyWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* UIProcess/wpe/WebPasteboardProxyWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* UIProcess/wpe/WebPreferencesWPE.cpp: Copied from Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h.
* UIProcess/wpe/WebProcessPoolWPE.cpp: Added.
* WebKit2.xcodeproj/project.pbxproj:
* WebKit2Prefix.h:
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
* WebProcess/WebCoreSupport/wpe/WebContextMenuClientWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp: Added.
* WebProcess/WebCoreSupport/wpe/WebPopupMenuWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
* WebProcess/WebPage/DrawingArea.cpp:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/wpe/CompositingManager.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* WebProcess/WebPage/wpe/CompositingManager.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* WebProcess/WebPage/wpe/DrawingAreaWPE.cpp: Added.
* WebProcess/WebPage/wpe/DrawingAreaWPE.h: Added.
* WebProcess/WebPage/wpe/WebInspectorUIWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* WebProcess/WebPage/wpe/WebInspectorWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* WebProcess/WebPage/wpe/WebPageWPE.cpp: Copied from Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h.
* WebProcess/wpe/WebProcessMainWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* wpe/wpe-webkit.pc.in: Added.

Source/WTF:

* wtf/Platform.h:
* wtf/PlatformWPE.cmake: Added.
* wtf/glib/RunLoopSourcePriority.h:

Tools:

webkit-dev thread:
https://lists.webkit.org/pipermail/webkit-dev/2017-April/028923.html

Add WPE support to various tooling scripts, TestWebKitAPI and WebKitTestRunner.
In-file changes removed from this ChangeLog entry for brevity.

* BuildSlaveSupport/built-product-archive:
* BuildSlaveSupport/test-result-archive:
* CMakeLists.txt:
* ImageDiff/PlatformWPE.cmake: Added.
* Scripts/build-dumprendertree:
* Scripts/build-webkit:
* Scripts/build-webkittestrunner:
* Scripts/update-webkit-libs-jhbuild:
* Scripts/update-webkitwpe-libs: Added.
* Scripts/webkitdirs.pm:
* Scripts/webkitperl/FeatureList.pm:
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
* Scripts/webkitpy/port/factory.py:
* Scripts/webkitpy/port/wpe.py: Added.
* TestWebKitAPI/PlatformWPE.cmake: Added.
* TestWebKitAPI/wpe/InjectedBundleControllerWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* TestWebKitAPI/wpe/PlatformUtilitiesWPE.cpp: Added.
* TestWebKitAPI/wpe/main.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
* WebKitTestRunner/InjectedBundle/AccessibilityController.h:
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/InjectedBundle/wpe/AccessibilityControllerWPE.cpp: Added.
* WebKitTestRunner/InjectedBundle/wpe/AccessibilityUIElementWPE.cpp: Added.
* WebKitTestRunner/InjectedBundle/wpe/ActivateFontsWPE.cpp: Added.
* WebKitTestRunner/InjectedBundle/wpe/InjectedBundleWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* WebKitTestRunner/InjectedBundle/wpe/TestRunnerWPE.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* WebKitTestRunner/PlatformWPE.cmake: Added.
* WebKitTestRunner/PlatformWebView.h:
* WebKitTestRunner/TestController.cpp:
* WebKitTestRunner/wpe/EventSenderProxyWPE.cpp: Added.
* WebKitTestRunner/wpe/HeadlessViewBackend.cpp: Added.
* WebKitTestRunner/wpe/HeadlessViewBackend.h: Copied from Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h.
* WebKitTestRunner/wpe/PlatformWebViewWPE.cpp: Added.
* WebKitTestRunner/wpe/TestControllerWPE.cpp: Added.
* WebKitTestRunner/wpe/main.cpp: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
* jhbuild/jhbuild-wrapper:
* wpe/generate-inspector-gresource-manifest.py: Added.
* wpe/jhbuild.modules: Added.
* wpe/jhbuildrc: Added.
* wpe/patches/cairo-egl-device-create-for-egl-surface.patch: Added.
* wpe/patches/fontconfig-C-11-requires-a-space-between-literal-and-identifier.patch: Added.
* wpe/patches/freetype6-2.4.11-truetype-font-height-fix.patch: Added.
* wpe/patches/gdate-suppress-string-format-literal-warning.patch: Added.
* wpe/patches/glib-warning-fix.patch: Added.
* wpe/patches/gst-plugins-bad-0001-dtls-port-to-OpenSSL-1.1.0.patch: Added.
* wpe/patches/gst-plugins-bad-0002-dtlscertificate-Fix-error-checking-in-RSA_generate_k.patch: Added.
* wpe/patches/gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch: Added.
* wpe/patches/gst-plugins-good-use-the-tfdt-decode-time.patch: Added.
* wpe/patches/gstreamer-typefind-Only-push-a-CAPS-event-downstream-if-the-.patch: Added.

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

4 years agoFix property names in ScrollingTreeScrollingNode::dumpProperties
commit-queue@webkit.org [Tue, 9 May 2017 09:41:49 +0000 (09:41 +0000)]
Fix property names in ScrollingTreeScrollingNode::dumpProperties
https://bugs.webkit.org/show_bug.cgi?id=171848

Patch by Frederic Wang <fwang@igalia.com> on 2017-05-09
Reviewed by Gyuyoung Kim.

No new tests, this function is only used for debugging purpose.

* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::dumpProperties):

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

4 years ago[GTK] Building Webkit2Gtk without OpenGL fails.
carlosgc@webkit.org [Tue, 9 May 2017 07:45:14 +0000 (07:45 +0000)]
[GTK] Building Webkit2Gtk without OpenGL fails.
https://bugs.webkit.org/show_bug.cgi?id=170959

Reviewed by Žan Doberšek.

Source/WebCore:

* platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp:
* platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h:
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:

Source/WebKit2:

* UIProcess/gtk/HardwareAccelerationManager.cpp:
(WebKit::HardwareAccelerationManager::HardwareAccelerationManager):

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

4 years ago[AppleWin] CaptureDeviceManager.cpp: error C2813: #import is not supported with /MP
commit-queue@webkit.org [Tue, 9 May 2017 07:37:03 +0000 (07:37 +0000)]
[AppleWin] CaptureDeviceManager.cpp: error C2813: #import is not supported with /MP
https://bugs.webkit.org/show_bug.cgi?id=171849

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-05-09
Reviewed by Per Arne Vollan.

* platform/mediastream/CaptureDeviceManager.cpp: Replaced #import with #include.

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

4 years agoCallLinkInfos belonging to Wasm->JS stubs need to be informed when we clearCode(...
sbarati@apple.com [Tue, 9 May 2017 07:15:01 +0000 (07:15 +0000)]
CallLinkInfos belonging to Wasm->JS stubs need to be informed when we clearCode() from all Executables
https://bugs.webkit.org/show_bug.cgi?id=171707
<rdar://problem/31891649>

Reviewed by Filip Pizlo.

This patch fixes a bug where a Wasm->JS IC call stub would go stale
and point into a CodeBlock no longer owned by any executable. The
problematic scenario is this:

1. We generate the call IC which has a branch on a callee check. This
   callee owns the Executable in question. If the branch succeeds, it
   will call code belonging to a particular CodeBlock associated with
   that Executable.

2. Heap::deleteAllCodeBlocks is called. This leads the Executable to clear
   its various CodeBlock references.

3. Wasm has no idea this happened, so now it has stale ICs that point into
   code from a CodeBlock no longer belonging to an Executable.

This patch fixes the bug by informing all JSWebAssemblyCodeBlocks to unlink
their CallLinkInfo when Heap::deleteAllCodeBlocks is called.

We track all JSWebAssemblyCodeBlocks by creating a new subspace for them.
This allows us to quickly iterate over the live JSWebAssemblyCodeBlocks in the
heap.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/Heap.cpp:
(JSC::Heap::deleteAllCodeBlocks):
* heap/Subspace.h:
* heap/SubspaceInlines.h:
(JSC::Subspace::forEachLiveCell):
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:
* wasm/js/JSWebAssemblyCodeBlock.cpp:
(JSC::JSWebAssemblyCodeBlock::clearJSCallICs):
* wasm/js/JSWebAssemblyCodeBlock.h:
(JSC::JSWebAssemblyCodeBlock::createStructure): Deleted.
(JSC::JSWebAssemblyCodeBlock::functionImportCount): Deleted.
(JSC::JSWebAssemblyCodeBlock::module): Deleted.
(JSC::JSWebAssemblyCodeBlock::jsEntrypointCalleeFromFunctionIndexSpace): Deleted.
(JSC::JSWebAssemblyCodeBlock::wasmEntrypointLoadLocationFromFunctionIndexSpace): Deleted.
(JSC::JSWebAssemblyCodeBlock::wasmToJsCallStubForImport): Deleted.
(JSC::JSWebAssemblyCodeBlock::offsetOfImportWasmToJSStub): Deleted.
(JSC::JSWebAssemblyCodeBlock::codeBlock): Deleted.
(JSC::JSWebAssemblyCodeBlock::offsetOfImportStubs): Deleted.
(JSC::JSWebAssemblyCodeBlock::allocationSize): Deleted.
(JSC::JSWebAssemblyCodeBlock::importWasmToJSStub): Deleted.
* wasm/js/JSWebAssemblyCodeBlockSubspace.cpp: Added.
(JSC::JSWebAssemblyCodeBlockSubspace::JSWebAssemblyCodeBlockSubspace):
(JSC::JSWebAssemblyCodeBlockSubspace::~JSWebAssemblyCodeBlockSubspace):
(JSC::JSWebAssemblyCodeBlockSubspace::finishSweep):
(JSC::JSWebAssemblyCodeBlockSubspace::destroy):
* wasm/js/JSWebAssemblyCodeBlockSubspace.h: Added.

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

4 years agoRefactor / Clean up DOMWindow.idl
cdumez@apple.com [Tue, 9 May 2017 06:14:32 +0000 (06:14 +0000)]
Refactor / Clean up DOMWindow.idl
https://bugs.webkit.org/show_bug.cgi?id=171843

Reviewed by Ryosuke Niwa.

Refactor / Clean up DOMWindow.idl to match the specification more closely:
- https://html.spec.whatwg.org/#the-window-object

No expected Web-facing change. Things that do not match the specification
have been annotated with FIXME comments.

* page/DOMWindow.idl:

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

4 years agoSimplify ScrollingStateNode::scrollingStateTreeAsText
commit-queue@webkit.org [Tue, 9 May 2017 05:25:46 +0000 (05:25 +0000)]
Simplify ScrollingStateNode::scrollingStateTreeAsText
https://bugs.webkit.org/show_bug.cgi?id=171802

Patch by Frederic Wang <fwang@igalia.com> on 2017-05-08
Reviewed by Simon Fraser.

Source/WebCore:

The following simplifications are performed:
- Rely on TextStream's internal value to manage indentation.
- Use TextStream::dumpProperty and << to print simple properties.
- Try and use TextStream::GroupScope for groups.

No new tests, only minor format changes in the dumped tree.

* page/scrolling/ScrollingStateFixedNode.cpp:
(WebCore::ScrollingStateFixedNode::dumpProperties):
* page/scrolling/ScrollingStateFixedNode.h:
* page/scrolling/ScrollingStateFrameScrollingNode.cpp:
(WebCore::ScrollingStateFrameScrollingNode::dumpProperties):
* page/scrolling/ScrollingStateFrameScrollingNode.h:
* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::dumpProperties):
(WebCore::ScrollingStateNode::dump):
(WebCore::ScrollingStateNode::scrollingStateTreeAsText):
* page/scrolling/ScrollingStateNode.h:
* page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
(WebCore::ScrollingStateOverflowScrollingNode::dumpProperties):
* page/scrolling/ScrollingStateOverflowScrollingNode.h:
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::dumpProperties):
* page/scrolling/ScrollingStateScrollingNode.h:
* page/scrolling/ScrollingStateStickyNode.cpp:
(WebCore::ScrollingStateStickyNode::dumpProperties):
* page/scrolling/ScrollingStateStickyNode.h:

LayoutTests:

Update references due to minor format changes in text ouput of scrolling state trees.

* fast/scrolling/ios/remove-scrolling-role-expected.txt:
* fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-expected.txt:
* fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolled-down-then-up-expected.txt:
* fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolling-layers-state-expected.txt:
* tiled-drawing/scrolling/clamp-out-of-bounds-scrolls-expected.txt:
* tiled-drawing/scrolling/fixed/absolute-inside-fixed-expected.txt:
* tiled-drawing/scrolling/fixed/absolute-inside-out-of-view-fixed-expected.txt:
* tiled-drawing/scrolling/fixed/fixed-in-overflow-expected.txt:
* tiled-drawing/scrolling/fixed/fixed-position-out-of-view-expected.txt:
* tiled-drawing/scrolling/fixed/fixed-position-out-of-view-negative-zindex-expected.txt:
* tiled-drawing/scrolling/fixed/four-bars-expected.txt:
* tiled-drawing/scrolling/fixed/four-bars-with-header-and-footer-expected.txt:
* tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt:
* tiled-drawing/scrolling/fixed/negative-scroll-offset-expected.txt:
* tiled-drawing/scrolling/fixed/negative-scroll-offset-in-view-expected.txt:
* tiled-drawing/scrolling/fixed/nested-fixed-expected.txt:
* tiled-drawing/scrolling/fixed/percentage-inside-fixed-expected.txt:
* tiled-drawing/scrolling/frames/coordinated-frame-expected.txt:
* tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor-expected.txt:
* tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt:
* tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor-expected.txt:
* tiled-drawing/scrolling/frames/fixed-inside-frame-expected.txt:
* tiled-drawing/scrolling/frames/remove-coordinated-frame-expected.txt:
* tiled-drawing/scrolling/frames/scroll-region-after-frame-layout-expected.txt:
* tiled-drawing/scrolling/scrolling-tree-after-scroll-expected.txt:
* tiled-drawing/scrolling/scrolling-tree-slow-scrolling-expected.txt:
* tiled-drawing/scrolling/sticky/negative-scroll-offset-expected.txt:
* tiled-drawing/scrolling/sticky/sticky-horizontal-expected.txt:
* tiled-drawing/scrolling/sticky/sticky-vertical-expected.txt:

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

4 years agoFollow-up to bug 171710: use more references and reject if either audio or video...
commit-queue@webkit.org [Tue, 9 May 2017 05:14:32 +0000 (05:14 +0000)]
Follow-up to bug 171710: use more references and reject if either audio or video source creation is failing
https://bugs.webkit.org/show_bug.cgi?id=171824

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-08
Reviewed by Alex Christensen.

Source/WebCore:

Refactoring to use more references.
Only behavioral change is the rejection of the getUserMedia promise if either audio or video source creation is
failing. Previously, if audio source creation was failing, the promise would still resolve if video source was
sucessfully created.

* platform/mediastream/RealtimeMediaSourceCenter.cpp:
(WebCore::RealtimeMediaSourceCenter::audioFactory):
(WebCore::RealtimeMediaSourceCenter::videoFactory):
(WebCore::RealtimeMediaSourceCenter::audioCaptureDeviceManager):
(WebCore::RealtimeMediaSourceCenter::videoCaptureDeviceManager):
* platform/mediastream/RealtimeMediaSourceCenter.h:
(WebCore::RealtimeMediaSourceCenter::defaultAudioFactory): Deleted.
(WebCore::RealtimeMediaSourceCenter::defaultVideoFactory): Deleted.
(WebCore::RealtimeMediaSourceCenter::defaultAudioCaptureDeviceManager): Deleted.
(WebCore::RealtimeMediaSourceCenter::defaultVideoCaptureDeviceManager): Deleted.
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
(WebCore::RealtimeMediaSourceCenterMac::createMediaStream):
(WebCore::RealtimeMediaSourceCenterMac::getMediaStreamDevices):
(WebCore::RealtimeMediaSourceCenterMac::bestSourcesForTypeAndConstraints):
(WebCore::RealtimeMediaSourceCenterMac::defaultAudioFactory):
(WebCore::RealtimeMediaSourceCenterMac::defaultVideoFactory):
(WebCore::RealtimeMediaSourceCenterMac::defaultAudioCaptureDeviceManager):
(WebCore::RealtimeMediaSourceCenterMac::defaultVideoCaptureDeviceManager):
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
* platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h:
* platform/mock/MockRealtimeMediaSourceCenter.cpp:
(WebCore::MockRealtimeMediaSourceCenter::defaultAudioFactory):
(WebCore::MockRealtimeMediaSourceCenter::defaultVideoFactory):
(WebCore::MockRealtimeMediaSourceCenter::defaultAudioCaptureDeviceManager):
(WebCore::MockRealtimeMediaSourceCenter::defaultVideoCaptureDeviceManager):
* platform/mock/MockRealtimeMediaSourceCenter.h:

Source/WebKit2:

* UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
(WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):

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

4 years agoUnreviewed GTK expectations gardening
mcatanzaro@igalia.com [Tue, 9 May 2017 03:59:50 +0000 (03:59 +0000)]
Unreviewed GTK expectations gardening

* platform/gtk/TestExpectations:
* webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav:

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

4 years agoREGRESSION(r213564): Flash video playback failures
bfulgham@apple.com [Tue, 9 May 2017 03:24:53 +0000 (03:24 +0000)]
REGRESSION(r213564): Flash video playback failures
https://bugs.webkit.org/show_bug.cgi?id=171840
<rdar://problem/32041569>

Reviewed by Alexey Proskuryakov.

The sandbox restrictions added in r213564 to prevent access to unused iokit properties
blocked some items needed for Flash video playback. This change relaxes the sandbox
to allow this software to run properly.

* PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:

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

4 years agoDrop [CEReactions] from CharacterData operations
cdumez@apple.com [Tue, 9 May 2017 02:46:26 +0000 (02:46 +0000)]
Drop [CEReactions] from CharacterData operations
https://bugs.webkit.org/show_bug.cgi?id=171813

Reviewed by Ryosuke Niwa.

Drop [CEReactions] from CharacterData operations to match the DOM specification:
- https://dom.spec.whatwg.org/#interface-characterdata

I believe WebKit had this because Attr used to have Text child nodes. Therefore, modifying
those Text child nodes via the CharacterData API could modify the value of an attribute,
requiring us to run attributeChangedCallback for Custom Elements. However, as of
<https://trac.webkit.org/r216259>, Attr can no longer have Text child nodes.

I have also verified that Blink does not have [CEReactions] for those methods.

No new tests, no expected Web-facing behavior change.

* dom/CharacterData.idl:

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

4 years agoReduce PassRefPtr use in WebKit2
achristensen@apple.com [Tue, 9 May 2017 02:22:45 +0000 (02:22 +0000)]
Reduce PassRefPtr use in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=171831

Reviewed by Chris Dumez.

* UIProcess/API/C/WKPageGroup.cpp:
(WKPageGroupCreateWithIdentifier):
* UIProcess/GenericCallback.h:
(WebKit::GenericCallback::create):
(WebKit::CallbackMap::put):
* UIProcess/StatisticsRequest.cpp:
(WebKit::StatisticsRequest::StatisticsRequest):
* UIProcess/StatisticsRequest.h:
(WebKit::StatisticsRequest::create):
* UIProcess/TextChecker.h:
* UIProcess/TextCheckerCompletion.cpp:
(WebKit::TextCheckerCompletion::create):
* UIProcess/TextCheckerCompletion.h:
* UIProcess/WebColorPicker.h:
(WebKit::WebColorPicker::create):
* UIProcess/WebConnectionToWebProcess.cpp:
(WebKit::WebConnectionToWebProcess::create):
* UIProcess/WebConnectionToWebProcess.h:
* UIProcess/WebContextInjectedBundleClient.cpp:
(WebKit::WebContextInjectedBundleClient::getInjectedBundleInitializationUserData):
* UIProcess/WebContextInjectedBundleClient.h:
* UIProcess/WebContextMenuListenerProxy.h:
(WebKit::WebContextMenuListenerProxy::create):
* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::create):
* UIProcess/WebCookieManagerProxy.h:
* UIProcess/WebEditCommandProxy.h:
(WebKit::WebEditCommandProxy::create):
* UIProcess/WebFormSubmissionListenerProxy.h:
(WebKit::WebFormSubmissionListenerProxy::create):
* UIProcess/WebFrameListenerProxy.h:
* UIProcess/WebFrameProxy.h:
(WebKit::WebFrameProxy::create):
* UIProcess/WebFullScreenManagerProxy.cpp:
(WebKit::WebFullScreenManagerProxy::create):
* UIProcess/WebFullScreenManagerProxy.h:
* UIProcess/WebGeolocationManagerProxy.cpp:
(WebKit::WebGeolocationManagerProxy::create):
* UIProcess/WebGeolocationManagerProxy.h:
* UIProcess/WebIconDatabase.cpp:
(WebKit::WebIconDatabase::create):
(WebKit::WebIconDatabase::iconDataForPageURL):
* UIProcess/WebIconDatabase.h:
* UIProcess/WebMediaSessionFocusManager.cpp:
(WebKit::WebMediaSessionFocusManager::create):
* UIProcess/WebMediaSessionFocusManager.h:
* UIProcess/WebOpenPanelResultListenerProxy.h:
(WebKit::WebOpenPanelResultListenerProxy::create):
* UIProcess/WebPageGroup.cpp:
(WebKit::WebPageGroup::create):
* UIProcess/WebPageGroup.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::forceRepaint):
(WebKit::WebPageProxy::computePagesForPrinting):
(WebKit::WebPageProxy::drawRectToImage):
(WebKit::WebPageProxy::drawPagesToPDF):
(WebKit::WebPageProxy::drawPagesForPrinting):
(WebKit::WebPageProxy::callAfterNextPresentationUpdate):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/TextCheckerIOS.mm:
(WebKit::TextChecker::requestCheckingOfString):
* UIProcess/mac/TextCheckerMac.mm:
(WebKit::TextChecker::requestCheckingOfString):
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
* UIProcess/mac/WKPrintingView.mm:
(-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]):
(-[WKPrintingView _drawPreview:]):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::loadURL):
(WebKit::NetscapePlugin::manualStreamDidReceiveResponse):
* WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
(WebKit::NetscapePluginStream::NetscapePluginStream):
* WebProcess/Plugins/Netscape/NetscapePluginStream.h:
(WebKit::NetscapePluginStream::create):
* WebProcess/WebCoreSupport/SessionStateConversion.cpp:
(WebKit::toFormData):

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

4 years agoRemove black background from video layer while in fullscreen.
commit-queue@webkit.org [Tue, 9 May 2017 02:00:05 +0000 (02:00 +0000)]
Remove black background from video layer while in fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=171816

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-05-08
Reviewed by Eric Carlson.

No new tests because no new behavior in DOM.

This changes the background of the video layer to clear when it goes into fullscreen
and back to black when it returns to inline to better facilitate fullsceen animations.

* platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm:
(WebCore::VideoFullscreenLayerManager::setVideoLayer):
(WebCore::VideoFullscreenLayerManager::setVideoFullscreenLayer):

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

4 years agoThe Incomplete asynchronously decoded image frame should be decoded every time it...
said@apple.com [Tue, 9 May 2017 01:53:54 +0000 (01:53 +0000)]
The Incomplete asynchronously decoded image frame should be decoded every time it's drawn
https://bugs.webkit.org/show_bug.cgi?id=170836

Reviewed by Tim Horton.

The asynchronously decoded image frames has to be cached to prevent flickering,
but we have to keep requesting new decoding for the incomplete frame every time
it's drawn. This is to avoid drawing an incomplete image frame even after all
its encoded data is received.

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::draw):
* platform/graphics/ImageFrameCache.cpp:
(WebCore::ImageFrameCache::cacheAsyncFrameNativeImageAtIndex):
(WebCore::ImageFrameCache::requestFrameAsyncDecodingAtIndex):

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

4 years agoGuard DragController::cleanupAfterSystemDrag to only clear drag state on Mac
wenson_hsieh@apple.com [Tue, 9 May 2017 01:45:20 +0000 (01:45 +0000)]
Guard DragController::cleanupAfterSystemDrag to only clear drag state on Mac
https://bugs.webkit.org/show_bug.cgi?id=171771
<rdar://problem/32019149>

Reviewed by Tim Horton.

The call to dragEnded here seems to have been added because a client could override Mac WK1
WebUIDelegate methods to cause this cleanup to never be performed. Since this limitation only
applies to Mac, guard it as such.

* page/mac/DragControllerMac.mm:
(WebCore::DragController::cleanupAfterSystemDrag):

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

4 years agoUnreviewed, rolling out r216262.
commit-queue@webkit.org [Tue, 9 May 2017 01:41:58 +0000 (01:41 +0000)]
Unreviewed, rolling out r216262.
https://bugs.webkit.org/show_bug.cgi?id=171842

"It regressed JetStream on iOS by 7%" (Requested by saamyjoon
on #webkit).

Reverted changeset:

"GCController.cpp's collect() should be Async"
https://bugs.webkit.org/show_bug.cgi?id=171708
http://trac.webkit.org/changeset/216262

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

4 years agotestWasmBoundsCheck and testCallFunctionWithHellaArguments is broken in testb3
sbarati@apple.com [Tue, 9 May 2017 01:35:22 +0000 (01:35 +0000)]
testWasmBoundsCheck and testCallFunctionWithHellaArguments is broken in testb3
https://bugs.webkit.org/show_bug.cgi?id=171392
<rdar://problem/31872222>

Reviewed by Keith Miller.

This patch fixes two bugs. The first one is:
Inside testb3, we were using the wrong WasmBoundsCheckValue constructor.
Everything compiled OK because of implicit casting in C. I've changed one
of the constructors to take arguments in a different order so we don't
run into this problem again.

The second bug was that Air::ShufflePair::inst was assuming that a move
from BigImm to its destination is always valid. This is not the case.
For example, the store, `Move BigImm, Addr` is not allowed. I refactored
the code to be correct by emitting more than one instruction when needeed.

When testing my changes, I ran ARM64 testb3 both in debug and
release. I ran into many pre-existing failures. I've opened
a new bug to fix those here: https://bugs.webkit.org/show_bug.cgi?id=171826

* b3/B3WasmBoundsCheckValue.cpp:
(JSC::B3::WasmBoundsCheckValue::WasmBoundsCheckValue):
* b3/B3WasmBoundsCheckValue.h:
* b3/air/AirEmitShuffle.cpp:
(JSC::B3::Air::ShufflePair::insts):
(JSC::B3::Air::ShufflePair::inst): Deleted.
* b3/air/AirEmitShuffle.h:
* b3/air/AirLowerMacros.cpp:
(JSC::B3::Air::lowerMacros):
* b3/testb3.cpp:
(JSC::B3::testLoadAcq42):
(JSC::B3::testStoreRelAddLoadAcq32):
(JSC::B3::testStoreRelAddLoadAcq8):
(JSC::B3::testStoreRelAddFenceLoadAcq8):
(JSC::B3::testStoreRelAddLoadAcq16):
(JSC::B3::testStoreRelAddLoadAcq64):
(JSC::B3::testSimplePatchpointWithOuputClobbersGPArgs):
(JSC::B3::testCheckMul):
(JSC::B3::testCheckMulMemory):
(JSC::B3::testCheckMul64):
(JSC::B3::testCheckMulFold):
(JSC::B3::testCheckMulFoldFail):
(JSC::B3::testCheckMulArgumentAliasing64):
(JSC::B3::testCheckMulArgumentAliasing32):
(JSC::B3::testCheckMul64SShr):
(JSC::B3::testCallFunctionWithHellaArguments):
(JSC::B3::functionWithHellaArguments2):
(JSC::B3::testCallFunctionWithHellaArguments2):
(JSC::B3::functionWithHellaArguments3):
(JSC::B3::testCallFunctionWithHellaArguments3):
(JSC::B3::testSpillDefSmallerThanUse):
(JSC::B3::testLateRegister):
(JSC::B3::testTerminalPatchpointThatNeedsToBeSpilled):
(JSC::B3::testTerminalPatchpointThatNeedsToBeSpilled2):
(JSC::B3::testMoveConstants):
(JSC::B3::testAtomicWeakCAS):
(JSC::B3::testAtomicStrongCAS):
(JSC::B3::testAtomicXchg):
(JSC::B3::testWasmBoundsCheck):
(JSC::B3::run):
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::emitCheckAndPreparePointer):

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

4 years agoMarked http/tests/security/storage-blocking-loosened-plugin.html as flaky
ryanhaddad@apple.com [Tue, 9 May 2017 00:32:33 +0000 (00:32 +0000)]
Marked http/tests/security/storage-blocking-loosened-plugin.html as flaky
https://bugs.webkit.org/show_bug.cgi?id=171837

Unreviewed test gardening.

Patch by Matt Lewis <jlewis3@apple.com> on 2017-05-08

* platform/mac-wk2/TestExpectations:

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

4 years agoMove offsetParent / offsetLeft / offsetTop / offsetWidth / offsetHeight from Element...
cdumez@apple.com [Tue, 9 May 2017 00:16:18 +0000 (00:16 +0000)]
Move offsetParent / offsetLeft / offsetTop / offsetWidth / offsetHeight from Element to HTMLElement
https://bugs.webkit.org/show_bug.cgi?id=171829

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Re-sync Web-Platform-Test after:
- https://github.com/w3c/web-platform-tests/pull/5855

* web-platform-tests/cssom-view/offsetParent_element_test.html:

Source/WebCore:

Move offsetParent / offsetLeft / offsetTop / offsetWidth / offsetHeight from Element to HTMLElement,
as per the specification:
- https://drafts.csswg.org/cssom-view/#extensions-to-the-htmlelement-interface

Both Firefox and Chrome match the specification and also do not have the corresponding API on
SVGElement.

Bug tracking the similar move in Blink (completed over 1 year ago):
- https://bugs.chromium.org/p/chromium/issues/detail?id=463116

Note that for the inner SVG elements like <rect> and <circle> these attributes were returning 0,
because those aren't part of the CSS box model. They did return correct values for the <svg>
element itself, however.

Test: fast/css/htmlelement-offset-properties.html

* dom/Element.idl:
- Drop offset* attributes, now that they are on HTMLElement.

* html/HTMLElement.idl:
- Resync HTMLElement.idl with the specification: https://html.spec.whatwg.org/#htmlelement
  No behavior change besides what's indicated in the Changelog above. Things that do not match
  the spec have been annotated with FIXME comments.
- Add offset* attributes that used to be on Element.

LayoutTests:

* fast/css/htmlelement-offset-properties-expected.txt:
* fast/css/htmlelement-offset-properties.html:
Add layout test coverage.

* editing/pasteboard/drag-link-with-data-transfer-adds-trusted-link-to-pasteboard.html:
* fast/css-grid-layout/grid-item-display.html:
* js/dom/dom-static-property-for-in-iteration-expected.txt:
* mathml/presentation/menclose-notation-no-overlap-expected.txt:
* mathml/presentation/menclose-notation-no-overlap.html:
* platform/mac/inspector/model/remote-object-expected.txt:
* svg/dynamic-updates/resources/SVGTestCase.js:
(clickAt):
* svg/text/inline-text-destroy-attributes-crash.xhtml:
Use getClientBoundingRect() instead of offset* properties for non-HTML elements.

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

4 years agoWeb Inspector: RTL: box model labels have bad alignment
bburg@apple.com [Mon, 8 May 2017 23:41:14 +0000 (23:41 +0000)]
Web Inspector: RTL: box model labels have bad alignment
https://bugs.webkit.org/show_bug.cgi?id=171817

Reviewed by Joseph Pecoraro.

* UserInterface/Views/BoxModelDetailsSectionRow.css:
(.details-section .row.box-model .label):
(body[dir=ltr] .details-section .row.box-model .label):
(body[dir=rtl] .details-section .row.box-model .label):
We can't just use a mirrored leading margin because all the
text here is center-aligned. Just hardcode a reasonable value.

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

4 years agoMarked imported/w3c/web-platform-tests/XMLHttpRequest/timeout-multiple-fetches.html...
ryanhaddad@apple.com [Mon, 8 May 2017 23:39:45 +0000 (23:39 +0000)]
Marked imported/w3c/web-platform-tests/XMLHttpRequest/timeout-multiple-fetches.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=169637

Unreviewed test gardening.

Patch by Matt Lewis <jlewis3@apple.com> on 2017-05-08

* platform/ios-wk2/TestExpectations:

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

4 years agoAdd support for reading and writing settings from UIProcess audio capture
commit-queue@webkit.org [Mon, 8 May 2017 23:31:56 +0000 (23:31 +0000)]
Add support for reading and writing settings from UIProcess audio capture
https://bugs.webkit.org/show_bug.cgi?id=171633

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-08
Reviewed by Eric Carlson.

Source/WebCore:

Covered by manual testing and existing test sets.

Moving success/failure callbacks for applyConstraints.
Making main RealtimeMediaSource::applyConstraints virtual so that WebProcess source proxies can implement it by
doing an IPC call directly. Doing so for UIProcess CoreAudioCaptureSource.

Adding support for volume to CoreAudioCaptureSource by applying gain post-capturing.
Adding support for toggling echo cancellation in CoreAudioCaptureSource.
Adding support to change echo cancellation and sample rate by scheduling a reconfiguration of the audio unit.
To do so, we stop producing data, delete the audio unit and restart producing data.
Removing CoreAudioCaptureSource::supportedConstraints as it is redundant with
RealtimeMediaSourceSettings::supportedConstraints.

Setting sample rate only to the following values: 8000, 16000, 32000, 44100, 48000.

* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::applyConstraints):
* platform/mediastream/MediaStreamTrackPrivate.cpp:
(WebCore::MediaStreamTrackPrivate::applyConstraints):
* platform/mediastream/MediaStreamTrackPrivate.h:
* platform/mediastream/RealtimeMediaSource.cpp:
(WebCore::RealtimeMediaSource::applyConstraints):
* platform/mediastream/RealtimeMediaSource.h:
* platform/mediastream/RealtimeMediaSourceSettings.h:
(WebCore::RealtimeMediaSourceSettings::supportedConstraints):
* platform/mediastream/mac/CoreAudioCaptureSource.cpp:
(WebCore::CoreAudioCaptureSource::~CoreAudioCaptureSource):
(WebCore::CoreAudioCaptureSource::processMicrophoneSamples):
(WebCore::CoreAudioCaptureSource::cleanupAudioUnit):
(WebCore::CoreAudioCaptureSource::createAudioUnit):
(WebCore::CoreAudioCaptureSource::configureAudioUnit):
(WebCore::CoreAudioCaptureSource::startProducingData):
(WebCore::CoreAudioCaptureSource::capabilities):
(WebCore::CoreAudioCaptureSource::settings):
(WebCore::CoreAudioCaptureSource::applySampleRate):
(WebCore::CoreAudioCaptureSource::applyEchoCancellation):
(WebCore::CoreAudioCaptureSource::scheduleReconfiguration):
(WebCore::CoreAudioCaptureSource::cleanupAudioUnits): Deleted.
(WebCore::CoreAudioCaptureSource::setupAudioUnits): Deleted.
* platform/mediastream/mac/CoreAudioCaptureSource.h:

Source/WebKit2:

* UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
(WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
(WebKit::UserMediaCaptureManagerProxy::applyConstraints):
* UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
* UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
* WebProcess/cocoa/UserMediaCaptureManager.cpp:
(WebKit::UserMediaCaptureManager::Source::setSettings):
(WebKit::UserMediaCaptureManager::Source::applyConstraintsSucceeded):
(WebKit::UserMediaCaptureManager::Source::applyConstraintsFailed):
(WebKit::UserMediaCaptureManager::createCaptureSource):
(WebKit::UserMediaCaptureManager::sourceSettingsChanged):
(WebKit::UserMediaCaptureManager::applyConstraints):
(WebKit::UserMediaCaptureManager::applyConstraintsSucceeded):
(WebKit::UserMediaCaptureManager::applyConstraintsFailed):
(WebKit::UserMediaCaptureManager::Source::setMuted): Deleted.
(WebKit::UserMediaCaptureManager::Source::setEnabled): Deleted.
* WebProcess/cocoa/UserMediaCaptureManager.h:
* WebProcess/cocoa/UserMediaCaptureManager.messages.in:

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

4 years agoImplement PlatformWebView::windowSnapshotImage and createBitmapContextFromWebView...
jbedard@apple.com [Mon, 8 May 2017 23:15:00 +0000 (23:15 +0000)]
Implement PlatformWebView::windowSnapshotImage and createBitmapContextFromWebView for iOS devices
https://bugs.webkit.org/show_bug.cgi?id=169421
<rdar://problem/30950171>

Reviewed by Tim Horton.

Tools:

* DumpRenderTree/ios/PixelDumpSupportIOS.mm:
(createBitmapContextFromWebView): Implement for IOSurface.
* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(WTR::PlatformWebView::windowSnapshotImage): Use snapshot API for device.

LayoutTests:

* platform/ios-device/TestExpectations: Mark compositing tests as failures, this
is due to a bug tracked in https://bugs.webkit.org/show_bug.cgi?id=170772.

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

4 years agoWeb Inspector: Request/Response toggles not working
commit-queue@webkit.org [Mon, 8 May 2017 23:12:29 +0000 (23:12 +0000)]
Web Inspector: Request/Response toggles not working
https://bugs.webkit.org/show_bug.cgi?id=171833
<rdar://problem/31341637>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-05-08
Reviewed by Brian Burg.

* UserInterface/Views/HierarchicalPathNavigationItem.js:
(WebInspector.HierarchicalPathNavigationItem.set components.let.componentsEqual):
(WebInspector.HierarchicalPathNavigationItem.prototype.set components):
If the new components being set were shallowly equal, then they wouldn't
actually be updated even if ultimately they are different. In this case
the Path Components with values "request" / "response" would not update
between different resources because the path components had equivalent
simple values. Provide a different discriminator (comparisonData) which
can be an object so these path components compare as necessarily different.

* UserInterface/Views/HeapSnapshotClusterContentView.js:
(WebInspector.HeapSnapshotClusterContentView.createPathComponent):
(WebInspector.HeapSnapshotClusterContentView):
* UserInterface/Views/ResourceClusterContentView.js:
(WebInspector.ResourceClusterContentView.createPathComponent):
(WebInspector.ResourceClusterContentView):
(WebInspector.ResourceClusterContentView.prototype._resourceTypeDidChange):
* UserInterface/Views/SVGImageResourceClusterContentView.js:
(WebInspector.SVGImageResourceClusterContentView):
* UserInterface/Views/ScriptClusterTimelineView.js:
(WebInspector.ScriptClusterTimelineView.createPathComponent):
(WebInspector.ScriptClusterTimelineView):
Provide comparisonData for path components cases that would need it.

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

4 years agoExpose a function to get proxy targets
fpizlo@apple.com [Mon, 8 May 2017 22:51:11 +0000 (22:51 +0000)]
Expose a function to get proxy targets
https://bugs.webkit.org/show_bug.cgi?id=171797
<rdar://problem/32027549>

Reviewed by Mark Lam.

This exposes a new private API function, JSObjectGetProxyTarget(), that gets the target of a
proxy. It works with both ProxyObject and JSProxy, but it's primarily intended for use with
JSProxy.

* API/JSObjectRef.cpp:
(JSObjectGetProxyTarget):
* API/JSObjectRefPrivate.h:
* API/tests/JSObjectGetProxyTargetTest.cpp: Added.
(testJSObjectGetProxyTarget):
* API/tests/JSObjectGetProxyTargetTest.h: Added.
* API/tests/testapi.c:
(main):
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/ProxyObject.h:
* shell/PlatformWin.cmake:

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

4 years agoop_throw_static_error's use of its first operand should be reflected in DFG BytecodeU...
mark.lam@apple.com [Mon, 8 May 2017 22:24:29 +0000 (22:24 +0000)]
op_throw_static_error's use of its first operand should be reflected in DFG BytecodeUseDef as well.
https://bugs.webkit.org/show_bug.cgi?id=171786
<rdar://problem/32051023>

Reviewed by Saam Barati.

JSTests:

* stress/bug-171786.js: Added.

Source/JavaScriptCore:

* bytecode/BytecodeDumper.cpp:
(JSC::BytecodeDumper<Block>::dumpBytecode):
- Fix BytecodeDumper to dump op_throw_static_error correctly.  Previously,
  it was expecting op1 to always be a constant.  r206870 changed it to take a
  variable string as well.

* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
- Fix the bug.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
- Move the Phantom of op1 after the ThrowStaticError node, because technically,
  the ThrowStaticError represents op_throw_static_error, and op_throw_static_error
  uses op1.  In practice, this probably doesn't matter, but let's have the code
  accurately communicate the behavior we're expecting.

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

4 years agoDrop non-standard document.implementation.createCSSStyleSheet() API
cdumez@apple.com [Mon, 8 May 2017 22:17:59 +0000 (22:17 +0000)]
Drop non-standard document.implementation.createCSSStyleSheet() API
https://bugs.webkit.org/show_bug.cgi?id=171825

Reviewed by Simon Fraser.

Source/WebCore:

Drop non-standard document.implementation.createCSSStyleSheet() API.

This was never-implemented by Firefox and they actually rejected implementing it:
- Drop non-standard document.implementation.createCSSStyleSheet() API

Blink dropped this API back in 2014 after getting UseCounter data showing this was not used:
- https://bugs.chromium.org/p/chromium/issues/detail?id=363561
- https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/uDjkuGA9gQs/zytnzJ6WryYJ

The API is not useful in its current state because even though
document.implementation.createCSSStyleSheet() allows you to create a stylesheet, there is
currently no way to associate it with the document.

Test: fast/css/DOMImplementation.createCSSStyleSheet-obsolete.html

* dom/DOMImplementation.idl:

LayoutTests:

* fast/css/DOMImplementation.createCSSStyleSheet-obsolete-expected.txt:
* fast/css/DOMImplementation.createCSSStyleSheet-obsolete.html:
Add layout test coverage.

* fast/dom/StyleSheet/gc-parent-rule-expected.txt:
* fast/dom/StyleSheet/gc-parent-rule.html:
* fast/dom/StyleSheet/gc-parent-stylesheet-expected.txt:
* fast/dom/StyleSheet/gc-parent-stylesheet.html:
Add utility functions to construct a CSSStyleSheet object and use it instead
of document.implementation.createCSSStyleSheet().

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

4 years agoAX: don't expose empty roledescription
jdiggs@igalia.com [Mon, 8 May 2017 22:16:27 +0000 (22:16 +0000)]
AX: don't expose empty roledescription
https://bugs.webkit.org/show_bug.cgi?id=163647

Reviewed by Chris Fleizach.

Source/WebCore:

If the value of aria-roledescription is empty or contains only whitespace
characters, ignore the value. Also strip out leading or trailing whitespace
characters in the value.

No new tests: We already had coverage for an empty aria-roledescription value.
That test was updated to reflect the new behavior. New test cases were added
to cover a value that contains only whitespace characters, and a value with
leading and trailing whitespace characters.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::roleDescription):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper roleDescription]):

LayoutTests:

* accessibility/aria-roledescription-expected.txt: New test cases, updated expectations.
* accessibility/aria-roledescription.html: New test cases, updated expectations.
* platform/gtk/accessibility/aria-roledescription-expected.txt: New test cases, updated expectations.

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

4 years agoDrop non-standard Element.scrollByLines() / scrollByPages()
cdumez@apple.com [Mon, 8 May 2017 22:15:14 +0000 (22:15 +0000)]
Drop non-standard Element.scrollByLines() / scrollByPages()
https://bugs.webkit.org/show_bug.cgi?id=171820

Reviewed by Simon Fraser.

Source/WebCore:

Drop non-standard Element.scrollByLines() / scrollByPages().

Those were added a very long time ago (https://trac.webkit.org/changeset/7901/webkit)
for Safari RSS but does not seem to be used anymore.

Blink has already dropped it without issue back in 2014:
- https://bugs.chromium.org/p/chromium/issues/detail?id=398356

Their UseCounter data showed no usage:
- https://www.chromestatus.com/metrics/feature/timeline/popularity/390

Test: fast/css/element-scrollByLines-scrollByPages-obsolete.html

* dom/Element.idl:

Source/WebInspectorUI:

Drop non-standard Element.scrollByLines() / scrollByPages() from
WebInspector code.

* UserInterface/Models/NativeFunctionParameters.js:

LayoutTests:

* LayoutTests/fast/css/element-scrollByLines-scrollByPages-obsolete-expected.txt:
* LayoutTests/fast/css/element-scrollByLines-scrollByPages-obsolete.html:
Add layout test coverage.

* fast/dom/non-numeric-values-numeric-parameters-expected.txt:
* fast/dom/script-tests/non-numeric-values-numeric-parameters.js:
* fast/events/scroll-event-does-not-bubble.html:
* fast/layers/scroll-overflow-no-layer-expected.txt: Renamed from LayoutTests/fast/layers/scrollByLines-overflow-no-layer-expected.txt.
* fast/layers/scroll-overflow-no-layer.html: Renamed from LayoutTests/fast/layers/scrollByLines-overflow-no-layer.html.
Update existing tests to stop relying on the API.

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

4 years agoCoreAudioSharedUnit should own its configuration parameters
commit-queue@webkit.org [Mon, 8 May 2017 22:12:39 +0000 (22:12 +0000)]
CoreAudioSharedUnit should own its configuration parameters
https://bugs.webkit.org/show_bug.cgi?id=171812

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-08
Reviewed by Eric Carlson.

Covered by manual tests.

Add sampleRate, volume and echoCancellation parameters to the shared audio unit.
Set default values when creating the shared audio unit and use those for the creation of new sources.
Add support for volume.
Add support for disabling echo cancellation.
Check valid sample rates when trying to apply a sample rate.

* platform/mediastream/RealtimeMediaSource.h:
* platform/mediastream/mac/CoreAudioCaptureSource.cpp:
(WebCore::CoreAudioSharedUnit::volume):
(WebCore::CoreAudioSharedUnit::sampleRate):
(WebCore::CoreAudioSharedUnit::enableEchoCancellation):
(WebCore::CoreAudioSharedUnit::setVolume):
(WebCore::CoreAudioSharedUnit::setSampleRate):
(WebCore::CoreAudioSharedUnit::setEnableEchoCancellation):
(WebCore::CoreAudioSharedUnit::CoreAudioSharedUnit):
(WebCore::CoreAudioSharedUnit::setupAudioUnits):
(WebCore::CoreAudioSharedUnit::configureMicrophoneProc):
(WebCore::CoreAudioSharedUnit::configureSpeakerProc):
(WebCore::CoreAudioSharedUnit::processMicrophoneSamples):
(WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):
(WebCore::CoreAudioCaptureSource::applySampleRate):
(WebCore::CoreAudioCaptureSource::applyEchoCancellation):
* platform/mediastream/mac/CoreAudioCaptureSource.h:

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

4 years agoMarked http/tests/websocket/tests/hybi/workers/close.html is flaky.
ryanhaddad@apple.com [Mon, 8 May 2017 21:51:27 +0000 (21:51 +0000)]
Marked http/tests/websocket/tests/hybi/workers/close.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=171830

Unreviewed test gardening.

Patch by Matt Lewis <jlewis3@apple.com> on 2017-05-08

* platform/ios-wk2/TestExpectations:

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

4 years agoMark media/modern-media-controls/status-label/status-label-font.html as flaky on...
ryanhaddad@apple.com [Mon, 8 May 2017 21:50:54 +0000 (21:50 +0000)]
Mark media/modern-media-controls/status-label/status-label-font.html as flaky on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=171828

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

4 years agoAX: Setting aria-orientation="horizontal" on a listbox is being overridden on the Mac
jdiggs@igalia.com [Mon, 8 May 2017 20:51:42 +0000 (20:51 +0000)]
AX: Setting aria-orientation="horizontal" on a listbox is being overridden on the Mac
https://bugs.webkit.org/show_bug.cgi?id=171821

Reviewed by Chris Fleizach.

Source/WebCore:

The Mac's AccessibilityObject wrapper was unconditionally returning vertical
as the orientation of listbox. Removing this override causes the author-specified
value to be exposed, with the default/implicit orientation continuing to be vertical.

No new tests. We already have coverage for the default/implicit orientation on a
listbox. A new test case was added to aria-orientation.html so that we would have
coverage for aria-orientation="horizontal" on a listbox.

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

LayoutTests:

* accessibility/aria-orientation-expected.txt: New test case.
* accessibility/aria-orientation.html: New test case.

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

4 years agoWeb Inspector: Make it easy to dynamically show/hide a SettingsView
mattbaker@apple.com [Mon, 8 May 2017 20:49:23 +0000 (20:49 +0000)]
Web Inspector: Make it easy to dynamically show/hide a SettingsView
https://bugs.webkit.org/show_bug.cgi?id=171765
<rdar://problem/32031280>

Reviewed by Brian Burg.

This patch adds SettingsTabContentView.prototype.setSettingsViewVisible,
for dynamically showing/hiding a child view (and its NavigationBar item).
The following new behavior is relevant when more that one child SettingsView
exist in the Settings tab:
 - Hiding the selected view will cause a new view to become selected.
   The previous visible view is selected, if it exists. Otherwise the
   next visible view is used.
 - Showing a view when no views are selected cause the view to be selected.

As the Settings tab currently has only one child view, the behavior above
was tested by adding a handful of vanilla SettingsView objects to the tab
and toggling their visibility.

* UserInterface/Views/NavigationBar.js:
Simplify overloaded parameter `navigationItemOrIdentifierOrIndex`, which
is used in a few places and is always an instance of NavigationItem.

(WebInspector.NavigationBar):
(WebInspector.NavigationBar.prototype.removeNavigationItem):
(WebInspector.NavigationBar.prototype.get selectedNavigationItem):
(WebInspector.NavigationBar.prototype.set selectedNavigationItem):
(WebInspector.NavigationBar.prototype.findNavigationItem):
Lookup a navigation item by its identifier.
(WebInspector.NavigationBar.prototype._findNavigationItem): Deleted.
Replaced overloaded private method with new public method.

* UserInterface/Views/NavigationItem.js:
Cleanup.
(WebInspector.NavigationItem):
(WebInspector.NavigationItem.prototype.get identifier):
(WebInspector.NavigationItem.prototype.get element):
(WebInspector.NavigationItem.prototype.get minimumWidth):
(WebInspector.NavigationItem.prototype.get parentNavigationBar):

* UserInterface/Views/SettingsTabContentView.css:
Use `visibility: hidden` instead of `display: none` when hiding the
NavigationBar, so that the selected view's top position stays the same.

(.content-view.settings):
(.content-view.settings .navigation-bar.invisible):

* UserInterface/Views/SettingsTabContentView.js:
(WebInspector.SettingsTabContentView):
Switch to an array of SettingsViews instead of a map. Fast lookup isn't
a concern due to the small number of items, and having indices simplifies
traversing the previous/next items in `setSettingsViewVisible`.

(WebInspector.SettingsTabContentView.prototype.set selectedSettingsView):
Rename `page` to `settingsView`.
(WebInspector.SettingsTabContentView.prototype.addSettingsView):
(WebInspector.SettingsTabContentView.prototype.setSettingsViewVisible):
Shows/hides the specified view. Hiding the selected SettingsView will
cause another visible view to become selected, if one exists.

(WebInspector.SettingsTabContentView.prototype._updateNavigationBarVisibility):
Helper for updating navigation bar visibility after making a change
to the navigation items.

(WebInspector.SettingsTabContentView.prototype._navigationItemSelected):

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

4 years ago[CG] To decode an image frame asynchronously, pass the native size of the image to...
commit-queue@webkit.org [Mon, 8 May 2017 20:36:31 +0000 (20:36 +0000)]
[CG] To decode an image frame asynchronously, pass the native size of the image to CGImageSourceCreateThumbnailAtIndex() if it's smaller than the sizeForDrawing
https://bugs.webkit.org/show_bug.cgi?id=170864
Source/WebCore:

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-05-08
Reviewed by Simon Fraser.

Tests: Existing tests were modified to test this patch.

The maxPixelSize was omitted when calling CGImageSourceCreateThumbnailAtIndex()
for the nativeSize image or when areaOf(nativeSize) < areaOf(sizeForDrawing).
The assumption was if we don't pass maxPixelSize, CG will create an image with the
nativeSize regardless how big this size is. It turns out this is wrong. CG has an
optimization to return a scaled down image if areaOf(nativeSize) is greater than
some maximum value.

This is not what we want for asynchronously image decoding. We want the decoded
frame to have the size we ask for, not some scaled down frame. The fix is to pass
always maxPixelSize to CGImageSourceCreateThumbnailAtIndex(). maxPixelSize will be
equal to maxDimension(sizeForDrawing) if sizeForDrawing is valid it is less than
maxDimension(nativeSize). Otherwise it will be equal to maxDimension(nativeSize).

* platform/graphics/DecodingOptions.h:
* platform/graphics/cg/ImageDecoderCG.cpp:
(WebCore::appendImageSourceOption):
(WebCore::appendImageSourceOptions):
(WebCore::imageSourceAsyncOptions):
(WebCore::ImageDecoder::createFrameImageAtIndex):

LayoutTests:

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-05-08
Reviewed by Simon Fraser.

* fast/images/async-image-background-image-repeated-expected.html:
* fast/images/async-image-background-image-repeated.html:
* fast/images/resources/sprite-sheet-red-green-blue.png:
* fast/images/sprite-sheet-image-draw-expected.html:
* fast/images/sprite-sheet-image-draw.html:
Change the sprite image to be 200x33100 instead of 200x2100 and use it in drawing.
If the maxPixelSize is not passed to CGImageSourceCreateThumbnailAtIndex(), the
decoded farme of this image will be 30x5000 pixels (15% of the original size).

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

4 years agoWebKit should default to using sRGB with NSColor conversion instead of device
bdakin@apple.com [Mon, 8 May 2017 20:25:46 +0000 (20:25 +0000)]
WebKit should default to using sRGB with NSColor conversion instead of device
color space
https://bugs.webkit.org/show_bug.cgi?id=171745
-and corresponding-
rdar://problem/28314183

Reviewed by Tim Horton.

Source/WebCore:

* platform/graphics/mac/ColorMac.mm:
(WebCore::makeRGBAFromNSColor):
(WebCore::nsColor):

LayoutTests:

* editing/mac/attributed-string/anchor-element-expected.txt:
* editing/mac/attributed-string/basic-expected.txt:
* editing/mac/attributed-string/comment-cdata-section-expected.txt:
* editing/mac/attributed-string/font-size-expected.txt:
* editing/mac/attributed-string/font-style-variant-effect-expected.txt:
* editing/mac/attributed-string/font-weight-expected.txt:
* editing/mac/attributed-string/letter-spacing-expected.txt:
* editing/mac/attributed-string/text-decorations-expected.txt:
* editing/mac/attributed-string/vertical-align-expected.txt:

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

4 years agoReduce PassRefPtr use
achristensen@apple.com [Mon, 8 May 2017 20:11:29 +0000 (20:11 +0000)]
Reduce PassRefPtr use
https://bugs.webkit.org/show_bug.cgi?id=171809

Reviewed by Chris Dumez.

Source/WebCore:

* platform/graphics/ca/PlatformCALayer.cpp:
(WebCore::PlatformCALayer::createCompatibleLayerOrTakeFromPool):
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/TileCoverageMap.cpp:
(WebCore::TileCoverageMap::TileCoverageMap):
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::TileGrid):
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(PlatformCALayerCocoa::create):
(PlatformCALayerCocoa::clone):
(PlatformCALayerCocoa::animationForKey):
(PlatformCALayerCocoa::createCompatibleLayer):

Source/WebKit2:

* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::setInitializationReply):
* PluginProcess/PluginControllerProxy.h:
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::destroyPlugin):
(WebKit::WebProcessConnection::createPlugin):
* PluginProcess/WebProcessConnection.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::runOpenPanel):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::registerUndoStep):
* WebProcess/WebPage/VisitedLinkTableController.cpp:
(WebKit::VisitedLinkTableController::getOrCreate):
* WebProcess/WebPage/VisitedLinkTableController.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::hitTest):
(WebKit::WebFrame::createSelectionSnapshot):
* WebProcess/WebPage/WebFrame.h:
* WebProcess/WebPage/WebOpenPanelResultListener.cpp:
(WebKit::WebOpenPanelResultListener::create):
(WebKit::WebOpenPanelResultListener::WebOpenPanelResultListener):
* WebProcess/WebPage/WebOpenPanelResultListener.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::unapplyEditCommand):
(WebKit::WebPage::reapplyEditCommand):
* WebProcess/WebPage/WebPageGroupProxy.cpp:
(WebKit::WebPageGroupProxy::create):
* WebProcess/WebPage/WebPageGroupProxy.h:
* WebProcess/WebPage/WebUndoStep.cpp:
(WebKit::WebUndoStep::create):
* WebProcess/WebPage/WebUndoStep.h:
(WebKit::WebUndoStep::step):
(WebKit::WebUndoStep::WebUndoStep):
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::create):
(WebKit::PlatformCALayerRemote::clone):
(WebKit::PlatformCALayerRemote::animationForKey):
(WebKit::PlatformCALayerRemote::createCompatibleLayer):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
(WebKit::PlatformCALayerRemoteCustom::create):
(WebKit::PlatformCALayerRemoteCustom::clone):

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

4 years agobuildbot: Cleanup simulators after running tests
jbedard@apple.com [Mon, 8 May 2017 20:07:28 +0000 (20:07 +0000)]
buildbot: Cleanup simulators after running tests
https://bugs.webkit.org/show_bug.cgi?id=171679

Reviewed by Aakash Jain.

simctl is partitioned for each user. Since kill-old-processes
is run as root, we need to specify the buildbot user when tearing
down simulators between steps.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(KillOldProcesses): Pass buildbot user to kill-old-processes.
* BuildSlaveSupport/kill-old-processes:
(main): Specify the user for simctl if one has been provided.

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

4 years ago[Mac] Audio capture fails when shouldCaptureAudioInUIProcess is set.
jer.noble@apple.com [Mon, 8 May 2017 20:03:46 +0000 (20:03 +0000)]
[Mac] Audio capture fails when shouldCaptureAudioInUIProcess is set.
https://bugs.webkit.org/show_bug.cgi?id=171710

Reviewed by Eric Carlson.

Source/WebCore:

Both the shouldCaptureAudioInUIProcess setting and useAVFoundationAudioCapture setting were trying to set
the audio factory for RealtimeMediaSourceCenter, and were stomping on each others' changes. Change the way
the useAVFoundationAudioCapture works so that it only affects the defaultAudioFactory, allowing that default
to be overridden by the shuoldCaptureAudioInUIProcess setting when it calls setAudioFactory().

* page/Settings.cpp:
(WebCore::Settings::setUseAVFoundationAudioCapture):
* platform/mediastream/RealtimeMediaSourceCenter.cpp:
(WebCore::RealtimeMediaSourceCenter::audioFactory):
(WebCore::RealtimeMediaSourceCenter::videoFactory):
(WebCore::RealtimeMediaSourceCenter::audioCaptureDeviceManager):
(WebCore::RealtimeMediaSourceCenter::videoCaptureDeviceManager):
* platform/mediastream/RealtimeMediaSourceCenter.h:
(WebCore::RealtimeMediaSourceCenter::audioFactory): Deleted.
(WebCore::RealtimeMediaSourceCenter::videoFactory): Deleted.
(WebCore::RealtimeMediaSourceCenter::audioCaptureDeviceManager): Deleted.
(WebCore::RealtimeMediaSourceCenter::videoCaptureDeviceManager): Deleted.
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
(WebCore::RealtimeMediaSourceCenterMac::setUseAVFoundationAudioCapture):
(WebCore::RealtimeMediaSourceCenterMac::singleton):
(WebCore::RealtimeMediaSourceCenter::platformCenter):
(WebCore::RealtimeMediaSourceCenterMac::defaultAudioFactory):
(WebCore::RealtimeMediaSourceCenterMac::defaultAudioCaptureDeviceManager):
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:

Source/WebKit2:

RealtimeMediaSourceCenterMac's setUseAVFoundationAudioCapture() is now accessed via a singleton.

* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::syncWithWebCorePrefs):

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

4 years ago[macOS] com.macromedia.Flash Player ESR.plugin.sb is installed outside of PlugInSandb...
aestes@apple.com [Mon, 8 May 2017 19:57:21 +0000 (19:57 +0000)]
[macOS] com.macromedia.Flash Player ESR.plugin.sb is installed outside of PlugInSandboxProfiles
https://bugs.webkit.org/show_bug.cgi?id=171774

Reviewed by Dan Bernstein.

* WebKit2.xcodeproj/project.pbxproj:

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

4 years agoSpeculative Windows build fix after r216428.
mark.lam@apple.com [Mon, 8 May 2017 19:50:51 +0000 (19:50 +0000)]
Speculative Windows build fix after r216428.
https://bugs.webkit.org/show_bug.cgi?id=171776

Not reviewed.

* wtf/StackTrace.h:

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

4 years agoSearch events should not fire synchronously for search type input elements with incre...
jiewen_tan@apple.com [Mon, 8 May 2017 19:17:29 +0000 (19:17 +0000)]
Search events should not fire synchronously for search type input elements with incremental attribute set
https://bugs.webkit.org/show_bug.cgi?id=171376
<rdar://problem/31863296>

Reviewed by Chris Dumez.

Source/WebCore:

For some reasons, we fire search events immediately for search type input elements with incremental
attribute set only when the length of the input equals to zero. This behaviour should be prevented
as event listeners in the middle might perform unexpectedly.

Test: fast/forms/search/search-incremental-crash.html

* html/SearchInputType.cpp:
(WebCore::SearchInputType::startSearchEventTimer):

LayoutTests:

* fast/forms/search/search-incremental-crash-expected.txt: Added.
* fast/forms/search/search-incremental-crash.html: Added.

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

4 years agoClean UserMediaCaptureManager::capabilities return value
commit-queue@webkit.org [Mon, 8 May 2017 18:58:09 +0000 (18:58 +0000)]
Clean UserMediaCaptureManager::capabilities return value
https://bugs.webkit.org/show_bug.cgi?id=171808

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-08
Reviewed by Eric Carlson.

* WebProcess/cocoa/UserMediaCaptureManager.cpp:
(WebKit::UserMediaCaptureManager::capabilities):
* WebProcess/cocoa/UserMediaCaptureManager.h:

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

4 years agoText overlaps on http://www.duden.de/rechtschreibung/Acre
zalan@apple.com [Mon, 8 May 2017 18:38:20 +0000 (18:38 +0000)]
Text overlaps on www.duden.de/rechtschreibung/Acre
https://bugs.webkit.org/show_bug.cgi?id=171796
<rdar://problem/31036028>

Reviewed by Simon Fraser.

Source/WebCore:

Simple line layout pre-measures space using the primary font,
even if the space glyph requires a fallback font (and even if the string does not have a space in it at all).
When this width gets cached (see WidthCache) we might end up using it later during normal line layout and
it could produce incorrect layout.
This patch removes the space width caching from Simple line layout, since Font already caches it.

Test: fast/text/simple-line-layout-fallback-space-glyph.html

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::createLineRuns):
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
(WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
(WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):
* rendering/SimpleLineLayoutTextFragmentIterator.h:

LayoutTests:

* fast/text/simple-line-layout-fallback-space-glyph-expected.html: Added.
* fast/text/simple-line-layout-fallback-space-glyph.html: Added.

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

4 years agoRefactor ImageInputType::width() / height() for clarity
cdumez@apple.com [Mon, 8 May 2017 18:28:23 +0000 (18:28 +0000)]
Refactor ImageInputType::width() / height() for clarity
https://bugs.webkit.org/show_bug.cgi?id=171810

Reviewed by Zalan Bujtas.

Refactor ImageInputType::width() / height() for clarity.

* html/ImageInputType.cpp:
(WebCore::ImageInputType::height):
(WebCore::ImageInputType::width):

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

4 years agoBail out of simple line layout when hyphen needs a fallback font.
zalan@apple.com [Mon, 8 May 2017 18:19:31 +0000 (18:19 +0000)]
Bail out of simple line layout when hyphen needs a fallback font.
https://bugs.webkit.org/show_bug.cgi?id=171811

Reviewed by Antti Koivisto.

With hyphen: auto is set, we don't know if the hypen string is going to be used, until
after we started laying out the content and figured that the text overflows the line.
However it's too late to bail out of simple line layout at this point, so let's just
pre-check if the hyphen string needs a fallback font.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForStyle):

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

4 years agoREGRESSION(r216179): [GTK] Script install-dependencies misses liborc
clopez@igalia.com [Mon, 8 May 2017 18:13:52 +0000 (18:13 +0000)]
REGRESSION(r216179): [GTK] Script install-dependencies misses liborc
https://bugs.webkit.org/show_bug.cgi?id=171681

Reviewed by Carlos Garcia Campos.

* gtk/install-dependencies:

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

4 years agoTURNS gathering is not working properly
commit-queue@webkit.org [Mon, 8 May 2017 17:39:37 +0000 (17:39 +0000)]
TURNS gathering is not working properly
https://bugs.webkit.org/show_bug.cgi?id=171747

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-08
Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

* Source/webrtc/base/openssladapter.cc: Adding support for SNI in case of TLS ice candidate gathering.

Source/WebCore:

Covered by manual tests.

* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
(WebCore::configurationFromMediaEndpointConfiguration): Reveting TURNS ice server skipping.

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

4 years agoUnreviewed, rolling out r216419.
mcatanzaro@igalia.com [Mon, 8 May 2017 17:36:42 +0000 (17:36 +0000)]
Unreviewed, rolling out r216419.

Broke 70 layout tests on GTK bot

Reverted changeset:

"Ensure clean tree before AX cache update."
https://bugs.webkit.org/show_bug.cgi?id=171546
http://trac.webkit.org/changeset/216419

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

4 years agoCoreAudioCaptureSource should not modify its shared unit if already started/stopped
commit-queue@webkit.org [Mon, 8 May 2017 17:31:54 +0000 (17:31 +0000)]
CoreAudioCaptureSource should not modify its shared unit if already started/stopped
https://bugs.webkit.org/show_bug.cgi?id=171804

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-08
Reviewed by Jer Noble.

Manual testing only since CoreAudioSharedUnit is not mocked.

* platform/mediastream/mac/CoreAudioCaptureSource.cpp:
(WebCore::CoreAudioCaptureSource::startProducingData): Exit early if source is already started.
(WebCore::CoreAudioCaptureSource::stopProducingData): Exit early if source is already stopped.

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

4 years agoComposedTreeIterator does not traverse all slotted children if the traversal root...
antti@apple.com [Mon, 8 May 2017 17:20:54 +0000 (17:20 +0000)]
ComposedTreeIterator does not traverse all slotted children if the traversal root is a slot element.
https://bugs.webkit.org/show_bug.cgi?id=171375
<rdar://problem/31863184>

Reviewed by Zalan Bujtas.

Source/WebCore:

We were hitting an assert when using details element with a flow thread. The root cause for this turned
out to be that we only traversed the first slotted child if the traversal root was a slot element.

Test: fast/html/details-flow-thread.html

* dom/ComposedTreeIterator.cpp:
(WebCore::ComposedTreeIterator::traverseNextLeavingContext):

    Try to traverse to the next slotted child before testing if we at the end of the current context.

LayoutTests:

* fast/html/details-flow-thread-expected.txt: Added.
* fast/html/details-flow-thread.html: Added.
* fast/shadow-dom/composed-tree-slots-expected.txt:
* fast/shadow-dom/composed-tree-slots.html:

    Expand the test so it also prints out slot subtrees using slots as traversal roots.

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

4 years agoWebAssembly: don't just emit extended offset adds for patch
jfbastien@apple.com [Mon, 8 May 2017 17:06:29 +0000 (17:06 +0000)]
WebAssembly: don't just emit extended offset adds for patch
https://bugs.webkit.org/show_bug.cgi?id=171799

Reviewed by Mark Lam.

It isn't necessary to restrict.

* b3/air/AirLowerStackArgs.cpp:
(JSC::B3::Air::lowerStackArgs):

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

4 years agoIntroduce ExceptionScope::assertNoException() and releaseAssertNoException().
mark.lam@apple.com [Mon, 8 May 2017 16:56:32 +0000 (16:56 +0000)]
Introduce ExceptionScope::assertNoException() and releaseAssertNoException().
https://bugs.webkit.org/show_bug.cgi?id=171776

Reviewed by Keith Miller.

Source/JavaScriptCore:

Instead of ASSERT(!scope.exception()), we can now do scope.assertNoException().
Ditto for RELEASE_ASSERT and scope.releaseAssertNoException().

The advantage of using ExceptionScope::assertNoException() and
releaseAssertNoException() is that if the assertion fails, these utility
functions will print the stack trace for where the unexpected exception is
detected as well as where the unexpected exception was thrown from.  This makes
it much easier to debug the source of unhandled exceptions.

* debugger/Debugger.cpp:
(JSC::Debugger::pauseIfNeeded):
* dfg/DFGOperations.cpp:
* interpreter/Interpreter.cpp:
(JSC::eval):
(JSC::notifyDebuggerOfUnwinding):
(JSC::Interpreter::executeProgram):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):
(JSC::Interpreter::execute):
(JSC::Interpreter::debug):
* interpreter/ShadowChicken.cpp:
(JSC::ShadowChicken::functionsOnStack):
* jsc.cpp:
(GlobalObject::moduleLoaderResolve):
(GlobalObject::moduleLoaderFetch):
(functionGenerateHeapSnapshot):
(functionSamplingProfilerStackTraces):
(box):
(runWithScripts):
* runtime/AbstractModuleRecord.cpp:
(JSC::AbstractModuleRecord::finishCreation):
* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint):
* runtime/Completion.cpp:
(JSC::rejectPromise):
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::sanitizedToString):
* runtime/ExceptionHelpers.cpp:
(JSC::createError):
* runtime/ExceptionScope.cpp:
(JSC::ExceptionScope::unexpectedExceptionMessage):
* runtime/ExceptionScope.h:
(JSC::ExceptionScope::assertNoException):
(JSC::ExceptionScope::releaseAssertNoException):
(JSC::ExceptionScope::unexpectedExceptionMessage):
* runtime/GenericArgumentsInlines.h:
(JSC::GenericArguments<Type>::defineOwnProperty):
* runtime/IntlCollator.cpp:
(JSC::IntlCollator::createCollator):
(JSC::IntlCollator::resolvedOptions):
* runtime/IntlDateTimeFormat.cpp:
(JSC::IntlDateTimeFormat::resolvedOptions):
(JSC::IntlDateTimeFormat::format):
* runtime/IntlNumberFormat.cpp:
(JSC::IntlNumberFormat::createNumberFormat):
(JSC::IntlNumberFormat::resolvedOptions):
* runtime/JSCJSValue.cpp:
(JSC::JSValue::putToPrimitiveByIndex):
* runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
(JSC::genericTypedArrayViewProtoFuncIncludes):
(JSC::genericTypedArrayViewProtoFuncIndexOf):
(JSC::genericTypedArrayViewProtoFuncLastIndexOf):
(JSC::genericTypedArrayViewPrivateFuncSubarrayCreate):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncHostPromiseRejectionTracker):
* runtime/JSModuleEnvironment.cpp:
(JSC::JSModuleEnvironment::getOwnPropertySlot):
* runtime/JSModuleLoader.cpp:
(JSC::JSModuleLoader::finishCreation):
* runtime/JSModuleNamespaceObject.cpp:
(JSC::JSModuleNamespaceObject::finishCreation):
* runtime/JSONObject.cpp:
(JSC::Stringifier::toJSON):
* runtime/JSObject.cpp:
(JSC::JSObject::ordinaryToPrimitive):
* runtime/JSPropertyNameEnumerator.h:
(JSC::propertyNameEnumerator):
* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorGetOwnPropertyDescriptors):
(JSC::objectConstructorDefineProperty):
* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncHasOwnProperty):
* runtime/ProgramExecutable.cpp:
(JSC::ProgramExecutable::initializeGlobalProperties):
* runtime/ReflectObject.cpp:
(JSC::reflectObjectDefineProperty):
* runtime/SamplingProfiler.cpp:
(JSC::SamplingProfiler::StackFrame::nameFromCallee):
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncRepeatCharacter):
* runtime/TemplateRegistry.cpp:
(JSC::TemplateRegistry::getTemplateObject):
* runtime/VM.cpp:
(JSC::VM::throwException):
* runtime/VM.h:
(JSC::VM::nativeStackTraceOfLastThrow):
(JSC::VM::clearException):
* wasm/WasmB3IRGenerator.cpp:
* wasm/js/JSWebAssemblyInstance.cpp:
(JSC::JSWebAssemblyInstance::create):

Source/WebCore:

No new tests because there's no behavior change in functionality.  We're only
refactoring the code to use the new assertion utility function.

* Modules/plugins/QuickTimePluginReplacement.mm:
(WebCore::QuickTimePluginReplacement::installReplacement):
* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::getJSArrayFromJSON):
(WebCore::getStringFromJSON):
(WebCore::getBooleanFromJSON):
* bindings/js/JSCustomElementRegistryCustom.cpp:
(WebCore::JSCustomElementRegistry::whenDefined):
* bindings/js/JSDOMExceptionHandling.cpp:
(WebCore::propagateExceptionSlowPath):
(WebCore::throwNotSupportedError):
(WebCore::throwInvalidStateError):
(WebCore::throwSecurityError):
(WebCore::throwDOMSyntaxError):
(WebCore::throwDataCloneError):
(WebCore::throwIndexSizeError):
(WebCore::throwTypeMismatchError):
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::makeThisTypeErrorForBuiltins):
(WebCore::makeGetterTypeErrorForBuiltins):
* bindings/js/JSDOMGlobalObjectTask.cpp:
* bindings/js/JSDOMPromise.h:
(WebCore::callPromiseFunction):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowMicrotaskCallback::call):
* bindings/js/JSMainThreadExecState.h:
(WebCore::JSMainThreadExecState::~JSMainThreadExecState):
* bindings/js/ReadableStreamDefaultController.cpp:
(WebCore::ReadableStreamDefaultController::isControlledReadableStreamLocked):
* bindings/js/ReadableStreamDefaultController.h:
(WebCore::ReadableStreamDefaultController::enqueue):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::readTerminal):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateSerializerFunction):
* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::JSTestNode::serialize):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObj::serialize):
* bindings/scripts/test/JS/JSTestSerialization.cpp:
(WebCore::JSTestSerialization::serialize):
* bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
(WebCore::JSTestSerializationInherit::serialize):
* bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
(WebCore::JSTestSerializationInheritFinal::serialize):
* contentextensions/ContentExtensionParser.cpp:
(WebCore::ContentExtensions::getTypeFlags):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
(WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange):
(WebCore::HTMLMediaElement::getCurrentMediaControlsStatus):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):

Source/WTF:

1. Add an option to skip some number of top frames when capturing the StackTrace.
2. Add an option to use an indentation string when dumping the StackTrace.

* wtf/StackTrace.cpp:
(WTF::StackTrace::captureStackTrace):
(WTF::StackTrace::dump):
* wtf/StackTrace.h:

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