WebKit-https.git
2 years agoJSCustomElementInterface::invokeCallback can be called with a null callback because...
msaboff@apple.com [Sat, 28 Jan 2017 00:03:36 +0000 (00:03 +0000)]
JSCustomElementInterface::invokeCallback can be called with a null callback because Weak<>
https://bugs.webkit.org/show_bug.cgi?id=167522

Reviewed by Filip Pizlo.

Added all provided callbacks to the global object with a private name the same way
that the constructor was added.  This will keep these callbacks from being GC'ed.

* bindings/js/JSCustomElementRegistryCustom.cpp:
(WebCore::JSCustomElementRegistry::define):

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

2 years ago[Cocoa] Prepare ComplexTextController for unit testing
mmaxfield@apple.com [Fri, 27 Jan 2017 23:56:58 +0000 (23:56 +0000)]
[Cocoa] Prepare ComplexTextController for unit testing
https://bugs.webkit.org/show_bug.cgi?id=167493

Reviewed by Simon Fraser.

Addressing post-review comments from Simon Fraser.

Source/WebCore:

* platform/graphics/FontCascade.h:
* platform/graphics/mac/ComplexTextController.h:
(WebCore::ComplexTextController::ComplexTextRun::createForTesting):
* platform/graphics/mac/ComplexTextControllerCoreText.h:
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):

Tools:

* TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp:
(TestWebKitAPI::TEST_F):

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

2 years agoTweak the test to avoid one pixel of difference on some hardware.
simon.fraser@apple.com [Fri, 27 Jan 2017 23:43:33 +0000 (23:43 +0000)]
Tweak the test to avoid one pixel of difference on some hardware.

* css3/filters/backdrop/backdrop-filter-uneven-corner-radii-expected.html:
* css3/filters/backdrop/backdrop-filter-uneven-corner-radii.html:

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

2 years agoExtend create_hash_table to specify Intrinsic
utatane.tea@gmail.com [Fri, 27 Jan 2017 23:29:26 +0000 (23:29 +0000)]
Extend create_hash_table to specify Intrinsic
https://bugs.webkit.org/show_bug.cgi?id=167505

Reviewed by Sam Weinig.

This patch extends create_hash_table to specify Intrinsic.
We can set Intrinsic in the static property table definition
in runtime/XXX.h.

And drop the adhoc code for String.fromCharCode in create_hash_table.

* create_hash_table:
* runtime/StringConstructor.cpp:

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

2 years agoElement with a backdrop-filter and a mask may not correctly mask the backdrop
simon.fraser@apple.com [Fri, 27 Jan 2017 23:16:17 +0000 (23:16 +0000)]
Element with a backdrop-filter and a mask may not correctly mask the backdrop
https://bugs.webkit.org/show_bug.cgi?id=167456
rdar://problem/29320059

Reviewed by Antoine Quint.

Source/WebCore:

If a layer had a backdrop filter, but also corner radii that triggered using a mask layer,
then the call to updateClippingStrategy() in GraphicsLayerCA::updateBackdropFiltersRect() would
set the backdrop layer's mask, but GraphicsLayerCA::updateMaskLayer() would promptly then set
the mask layer back to nil.

Fix by having GraphicsLayerCA::updateMaskLayer() put the mask on the structural layer, if there
is one. We always have a structural layer with backdrops, so this will mask both the layer
and the backdrop.

Test: css3/filters/backdrop/backdrop-filter-uneven-corner-radii.html

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateMaskLayer):
* platform/graphics/mac/WebLayer.mm:
(-[CALayer _descriptionWithPrefix:]): Dump the mask layer.

LayoutTests:

* css3/filters/backdrop/backdrop-filter-uneven-corner-radii-expected.html: Added.
* css3/filters/backdrop/backdrop-filter-uneven-corner-radii.html: Added.

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

2 years agoFix remaining bad uses of logDiagnosticMessageWithValue()
cdumez@apple.com [Fri, 27 Jan 2017 23:11:17 +0000 (23:11 +0000)]
Fix remaining bad uses of logDiagnosticMessageWithValue()
https://bugs.webkit.org/show_bug.cgi?id=167526

Reviewed by Alex Christensen.

Source/WebCore:

Drop unused keys, add new ones.

* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::networkCacheFailureReasonKey):
(WebCore::DiagnosticLoggingKeys::networkCacheUnusedReasonKey):
(WebCore::DiagnosticLoggingKeys::networkCacheReuseFailureKey):
(WebCore::DiagnosticLoggingKeys::backNavigationDeltaKey):
(WebCore::DiagnosticLoggingKeys::userZoomActionKey):
(WebCore::DiagnosticLoggingKeys::deltaKey): Deleted.
(WebCore::DiagnosticLoggingKeys::backNavigationKey): Deleted.
(WebCore::DiagnosticLoggingKeys::requestKey): Deleted.
(WebCore::DiagnosticLoggingKeys::unusableCachedEntryKey): Deleted.
(WebCore::DiagnosticLoggingKeys::userKey): Deleted.
(WebCore::DiagnosticLoggingKeys::zoomedKey): Deleted.
(WebCore::DiagnosticLoggingKeys::notInCacheKey): Deleted.
* page/DiagnosticLoggingKeys.h:

Source/WebKit2:

Fix remaining bad uses of logDiagnosticMessageWithValue(). It can only
be called with numeric values.

* NetworkProcess/cache/NetworkCacheStatistics.cpp:
(WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
(WebKit::NetworkCache::Statistics::recordRetrievalFailure):
(WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::goToItem):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::willStartUserTriggeredZooming):

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

2 years agoProclaim that we are considering font-display, rhythmic sizing, and text decoration...
mmaxfield@apple.com [Fri, 27 Jan 2017 22:39:33 +0000 (22:39 +0000)]
Proclaim that we are considering font-display, rhythmic sizing, and text decoration level 4
https://bugs.webkit.org/show_bug.cgi?id=167340

Reviewed by Saam Barati.

* features.json:

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

2 years agomedia/track/track-in-band-style.html is flaky
jer.noble@apple.com [Fri, 27 Jan 2017 22:23:32 +0000 (22:23 +0000)]
media/track/track-in-band-style.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=167516

Reviewed by Eric Carlson.

Update the test to use 'cuechange' rather than a 200ms timer.

* media/track/track-in-band-style-expected.txt:
* media/track/track-in-band-style.html:
* platform/mac/TestExpectations:

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

2 years agoFix diagnostic logging under loader/
cdumez@apple.com [Fri, 27 Jan 2017 21:07:57 +0000 (21:07 +0000)]
Fix diagnostic logging under loader/
https://bugs.webkit.org/show_bug.cgi?id=167512

Reviewed by Alex Christensen.

Fix diagnostic logging under loader/. We should not be using logDiagnosticLoggingWithValue()
without a numeric value.

* loader/ResourceLoader.cpp:
(WebCore::logResourceResponseSource):
* loader/SubresourceLoader.cpp:
(WebCore::logResourceLoaded):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::logMemoryCacheResourceRequest):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::logRevalidation):
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::memoryCacheEntryDecisionKey):
(WebCore::DiagnosticLoggingKeys::memoryCacheUsageKey):
(WebCore::DiagnosticLoggingKeys::cachedResourceRevalidationReasonKey):
(WebCore::DiagnosticLoggingKeys::resourceLoadedKey):
(WebCore::DiagnosticLoggingKeys::resourceResponseSourceKey):
* page/DiagnosticLoggingKeys.h:

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

2 years agoscanExternalRememberedSet needs to mergeIfNecessary
fpizlo@apple.com [Fri, 27 Jan 2017 21:01:50 +0000 (21:01 +0000)]
scanExternalRememberedSet needs to mergeIfNecessary
https://bugs.webkit.org/show_bug.cgi?id=167523

Reviewed by Keith Miller.

The protocol for opaque roots is that if you add to them outside of draining, then you need to call
mergeIfNecessary.

This means that every MarkingConstraint that adds opaque roots needs to mergeIfNecessary after.

scanExternalRememberedSet transitively calls addOpaqueRoot, is called from a MarkingConstraint, and
was missing a call to mergeIfNecessary. This fixes it.

* API/JSVirtualMachine.mm:
(scanExternalRememberedSet):

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

2 years agoFix diagnostic logging in media code
cdumez@apple.com [Fri, 27 Jan 2017 20:35:53 +0000 (20:35 +0000)]
Fix diagnostic logging in media code
https://bugs.webkit.org/show_bug.cgi?id=167510

Reviewed by Alex Christensen.

Fix diagnostic logging in media code. It should not use logDiagnosticMessageWithValue()
with a non-numeric value.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::loadResource):
(WebCore::HTMLMediaElement::updatePlayState):

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

2 years agoRound CPU Usage diagnostic logging to 2 significant digits
cdumez@apple.com [Fri, 27 Jan 2017 20:33:12 +0000 (20:33 +0000)]
Round CPU Usage diagnostic logging to 2 significant digits
https://bugs.webkit.org/show_bug.cgi?id=167515
<rdar://problem/30236297>

Reviewed by Antti Koivisto.

Round CPU Usage diagnostic logging to 2 significant digits
as requested by diagnostic logging team.

* UIProcess/PerActivityStateCPUUsageSampler.cpp:
(WebKit::toStringRoundingSignificantFigures):
(WebKit::PerActivityStateCPUUsageSampler::loggingTimerFired):

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

2 years ago[Cocoa] Prepare ComplexTextController for unit testing
mmaxfield@apple.com [Fri, 27 Jan 2017 20:28:11 +0000 (20:28 +0000)]
[Cocoa] Prepare ComplexTextController for unit testing
https://bugs.webkit.org/show_bug.cgi?id=167493

Reviewed by Dean Jackson.

Source/WebCore:

ComplexTextController has three phases:
1. Interrogate Core Text about some text
2. Compute layout advances and paint advances from the information retrieved from
Core Text
3. Iterate through the layout advances or paint advances.

This patch tests phases 2 and 3 by chopping ComplexTextController between
phases 1 and 2, and injecting foreign metrics from a unit test. These metrics
have been gathered from real-world uses; however, a layout test is not appropriate
because the fonts which produced these metrics are not licensed appropriately.
The tests can enforce the correct behavior by using ComplexTextController's
public API.

This is in preparation for https://bugs.webkit.org/show_bug.cgi?id=166013.
However, the fix for that bug is quite large, so I've split out this smaller piece
to ease the reviewing burden. The tests I've added are disabled for now (because
they fail), but will be enabled by the fix to that bug.

No new tests because there is no behavior change.

* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/FontCascade.h:
* platform/graphics/FontDescription.h:
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::ComplexTextController):
(WebCore::ComplexTextController::finishConstruction):
* platform/graphics/mac/ComplexTextController.h:
(WebCore::ComplexTextController::ComplexTextRun::createForTesting):
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):

Tools:

Create four unit tests.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp: Added.
(TestWebKitAPI::ComplexTextControllerTest::SetUp):
(TestWebKitAPI::TEST_F):

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

2 years agoLayoutTest fast/mediastream/getUserMedia-webaudio.html is flaky
commit-queue@webkit.org [Fri, 27 Jan 2017 19:37:05 +0000 (19:37 +0000)]
LayoutTest fast/mediastream/getUserMedia-webaudio.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=167513

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2017-01-27

* TestExpectations: Not yet ready to run this test.

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

2 years agoSimple line layout: Do not bail out on -webkit-line-box-contain: block glyphs unless...
zalan@apple.com [Fri, 27 Jan 2017 19:24:26 +0000 (19:24 +0000)]
Simple line layout: Do not bail out on -webkit-line-box-contain: block glyphs unless text overflows vertically.
https://bugs.webkit.org/show_bug.cgi?id=167481
<rdar://problem/30180150>

Reviewed by Antti Koivisto.

Source/WebCore:

Since -webkit-line-box-contain: glyphs requires variable line height support, we can use simple line layout
only when each line happen to have the same height ('block' property value is set, glyphs do not overflow the block line height).

Test: fast/text/simple-line-layout-line-box-contain-glyphs.html

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForText):
(WebCore::SimpleLineLayout::canUseForFontAndText):
(WebCore::SimpleLineLayout::canUseForStyle):
(WebCore::SimpleLineLayout::printReason):

LayoutTests:

* fast/text/simple-line-layout-line-box-contain-glyphs-expected.html: Added.
* fast/text/simple-line-layout-line-box-contain-glyphs.html: Added.

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

2 years agoFix PageCache diagnostic logging
cdumez@apple.com [Fri, 27 Jan 2017 19:14:57 +0000 (19:14 +0000)]
Fix PageCache diagnostic logging
https://bugs.webkit.org/show_bug.cgi?id=167508

Reviewed by Sam Weinig.

Fix PageCache diagnostic logging. It should not call logDiagnosticMessageWithValue()
with a non-numeric value. Use logDiagnosticMessage() instead.

* history/PageCache.cpp:
(WebCore::logPageCacheFailureDiagnosticMessage):
(WebCore::canCacheFrame):
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::pageCacheFailureKey):
(WebCore::DiagnosticLoggingKeys::successKey): Deleted.
(WebCore::DiagnosticLoggingKeys::failureKey): Deleted.
* page/DiagnosticLoggingKeys.h:

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

2 years agoStyles should not show background-repeat-x/y, or -webkit-mask-repeat-x/y
commit-queue@webkit.org [Fri, 27 Jan 2017 18:58:13 +0000 (18:58 +0000)]
Styles should not show background-repeat-x/y, or -webkit-mask-repeat-x/y
https://bugs.webkit.org/show_bug.cgi?id=167255

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2017-01-27
Reviewed by Joseph Pecoraro.

Source/WebCore:

Test: inspector/css/css-property.html

* css/makeprop.pl:
(addProperty):
Add a generated function `isInternalCSSProperty` that checks the given CSSPropertyID against
a derived list of properties from CSSProperties.json with "internal-only".

* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getSupportedCSSProperties):
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyle::styleWithProperties):
Only pass CSS property payloads to the frontend if they are not internal.

LayoutTests:

Checks that internal-only CSS properties are marked as invalid when passed to WebInspector.

* inspector/css/css-property-expected.txt: Added.
* inspector/css/css-property.html: Added.

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

2 years agoImplement Cache-control: immutable
antti@apple.com [Fri, 27 Jan 2017 18:44:18 +0000 (18:44 +0000)]
Implement Cache-control: immutable
https://bugs.webkit.org/show_bug.cgi?id=167497

Reviewed by Chris Dumez.

Source/WebCore:

Cache-control value 'immutable' indicates that a subresource does not change and so does not need to be
revalidated on a normal reload. This can significantly speed up reloads and reduce network traffic.

It is has been implemented in Firefox and is already used by Facebook.

https://tools.ietf.org/html/draft-mcmanus-immutable-00
https://hacks.mozilla.org/2017/01/using-immutable-caching-to-speed-up-the-web/

This patch implements Cache-control: immutable for memory cache only. A disk cache implementation
doesn't seem necessary as the resource is basically always expected to be in memory cache on reload.

Immutable is only supported for https as suggested by the draft specification (and Gecko implementation).

Test: http/tests/cache/cache-control-immutable-http.html
      http/tests/cache/cache-control-immutable-https.html

* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::makeRevalidationDecision):

    On normal reloads (CachePolicyRevalidate) of https resources check for 'Cache-control: immutable'.
    If the resource is not expired don't revalidate it.

* platform/network/CacheValidation.cpp:
(WebCore::parseCacheControlDirectives):
* platform/network/CacheValidation.h:
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::cacheControlContainsImmutable):
* platform/network/ResourceResponseBase.h:

LayoutTests:

* http/tests/cache/cache-control-immutable-http-expected.txt: Added.
* http/tests/cache/cache-control-immutable-http.html: Added.
* http/tests/cache/cache-control-immutable-https-expected.txt: Added.
* http/tests/cache/cache-control-immutable-https.html: Added.
* http/tests/cache/resources/cache-control-immutable.js: Added.
* http/tests/cache/resources/iframe-with-script.cgi: Added.

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

2 years ago[WebRTC] Use MediaEndPointPeerConnection if not using libwebrtc
commit-queue@webkit.org [Fri, 27 Jan 2017 18:20:01 +0000 (18:20 +0000)]
[WebRTC] Use MediaEndPointPeerConnection if not using libwebrtc
https://bugs.webkit.org/show_bug.cgi?id=167504

Patch by Youenn Fablet <youennf@gmail.com> on 2017-01-27
Reviewed by Alex Christensen.

No change of behavior.

* Modules/mediastream/MediaEndpointPeerConnection.cpp: If libwebrtc, we should use libwebrtc peer connection backend.

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

2 years agoRebaseline bindings tests after r211238.
ryanhaddad@apple.com [Fri, 27 Jan 2017 17:29:33 +0000 (17:29 +0000)]
Rebaseline bindings tests after r211238.

Unreviewed test gardening.

* bindings/scripts/test/JS/JSTestDOMJIT.cpp:
(WebCore::JSTestDOMJIT::visitChildren):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTarget::visitChildren):
* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::JSTestNode::visitChildren):

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

2 years agoMarking media/modern-media-controls/layout-node/addChild.html as flaky.
ryanhaddad@apple.com [Fri, 27 Jan 2017 17:29:28 +0000 (17:29 +0000)]
Marking media/modern-media-controls/layout-node/addChild.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=167461

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

2 years ago[css-grid] Move Grid class out of RenderGrid
svillar@igalia.com [Fri, 27 Jan 2017 16:28:24 +0000 (16:28 +0000)]
[css-grid] Move Grid class out of RenderGrid
https://bugs.webkit.org/show_bug.cgi?id=167418

Reviewed by Antti Koivisto.

The RenderGrid should be able to use different implementations of
the Grid class. The latter is big enough to be in its own file. That
would help on the effort of moving the grid track sizing algorithm
out of RenderGrid too.

No new tests required as we're just moving code.

* CMakeLists.txt:
* rendering/Grid.cpp: Added.
(WebCore::Grid::Grid):
(WebCore::Grid::numTracks):
(WebCore::Grid::ensureGridSize):
(WebCore::Grid::insert):
(WebCore::Grid::setSmallestTracksStart):
(WebCore::Grid::smallestTrackStart):
(WebCore::Grid::gridItemArea):
(WebCore::Grid::setGridItemArea):
(WebCore::Grid::setAutoRepeatTracks):
(WebCore::Grid::autoRepeatTracks):
(WebCore::Grid::setAutoRepeatEmptyColumns):
(WebCore::Grid::setAutoRepeatEmptyRows):
(WebCore::Grid::hasAutoRepeatEmptyTracks):
(WebCore::Grid::isEmptyAutoRepeatTrack):
(WebCore::Grid::autoRepeatEmptyTracks):
(WebCore::Grid::gridItemSpan):
(WebCore::Grid::setNeedsItemsPlacement):
(WebCore::GridIterator::GridIterator):
(WebCore::GridIterator::nextGridItem):
(WebCore::GridIterator::isEmptyAreaEnough):
(WebCore::GridIterator::nextEmptyGridArea):
* rendering/Grid.h: Added.
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeEmptyTracksForAutoRepeat):
(WebCore::RenderGrid::Grid::numTracks): Deleted.
(WebCore::RenderGrid::Grid::ensureGridSize): Deleted.
(WebCore::RenderGrid::Grid::insert): Deleted.
(WebCore::RenderGrid::Grid::setSmallestTracksStart): Deleted.
(WebCore::RenderGrid::Grid::smallestTrackStart): Deleted.
(WebCore::RenderGrid::Grid::gridItemArea): Deleted.
(WebCore::RenderGrid::Grid::setGridItemArea): Deleted.
(WebCore::RenderGrid::Grid::setAutoRepeatTracks): Deleted.
(WebCore::RenderGrid::Grid::autoRepeatTracks): Deleted.
(WebCore::RenderGrid::Grid::setAutoRepeatEmptyColumns): Deleted.
(WebCore::RenderGrid::Grid::setAutoRepeatEmptyRows): Deleted.
(WebCore::RenderGrid::Grid::hasAutoRepeatEmptyTracks): Deleted.
(WebCore::RenderGrid::Grid::isEmptyAutoRepeatTrack): Deleted.
(WebCore::RenderGrid::Grid::autoRepeatEmptyTracks): Deleted.
(WebCore::RenderGrid::Grid::gridItemSpan): Deleted.
(WebCore::RenderGrid::Grid::setNeedsItemsPlacement): Deleted.
(WebCore::RenderGrid::GridIterator::GridIterator): Deleted.
(WebCore::RenderGrid::GridIterator::nextGridItem): Deleted.
(WebCore::RenderGrid::GridIterator::isEmptyAreaEnough): Deleted.
(WebCore::RenderGrid::GridIterator::nextEmptyGridArea): Deleted.
* rendering/RenderGrid.h:

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

2 years agoUnreviewed, update scroll snapping demos to use current Module 1 spec
wenson_hsieh@apple.com [Fri, 27 Jan 2017 15:58:05 +0000 (15:58 +0000)]
Unreviewed, update scroll snapping demos to use current Module 1 spec

* demos/scroll-snap/index.html:

Adopt the new CSS properties scroll-snap-type and scroll-snap-align.

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

2 years ago[Threaded Compositor] Stop creating the GLContext on demand the first time makeContex...
carlosgc@webkit.org [Fri, 27 Jan 2017 12:10:56 +0000 (12:10 +0000)]
[Threaded Compositor] Stop creating the GLContext on demand the first time makeContextCurrent is called
https://bugs.webkit.org/show_bug.cgi?id=167496

Reviewed by Žan Doberšek.

This is causing problems with animations when entering AC mode on demand. What happens is that the threaded
compositor is created, then the animation is scheduled and during the first animation iteration the GLContext is
created, making the first frame of the animation quite slow. In my computer creating the GLContext takes 0.8
seconds. If the animation duration is less than the time it takes to create the GLContext, the animation ends
without iterating. This causing timeouts in the bots in tests like
animations/animation-iteration-event-destroy-renderer.html that expect webkitAnimationIteration events that
never fire.

* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::ThreadedCompositor): Create the GLContext right after the compositing thread is
created if we already have a native surface handle.
(WebKit::ThreadedCompositor::createGLContext): Helper to create the GLContext.
(WebKit::ThreadedCompositor::setNativeSurfaceHandleForCompositing): Create the GLContext when a native surface
handle is given.
(WebKit::ThreadedCompositor::makeContextCurrent): Deleted.
(WebKit::ThreadedCompositor::renderLayerTree): Make the context cunrrent directly here.
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:

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

2 years agoImplement dynamic-import for WebCore
utatane.tea@gmail.com [Fri, 27 Jan 2017 10:49:23 +0000 (10:49 +0000)]
Implement dynamic-import for WebCore
https://bugs.webkit.org/show_bug.cgi?id=166926

Reviewed by Ryosuke Niwa.

Source/WebCore:

This patch introduces browser side dynamic-import implementation.
The dynamic-import is new ES feature which is now stage 3.
The JSC shell already implements it.

The dynamic-import allows us to kick module loading in a dynamic manner.
For example, you can write,

    await module = import(`${HOST}/hello.js`);

The dynamic `import` operator (this is not a function) returns a promise with
module namespace object if the module loading succeeds. Otherwise, it returns
a rejected promise.

And importantly, this feature allows us to kick module loading from classic script.
Previously, module loading can be only used from <script type="module"> tag. And
all the module loading is done statically.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/CachedModuleScriptLoader.cpp:
(WebCore::CachedModuleScriptLoader::load):
* bindings/js/CachedScriptFetcher.cpp:
(WebCore::CachedScriptFetcher::create):
(WebCore::CachedScriptFetcher::requestModuleScript):
requestModuleScript function is used only when loading a new module script.
So, LoadableClassicScript should use requestScriptWithCache to load itself.
We pass String() for cross origin mode for null cross origin attribute as
specified.

(WebCore::CachedScriptFetcher::requestScriptWithCache):
* bindings/js/CachedScriptFetcher.h:
(WebCore::CachedScriptFetcher::CachedScriptFetcher):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::moduleLoaderImportModule):
* bindings/js/JSDOMWindowBase.h:
* bindings/js/JSLazyEventListener.cpp:
(WebCore::JSLazyEventListener::initializeJSFunction):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::executeScript):
* bindings/js/ScriptModuleLoader.cpp:
(WebCore::resolveModuleSpecifier):
Extract the part of resolving module specifier to a static function to use
it in ScriptModuleLoader::resolve and ScriptModuleLoader::importModule.

(WebCore::ScriptModuleLoader::resolve):
(WebCore::rejectPromise):
(WebCore::ScriptModuleLoader::importModule):
New hook moduleLoaderImportModule is implemented. This hook is called when
`import` operator is used. This hook is responsible to
    1. resolve the module name to obtain module specifier. (like, resolve the
        relative URL to get absolute URL.)
    2. kick module loading with the resolved specifier.
When resolving the module name, the referrer information is needed.
For example, "./script.js" will be resolved to "http://example.com/script.js" if
the referrer module specifier is "http://example.com/".
If `import("./script.js")` is executed in the classic script
src="http://example.com/test.js", it starts loading "http://example.com/script.js".
So the information of the caller of `import` operator is necessary here.
This appropriate referrer is propagated by SourceOrigin.

* bindings/js/ScriptModuleLoader.h:
* dom/InlineClassicScript.h:
* dom/LoadableClassicScript.cpp:
(WebCore::LoadableClassicScript::load):
* dom/LoadableClassicScript.h:
* dom/LoadableModuleScript.h:
* dom/LoadableScript.h:
(WebCore::LoadableScript::LoadableScript):
(WebCore::LoadableScript::isClassicScript): Deleted.
(WebCore::LoadableScript::isModuleScript): Deleted.
* dom/ScriptElement.h:
* dom/ScriptElementCachedScriptFetcher.cpp: Copied from Source/WebCore/dom/InlineClassicScript.h.
(WebCore::ScriptElementCachedScriptFetcher::requestModuleScript):
This requestModuleScript will be used when the script tag (or modules imported from the script tag) uses `import` operator.
In classic scripts, `crossorigin` mode always becomes "omit" while module scripts
propagate the original `crossorigin` value.

* dom/ScriptElementCachedScriptFetcher.h: Copied from Source/WebCore/bindings/js/CachedScriptFetcher.h.
(WebCore::ScriptElementCachedScriptFetcher::crossOriginMode):
(WebCore::ScriptElementCachedScriptFetcher::ScriptElementCachedScriptFetcher):

LayoutTests:

* http/tests/misc/import-absolute-url-expected.txt: Added.
* http/tests/misc/import-absolute-url.html: Added.
* http/tests/security/contentSecurityPolicy/1.1/import-scriptnonce-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/1.1/import-scriptnonce.html: Added.
* http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed1.js: Added.
* http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed2.js: Added.
* http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed3.js: Added.
* http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed4.js: Added.
* http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed5.js: Added.
* http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-allowed6.js: Added.
* http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked1.js: Added.
* http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked2.js: Added.
* http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked3.js: Added.
* http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked4.js: Added.
* http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked5.js: Added.
* http/tests/security/contentSecurityPolicy/1.1/resources/import-scriptnonce-blocked6.js: Added.
* http/tests/security/import-module-crossorigin-loads-error-expected.txt: Added.
* http/tests/security/import-module-crossorigin-loads-error-src-expected.txt: Added.
* http/tests/security/import-module-crossorigin-loads-error-src.html: Added.
* http/tests/security/import-module-crossorigin-loads-error.html: Added.
* http/tests/security/import-module-crossorigin-loads-expected.txt: Added.
* http/tests/security/import-module-crossorigin-loads-src-expected.txt: Added.
* http/tests/security/import-module-crossorigin-loads-src.html: Added.
* http/tests/security/import-module-crossorigin-loads.html: Added.
* http/tests/security/import-script-crossorigin-loads-error-expected.txt: Added.
* http/tests/security/import-script-crossorigin-loads-error.html: Added.
* http/tests/security/import-script-crossorigin-loads-omit-expected.txt: Added.
* http/tests/security/import-script-crossorigin-loads-omit.html: Added.
* http/tests/security/resources/cors-deny.php: Added.
* http/tests/security/resources/import-module-crossorigin-loads-error-src.js: Added.
(import.string_appeared_here.then):
* http/tests/security/resources/import-module-crossorigin-loads-src.js: Added.
(import.string_appeared_here.then):
* js/dom/modules/import-execution-order-expected.txt: Added.
* js/dom/modules/import-execution-order.html: Copied from LayoutTests/js/dom/modules/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.html.
* js/dom/modules/import-from-handler-expected.txt: Added.
* js/dom/modules/import-from-handler.html: Copied from LayoutTests/js/dom/modules/module-src-simple.html.
* js/dom/modules/import-from-javascript-url-expected.txt: Added.
* js/dom/modules/import-from-javascript-url.html: Copied from LayoutTests/js/dom/modules/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.html.
* js/dom/modules/import-from-loaded-classic-expected.txt: Added.
* js/dom/modules/import-from-loaded-classic.html: Copied from LayoutTests/js/dom/modules/module-src-simple.html.
* js/dom/modules/import-from-loaded-module-expected.txt: Added.
* js/dom/modules/import-from-loaded-module.html: Copied from LayoutTests/js/dom/modules/module-src-simple.html.
* js/dom/modules/import-from-module-expected.txt: Added.
* js/dom/modules/import-from-module.html: Copied from LayoutTests/js/dom/modules/module-src-simple.html.
* js/dom/modules/import-incorrect-relative-specifier-expected.txt: Added.
* js/dom/modules/import-incorrect-relative-specifier.html: Copied from LayoutTests/js/dom/modules/module-src-simple.html.
* js/dom/modules/import-simple-expected.txt: Added.
* js/dom/modules/import-simple.html: Copied from LayoutTests/js/dom/modules/module-src-simple.html.
* js/dom/modules/module-document-write-src.html:
* js/dom/modules/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.html:
* js/dom/modules/module-execution-order-mixed-with-classic-scripts.html:
* js/dom/modules/module-execution-order-mixed.html:
* js/dom/modules/module-inline-dynamic.html:
* js/dom/modules/module-inline-simple.html:
* js/dom/modules/module-load-event-with-src.html:
* js/dom/modules/module-load-same-module-from-different-entry-point-dynamic.html:
* js/dom/modules/module-load-same-module-from-different-entry-point-in-src.html:
* js/dom/modules/module-load-same-module-from-different-entry-point.html:
* js/dom/modules/module-not-found-error-event-with-src-and-import.html:
* js/dom/modules/module-src-current-script.html:
* js/dom/modules/module-src-dynamic.html:
* js/dom/modules/module-src-simple.html:
* js/dom/modules/module-type-case-insensitive.html:
* js/dom/modules/module-will-fire-beforeload.html:
* js/dom/modules/nomodule-dynamic-classic-src.html:
* js/dom/modules/nomodule-has-no-effect-on-module-inline.html:
* js/dom/modules/nomodule-has-no-effect-on-module-src.html:
* js/dom/modules/nomodule-prevents-execution-classic-script-src.html:
* js/dom/modules/nomodule-reflect.html:
* js/dom/modules/resources/error-classic-script.js: Renamed from LayoutTests/js/dom/modules/script-tests/error-classic-script.js.
* js/dom/modules/resources/import-from-loaded-classic-finish.js: Added.
* js/dom/modules/resources/import-from-loaded-classic.js: Added.
* js/dom/modules/resources/import-from-loaded-module-finish.js: Added.
* js/dom/modules/resources/import-from-loaded-module.js: Added.
* js/dom/modules/resources/module-document-write-src.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-document-write-src.js.
* js/dom/modules/resources/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror-throw.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror-throw.js.
* js/dom/modules/resources/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.js.
* js/dom/modules/resources/module-execution-order-mixed-2.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-2.js.
* js/dom/modules/resources/module-execution-order-mixed-cappuccino.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-cappuccino.js.
* js/dom/modules/resources/module-execution-order-mixed-cocoa.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-cocoa.js.
* js/dom/modules/resources/module-execution-order-mixed-matcha.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-matcha.js.
* js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-2.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-with-classic-scripts-2.js.
* js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-cappuccino.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-with-classic-scripts-cappuccino.js.
* js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-cocoa.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-with-classic-scripts-cocoa.js.
* js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts-matcha.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-with-classic-scripts-matcha.js.
* js/dom/modules/resources/module-execution-order-mixed-with-classic-scripts.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed-with-classic-scripts.js.
* js/dom/modules/resources/module-execution-order-mixed.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-execution-order-mixed.js.
* js/dom/modules/resources/module-inline-dynamic.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-inline-dynamic.js.
* js/dom/modules/resources/module-inline-simple.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-inline-simple.js.
* js/dom/modules/resources/module-load-event-with-src.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-load-event-with-src.js.
* js/dom/modules/resources/module-load-same-module-from-different-entry-point.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-load-same-module-from-different-entry-point.js.
* js/dom/modules/resources/module-not-found-error-event-with-src-and-import.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-not-found-error-event-with-src-and-import.js.
* js/dom/modules/resources/module-src-current-script.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-src-current-script.js.
* js/dom/modules/resources/module-src-dynamic-cocoa.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-src-dynamic-cocoa.js.
* js/dom/modules/resources/module-src-dynamic.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-src-dynamic.js.
* js/dom/modules/resources/module-src-simple-cocoa.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-src-simple-cocoa.js.
* js/dom/modules/resources/module-src-simple.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-src-simple.js.
* js/dom/modules/resources/module-will-fire-beforeload.js: Renamed from LayoutTests/js/dom/modules/script-tests/module-will-fire-beforeload.js.

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

2 years ago[GTK] Stop forcing accelerated compositing by default
carlosgc@webkit.org [Fri, 27 Jan 2017 08:54:23 +0000 (08:54 +0000)]
[GTK] Stop forcing accelerated compositing by default
https://bugs.webkit.org/show_bug.cgi?id=167492

Reviewed by Žan Doberšek.

We are now ready to bring back the on demand accelerated compositing mode with the threaded
compositor. Unfortunately, having AC always enabled brought a lot of issues for many people. Not only it
requires a lot more memory but also caused rendering issues (or even nothing rendered at all) with some graphics
drivers. People started to use WEBKIT_DISABLE_COMPOSITING_MODE as a workaround, but that was not expected to be
used by users. So, entering/leaving AC when required by web contents is not actually the solution but a huge
improvement for many people. If we are eventually ready to force AC mode again, we'll change this again. Note
that we still have WEBKIT_DISABLE_COMPOSITING_MODE, but now also WEBKIT_FORCE_COMPOSITING_MODE for testing and debugging.

* UIProcess/gtk/WebPreferencesGtk.cpp:
(WebKit::WebPreferences::platformInitializeStore):

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

2 years agoUnreviewed. Fix GTK+ debug build after r211247.
carlosgc@webkit.org [Fri, 27 Jan 2017 08:26:40 +0000 (08:26 +0000)]
Unreviewed. Fix GTK+ debug build after r211247.

* heap/GCAssertions.h:

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

2 years agoRevert r210474 it is no longer needed
cdumez@apple.com [Fri, 27 Jan 2017 07:14:47 +0000 (07:14 +0000)]
Revert r210474 it is no longer needed
https://bugs.webkit.org/show_bug.cgi?id=167487

Reviewed by Daniel Bates.

Revert r210474 it is no longer needed after r211254.

* dom/Document.cpp:
(WebCore::Document::canNavigate):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::handleClick):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::handleClick):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::urlSelected):
(WebCore::FrameLoader::submitForm):
(WebCore::FrameLoader::loadFrameRequest):
* mathml/MathMLElement.cpp:
(WebCore::MathMLElement::defaultEventHandler):
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::defaultEventHandler):

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

2 years ago[WebRTC] Implement WebRTC PeerConnection backend based on libwebrtc
commit-queue@webkit.org [Fri, 27 Jan 2017 06:09:41 +0000 (06:09 +0000)]
[WebRTC] Implement WebRTC PeerConnection backend based on libwebrtc
https://bugs.webkit.org/show_bug.cgi?id=167289

Patch by Youenn Fablet <youennf@gmail.com> on 2017-01-26
Reviewed by Alex Christensen.

Introducing an initial implementation of WebRTC peer connection backend based on LibWebRTC.
This is done behind a compilation flag which is off by default, until the implementation is ready.

The backend implements the PeerConnectionBackend API.
The implementation is split into LibWebRTCPeerConnectionBackend which contains mostly generic code and
passes the real work to LibWebRTCMediaEndpoint.
The latter class is implementing the API using LibWebRTC.

* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: Added.
(WebCore::LibWebRTCMediaEndpoint::LibWebRTCMediaEndpoint):
(WebCore::sessionDescriptionType):
(WebCore::LibWebRTCMediaEndpoint::doSetLocalDescription):
(WebCore::LibWebRTCMediaEndpoint::doSetRemoteDescription):
(WebCore::LibWebRTCMediaEndpoint::addPendingIceCandidates):
(WebCore::streamId):
(WebCore::LibWebRTCMediaEndpoint::doCreateOffer):
(WebCore::LibWebRTCMediaEndpoint::doCreateAnswer):
(WebCore::LibWebRTCMediaEndpoint::getStats):
(WebCore::LibWebRTCMediaEndpoint::StatsCollector::StatsCollector):
(WebCore::LibWebRTCMediaEndpoint::StatsCollector::OnStatsDelivered):
(WebCore::signalingState):
(WebCore::LibWebRTCMediaEndpoint::OnSignalingChange):
(WebCore::trackId):
(WebCore::createMediaStreamTrack):
(WebCore::LibWebRTCMediaEndpoint::addStream):
(WebCore::LibWebRTCMediaEndpoint::OnAddStream):
(WebCore::LibWebRTCMediaEndpoint::OnRemoveStream):
(WebCore::LibWebRTCMediaEndpoint::OnDataChannel):
(WebCore::LibWebRTCMediaEndpoint::stop):
(WebCore::LibWebRTCMediaEndpoint::OnRenegotiationNeeded):
(WebCore::iceConnectionState):
(WebCore::LibWebRTCMediaEndpoint::OnIceConnectionChange):
(WebCore::LibWebRTCMediaEndpoint::OnIceGatheringChange):
(WebCore::LibWebRTCMediaEndpoint::OnIceCandidate):
(WebCore::LibWebRTCMediaEndpoint::OnIceCandidatesRemoved):
(WebCore::LibWebRTCMediaEndpoint::createSessionDescriptionSucceeded):
(WebCore::LibWebRTCMediaEndpoint::createSessionDescriptionFailed):
(WebCore::LibWebRTCMediaEndpoint::setLocalSessionDescriptionSucceeded):
(WebCore::LibWebRTCMediaEndpoint::setLocalSessionDescriptionFailed):
(WebCore::LibWebRTCMediaEndpoint::setRemoteSessionDescriptionSucceeded):
(WebCore::LibWebRTCMediaEndpoint::setRemoteSessionDescriptionFailed):
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h: Added.
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp: Added.
(WebCore::createLibWebRTCPeerConnectionBackend):
(WebCore::libWebRTCProvider):
(WebCore::LibWebRTCPeerConnectionBackend::LibWebRTCPeerConnectionBackend):
(WebCore::configurationFromMediaEndpointConfiguration):
(WebCore::LibWebRTCPeerConnectionBackend::setConfiguration):
(WebCore::LibWebRTCPeerConnectionBackend::getStats):
(WebCore::LibWebRTCPeerConnectionBackend::doSetLocalDescription):
(WebCore::LibWebRTCPeerConnectionBackend::doSetRemoteDescription):
(WebCore::LibWebRTCPeerConnectionBackend::doCreateOffer):
(WebCore::LibWebRTCPeerConnectionBackend::doCreateAnswer):
(WebCore::LibWebRTCPeerConnectionBackend::doStop):
(WebCore::LibWebRTCPeerConnectionBackend::doAddIceCandidate):
(WebCore::LibWebRTCPeerConnectionBackend::markAsNeedingNegotiation):
(WebCore::LibWebRTCPeerConnectionBackend::createReceiver):
(WebCore::LibWebRTCPeerConnectionBackend::createDataChannelHandler):
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h: Added.
* WebCore.xcodeproj/project.pbxproj:

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

2 years agoCrash when navigating back to a page in PacheCache when one of its frames has been...
cdumez@apple.com [Fri, 27 Jan 2017 05:36:19 +0000 (05:36 +0000)]
Crash when navigating back to a page in PacheCache when one of its frames has been removed
https://bugs.webkit.org/show_bug.cgi?id=167421
<rdar://problem/30188490>

Reviewed by Darin Adler.

Source/WebCore:

Disallow page caching of a page if:
1. The main window has an opener (i.e. it was opened via window.open)
2. It has ever used window.open()

This is because allowing page caching in this case would allow such
windows to script each other even after one of them entered Page
Cache. Allowing this is dangerous and easily causes crashes.

This is a short term workaround until we find a better solution to
the problem. One issue is this workaround is that navigating back
to a page that has an opener or used window.open() will not longer
get the page from PageCache. As a result, state may be lost upon
navigating back. However, we never guarantee that pages get page
cached, and Chrome does not have a PageCache.

Tests: fast/history/page-cache-after-window-open.html
       fast/history/page-cache-back-navigation-crash.html
       fast/history/page-cache-with-opener.html

* dom/Document.cpp:
(WebCore::Document::hasEverCalledWindowOpen):
(WebCore::Document::markHasCalledWindowOpen):
* dom/Document.h:
* history/PageCache.cpp:
(WebCore::canCachePage):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::createWindow):
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::hasCalledWindowOpenKey):
(WebCore::DiagnosticLoggingKeys::hasOpenerKey):
* page/DiagnosticLoggingKeys.h:
* page/Page.cpp:
(WebCore::Page::openedByWindowOpen):
* page/Page.h:
* page/Settings.in:

Source/WebKit/mac:

Add a new setting allowing layout tests to enable PageCache in a window
that has an opener, for convenience.

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences allowsPageCacheWithWindowOpener]):
(-[WebPreferences setAllowsPageCacheWithWindowOpener:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit/win:

Add a new setting allowing layout tests to enable PageCache in a window
that has an opener, for convenience.

* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
* WebPreferences.h:

Source/WebKit2:

Add a new setting allowing layout tests to enable PageCache in a window
that has an opener, for convenience.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetAllowsPageCacheWithWindowOpener):
(WKPreferencesGetAllowsPageCacheWithWindowOpener):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Tools:

Add a new setting allowing layout tests to enable PageCache in a window
that has an opener, for convenience.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
* DumpRenderTree/win/DumpRenderTree.cpp:
(resetWebPreferencesToConsistentValues):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):

LayoutTests:

* fast/history/page-cache-after-window-open-expected.txt: Added.
* fast/history/page-cache-after-window-open.html: Added.
* fast/history/page-cache-back-navigation-crash-expected.txt: Added.
* fast/history/page-cache-back-navigation-crash.html: Added.
* fast/history/page-cache-with-opener-expected.txt: Added.
* fast/history/page-cache-with-opener.html: Added.
* fast/history/resources/page-cache-window-with-iframe.html: Added.
* fast/history/resources/page-cache-window-with-opener.html: Added.
Add layout test coverage.

* editing/mac/input/unconfirmed-text-navigation-with-page-cache.html:
* fast/harness/page-cache-crash-on-data-urls.html:
* fast/harness/use-page-cache.html:
* fast/history/page-cache-after-window-open-expected.txt: Added.
* fast/history/page-cache-after-window-open.html: Added.
* fast/history/page-cache-with-opener-expected.txt: Added.
* fast/history/page-cache-with-opener.html: Added.
* fast/history/resources/page-cache-window-with-opener.html: Added.
* fast/loader/stateobjects/no-popstate-when-back-to-stateless-entry-with-page-cache.html:
* fast/loader/stateobjects/popstate-fires-with-page-cache.html:
* tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html:
These tests relied on using window.open() to test PageCache for convenience. They now
need to override a setting in order to be allowed to do so.

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

2 years ago[WebRTC] Add a LibWebRTC mock for testing
commit-queue@webkit.org [Fri, 27 Jan 2017 04:54:09 +0000 (04:54 +0000)]
[WebRTC] Add a LibWebRTC mock for testing
https://bugs.webkit.org/show_bug.cgi?id=167429

Patch by Youenn Fablet <youennf@gmail.com> on 2017-01-26
Reviewed by Alex Christensen.

Source/WebCore:

Covered by updated tests although feature is behind a flag, off by default.
MockLibWebRTCPeerConnection will allow us testing the code above the WebRTC implementation above LibWebRTC,
without reyling on it and controlling the way that the peer connections will behave.
Adding support for mock factory to create real peer connections in case where we want to do full testing through the local loopback.

Tests: fast/mediastream/getUserMedia-webaudio.html
       webrtc/datachannel/basic.html
       webrtc/video.html

* WebCore.xcodeproj/project.pbxproj:
* testing/Internals.cpp:
(WebCore::Internals::Internals):
(WebCore::Internals::useMockRTCPeerConnectionFactory):
* testing/Internals.h:
* testing/Internals.idl:
* testing/MockLibWebRTCPeerConnection.cpp: Added.
(WebCore::useMockRTCPeerConnectionFactory):
(WebCore::MockLibWebRTCPeerConnectionForIceCandidates::MockLibWebRTCPeerConnectionForIceCandidates):
(WebCore::MockLibWebRTCPeerConnectionForIceCandidates::gotLocalDescription):
(WebCore::MockLibWebRTCPeerConnectionForIceConnectionState::MockLibWebRTCPeerConnectionForIceConnectionState):
(WebCore::MockLibWebRTCPeerConnectionForIceConnectionState::gotLocalDescription):
(WebCore::MockLibWebRTCPeerConnectionFactory::MockLibWebRTCPeerConnectionFactory):
(WebCore::MockLibWebRTCPeerConnectionFactory::CreatePeerConnection):
(WebCore::MockLibWebRTCPeerConnectionFactory::CreateLocalMediaStream):
(WebCore::MockLibWebRTCPeerConnection::SetLocalDescription):
(WebCore::MockLibWebRTCPeerConnection::SetRemoteDescription):
(WebCore::MockLibWebRTCPeerConnection::CreateDataChannel):
(WebCore::MockLibWebRTCPeerConnection::AddStream):
(WebCore::MockLibWebRTCPeerConnection::RemoveStream):
(WebCore::MockLibWebRTCPeerConnection::CreateOffer):
(WebCore::MockLibWebRTCPeerConnection::CreateAnswer):
* testing/MockLibWebRTCPeerConnection.h: Added.
(WebCore::MockLibWebRTCPeerConnection::~MockLibWebRTCPeerConnection):
(WebCore::MockLibWebRTCPeerConnection::MockLibWebRTCPeerConnection):
(WebCore::MockLibWebRTCPeerConnection::local_streams):
(WebCore::MockLibWebRTCPeerConnection::remote_streams):
(WebCore::MockLibWebRTCPeerConnection::CreateDtmfSender):
(WebCore::MockLibWebRTCPeerConnection::GetStats):
(WebCore::MockLibWebRTCPeerConnection::local_description):
(WebCore::MockLibWebRTCPeerConnection::remote_description):
(WebCore::MockLibWebRTCPeerConnection::AddIceCandidate):
(WebCore::MockLibWebRTCPeerConnection::RegisterUMAObserver):
(WebCore::MockLibWebRTCPeerConnection::signaling_state):
(WebCore::MockLibWebRTCPeerConnection::ice_connection_state):
(WebCore::MockLibWebRTCPeerConnection::ice_gathering_state):
(WebCore::MockLibWebRTCPeerConnection::StopRtcEventLog):
(WebCore::MockLibWebRTCPeerConnection::Close):
(WebCore::MockLibWebRTCPeerConnection::gotLocalDescription):
(WebCore::MockLibWebRTCIceCandidate::MockLibWebRTCIceCandidate):
(WebCore::MockLibWebRTCAudioTrack::MockLibWebRTCAudioTrack):
(WebCore::MockLibWebRTCVideoTrack::MockLibWebRTCVideoTrack):
(WebCore::MockLibWebRTCDataChannel::MockLibWebRTCDataChannel):
(WebCore::MockLibWebRTCPeerConnectionFactory::create):

LayoutTests:

* TestExpectations: Marking webrtc new tests as skipped for the moment.
* fast/mediastream/RTCPeerConnection-createAnswer.html:
* fast/mediastream/RTCPeerConnection-icecandidate-event.html:
* fast/mediastream/RTCPeerConnection-iceconnectionstatechange-event.html:
* webrtc/datachannel/basic.html: Added.
* webrtc/routines.js: Added.
(createConnections):
(closeConnections):
(onCreateSessionDescriptionError):
(gotDescription1):
(gotDescription2):
(iceCallback1):
(iceCallback2):
(onAddIceCandidateSuccess):
(onAddIceCandidateError):
* webrtc/video.html: Added.

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

2 years agoUnreviewed, add a demo page for an input events blog post
wenson_hsieh@apple.com [Fri, 27 Jan 2017 04:22:29 +0000 (04:22 +0000)]
Unreviewed, add a demo page for an input events blog post

* demos/input-events/index.html: Added.

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

2 years ago[QuickLook] Add test to ensure that RTF documents have a unique origin
dbates@webkit.org [Fri, 27 Jan 2017 02:52:50 +0000 (02:52 +0000)]
[QuickLook] Add test to ensure that RTF documents have a unique origin
https://bugs.webkit.org/show_bug.cgi?id=167480

Reviewed by Andy Estes.

* http/tests/quicklook/resources/document-domain-is-empty-string.rtf: Added.
* http/tests/quicklook/rtf-document-domain-is-empty-string-expected.txt: Added.
* http/tests/quicklook/rtf-document-domain-is-empty-string.html: Added.
* platform/ios-simulator/TestExpectations: Skip the test in OpenSource as we
do not support touch events.

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

2 years agoPage should be able to request pointer lock without user gesture if it relinquished...
commit-queue@webkit.org [Fri, 27 Jan 2017 02:17:25 +0000 (02:17 +0000)]
Page should be able to request pointer lock without user gesture if it relinquished it without a user gesture
https://bugs.webkit.org/show_bug.cgi?id=167126

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-01-26
Reviewed by Jon Lee.

Source/WebCore:

Enabled pointer-lock/locked-element-removed-from-dom.html for WK2.
Not enable in WK1 because of https://bugs.webkit.org/show_bug.cgi?id=167127

This change allows a page to lock the pointer again without a user gesture if it was unlocked by
the page and not by the user. See https://www.w3.org/TR/2016/REC-pointerlock-20161027/ 5.1 Methods

* page/PointerLockController.cpp:

When a document acquires pointer lock with a user gesture, that document is allowed to request pointer lock again
until the user takes an action to end pointer lock. We know it is a user action because user actions always
call requestPointerUnlockAndForceCursorVisible().

When the page requests a pointer unlock (via requestPointerUnlock), that document is allowed to continue to relock
the page. This continues until there is either an unlock request form the user
via requestPointerUnlockAndForceCursorVisible or a didLosePointerLock without a pointer unlock request.

(WebCore::PointerLockController::PointerLockController):
(WebCore::PointerLockController::requestPointerLock):
(WebCore::PointerLockController::requestPointerUnlock):
(WebCore::PointerLockController::requestPointerUnlockAndForceCursorVisible):
(WebCore::PointerLockController::elementRemoved):
(WebCore::PointerLockController::documentDetached):
(WebCore::PointerLockController::didAcquirePointerLock):
(WebCore::PointerLockController::didLosePointerLock):
(WebCore::PointerLockController::clearElement):
* page/PointerLockController.h:

LayoutTests:

Enable pointer-lock/locked-element-removed-from-dom.html for WK2 by enabling for Mac and disabling for WK1.
Not enable in WK1 becuase of https://bugs.webkit.org/show_bug.cgi?id=167127

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

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

2 years ago[QuickLook] REGRESSION (WebKit2): Requests are made to invalid x-apple-ql-id: URLs
aestes@apple.com [Fri, 27 Jan 2017 02:00:17 +0000 (02:00 +0000)]
[QuickLook] REGRESSION (WebKit2): Requests are made to invalid x-apple-ql-id: URLs
https://bugs.webkit.org/show_bug.cgi?id=167453

Reviewed by Brent Fulgham.

Source/WebCore:

Requests to x-apple-ql-id: URLs should be filtered by
-[QLPreviewConverter safeRequestForRequest:]. This method checks that the URL is one of the
ones generated for the current preview, and changes it to "about:" if it isn't.

WebCore::safeQLURLForDocumentURLAndResourceURL() was responsible for finding the
QLPreviewConverter instance to use by looking it up in an NSMutableDictionary using the
document URL as a key. In WebKit1, this dictionary was populated by the
QuickLookHandleClient when new QuickLookHandles were created, but the WebKit2
QuickLookHandleClient never did this. As a result, requests to invalid URLs were not being
rewritten.

An easy way to load a QuickLook document with invalid URLs is to create an HTML file with a
Microsoft Office extension (e.g. .xls); QuickLook, iWork, and Office support opening HTML
files with Office document extensions. In r207155 we applied a Content Security Policy to
QuickLook documents that only allows x-apple-ql-id: resources to load. This blocked
cross-origin requests from loading, but same-origin requests to URLs that weren't generated
by QLPreviewConverter were still allowed to load.

This change blocks these URLs by calling -[QLPreviewConverter safeRequestForRequest:] in a
way that works for both WebKit1 and WebKit2.

After implementing QuickLook for WebKit2, we found a bug when loading HTML-as-Office
documents (webkit.org/b/135651) that presented as a nil MIME type in the preview
NSURLResponse returned by QLPreviewConverter. Unfortunately r172159 papered over the actual
bug by failing to load previews with nil MIME types.

The real issue was that we were asking for the preview response before QuickLook had
received enough data to determine a MIME type, so this change also removes the bad fix from
r172159 and instead waits until QuickLook has converted the document to ask for its preview
response. This restores the ability to load HTML files with Office document extensions.
These two fixes are combined in a single patch because I don't know how to create an invalid
QuickLook URL for testing without loading an HTML-as-Office document.

Test: quicklook/invalid-ql-id-url.html

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequestInternal): Called
QuickLookHandle::willSendRequest() if m_documentLoader has a QuickLookHandle.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::load): Removed the call to
WebCore::safeQLURLForDocumentURLAndResourceURL().
* loader/ios/QuickLook.h: Removed safeQLURLForDocumentURLAndResourceURL() and declared
QuickLookHandle::willSendRequest().
* loader/ios/QuickLook.mm: Removed _previewResponse and _hasFailed ivars from
WebPreviewConverter.
(-[WebPreviewConverter initWithResourceLoader:resourceResponse:quickLookHandle:]): Stopped
setting _previewResponse.
(-[WebPreviewConverter _sendDidReceiveResponseIfNecessary]): Only emptied _bufferedDataArray
if we haven't already called -_sendDidReceiveResponseIfNecessary; removed the check for a
nil _previewResponse MIME type; accessed -[QLPreviewConverter previewResponse] now that the
document has been converted and asserted its MIME type is non-nil.
(-[WebPreviewConverter connection:didReceiveData:lengthReceived:]): Removed _hasFailed check.
(-[WebPreviewConverter connectionDidFinishLoading:]): Ditto.
(isQuickLookPasswordError): Moved the check for password failure errors to here from
-connection:didFailWithError: for better readability.
(-[WebPreviewConverter connection:didFailWithError:]): Removed _hasFailed check and used
more early returns.
(WebCore::QuickLookHandle::willSendRequest): Filtered the request through
-[QLPreviewConverter safeRequestWithRequest:] if the request URL's scheme is x-apple-ql-id:.
(WebCore::safeQLURLForDocumentURLAndResourceURL): Deleted.

LayoutTests:

* quicklook/invalid-ql-id-url-expected.txt: Added.
* quicklook/invalid-ql-id-url.html: Added.
* quicklook/nil-response-mime-type-expected.txt: Removed.
* quicklook/nil-response-mime-type.html: Removed.
* quicklook/resources/invalid-ql-id-url.xls: Added.
* quicklook/resources/nil-response-mime-type.xls: Removed.

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

2 years agoclassInfo should take a VM so it is not materialized from the object on each call
keith_miller@apple.com [Fri, 27 Jan 2017 01:47:52 +0000 (01:47 +0000)]
classInfo should take a VM so it is not materialized from the object on each call
https://bugs.webkit.org/show_bug.cgi?id=167424

Rubber Stamped by Michael Saboff.

Previously, classInfo() would get the VM from the target's
MarkedBlock.  Most callers already have a VM on hand, so it is
wasteful to compute the VM from the marked block every time. This
patch refactors some of the most common callers of classInfo(),
jsDynamicCast and inherits to take a VM as well.

Source/JavaScriptCore:

* API/JSCallbackConstructor.cpp:
(JSC::JSCallbackConstructor::finishCreation):
* API/JSCallbackFunction.cpp:
(JSC::JSCallbackFunction::finishCreation):
* API/JSCallbackObjectFunctions.h:
(JSC::JSCallbackObject<Parent>::asCallbackObject):
(JSC::JSCallbackObject<Parent>::finishCreation):
* API/JSObjectRef.cpp:
(JSObjectSetPrototype):
(classInfoPrivate):
(JSObjectGetPrivate):
(JSObjectSetPrivate):
(JSObjectGetPrivateProperty):
(JSObjectSetPrivateProperty):
(JSObjectDeletePrivateProperty):
* API/JSTypedArray.cpp:
(JSValueGetTypedArrayType):
(JSObjectMakeTypedArrayWithArrayBuffer):
(JSObjectMakeTypedArrayWithArrayBufferAndOffset):
(JSObjectGetTypedArrayBytesPtr):
(JSObjectGetTypedArrayLength):
(JSObjectGetTypedArrayByteLength):
(JSObjectGetTypedArrayByteOffset):
(JSObjectGetTypedArrayBuffer):
(JSObjectGetArrayBufferBytesPtr):
(JSObjectGetArrayBufferByteLength):
* API/JSValue.mm:
(isDate):
(isArray):
(valueToObjectWithoutCopy):
* API/JSValueRef.cpp:
(JSValueIsArray):
(JSValueIsDate):
(JSValueIsObjectOfClass):
* API/JSWeakObjectMapRefPrivate.cpp:
* API/JSWrapperMap.mm:
(tryUnwrapObjcObject):
* API/ObjCCallbackFunction.h:
* API/ObjCCallbackFunction.mm:
(tryUnwrapConstructor):
* bindings/ScriptFunctionCall.cpp:
(Deprecated::ScriptFunctionCall::call):
* bytecode/CallVariant.h:
(JSC::CallVariant::internalFunction):
(JSC::CallVariant::function):
(JSC::CallVariant::isClosureCall):
(JSC::CallVariant::executable):
(JSC::CallVariant::functionExecutable):
(JSC::CallVariant::nativeExecutable):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::setConstantRegisters):
(JSC::CodeBlock::replacement):
(JSC::CodeBlock::computeCapabilityLevel):
(JSC::CodeBlock::nameForRegister):
* bytecode/ObjectAllocationProfile.h:
(JSC::ObjectAllocationProfile::possibleDefaultPropertyCount):
* bytecode/ObjectPropertyCondition.cpp:
(JSC::ObjectPropertyCondition::attemptToMakeEquivalenceWithoutBarrier):
* bytecode/ObjectPropertyCondition.h:
(JSC::ObjectPropertyCondition::isValidValueForPresence):
* bytecode/PropertyCondition.cpp:
(JSC::PropertyCondition::isValidValueForAttributes):
(JSC::PropertyCondition::isValidValueForPresence):
(JSC::PropertyCondition::attemptToMakeEquivalenceWithoutBarrier):
* bytecode/PropertyCondition.h:
* bytecode/SpeculatedType.cpp:
(JSC::speculationFromCell):
* debugger/Debugger.cpp:
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::functionName):
(JSC::DebuggerCallFrame::scope):
(JSC::DebuggerCallFrame::type):
* debugger/DebuggerScope.cpp:
(JSC::DebuggerScope::name):
(JSC::DebuggerScope::location):
* dfg/DFGAbstractInterpreter.h:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::AbstractInterpreter):
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::get):
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
(JSC::DFG::ByteCodeParser::planLoad):
(JSC::DFG::ByteCodeParser::checkPresenceLike):
(JSC::DFG::ByteCodeParser::load):
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
* dfg/DFGDesiredWeakReferences.cpp:
(JSC::DFG::DesiredWeakReferences::reallyAdd):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupMakeRope):
* dfg/DFGFrozenValue.h:
(JSC::DFG::FrozenValue::FrozenValue):
(JSC::DFG::FrozenValue::dynamicCast):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::tryGetConstantClosureVar):
(JSC::DFG::Graph::tryGetFoldableView):
(JSC::DFG::Graph::getRegExpPrototypeProperty):
(JSC::DFG::Graph::isStringPrototypeMethodSane):
(JSC::DFG::Graph::canOptimizeStringObjectAccess):
* dfg/DFGLazyJSValue.cpp:
(JSC::DFG::LazyJSValue::tryGetStringImpl):
(JSC::DFG::LazyJSValue::tryGetString):
* dfg/DFGLazyJSValue.h:
* dfg/DFGNode.cpp:
(JSC::DFG::Node::convertToPutStructureHint):
* dfg/DFGNode.h:
(JSC::DFG::Node::dynamicCastConstant):
(JSC::DFG::Node::castConstant):
* dfg/DFGOperations.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileIn):
(JSC::DFG::SpeculativeJIT::compileMaterializeNewObject):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileDirectCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileIn):
(JSC::FTL::DFG::LowerDFGToB3::compileMaterializeCreateActivation):
(JSC::FTL::DFG::LowerDFGToB3::compileStringReplace):
* ftl/FTLOperations.cpp:
(JSC::FTL::operationMaterializeObjectInOSR):
* heap/CodeBlockSet.cpp:
(JSC::CodeBlockSet::lastChanceToFinalize):
(JSC::CodeBlockSet::deleteUnmarkedAndUnreferenced):
* heap/CodeBlockSet.h:
* heap/GCAssertions.h:
* heap/Heap.cpp:
(JSC::Heap::lastChanceToFinalize):
(JSC::Heap::protectedObjectTypeCounts):
(JSC::Heap::objectTypeCounts):
(JSC::Heap::deleteUnmarkedCompiledCode):
* heap/HeapSnapshotBuilder.cpp:
(JSC::HeapSnapshotBuilder::json):
* heap/SlotVisitor.cpp:
(JSC::validate):
* inspector/InjectedScriptHost.h:
* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::reportAPIException):
* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::finishCreation):
(Inspector::JSInjectedScriptHost::isHTMLAllCollection):
(Inspector::JSInjectedScriptHost::subtype):
(Inspector::JSInjectedScriptHost::functionDetails):
(Inspector::JSInjectedScriptHost::getInternalProperties):
(Inspector::JSInjectedScriptHost::proxyTargetValue):
(Inspector::JSInjectedScriptHost::weakMapSize):
(Inspector::JSInjectedScriptHost::weakMapEntries):
(Inspector::JSInjectedScriptHost::weakSetSize):
(Inspector::JSInjectedScriptHost::weakSetEntries):
(Inspector::JSInjectedScriptHost::iteratorEntries):
* inspector/JSInjectedScriptHostPrototype.cpp:
(Inspector::JSInjectedScriptHostPrototype::finishCreation):
(Inspector::jsInjectedScriptHostPrototypeAttributeEvaluate):
(Inspector::jsInjectedScriptHostPrototypeFunctionInternalConstructorName):
(Inspector::jsInjectedScriptHostPrototypeFunctionIsHTMLAllCollection):
(Inspector::jsInjectedScriptHostPrototypeFunctionProxyTargetValue):
(Inspector::jsInjectedScriptHostPrototypeFunctionWeakMapSize):
(Inspector::jsInjectedScriptHostPrototypeFunctionWeakMapEntries):
(Inspector::jsInjectedScriptHostPrototypeFunctionWeakSetSize):
(Inspector::jsInjectedScriptHostPrototypeFunctionWeakSetEntries):
(Inspector::jsInjectedScriptHostPrototypeFunctionIteratorEntries):
(Inspector::jsInjectedScriptHostPrototypeFunctionEvaluateWithScopeExtension):
(Inspector::jsInjectedScriptHostPrototypeFunctionSubtype):
(Inspector::jsInjectedScriptHostPrototypeFunctionFunctionDetails):
(Inspector::jsInjectedScriptHostPrototypeFunctionGetInternalProperties):
* inspector/JSJavaScriptCallFrame.cpp:
(Inspector::JSJavaScriptCallFrame::finishCreation):
(Inspector::toJSJavaScriptCallFrame): Deleted.
* inspector/JSJavaScriptCallFrame.h:
* inspector/JSJavaScriptCallFramePrototype.cpp:
(Inspector::JSJavaScriptCallFramePrototype::finishCreation):
(Inspector::jsJavaScriptCallFramePrototypeFunctionEvaluateWithScopeExtension):
(Inspector::jsJavaScriptCallFramePrototypeFunctionScopeDescriptions):
(Inspector::jsJavaScriptCallFrameAttributeCaller):
(Inspector::jsJavaScriptCallFrameAttributeSourceID):
(Inspector::jsJavaScriptCallFrameAttributeLine):
(Inspector::jsJavaScriptCallFrameAttributeColumn):
(Inspector::jsJavaScriptCallFrameAttributeFunctionName):
(Inspector::jsJavaScriptCallFrameAttributeScopeChain):
(Inspector::jsJavaScriptCallFrameAttributeThisObject):
(Inspector::jsJavaScriptCallFrameAttributeType):
(Inspector::jsJavaScriptCallFrameIsTailDeleted):
* inspector/ScriptArguments.cpp:
(Inspector::ScriptArguments::getFirstArgumentAsString):
* inspector/agents/InspectorHeapAgent.cpp:
(Inspector::InspectorHeapAgent::getPreview):
* interpreter/Interpreter.cpp:
(JSC::notifyDebuggerOfUnwinding):
(JSC::Interpreter::unwind):
(JSC::Interpreter::notifyDebuggerOfExceptionToBeThrown):
(JSC::Interpreter::execute):
* interpreter/ShadowChicken.cpp:
(JSC::ShadowChicken::update):
* interpreter/StackVisitor.cpp:
(JSC::StackVisitor::readFrame):
(JSC::StackVisitor::readNonInlinedFrame):
(JSC::StackVisitor::Frame::calleeSaveRegisters):
* jit/JITCode.cpp:
(JSC::JITCode::execute):
* jit/JITOperations.cpp:
(JSC::operationNewFunctionCommon):
* jit/Repatch.cpp:
(JSC::tryCacheGetByID):
* jsc.cpp:
(WTF::CustomGetter::customGetter):
(WTF::RuntimeArray::finishCreation):
(WTF::RuntimeArray::lengthGetter):
(WTF::DOMJITGetter::customGetter):
(WTF::DOMJITGetterComplex::DOMJITNodeDOMJIT::slowCall):
(WTF::DOMJITGetterComplex::functionEnableException):
(WTF::DOMJITGetterComplex::customGetter):
(WTF::DOMJITFunctionObject::safeFunction):
(functionDescribeArray):
(functionCreateElement):
(functionGetElement):
(functionSetElementRoot):
(functionGetHiddenValue):
(functionSetHiddenValue):
(functionSetImpureGetterDelegate):
(functionNoFTL):
(functionDollarEvalScript):
(functionDollarAgentBroadcast):
(functionTransferArrayBuffer):
(functionFindTypeForExpression):
(functionReturnTypeFor):
(functionHasBasicBlockExecuted):
(functionBasicBlockExecutionCount):
(functionEnsureArrayStorage):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/AbstractModuleRecord.cpp:
(JSC::AbstractModuleRecord::finishCreation):
* runtime/ArrayBuffer.cpp:
(JSC::ArrayBuffer::transferTo):
* runtime/ArrayBuffer.h:
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::finishCreation):
(JSC::arrayConstructorPrivateFuncIsArraySlow):
(JSC::arrayConstructorPrivateFuncIsArrayConstructor):
* runtime/ArrayConstructor.h:
(JSC::isArrayConstructor): Deleted.
* runtime/ArrayIteratorPrototype.cpp:
(JSC::ArrayIteratorPrototype::finishCreation):
* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::finishCreation):
* runtime/AsyncFunctionPrototype.cpp:
(JSC::AsyncFunctionPrototype::finishCreation):
* runtime/AtomicsObject.cpp:
(JSC::AtomicsObject::finishCreation):
(JSC::atomicsFuncWait):
(JSC::atomicsFuncWake):
* runtime/BooleanObject.cpp:
(JSC::BooleanObject::finishCreation):
* runtime/BooleanObject.h:
(JSC::asBooleanObject):
* runtime/BooleanPrototype.cpp:
(JSC::BooleanPrototype::finishCreation):
(JSC::booleanProtoFuncToString):
(JSC::booleanProtoFuncValueOf):
* runtime/ConsoleObject.cpp:
(JSC::ConsoleObject::finishCreation):
* runtime/DateConstructor.cpp:
(JSC::constructDate):
* runtime/DateInstance.cpp:
(JSC::DateInstance::finishCreation):
* runtime/DateInstance.h:
(JSC::asDateInstance):
* runtime/DatePrototype.cpp:
(JSC::formateDateInstance):
(JSC::DatePrototype::finishCreation):
(JSC::dateProtoFuncToISOString):
(JSC::dateProtoFuncToLocaleString):
(JSC::dateProtoFuncToLocaleDateString):
(JSC::dateProtoFuncToLocaleTimeString):
(JSC::dateProtoFuncGetTime):
(JSC::dateProtoFuncGetFullYear):
(JSC::dateProtoFuncGetUTCFullYear):
(JSC::dateProtoFuncGetMonth):
(JSC::dateProtoFuncGetUTCMonth):
(JSC::dateProtoFuncGetDate):
(JSC::dateProtoFuncGetUTCDate):
(JSC::dateProtoFuncGetDay):
(JSC::dateProtoFuncGetUTCDay):
(JSC::dateProtoFuncGetHours):
(JSC::dateProtoFuncGetUTCHours):
(JSC::dateProtoFuncGetMinutes):
(JSC::dateProtoFuncGetUTCMinutes):
(JSC::dateProtoFuncGetSeconds):
(JSC::dateProtoFuncGetUTCSeconds):
(JSC::dateProtoFuncGetMilliSeconds):
(JSC::dateProtoFuncGetUTCMilliseconds):
(JSC::dateProtoFuncGetTimezoneOffset):
(JSC::dateProtoFuncSetTime):
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetYear):
(JSC::dateProtoFuncGetYear):
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::finishCreation):
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::finishCreation):
* runtime/ExceptionHelpers.cpp:
(JSC::isTerminatedExecutionException):
* runtime/ExceptionHelpers.h:
* runtime/ExecutableBase.cpp:
(JSC::ExecutableBase::clearCode):
(JSC::ExecutableBase::dump):
(JSC::ExecutableBase::hashFor):
* runtime/FunctionPrototype.cpp:
(JSC::functionProtoFuncToString):
* runtime/GeneratorFunctionPrototype.cpp:
(JSC::GeneratorFunctionPrototype::finishCreation):
* runtime/GeneratorPrototype.cpp:
(JSC::GeneratorPrototype::finishCreation):
* runtime/GetterSetter.h:
* runtime/InspectorInstrumentationObject.cpp:
(JSC::InspectorInstrumentationObject::finishCreation):
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::finishCreation):
(JSC::InternalFunction::createSubclassStructure):
* runtime/InternalFunction.h:
(JSC::asInternalFunction):
* runtime/IntlCollator.cpp:
(JSC::IntlCollator::finishCreation):
* runtime/IntlCollatorPrototype.cpp:
(JSC::IntlCollatorPrototypeGetterCompare):
(JSC::IntlCollatorPrototypeFuncResolvedOptions):
* runtime/IntlDateTimeFormat.cpp:
(JSC::IntlDateTimeFormat::finishCreation):
* runtime/IntlDateTimeFormatPrototype.cpp:
(JSC::IntlDateTimeFormatPrototypeGetterFormat):
(JSC::IntlDateTimeFormatPrototypeFuncResolvedOptions):
* runtime/IntlNumberFormat.cpp:
(JSC::IntlNumberFormat::finishCreation):
* runtime/IntlNumberFormatPrototype.cpp:
(JSC::IntlNumberFormatPrototypeGetterFormat):
(JSC::IntlNumberFormatPrototypeFuncResolvedOptions):
* runtime/IntlObject.cpp:
(JSC::IntlObject::finishCreation):
* runtime/IntlObjectInlines.h:
(JSC::constructIntlInstanceWithWorkaroundForLegacyIntlConstructor):
* runtime/IteratorPrototype.cpp:
(JSC::IteratorPrototype::finishCreation):
* runtime/JSArray.h:
(JSC::asArray):
(JSC::isJSArray):
* runtime/JSArrayBuffer.h:
(JSC::toPossiblySharedArrayBuffer):
(JSC::toUnsharedArrayBuffer):
(JSC::JSArrayBuffer::toWrapped):
* runtime/JSArrayBufferConstructor.cpp:
(JSC::arrayBufferFuncIsView):
* runtime/JSArrayBufferPrototype.cpp:
(JSC::arrayBufferProtoFuncSlice):
* runtime/JSArrayBufferView.h:
* runtime/JSArrayBufferViewInlines.h:
(JSC::JSArrayBufferView::toWrapped):
* runtime/JSBoundFunction.cpp:
(JSC::isBoundFunction):
(JSC::getBoundFunctionStructure):
(JSC::JSBoundFunction::finishCreation):
* runtime/JSCJSValue.cpp:
(JSC::JSValue::dumpForBacktrace):
* runtime/JSCJSValue.h:
* runtime/JSCJSValueInlines.h:
(JSC::JSValue::inherits):
(JSC::JSValue::classInfoOrNull):
* runtime/JSCallee.cpp:
(JSC::JSCallee::finishCreation):
* runtime/JSCell.cpp:
(JSC::JSCell::dumpToStream):
(JSC::JSCell::className):
(JSC::JSCell::isAnyWasmCallee):
* runtime/JSCell.h:
(JSC::jsCast):
(JSC::jsDynamicCast):
* runtime/JSCellInlines.h:
(JSC::JSCell::methodTable):
(JSC::JSCell::inherits):
(JSC::JSCell::classInfo):
* runtime/JSCustomGetterSetterFunction.cpp:
(JSC::JSCustomGetterSetterFunction::finishCreation):
* runtime/JSDataViewPrototype.cpp:
(JSC::getData):
(JSC::setData):
(JSC::dataViewProtoGetterBuffer):
(JSC::dataViewProtoGetterByteLength):
(JSC::dataViewProtoGetterByteOffset):
* runtime/JSFunction.cpp:
(JSC::JSFunction::finishCreation):
(JSC::JSFunction::allocateAndInitializeRareData):
(JSC::JSFunction::initializeRareData):
(JSC::RetrieveArgumentsFunctor::RetrieveArgumentsFunctor):
(JSC::RetrieveCallerFunctionFunctor::RetrieveCallerFunctionFunctor):
(JSC::RetrieveCallerFunctionFunctor::operator()):
(JSC::JSFunction::callerGetter):
(JSC::JSFunction::getOwnNonIndexPropertyNames):
(JSC::getCalculatedDisplayName):
(JSC::JSFunction::reifyBoundNameIfNeeded):
* runtime/JSGenericTypedArrayView.h:
(JSC::toPossiblySharedNativeTypedView):
(JSC::toUnsharedNativeTypedView):
(JSC::JSGenericTypedArrayView<Adaptor>::toWrapped):
* runtime/JSGenericTypedArrayViewConstructorInlines.h:
(JSC::constructGenericTypedArrayViewWithArguments):
(JSC::constructGenericTypedArrayView):
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView<Adaptor>::set):
* runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
(JSC::speciesConstruct):
(JSC::genericTypedArrayViewProtoFuncSet):
(JSC::genericTypedArrayViewProtoFuncSlice):
(JSC::genericTypedArrayViewPrivateFuncSubarrayCreate):
* runtime/JSGenericTypedArrayViewPrototypeInlines.h:
(JSC::JSGenericTypedArrayViewPrototype<ViewClass>::finishCreation):
* runtime/JSGlobalObject.cpp:
(JSC::getTemplateObject):
(JSC::enqueueJob):
(JSC::JSGlobalObject::init):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncProtoGetter):
(JSC::globalFuncProtoSetter):
* runtime/JSInternalPromiseDeferred.cpp:
(JSC::JSInternalPromiseDeferred::create):
* runtime/JSLexicalEnvironment.h:
(JSC::asActivation):
* runtime/JSModuleLoader.cpp:
(JSC::JSModuleLoader::finishCreation):
(JSC::JSModuleLoader::evaluate):
(JSC::JSModuleLoader::getModuleNamespaceObject):
* runtime/JSModuleNamespaceObject.cpp:
(JSC::JSModuleNamespaceObject::finishCreation):
(JSC::moduleNamespaceObjectSymbolIterator):
* runtime/JSModuleRecord.cpp:
(JSC::JSModuleRecord::finishCreation):
* runtime/JSNativeStdFunction.cpp:
(JSC::JSNativeStdFunction::finishCreation):
* runtime/JSONObject.cpp:
(JSC::JSONObject::finishCreation):
(JSC::unwrapBoxedPrimitive):
(JSC::Stringifier::Stringifier):
(JSC::Walker::walk):
* runtime/JSObject.cpp:
(JSC::JSObject::className):
(JSC::JSObject::toStringName):
(JSC::JSObject::calculatedClassName):
(JSC::JSObject::putInlineSlow):
(JSC::JSObject::ensureInt32Slow):
(JSC::JSObject::ensureDoubleSlow):
(JSC::JSObject::ensureContiguousSlow):
(JSC::JSObject::ensureArrayStorageSlow):
(JSC::JSObject::deleteProperty):
(JSC::JSObject::getOwnStaticPropertySlot):
(JSC::JSObject::findPropertyHashEntry):
(JSC::JSObject::getOwnNonIndexPropertyNames):
(JSC::JSObject::reifyAllStaticProperties):
(JSC::JSObject::getOwnPropertyDescriptor):
* runtime/JSObject.h:
(JSC::JSObject::finishCreation):
(JSC::JSNonFinalObject::finishCreation):
(JSC::JSFinalObject::finishCreation):
* runtime/JSPromiseDeferred.cpp:
(JSC::JSPromiseDeferred::create):
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::finishCreation):
(JSC::propertyNameIteratorFuncNext):
* runtime/JSScope.cpp:
(JSC::JSScope::symbolTable):
* runtime/JSScope.h:
* runtime/JSString.cpp:
(JSC::JSString::dumpToStream):
* runtime/JSStringIterator.cpp:
(JSC::JSStringIterator::finishCreation):
* runtime/JSTypedArrayViewPrototype.cpp:
(JSC::typedArrayViewPrivateFuncIsTypedArrayView):
(JSC::typedArrayViewPrivateFuncLength):
(JSC::typedArrayViewPrivateFuncGetOriginalConstructor):
(JSC::typedArrayViewProtoGetterFuncToStringTag):
(JSC::JSTypedArrayViewPrototype::finishCreation):
* runtime/LazyClassStructure.cpp:
(JSC::LazyClassStructure::Initializer::setConstructor):
* runtime/Lookup.h:
(JSC::putEntry):
* runtime/MapConstructor.cpp:
(JSC::MapConstructor::finishCreation):
* runtime/MapIteratorPrototype.cpp:
(JSC::MapIteratorPrototype::finishCreation):
(JSC::MapIteratorPrototypeFuncNext):
* runtime/MapPrototype.cpp:
(JSC::MapPrototype::finishCreation):
(JSC::mapProtoFuncValues):
(JSC::mapProtoFuncEntries):
(JSC::mapProtoFuncKeys):
(JSC::privateFuncMapIterator):
(JSC::privateFuncMapIteratorNext):
* runtime/MathObject.cpp:
(JSC::MathObject::finishCreation):
* runtime/ModuleLoaderPrototype.cpp:
(JSC::moduleLoaderPrototypeParseModule):
(JSC::moduleLoaderPrototypeRequestedModules):
(JSC::moduleLoaderPrototypeModuleDeclarationInstantiation):
(JSC::moduleLoaderPrototypeResolve):
(JSC::moduleLoaderPrototypeFetch):
(JSC::moduleLoaderPrototypeInstantiate):
(JSC::moduleLoaderPrototypeGetModuleNamespaceObject):
(JSC::moduleLoaderPrototypeEvaluate):
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::finishCreation):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::finishCreation):
* runtime/NumberObject.cpp:
(JSC::NumberObject::finishCreation):
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::finishCreation):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::finishCreation):
* runtime/ObjectPrototype.cpp:
(JSC::ObjectPrototype::finishCreation):
* runtime/ProxyObject.cpp:
(JSC::ProxyObject::toStringName):
(JSC::ProxyObject::finishCreation):
* runtime/ReflectObject.cpp:
(JSC::ReflectObject::finishCreation):
(JSC::reflectObjectConstruct):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::finishCreation):
(JSC::setRegExpConstructorInput):
(JSC::setRegExpConstructorMultiline):
(JSC::constructRegExp):
* runtime/RegExpConstructor.h:
(JSC::asRegExpConstructor):
(JSC::isRegExp):
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::finishCreation):
* runtime/RegExpObject.h:
(JSC::asRegExpObject):
* runtime/RegExpPrototype.cpp:
(JSC::RegExpPrototype::finishCreation):
(JSC::regExpProtoFuncTestFast):
(JSC::regExpProtoFuncExec):
(JSC::regExpProtoFuncMatchFast):
(JSC::regExpProtoFuncCompile):
(JSC::regExpProtoGetterGlobal):
(JSC::regExpProtoGetterIgnoreCase):
(JSC::regExpProtoGetterMultiline):
(JSC::regExpProtoGetterSticky):
(JSC::regExpProtoGetterUnicode):
(JSC::regExpProtoGetterSource):
* runtime/SamplingProfiler.cpp:
(JSC::SamplingProfiler::processUnverifiedStackTraces):
* runtime/ScriptExecutable.cpp:
(JSC::ScriptExecutable::newCodeBlockFor):
(JSC::ScriptExecutable::newReplacementCodeBlockFor):
* runtime/SetConstructor.cpp:
(JSC::SetConstructor::finishCreation):
* runtime/SetIteratorPrototype.cpp:
(JSC::SetIteratorPrototype::finishCreation):
(JSC::SetIteratorPrototypeFuncNext):
* runtime/SetPrototype.cpp:
(JSC::SetPrototype::finishCreation):
(JSC::setProtoFuncValues):
(JSC::setProtoFuncEntries):
(JSC::privateFuncSetIterator):
(JSC::privateFuncSetIteratorNext):
* runtime/StackFrame.cpp:
(JSC::StackFrame::sourceURL):
(JSC::StackFrame::functionName):
* runtime/StringIteratorPrototype.cpp:
(JSC::StringIteratorPrototype::finishCreation):
* runtime/StringObject.cpp:
(JSC::StringObject::finishCreation):
* runtime/StringObject.h:
(JSC::asStringObject):
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::finishCreation):
(JSC::replace):
(JSC::stringProtoFuncReplaceUsingRegExp):
(JSC::stringProtoFuncToString):
* runtime/StructureRareData.cpp:
(JSC::StructureRareData::setObjectToStringValue):
* runtime/Symbol.cpp:
(JSC::Symbol::finishCreation):
* runtime/SymbolConstructor.cpp:
(JSC::SymbolConstructor::finishCreation):
* runtime/SymbolObject.cpp:
(JSC::SymbolObject::finishCreation):
* runtime/SymbolPrototype.cpp:
(JSC::SymbolPrototype::finishCreation):
(JSC::symbolProtoFuncToString):
(JSC::symbolProtoFuncValueOf):
* runtime/TestRunnerUtils.cpp:
(JSC::getExecutableForFunction):
* runtime/ThrowScope.cpp:
(JSC::ThrowScope::throwException):
* runtime/VM.cpp:
(JSC::VM::throwException):
* runtime/WeakMapConstructor.cpp:
(JSC::WeakMapConstructor::finishCreation):
* runtime/WeakMapPrototype.cpp:
(JSC::WeakMapPrototype::finishCreation):
(JSC::getWeakMapData):
* runtime/WeakSetConstructor.cpp:
(JSC::WeakSetConstructor::finishCreation):
* runtime/WeakSetPrototype.cpp:
(JSC::WeakSetPrototype::finishCreation):
(JSC::getWeakMapData):
* tools/JSDollarVMPrototype.cpp:
(JSC::codeBlockFromArg):
* wasm/JSWebAssembly.cpp:
(JSC::JSWebAssembly::finishCreation):
* wasm/js/JSWebAssemblyHelpers.h:
(JSC::getWasmBufferFromValue):
* wasm/js/JSWebAssemblyInstance.cpp:
(JSC::JSWebAssemblyInstance::finishCreation):
* wasm/js/JSWebAssemblyMemory.cpp:
(JSC::JSWebAssemblyMemory::grow):
(JSC::JSWebAssemblyMemory::finishCreation):
(JSC::JSWebAssemblyMemory::destroy):
(JSC::JSWebAssemblyMemory::~JSWebAssemblyMemory): Deleted.
* wasm/js/JSWebAssemblyMemory.h:
* wasm/js/JSWebAssemblyModule.cpp:
(JSC::JSWebAssemblyModule::finishCreation):
* wasm/js/JSWebAssemblyTable.cpp:
(JSC::JSWebAssemblyTable::finishCreation):
* wasm/js/WebAssemblyFunction.cpp:
(JSC::callWebAssemblyFunction):
(JSC::WebAssemblyFunction::finishCreation):
* wasm/js/WebAssemblyInstanceConstructor.cpp:
(JSC::constructJSWebAssemblyInstance):
* wasm/js/WebAssemblyMemoryPrototype.cpp:
(JSC::getMemory):
* wasm/js/WebAssemblyModulePrototype.cpp:
(JSC::webAssemblyModuleProtoCustomSections):
* wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::finishCreation):
* wasm/js/WebAssemblyTablePrototype.cpp:
(JSC::getTable):
(JSC::webAssemblyTableProtoFuncSet):

Source/WebCore:

* Modules/fetch/FetchBody.cpp:
(WebCore::FetchBody::extract):
* Modules/plugins/QuickTimePluginReplacement.mm:
(WebCore::QuickTimePluginReplacement::installReplacement):
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::createIDBKeyFromValue):
* bindings/js/JSCommandLineAPIHostCustom.cpp:
(WebCore::JSCommandLineAPIHost::getEventListeners):
(WebCore::JSCommandLineAPIHost::databaseId):
(WebCore::JSCommandLineAPIHost::storageId):
* bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::JSCryptoAlgorithmDictionary::parseAlgorithmIdentifier):
(WebCore::createRsaKeyGenParams):
* bindings/js/JSCryptoCustom.cpp:
(WebCore::JSCrypto::getRandomValues):
* bindings/js/JSCryptoOperationData.cpp:
(WebCore::cryptoOperationDataFromJSValue):
* bindings/js/JSCustomElementInterface.cpp:
(WebCore::constructCustomElementSynchronously):
(WebCore::JSCustomElementInterface::upgradeElement):
* bindings/js/JSDOMBinding.cpp:
(WebCore::valueToDate):
(WebCore::reportException):
(WebCore::retrieveErrorMessage):
* bindings/js/JSDOMBinding.h:
(WebCore::castThisValue):
(WebCore::toPossiblySharedArrayBufferView):
(WebCore::toUnsharedArrayBufferView):
(WebCore::toPossiblySharedInt8Array):
(WebCore::toPossiblySharedInt16Array):
(WebCore::toPossiblySharedInt32Array):
(WebCore::toPossiblySharedUint8Array):
(WebCore::toPossiblySharedUint8ClampedArray):
(WebCore::toPossiblySharedUint16Array):
(WebCore::toPossiblySharedUint32Array):
(WebCore::toPossiblySharedFloat32Array):
(WebCore::toPossiblySharedFloat64Array):
(WebCore::toUnsharedInt8Array):
(WebCore::toUnsharedInt16Array):
(WebCore::toUnsharedInt32Array):
(WebCore::toUnsharedUint8Array):
(WebCore::toUnsharedUint8ClampedArray):
(WebCore::toUnsharedUint16Array):
(WebCore::toUnsharedUint32Array):
(WebCore::toUnsharedFloat32Array):
(WebCore::toUnsharedFloat64Array):
(WebCore::toRefNativeArray):
* bindings/js/JSDOMConstructor.h:
(WebCore::JSDOMConstructorNotConstructable<JSClass>::finishCreation):
(WebCore::JSDOMConstructor<JSClass>::finishCreation):
(WebCore::JSDOMNamedConstructor<JSClass>::finishCreation):
(WebCore::JSBuiltinConstructor<JSClass>::finishCreation):
* bindings/js/JSDOMConvert.h:
(WebCore::Converter<IDLInterface<T>>::convert):
(WebCore::Converter<IDLXPathNSResolver<T>>::convert):
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::finishCreation):
(WebCore::JSDOMGlobalObject::scriptExecutionContext):
* bindings/js/JSDOMIterator.h:
(WebCore::IteratorTraits>::next):
(WebCore::IteratorTraits>::finishCreation):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::finishCreation):
(WebCore::toJSDOMWindow):
* bindings/js/JSDOMWindowBase.h:
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::jsDOMWindowWebKit):
(WebCore::JSDOMWindow::toWrapped):
* bindings/js/JSDOMWindowShell.cpp:
(WebCore::JSDOMWindowShell::finishCreation):
(WebCore::JSDOMWindowShell::toWrapped):
* bindings/js/JSDOMWindowShell.h:
* bindings/js/JSDocumentCustom.cpp:
(WebCore::cachedDocumentWrapper):
(WebCore::JSDocument::createTouchList):
* bindings/js/JSDynamicDowncast.h:
(WebCore::JSDynamicCastTrait::cast):
(WebCore::JSDynamicCastTrait<JSNode>::cast):
(WebCore::JSDynamicCastTrait<JSElement>::cast):
(WebCore::JSDynamicCastTrait<JSDocument>::cast):
(WebCore::JSDynamicCastTrait<JSEvent>::cast):
(WebCore::jsDynamicDowncast):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):
* bindings/js/JSEventTargetCustom.cpp:
(WebCore::JSEventTarget::toWrapped):
(WebCore::jsEventTargetCast):
* bindings/js/JSEventTargetCustom.h:
(WebCore::BindingCaller<JSEventTarget>::callOperation):
* bindings/js/JSExceptionBase.cpp:
(WebCore::toExceptionBase):
* bindings/js/JSExceptionBase.h:
* bindings/js/JSInspectorFrontendHostCustom.cpp:
(WebCore::populateContextMenuItems):
(WebCore::JSInspectorFrontendHost::showContextMenu):
* bindings/js/JSNodeCustom.cpp:
(WebCore::JSNode::insertBefore):
(WebCore::JSNode::replaceChild):
(WebCore::JSNode::removeChild):
(WebCore::JSNode::appendChild):
(WebCore::JSNode::pushEventHandlerScope):
* bindings/js/JSPluginElementFunctions.cpp:
(WebCore::pluginElementPropertyGetter):
* bindings/js/JSReadableStreamPrivateConstructors.cpp:
(WebCore::constructJSReadableStreamDefaultReader):
* bindings/js/JSReadableStreamSourceCustom.cpp:
(WebCore::startReadableStream):
(WebCore::JSReadableStreamSource::start):
(WebCore::pullReadableStream):
* bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::toCryptoKey):
(WebCore::jsSubtleCryptoFunctionEncryptPromise):
(WebCore::jsSubtleCryptoFunctionDecryptPromise):
(WebCore::jsSubtleCryptoFunctionSignPromise):
(WebCore::jsSubtleCryptoFunctionVerifyPromise):
(WebCore::jsSubtleCryptoFunctionDigestPromise):
(WebCore::jsSubtleCryptoFunctionWrapKeyPromise):
(WebCore::jsSubtleCryptoFunctionUnwrapKeyPromise):
* bindings/js/JSTrackCustom.cpp:
(WebCore::toTrack): Deleted.
* bindings/js/JSTrackCustom.h:
* bindings/js/JSWebKitSubtleCryptoCustom.cpp:
(WebCore::JSWebKitSubtleCrypto::encrypt):
(WebCore::JSWebKitSubtleCrypto::decrypt):
(WebCore::JSWebKitSubtleCrypto::sign):
(WebCore::JSWebKitSubtleCrypto::verify):
(WebCore::JSWebKitSubtleCrypto::exportKey):
(WebCore::JSWebKitSubtleCrypto::wrapKey):
(WebCore::JSWebKitSubtleCrypto::unwrapKey):
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::finishCreation):
(WebCore::toJSDedicatedWorkerGlobalScope):
(WebCore::toJSWorkerGlobalScope):
* bindings/js/JSWorkerGlobalScopeBase.h:
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::send):
* bindings/js/JSXPathNSResolverCustom.cpp:
(WebCore::JSXPathNSResolver::toWrapped):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::setupModuleScriptHandlers):
* bindings/js/ScriptModuleLoader.cpp:
(WebCore::ScriptModuleLoader::fetch):
(WebCore::ScriptModuleLoader::evaluate):
* bindings/js/ScriptState.cpp:
(WebCore::domWindowFromExecState):
(WebCore::scriptExecutionContextFromExecState):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::isArray):
(WebCore::CloneSerializer::isMap):
(WebCore::CloneSerializer::isSet):
(WebCore::CloneSerializer::dumpArrayBufferView):
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneSerializer::serialize):
(WebCore::CloneDeserializer::CloneDeserializer):
(WebCore::CloneDeserializer::readArrayBufferView):
(WebCore::CloneDeserializer::readTerminal):
(WebCore::transferArrayBuffers):
(WebCore::SerializedScriptValue::create):
* bindings/js/StructuredClone.cpp:
(WebCore::structuredCloneArrayBuffer):
(WebCore::structuredCloneArrayBufferView):
* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::evaluate):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateOverloadedFunctionOrConstructor):
(GenerateImplementation):
* bindings/scripts/test/JS/JSInterfaceName.cpp:
(WebCore::JSInterfaceName::finishCreation):
(WebCore::jsInterfaceNameConstructor):
(WebCore::setJSInterfaceNameConstructor):
(WebCore::JSInterfaceName::toWrapped):
* bindings/scripts/test/JS/JSInterfaceName.h:
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::JSTestActiveDOMObject::finishCreation):
(WebCore::BindingCaller<JSTestActiveDOMObject>::castForAttribute):
(WebCore::BindingCaller<JSTestActiveDOMObject>::castForOperation):
(WebCore::jsTestActiveDOMObjectConstructor):
(WebCore::setJSTestActiveDOMObjectConstructor):
(WebCore::JSTestActiveDOMObject::toWrapped):
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
* bindings/scripts/test/JS/JSTestCEReactions.cpp:
(WebCore::JSTestCEReactions::finishCreation):
(WebCore::BindingCaller<JSTestCEReactions>::castForAttribute):
(WebCore::BindingCaller<JSTestCEReactions>::castForOperation):
(WebCore::jsTestCEReactionsConstructor):
(WebCore::setJSTestCEReactionsConstructor):
(WebCore::JSTestCEReactions::toWrapped):
* bindings/scripts/test/JS/JSTestCEReactions.h:
* bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
(WebCore::JSTestCEReactionsStringifier::finishCreation):
(WebCore::BindingCaller<JSTestCEReactionsStringifier>::castForAttribute):
(WebCore::BindingCaller<JSTestCEReactionsStringifier>::castForOperation):
(WebCore::jsTestCEReactionsStringifierConstructor):
(WebCore::setJSTestCEReactionsStringifierConstructor):
(WebCore::JSTestCEReactionsStringifier::toWrapped):
* bindings/scripts/test/JS/JSTestCEReactionsStringifier.h:
* bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
(WebCore::JSTestClassWithJSBuiltinConstructor::finishCreation):
(WebCore::jsTestClassWithJSBuiltinConstructorConstructor):
(WebCore::setJSTestClassWithJSBuiltinConstructorConstructor):
(WebCore::JSTestClassWithJSBuiltinConstructor::toWrapped):
* bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
(WebCore::JSTestCustomConstructorWithNoInterfaceObject::finishCreation):
(WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):
(WebCore::setJSTestCustomConstructorWithNoInterfaceObjectConstructor):
(WebCore::JSTestCustomConstructorWithNoInterfaceObject::toWrapped):
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::JSTestCustomNamedGetter::finishCreation):
(WebCore::BindingCaller<JSTestCustomNamedGetter>::castForOperation):
(WebCore::jsTestCustomNamedGetterConstructor):
(WebCore::setJSTestCustomNamedGetterConstructor):
(WebCore::JSTestCustomNamedGetter::toWrapped):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
* bindings/scripts/test/JS/JSTestDOMJIT.cpp:
(WebCore::JSTestDOMJIT::finishCreation):
(WebCore::BindingCaller<JSTestDOMJIT>::castForAttribute):
(WebCore::BindingCaller<JSTestDOMJIT>::castForOperation):
(WebCore::jsTestDOMJITConstructor):
(WebCore::setJSTestDOMJITConstructor):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructor::finishCreation):
(WebCore::BindingCaller<JSTestEventConstructor>::castForAttribute):
(WebCore::jsTestEventConstructorConstructor):
(WebCore::setJSTestEventConstructorConstructor):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTarget::finishCreation):
(WebCore::BindingCaller<JSTestEventTarget>::castForOperation):
(WebCore::jsTestEventTargetConstructor):
(WebCore::setJSTestEventTargetConstructor):
(WebCore::JSTestEventTarget::toWrapped):
* bindings/scripts/test/JS/JSTestEventTarget.h:
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::JSTestException::finishCreation):
(WebCore::BindingCaller<JSTestException>::castForAttribute):
(WebCore::jsTestExceptionConstructor):
(WebCore::setJSTestExceptionConstructor):
(WebCore::JSTestException::toWrapped):
* bindings/scripts/test/JS/JSTestException.h:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
(WebCore::JSTestGenerateIsReachable::finishCreation):
(WebCore::jsTestGenerateIsReachableConstructor):
(WebCore::setJSTestGenerateIsReachableConstructor):
(WebCore::JSTestGenerateIsReachable::toWrapped):
* bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
* bindings/scripts/test/JS/JSTestGlobalObject.cpp:
(WebCore::JSTestGlobalObject::finishCreation):
(WebCore::BindingCaller<JSTestGlobalObject>::castForAttribute):
(WebCore::BindingCaller<JSTestGlobalObject>::castForOperation):
(WebCore::jsTestGlobalObjectConstructor):
(WebCore::setJSTestGlobalObjectConstructor):
(WebCore::JSTestGlobalObject::toWrapped):
* bindings/scripts/test/JS/JSTestGlobalObject.h:
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterface::finishCreation):
(WebCore::BindingCaller<JSTestInterface>::castForAttribute):
(WebCore::BindingCaller<JSTestInterface>::castForOperation):
(WebCore::jsTestInterfaceConstructor):
(WebCore::setJSTestInterfaceConstructor):
(WebCore::JSTestInterface::toWrapped):
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
(WebCore::JSTestInterfaceLeadingUnderscore::finishCreation):
(WebCore::BindingCaller<JSTestInterfaceLeadingUnderscore>::castForAttribute):
(WebCore::jsTestInterfaceLeadingUnderscoreConstructor):
(WebCore::setJSTestInterfaceLeadingUnderscoreConstructor):
(WebCore::JSTestInterfaceLeadingUnderscore::toWrapped):
* bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.h:
* bindings/scripts/test/JS/JSTestIterable.cpp:
(WebCore::JSTestIterable::finishCreation):
(WebCore::BindingCaller<JSTestIterable>::castForOperation):
(WebCore::jsTestIterableConstructor):
(WebCore::setJSTestIterableConstructor):
(WebCore::JSTestIterable::toWrapped):
* bindings/scripts/test/JS/JSTestIterable.h:
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
(WebCore::JSTestJSBuiltinConstructor::finishCreation):
(WebCore::BindingCaller<JSTestJSBuiltinConstructor>::castForAttribute):
(WebCore::BindingCaller<JSTestJSBuiltinConstructor>::castForOperation):
(WebCore::jsTestJSBuiltinConstructorConstructor):
(WebCore::setJSTestJSBuiltinConstructorConstructor):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::JSTestMediaQueryListListener::finishCreation):
(WebCore::BindingCaller<JSTestMediaQueryListListener>::castForOperation):
(WebCore::jsTestMediaQueryListListenerConstructor):
(WebCore::setJSTestMediaQueryListListenerConstructor):
(WebCore::JSTestMediaQueryListListener::toWrapped):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructor::finishCreation):
(WebCore::jsTestNamedConstructorConstructor):
(WebCore::setJSTestNamedConstructorConstructor):
(WebCore::JSTestNamedConstructor::toWrapped):
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::JSTestNode::finishCreation):
(WebCore::BindingCaller<JSTestNode>::castForAttribute):
(WebCore::BindingCaller<JSTestNode>::castForOperation):
(WebCore::jsTestNodeConstructor):
(WebCore::setJSTestNodeConstructor):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObj::finishCreation):
(WebCore::BindingCaller<JSTestObj>::castForAttribute):
(WebCore::BindingCaller<JSTestObj>::castForOperation):
(WebCore::jsTestObjConstructor):
(WebCore::setJSTestObjConstructor):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithDistinguishingUnion):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWith2DistinguishingUnions):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithNonDistinguishingUnion):
(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion):
(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter):
(WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction):
(WebCore::JSTestObj::toWrapped):
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::JSTestOverloadedConstructorsConstructor::construct):
(WebCore::JSTestOverloadedConstructors::finishCreation):
(WebCore::jsTestOverloadedConstructorsConstructor):
(WebCore::setJSTestOverloadedConstructorsConstructor):
(WebCore::JSTestOverloadedConstructors::toWrapped):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
(WebCore::JSTestOverloadedConstructorsWithSequence::finishCreation):
(WebCore::jsTestOverloadedConstructorsWithSequenceConstructor):
(WebCore::setJSTestOverloadedConstructorsWithSequenceConstructor):
(WebCore::JSTestOverloadedConstructorsWithSequence::toWrapped):
* bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
(WebCore::JSTestOverrideBuiltins::finishCreation):
(WebCore::BindingCaller<JSTestOverrideBuiltins>::castForOperation):
(WebCore::jsTestOverrideBuiltinsConstructor):
(WebCore::setJSTestOverrideBuiltinsConstructor):
(WebCore::JSTestOverrideBuiltins::toWrapped):
* bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
* bindings/scripts/test/JS/JSTestSerialization.cpp:
(WebCore::JSTestSerialization::finishCreation):
(WebCore::BindingCaller<JSTestSerialization>::castForAttribute):
(WebCore::BindingCaller<JSTestSerialization>::castForOperation):
(WebCore::jsTestSerializationConstructor):
(WebCore::setJSTestSerializationConstructor):
(WebCore::JSTestSerialization::toWrapped):
* bindings/scripts/test/JS/JSTestSerialization.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterface::finishCreation):
(WebCore::BindingCaller<JSTestSerializedScriptValueInterface>::castForAttribute):
(WebCore::BindingCaller<JSTestSerializedScriptValueInterface>::castForOperation):
(WebCore::jsTestSerializedScriptValueInterfaceConstructor):
(WebCore::setJSTestSerializedScriptValueInterfaceConstructor):
(WebCore::JSTestSerializedScriptValueInterface::toWrapped):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefs::finishCreation):
(WebCore::BindingCaller<JSTestTypedefs>::castForAttribute):
(WebCore::BindingCaller<JSTestTypedefs>::castForOperation):
(WebCore::jsTestTypedefsConstructor):
(WebCore::setJSTestTypedefsConstructor):
(WebCore::JSTestTypedefs::toWrapped):
* bindings/scripts/test/JS/JSTestTypedefs.h:
* bridge/c/CRuntimeObject.cpp:
(JSC::Bindings::CRuntimeObject::finishCreation):
* bridge/c/c_instance.cpp:
(JSC::Bindings::CRuntimeMethod::finishCreation):
(JSC::Bindings::CInstance::invokeMethod):
* bridge/c/c_utility.cpp:
(JSC::Bindings::convertValueToNPVariant):
* bridge/objc/ObjCRuntimeObject.mm:
(JSC::Bindings::ObjCRuntimeObject::finishCreation):
* bridge/objc/WebScriptObject.mm:
(-[WebScriptObject setValue:forKey:]):
(+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
* bridge/objc/objc_instance.mm:
(ObjCRuntimeMethod::finishCreation):
(ObjcInstance::invokeMethod):
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::ObjcFallbackObjectImp::finishCreation):
(JSC::Bindings::callObjCFallbackObject):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::finishCreation):
(JSC::RuntimeArray::lengthGetter):
* bridge/runtime_method.cpp:
(JSC::RuntimeMethod::finishCreation):
(JSC::RuntimeMethod::lengthGetter):
(JSC::callRuntimeMethod):
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::finishCreation):
(JSC::Bindings::callRuntimeObject):
(JSC::Bindings::callRuntimeConstructor):
* css/FontFace.cpp:
(WebCore::FontFace::create):
* html/HTMLMediaElement.cpp:
(WebCore::controllerJSValue):
(WebCore::HTMLMediaElement::updateCaptionContainer):
(WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::canAccessInspectedScriptState):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForEventListener):
(WebCore::InspectorDOMAgent::scriptValueAsNode):
* inspector/WebInjectedScriptHost.cpp:
(WebCore::WebInjectedScriptHost::subtype):
(WebCore::WebInjectedScriptHost::isHTMLAllCollection):
* inspector/WebInjectedScriptHost.h:

Source/WebKit/mac:

* DOM/DOM.mm:
(+[DOMNode _nodeFromJSWrapper:]):
* DOM/DOMUtility.mm:
(createDOMWrapper):
* DOM/WebDOMOperations.mm:
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::getObjectID):
(WebKit::NetscapePluginInstanceProxy::retainLocalObject):
(WebKit::NetscapePluginInstanceProxy::releaseLocalObject):
* Plugins/Hosted/ProxyInstance.mm:
(WebKit::ProxyRuntimeMethod::finishCreation):
(WebKit::ProxyInstance::invokeMethod):
* Plugins/Hosted/ProxyRuntimeObject.mm:
(WebKit::ProxyRuntimeObject::finishCreation):
* WebView/WebFrame.mm:
(-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
* WebView/WebView.mm:
(+[WebView _reportException:inContext:]):
(aeDescFromJSValue):
(-[WebView _notificationIDForTesting:]):

Source/WebKit/win:

* WebFrame.cpp:
(WebFrame::stringByEvaluatingJavaScriptInScriptWorld):
* WebView.cpp:
(WebView::elementFromJS):

Source/WebKit2:

* WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::elementForNodeHandle):
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::InjectedBundleNodeHandle::getOrCreate):
* WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
(WebKit::InjectedBundleRangeHandle::getOrCreate):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::reportException):
(WebKit::InjectedBundle::webNotificationID):
(WebKit::InjectedBundle::createWebDataFromUint8Array):
* WebProcess/Plugins/Netscape/JSNPMethod.cpp:
(WebKit::JSNPMethod::finishCreation):
(WebKit::callMethod):
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::finishCreation):
(WebKit::callNPJSObject):
(WebKit::constructWithConstructor):
* WebProcess/Plugins/Netscape/NPJSObject.cpp:
(WebKit::NPJSObject::create):
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::getOrCreateNPObject):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::frameForContext):
(WebKit::WebFrame::counterValue):

Tools:

* DumpRenderTree/TestRunner.cpp:
(setAudioResultCallback):

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

2 years agoFix missing exception check in genericTypedArrayViewProtoFuncSet().
mark.lam@apple.com [Fri, 27 Jan 2017 01:38:05 +0000 (01:38 +0000)]
Fix missing exception check in genericTypedArrayViewProtoFuncSet().
https://bugs.webkit.org/show_bug.cgi?id=166812
<rdar://problem/29916672>

Reviewed by Saam Barati.

JSTests:

* stress/regress-166812.js: Added.

Source/JavaScriptCore:

* runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
(JSC::genericTypedArrayViewProtoFuncSet):

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

2 years agoUnreviewed, rolling out r211224.
commit-queue@webkit.org [Fri, 27 Jan 2017 01:33:38 +0000 (01:33 +0000)]
Unreviewed, rolling out r211224.
https://bugs.webkit.org/show_bug.cgi?id=167479

"It was a Kraken performance regression" (Requested by
saamyjoon on #webkit).

Reverted changeset:

"OSR entry: delay outer-loop compilation when at inner-loop"
https://bugs.webkit.org/show_bug.cgi?id=167149
http://trac.webkit.org/changeset/211224

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

2 years agoWebGL content in Safari sticks to GPU that it was started on, sometimes causing extra...
dino@apple.com [Fri, 27 Jan 2017 01:14:22 +0000 (01:14 +0000)]
WebGL content in Safari sticks to GPU that it was started on, sometimes causing extra battery drain and difficulty interacting with UI
https://bugs.webkit.org/show_bug.cgi?id=167477
<rdar://problem/29956321>

Reviewed by Tim Horton.

We were not implementing the recommended approach to properly handle
GPU switching, causing some contexts to remain on a GPU and slow
down the machine's UI. It also could stop the discrete GPU from
turning off.

Register for CGL's display reconfiguration notification, so that we
can alert any active CGLContexts and cause them to update.

The code change here doesn't lend itself to automated testing because
it is specific to hardware with multiple GPUs, relies on some separate
tools to detect which GPU is active, and an external method of triggering
a GPU switch. It's best tested by the manual workflow in Radar.

* platform/graphics/GraphicsContext3D.h: Add a macOS-specific update
call.
* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::displayWasReconfigured): The callback for display reconfigurations.
(WebCore::addActiveContext): Helper to keep track of active contexts, so we
can register/unregister the callback when necessary.
(WebCore::removeActiveContext):
(WebCore::GraphicsContext3D::create): Use the new helpers.
(WebCore::GraphicsContext3D::~GraphicsContext3D):
(WebCore::GraphicsContext3D::updateCGLContext): Tell the CGLContextRef to update.

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

2 years agoREGRESSION (r207483): Touch Bar: Lists and BIU Buttons Missing from Touch Bar in...
wenson_hsieh@apple.com [Fri, 27 Jan 2017 01:01:30 +0000 (01:01 +0000)]
REGRESSION (r207483): Touch Bar: Lists and BIU Buttons Missing from Touch Bar in HTML Notes
https://bugs.webkit.org/show_bug.cgi?id=167472
<rdar://problem/30149809>

Reviewed by Beth Dakin.

Revision 207483 caused the touch bar to stop showing up in HTML Notes due to -updateTextTouchBar not
initializing the text touch bar and causing -makeTouchBar to return nil while processing a mouse click. The
purpose of bailing out of the update was to prevent the text touch bar from thrashing during a selection drag.
If the text touch bar doesn't exist yet, we don't have to worry about its appearance flickering from a different
previous state, so we should just allow the touch bar to update instead.

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

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

2 years agoUnreviewed, rolling out r210328.
commit-queue@webkit.org [Fri, 27 Jan 2017 00:57:36 +0000 (00:57 +0000)]
Unreviewed, rolling out r210328.
https://bugs.webkit.org/show_bug.cgi?id=167476

Blocking bug is fixed <rdar://problem/29957753> (Requested by
keith_miller on #webkit).

Reverted changeset:

"Disable smooth playhead animation for main content media in
the Touch Bar"
https://bugs.webkit.org/show_bug.cgi?id=166715
http://trac.webkit.org/changeset/210328

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

2 years agoWeb Inspector: iOS: Memory timeline shows impossible values for Page size (underflowed)
commit-queue@webkit.org [Fri, 27 Jan 2017 00:56:44 +0000 (00:56 +0000)]
Web Inspector: iOS: Memory timeline shows impossible values for Page size (underflowed)
https://bugs.webkit.org/show_bug.cgi?id=167468
<rdar://problem/30099051>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-01-26
Reviewed by Andreas Kling.

* page/cocoa/ResourceUsageThreadCocoa.mm:
(WebCore::vmPageSize):
This value matches the sysctl value we were attempting to access, and is
the most appropriate when dealing with mach APIs, as we are using here.

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

2 years agoAutoplay muted videos stop playback of any streaming app in the background
jer.noble@apple.com [Fri, 27 Jan 2017 00:38:22 +0000 (00:38 +0000)]
Autoplay muted videos stop playback of any streaming app in the background
https://bugs.webkit.org/show_bug.cgi?id=163993
<rdar://problem/29020431>

Reviewed by Eric Carlson.

Source/WebCore:

Added test in TestWebKitAPI, WebKit1.AudioSessionCategoryIOS.

Previously, we would set the audio session category to "playback" if there was a media-
element-type media session, and if there was a session capable of playing audio. But because
this was an "or" operation, we would incorrectly set the category to "playback" if there was
a video element incapable of rendering audio (due to being muted, without an audio track,
etc.), and also a session capable of producing audio, such as WebAudio.

With this change, this turns into an "and" operation; there must be a media element capable
of rendering audio in order to switch the audio session category to "playback".

Additionally, we no longer cache the value of "canProduceAudio()"; it's queried directly
whenever updateSessionState() is called.

* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::constructCommon):
* Modules/webaudio/AudioContext.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::insertedInto):
(WebCore::HTMLMediaElement::loadResource):
(WebCore::HTMLMediaElement::setMuted):
(WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged):
(WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged):
(WebCore::HTMLMediaElement::clearMediaPlayer):
(WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged):
(WebCore::HTMLMediaElement::presentationType):
(WebCore::HTMLMediaElement::characteristics):
(WebCore::HTMLMediaElement::canProduceAudio):
* html/HTMLMediaElement.h:
* platform/audio/PlatformMediaSession.cpp:
(WebCore::PlatformMediaSession::activeAudioSessionRequired):
(WebCore::PlatformMediaSession::canProduceAudio):
(WebCore::PlatformMediaSession::canProduceAudioChanged):
(WebCore::PlatformMediaSession::setCanProduceAudio): Deleted.
* platform/audio/PlatformMediaSession.h:
(WebCore::PlatformMediaSessionClient::canProduceAudio):
(WebCore::PlatformMediaSession::canProduceAudio): Deleted.
* platform/audio/cocoa/MediaSessionManagerCocoa.cpp:
(PlatformMediaSessionManager::updateSessionState):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/ios/AudioSessionCategoryIOS.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit/ios/video-with-muted-audio-and-webaudio.html: Added.

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

2 years agoFix CPU usage diagnostic logging in PerActivityStateCPUUsageSampler
cdumez@apple.com [Fri, 27 Jan 2017 00:14:50 +0000 (00:14 +0000)]
Fix CPU usage diagnostic logging in PerActivityStateCPUUsageSampler
https://bugs.webkit.org/show_bug.cgi?id=167471
<rdar://problem/30221723>

Reviewed by Alex Christensen.

Fix CPU usage diagnostic logging in PerActivityStateCPUUsageSampler
to use numeric values for logDiagnosticMessageWithValue().

* UIProcess/PerActivityStateCPUUsageSampler.cpp:
(WebKit::PerActivityStateCPUUsageSampler::loggingTimerFired):
(WebKit::loggingKeyForCPUUsage): Deleted.

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

2 years agoEventTarget should visit the JSEventListeners using visitAdditionalChildren
fpizlo@apple.com [Fri, 27 Jan 2017 00:11:54 +0000 (00:11 +0000)]
EventTarget should visit the JSEventListeners using visitAdditionalChildren
https://bugs.webkit.org/show_bug.cgi?id=167462

Reviewed by Michael Saboff.

No new tests because this is already caught by existing testing. This would show up as ASSERTs
in debug, and we suspect it might be at fault for null deref crashes.

Previously, EventTarget would have its event listeners visited by its subclasses' visitChildren
methods. Every subclass of EventTarget would call EventTarget's visitJSEventListeners. For
example, this means that if JSFoo has seven classes between it and JSEventTarget in the JSCell
class hierarchy, then JSFoo::visitChildren would end up calling visitJSEventListeners seven extra
times.

Also, the weird way that visitJSEventListeners was called meant that it was not part of the GC's
output constraint processing. This meant that it would not be called when the GC tried to
terminate. So, if something about the event listener changes during a GC cycle, the GC would
potentially fail to mark one of the references.

Both problems can be solved by simply moving the call to visitJSEventListeners into
visitAdditionalChildren.

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::visitAdditionalChildren):
* bindings/js/JSEventTargetCustom.cpp:
(WebCore::JSEventTarget::visitAdditionalChildren):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* dom/EventTarget.idl:

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

2 years agoHarden how the compiler references GC objects
sbarati@apple.com [Thu, 26 Jan 2017 23:50:58 +0000 (23:50 +0000)]
Harden how the compiler references GC objects
https://bugs.webkit.org/show_bug.cgi?id=167277
<rdar://problem/30179506>

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Since r210971, the DFG/FTL will flash safepoints before
each phase. This means that there are more opportunities for
a GC to happen while the compiler is running. Because of this,
the compiler must keep track of all the heap pointers that are part
of the Graph data structure. To accomplish this, I've designed
a new type called RegisteredStructure that can only be constructed
after the Graph becomes aware of its underlying Structure*. I
designed this new type to have the type system in C++ help us catch
errors where we're not informing the graph/plan of a heap pointer.
I've made it a compile error to create an OpInfo with a pointer
T* where T inherits from HeapCell. This encourages an OpInfo
to be created with either a FrozenValue* or a RegisteredStructure.
I've added similar compile time assertions for TrustedImmPtr in DFG::SpeculativeJIT
and FTL::Output::constIntPtr. These static asserts don't save us from all bad
programs because there are ways to write code that's incorrect that compiles,
but the new types do help us ensure that the most obvious way of writing the
code is correct.

The reason this patch is so big is that I've strung RegisteredStructure and
RegisteredStructureSet through the entire DFG/FTL.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::determineLiveness):
* bytecode/StructureSet.cpp:
(JSC::StructureSet::filter): Deleted.
(JSC::StructureSet::filterArrayModes): Deleted.
(JSC::StructureSet::speculationFromStructures): Deleted.
(JSC::StructureSet::arrayModesFromStructures): Deleted.
(JSC::StructureSet::validateReferences): Deleted.
* bytecode/StructureSet.h:
* dfg/DFGAbstractInterpreter.h:
(JSC::DFG::AbstractInterpreter::filter):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::booleanResult):
(JSC::DFG::isToThisAnIdentity):
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
(JSC::DFG::AbstractInterpreter<AbstractStateType>::observeTransition):
(JSC::DFG::AbstractInterpreter<AbstractStateType>::filter):
* dfg/DFGAbstractValue.cpp:
(JSC::DFG::AbstractValue::set):
(JSC::DFG::AbstractValue::setType):
(JSC::DFG::AbstractValue::mergeOSREntryValue):
(JSC::DFG::AbstractValue::filter):
(JSC::DFG::AbstractValue::changeStructure):
(JSC::DFG::AbstractValue::contains):
* dfg/DFGAbstractValue.h:
(JSC::DFG::AbstractValue::observeTransition):
(JSC::DFG::AbstractValue::TransitionObserver::TransitionObserver):
* dfg/DFGArgumentsEliminationPhase.cpp:
* dfg/DFGArrayMode.cpp:
(JSC::DFG::ArrayMode::alreadyChecked):
* dfg/DFGArrayifySlowPathGenerator.h:
(JSC::DFG::ArrayifySlowPathGenerator::ArrayifySlowPathGenerator):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleConstantInternalFunction):
(JSC::DFG::ByteCodeParser::load):
(JSC::DFG::ByteCodeParser::handleGetById):
(JSC::DFG::ByteCodeParser::handlePutById):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
* dfg/DFGCallArrayAllocatorSlowPathGenerator.h:
(JSC::DFG::CallArrayAllocatorSlowPathGenerator::CallArrayAllocatorSlowPathGenerator):
(JSC::DFG::CallArrayAllocatorWithVariableSizeSlowPathGenerator::CallArrayAllocatorWithVariableSizeSlowPathGenerator):
* dfg/DFGCallCreateDirectArgumentsSlowPathGenerator.h:
(JSC::DFG::CallCreateDirectArgumentsSlowPathGenerator::CallCreateDirectArgumentsSlowPathGenerator):
* dfg/DFGCommonData.cpp:
(JSC::DFG::CommonData::notifyCompilingStructureTransition):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
(JSC::DFG::ConstantFoldingPhase::emitGetByOffset):
(JSC::DFG::ConstantFoldingPhase::emitPutByOffset):
(JSC::DFG::ConstantFoldingPhase::addBaseCheck):
(JSC::DFG::ConstantFoldingPhase::addStructureTransitionCheck):
* dfg/DFGDesiredWeakReferences.cpp:
(JSC::DFG::DesiredWeakReferences::reallyAdd):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::checkArray):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::Graph):
(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::tryGetConstantProperty):
(JSC::DFG::Graph::inferredValueForProperty):
(JSC::DFG::Graph::visitChildren):
(JSC::DFG::Graph::freeze):
(JSC::DFG::Graph::registerStructure):
(JSC::DFG::Graph::assertIsRegistered):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::registerStructure):
(JSC::DFG::Graph::addStructureSet):
* dfg/DFGJITCompiler.h:
(JSC::DFG::JITCompiler::branchWeakStructure):
* dfg/DFGMultiGetByOffsetData.cpp:
(JSC::DFG::MultiGetByOffsetCase::dumpInContext):
* dfg/DFGMultiGetByOffsetData.h:
(JSC::DFG::MultiGetByOffsetCase::MultiGetByOffsetCase):
(JSC::DFG::MultiGetByOffsetCase::set):
* dfg/DFGNode.cpp:
(JSC::DFG::Node::convertToPutStructureHint):
* dfg/DFGNode.h:
(JSC::DFG::Node::convertToCheckStructure):
(JSC::DFG::Node::structureSet):
(JSC::DFG::Node::structure):
(JSC::DFG::Node::OpInfoWrapper::OpInfoWrapper):
(JSC::DFG::Node::OpInfoWrapper::operator=):
(JSC::DFG::Node::OpInfoWrapper::asRegisteredStructure):
* dfg/DFGObjectAllocationSinkingPhase.cpp:
* dfg/DFGOpInfo.h:
(JSC::DFG::OpInfo::OpInfo):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
(JSC::DFG::Plan::finalizeWithoutNotifyingCallback):
* dfg/DFGRegisteredStructure.h: Added.
(JSC::DFG::RegisteredStructure::get):
(JSC::DFG::RegisteredStructure::operator->):
(JSC::DFG::RegisteredStructure::operator==):
(JSC::DFG::RegisteredStructure::operator!=):
(JSC::DFG::RegisteredStructure::operator bool):
(JSC::DFG::RegisteredStructure::RegisteredStructure):
(JSC::DFG::RegisteredStructure::createPrivate):
* dfg/DFGRegisteredStructureSet.cpp: Added.
(JSC::DFG::RegisteredStructureSet::filter):
(JSC::DFG::RegisteredStructureSet::filterArrayModes):
(JSC::DFG::RegisteredStructureSet::speculationFromStructures):
(JSC::DFG::RegisteredStructureSet::arrayModesFromStructures):
(JSC::DFG::RegisteredStructureSet::validateReferences):
* dfg/DFGRegisteredStructureSet.h: Added.
(JSC::DFG::RegisteredStructureSet::RegisteredStructureSet):
(JSC::DFG::RegisteredStructureSet::onlyStructure):
(JSC::DFG::RegisteredStructureSet::toStructureSet):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::emitAllocateRawObject):
(JSC::DFG::SpeculativeJIT::emitGetCallee):
(JSC::DFG::SpeculativeJIT::silentFill):
(JSC::DFG::SpeculativeJIT::checkArray):
(JSC::DFG::SpeculativeJIT::compileGetByValOnString):
(JSC::DFG::SpeculativeJIT::compileFromCharCode):
(JSC::DFG::SpeculativeJIT::compileDoubleRep):
(JSC::DFG::compileClampDoubleToByte):
(JSC::DFG::SpeculativeJIT::compileMakeRope):
(JSC::DFG::SpeculativeJIT::compileArithRounding):
(JSC::DFG::SpeculativeJIT::compileNewFunctionCommon):
(JSC::DFG::SpeculativeJIT::compileNewFunction):
(JSC::DFG::SpeculativeJIT::compileCreateActivation):
(JSC::DFG::SpeculativeJIT::compileCreateDirectArguments):
(JSC::DFG::SpeculativeJIT::compileCreateScopedArguments):
(JSC::DFG::SpeculativeJIT::compileCreateClonedArguments):
(JSC::DFG::SpeculativeJIT::compileSpread):
(JSC::DFG::SpeculativeJIT::compileArraySlice):
(JSC::DFG::SpeculativeJIT::compileTypeOf):
(JSC::DFG::SpeculativeJIT::compileAllocatePropertyStorage):
(JSC::DFG::SpeculativeJIT::compileReallocatePropertyStorage):
(JSC::DFG::SpeculativeJIT::compileToStringOrCallStringConstructorOnCell):
(JSC::DFG::SpeculativeJIT::compileNewTypedArray):
(JSC::DFG::SpeculativeJIT::speculateStringOrStringObject):
(JSC::DFG::SpeculativeJIT::compileMaterializeNewObject):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::TrustedImmPtr::TrustedImmPtr):
(JSC::DFG::SpeculativeJIT::TrustedImmPtr::weakPointer):
(JSC::DFG::SpeculativeJIT::TrustedImmPtr::operator MacroAssembler::TrustedImmPtr):
(JSC::DFG::SpeculativeJIT::TrustedImmPtr::asIntptr):
(JSC::DFG::SpeculativeJIT::callOperation):
(JSC::DFG::SpeculativeJIT::emitAllocateDestructibleObject):
(JSC::DFG::SpeculativeJIT::speculateStringObjectForStructure):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNullOrUndefined):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNullOrUndefined):
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::fillSpeculateCell):
(JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
(JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::compileAllocateNewArrayWithSize):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNullOrUndefined):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNullOrUndefined):
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
(JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::compileAllocateNewArrayWithSize):
* dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):
* dfg/DFGStructureAbstractValue.cpp:
(JSC::DFG::StructureAbstractValue::assertIsRegistered):
(JSC::DFG::StructureAbstractValue::clobber):
(JSC::DFG::StructureAbstractValue::observeTransition):
(JSC::DFG::StructureAbstractValue::observeTransitions):
(JSC::DFG::StructureAbstractValue::add):
(JSC::DFG::StructureAbstractValue::merge):
(JSC::DFG::StructureAbstractValue::mergeNotTop):
(JSC::DFG::StructureAbstractValue::filter):
(JSC::DFG::StructureAbstractValue::filterSlow):
(JSC::DFG::StructureAbstractValue::filterClassInfoSlow):
(JSC::DFG::StructureAbstractValue::contains):
(JSC::DFG::StructureAbstractValue::isSubsetOf):
(JSC::DFG::StructureAbstractValue::isSupersetOf):
(JSC::DFG::StructureAbstractValue::overlaps):
(JSC::DFG::StructureAbstractValue::isSubClassOf):
(JSC::DFG::StructureAbstractValue::dumpInContext):
* dfg/DFGStructureAbstractValue.h:
(JSC::DFG::StructureAbstractValue::StructureAbstractValue):
(JSC::DFG::StructureAbstractValue::operator=):
(JSC::DFG::StructureAbstractValue::set):
(JSC::DFG::StructureAbstractValue::toStructureSet):
(JSC::DFG::StructureAbstractValue::at):
(JSC::DFG::StructureAbstractValue::operator[]):
(JSC::DFG::StructureAbstractValue::onlyStructure):
* dfg/DFGStructureRegistrationPhase.cpp:
(JSC::DFG::StructureRegistrationPhase::StructureRegistrationPhase): Deleted.
(JSC::DFG::StructureRegistrationPhase::run): Deleted.
(JSC::DFG::StructureRegistrationPhase::registerStructures): Deleted.
(JSC::DFG::StructureRegistrationPhase::registerStructure): Deleted.
(JSC::DFG::StructureRegistrationPhase::assertAreRegistered): Deleted.
(JSC::DFG::StructureRegistrationPhase::assertIsRegistered): Deleted.
(JSC::DFG::performStructureRegistration): Deleted.
* dfg/DFGStructureRegistrationPhase.h:
* dfg/DFGTransition.cpp:
(JSC::DFG::Transition::dumpInContext):
* dfg/DFGTransition.h:
(JSC::DFG::Transition::Transition):
* dfg/DFGTypeCheckHoistingPhase.cpp:
(JSC::DFG::TypeCheckHoistingPhase::noticeStructureCheck):
(JSC::DFG::TypeCheckHoistingPhase::noticeStructureCheckAccountingForArrayMode):
* dfg/DFGValidate.cpp:
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::lower):
(JSC::FTL::DFG::LowerDFGToB3::compileCallObjectConstructor):
(JSC::FTL::DFG::LowerDFGToB3::compileCheckStructure):
(JSC::FTL::DFG::LowerDFGToB3::compilePutStructure):
(JSC::FTL::DFG::LowerDFGToB3::compileArraySlice):
(JSC::FTL::DFG::LowerDFGToB3::compileCreateActivation):
(JSC::FTL::DFG::LowerDFGToB3::compileNewFunction):
(JSC::FTL::DFG::LowerDFGToB3::compileCreateDirectArguments):
(JSC::FTL::DFG::LowerDFGToB3::compileCreateRest):
(JSC::FTL::DFG::LowerDFGToB3::compileNewArray):
(JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileNewArrayBuffer):
(JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSize):
(JSC::FTL::DFG::LowerDFGToB3::compileNewTypedArray):
(JSC::FTL::DFG::LowerDFGToB3::compileAllocatePropertyStorage):
(JSC::FTL::DFG::LowerDFGToB3::compileReallocatePropertyStorage):
(JSC::FTL::DFG::LowerDFGToB3::compileMultiGetByOffset):
(JSC::FTL::DFG::LowerDFGToB3::compileMultiPutByOffset):
(JSC::FTL::DFG::LowerDFGToB3::compileGetMapBucket):
(JSC::FTL::DFG::LowerDFGToB3::compileOverridesHasInstance):
(JSC::FTL::DFG::LowerDFGToB3::compileCheckStructureImmediate):
(JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject):
(JSC::FTL::DFG::LowerDFGToB3::compileMaterializeCreateActivation):
(JSC::FTL::DFG::LowerDFGToB3::compileNewRegexp):
(JSC::FTL::DFG::LowerDFGToB3::compileLogShadowChickenTail):
(JSC::FTL::DFG::LowerDFGToB3::checkStructure):
(JSC::FTL::DFG::LowerDFGToB3::checkInferredType):
(JSC::FTL::DFG::LowerDFGToB3::allocateObject):
(JSC::FTL::DFG::LowerDFGToB3::allocateVariableSizedObject):
(JSC::FTL::DFG::LowerDFGToB3::allocateJSArray):
(JSC::FTL::DFG::LowerDFGToB3::allocateUninitializedContiguousJSArray):
(JSC::FTL::DFG::LowerDFGToB3::boolify):
(JSC::FTL::DFG::LowerDFGToB3::equalNullOrUndefined):
(JSC::FTL::DFG::LowerDFGToB3::lowCell):
(JSC::FTL::DFG::LowerDFGToB3::speculateStringObjectForStructureID):
(JSC::FTL::DFG::LowerDFGToB3::weakPointer):
(JSC::FTL::DFG::LowerDFGToB3::frozenPointer):
(JSC::FTL::DFG::LowerDFGToB3::weakStructureID):
(JSC::FTL::DFG::LowerDFGToB3::weakStructure):
(JSC::FTL::DFG::LowerDFGToB3::crash):
* ftl/FTLOutput.h:
(JSC::FTL::Output::weakPointer):
(JSC::FTL::Output::constIntPtr):

Source/WTF:

I made TinyPtrSet use bitwise_cast instead of static_cast
for its singleEntry() function so that it can work on pointer-like
types just as it can on actual pointer types.

An example of where this matters is when you have TinyPtrSet<T>
where T is defined to be a struct which wraps a pointer, e.g:

struct T {
    void* m_pointer;
}

* wtf/TinyPtrSet.h:
(WTF::TinyPtrSet::singleEntry):

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

2 years ago[QuickLook] Create temporary files with NSFileProtectionCompleteUnlessOpen
aestes@apple.com [Thu, 26 Jan 2017 23:50:28 +0000 (23:50 +0000)]
[QuickLook] Create temporary files with NSFileProtectionCompleteUnlessOpen
https://bugs.webkit.org/show_bug.cgi?id=167455
<rdar://problem/12499118>

Reviewed by David Kilzer.

Add the NSFileProtectionKey attribute with value NSFileProtectionCompleteUnlessOpen to
temporary directories created for QuickLook files. Also:

1. Stop calling -[NSFileManager _web_pathWithUniqueFilenameForPath:], since the temporary
directory is already unique and only one file will be placed inside it.
2. Create the temporary file with -[NSFileManager _web_createFileAtPath:contents:attributes:]
instead of with -[NSFileManager _web_createFileAtPathWithIntermediateDirectories:contents:attributes:directoryAttributes:],
since the intermediate directories were already created by createTemporaryDirectory().
3. Explicitly set the temporary directory's attributes with
-[NSFileManager setAttributes:ofItemAtPath:error:].
4. Append the lastPathComponent of fileName to downloadDirectory to ensure fileName isn't
really a relative path.

* loader/ios/QuickLook.h: Stopped declaring QLFileAttributes() and QLDirectoryAttributes().
* loader/ios/QuickLook.mm:
(WebCore::temporaryFileAttributes): Renamed from QLFileAttributes().
(WebCore::temporaryDirectoryAttributes): Renamed from QLDirectoryAttributes().
(WebCore::createTemporaryFileForQuickLook):
(WebCore::QLFileAttributes): Deleted.
(WebCore::QLDirectoryAttributes): Deleted.
* platform/spi/cocoa/NSFileManagerSPI.h: Declared -_web_createFileAtPath:contents:attributes:
and removed declarations for -_web_createFileAtPathWithIntermediateDirectories:contents:attributes:directoryAttributes:
and -_web_pathWithUniqueFilenameForPath:

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

2 years agoPointer lock events should be delivered directly to the target element
commit-queue@webkit.org [Thu, 26 Jan 2017 23:47:53 +0000 (23:47 +0000)]
Pointer lock events should be delivered directly to the target element
https://bugs.webkit.org/show_bug.cgi?id=167134

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-01-26
Reviewed by Jon Lee.

Source/WebCore:

pointer-lock/mouse-event-delivery.html: Enabled for mac, added wheel event tests.

When pointer is locked on an element, route mouse events directly to the target element, instead of
doing the normal event disptach.

* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleMouseDoubleClickEvent):
(WebCore::EventHandler::handleMouseMoveEvent):
(WebCore::EventHandler::handleMouseReleaseEvent):
(WebCore::EventHandler::handleMouseForceEvent):
(WebCore::EventHandler::handleWheelEvent):
* page/PointerLockController.cpp:
(WebCore::PointerLockController::isLocked): Added.
(WebCore::PointerLockController::dispatchLockedWheelEvent): Added.
* page/PointerLockController.h:

LayoutTests:

The pointer-lock/mouse-event-delivery.html test is modified to explicitly move the mouse pointer to a valid
location before sending mouse actions. Without this, the test infrastructure doesn't know that the pointer
is over the web view and doesn't deliver events.

Added code to test for wheel events.

* platform/mac/TestExpectations: enabled test.
* pointer-lock/mouse-event-delivery.html:
* pointer-lock/mouse-event-delivery-expected.txt:

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

2 years agoRequest pointer unlock on navigation and re-enable pointer-lock tests for WK2.
commit-queue@webkit.org [Thu, 26 Jan 2017 23:47:06 +0000 (23:47 +0000)]
Request pointer unlock on navigation and re-enable pointer-lock tests for WK2.
https://bugs.webkit.org/show_bug.cgi?id=166765

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-01-26
Reviewed by Tim Horton.

Source/WebKit2:

When the main frame is load is committed, pointer lock should end.
This resets pointer lock state between tests and allows tests to succeed.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):

LayoutTests:

Enabled pointer lock tests for wk2 now that pointer lock state is being reset after each test.

* platform/mac-wk2/TestExpectations:

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

2 years agoFix CPU / Memory diagnostic logging in PerformanceMonitor
cdumez@apple.com [Thu, 26 Jan 2017 23:33:14 +0000 (23:33 +0000)]
Fix CPU / Memory diagnostic logging in PerformanceMonitor
https://bugs.webkit.org/show_bug.cgi?id=167469
<rdar://problem/30220959>

Reviewed by Alex Christensen.

Fix CPU / Memory diagnostic logging in PerformanceMonitor to use logDiagnosticMessage()
instead of logDiagnosticMessageWithValue(). logDiagnosticMessageWithValue() should only
be used with numeric values but we already take care of the bucketing on our side.

* page/DiagnosticLoggingClient.h:
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::postPageBackgroundingCPUUsageKey):
(WebCore::DiagnosticLoggingKeys::postPageBackgroundingMemoryUsageKey):
(WebCore::DiagnosticLoggingKeys::postPageLoadCPUUsageKey):
(WebCore::DiagnosticLoggingKeys::postPageLoadMemoryUsageKey):
(WebCore::DiagnosticLoggingKeys::foregroundCPUUsageToDiagnosticLoggingKey):
(WebCore::DiagnosticLoggingKeys::backgroundCPUUsageToDiagnosticLoggingKey):
(WebCore::DiagnosticLoggingKeys::postPageBackgroundingKey): Deleted.
(WebCore::DiagnosticLoggingKeys::postPageLoadKey): Deleted.
(WebCore::DiagnosticLoggingKeys::memoryUsageKey): Deleted.
* page/DiagnosticLoggingKeys.h:
* page/PerformanceMonitor.cpp:
(WebCore::PerformanceMonitor::measurePostLoadCPUUsage):
(WebCore::PerformanceMonitor::measurePostLoadMemoryUsage):
(WebCore::PerformanceMonitor::measurePostBackgroundingMemoryUsage):
(WebCore::PerformanceMonitor::measurePostBackgroundingCPUUsage):

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

2 years agoDisable API test WebKit2.WebsitePoliciesPlayAfterPreventedAutoplay.
ryanhaddad@apple.com [Thu, 26 Jan 2017 22:34:00 +0000 (22:34 +0000)]
Disable API test WebKit2.WebsitePoliciesPlayAfterPreventedAutoplay.
https://bugs.webkit.org/show_bug.cgi?id=167466

Unreviewed test gardening.

* TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm:
(TEST):

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

2 years agoGamepads: Some DPads are still not exposed in the HID backend.
beidson@apple.com [Thu, 26 Jan 2017 22:10:58 +0000 (22:10 +0000)]
Gamepads: Some DPads are still not exposed in the HID backend.
rdar://problem/30217518 and https://bugs.webkit.org/show_bug.cgi?id=167465

Reviewed by Alex Christensen.

No new tests (Currently unable to test HID backend directly)

* platform/gamepad/mac/HIDGamepad.cpp:
(WebCore::HIDGamepad::maybeAddButton): Allow GenericDesktop paged elements that are DPads to be buttons.

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

2 years agoUnreviewed, rolling out r210095.
commit-queue@webkit.org [Thu, 26 Jan 2017 21:44:59 +0000 (21:44 +0000)]
Unreviewed, rolling out r210095.
https://bugs.webkit.org/show_bug.cgi?id=167464

broke tiling on mac (Requested by thorton on #webkit).

Reverted changeset:

"TileGrid revalidates tiles twice during flush, first with
wrong visible rect"
https://bugs.webkit.org/show_bug.cgi?id=166406
http://trac.webkit.org/changeset/210095

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

2 years agoFix WebGL diagnostic logging
cdumez@apple.com [Thu, 26 Jan 2017 21:34:45 +0000 (21:34 +0000)]
Fix WebGL diagnostic logging
https://bugs.webkit.org/show_bug.cgi?id=167463
<rdar://problem/30216981>

Reviewed by Alex Christensen.

Fix WebGL diagnostic logging so that it no longer uses logDiagnosticMessageWithValue().
This is because the value apparently needs to be numeric on Mac.

Source/WebCore:

* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::checkForContextLossHandling):
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::pageHandlesWebGLContextLossKey):
(WebCore::WebCore::DiagnosticLoggingKeys::webGLStateKey):
(WebCore::DiagnosticLoggingKeys::stateKey): Deleted.
(WebCore::DiagnosticLoggingKeys::handlesContextLossKey): Deleted.
(WebCore::WebCore::DiagnosticLoggingKeys::webGLKey): Deleted.
* page/DiagnosticLoggingKeys.h:

Source/WebKit2:

* UIProcess/HighPerformanceGraphicsUsageSampler.cpp:
(WebKit::HighPerformanceGraphicsUsageSampler::timerFired):

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

2 years agoSimple line layout: Add support for -webkit-hyphenate-limit-lines
zalan@apple.com [Thu, 26 Jan 2017 21:19:38 +0000 (21:19 +0000)]
Simple line layout: Add support for -webkit-hyphenate-limit-lines
https://bugs.webkit.org/show_bug.cgi?id=167446
<rdar://problem/30194030>

Reviewed by Antti Koivisto.

Source/WebCore:

Now we can set the limit on the number of lines that a word can split across through hyphenation.

Tests: fast/text/simple-line-layout-hyphen-limit-lines.html
       fast/text/simple-line-layout-hyphen-limit-lines2.html

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForStyle):
(WebCore::SimpleLineLayout::splitFragmentToFitLine):
(WebCore::SimpleLineLayout::printReason):
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
* rendering/SimpleLineLayoutTextFragmentIterator.h:
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::TextFragment):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::wrappingWithHyphenCounter):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::splitWithHyphen): The right side of the split has +1 on the wrapping counter.

LayoutTests:

* fast/text/simple-line-layout-hyphen-limit-lines-expected.html: Added.
* fast/text/simple-line-layout-hyphen-limit-lines.html: Added.
* fast/text/simple-line-layout-hyphen-limit-lines2-expected.html: Added.
* fast/text/simple-line-layout-hyphen-limit-lines2.html: Added.
* platform/mac/fast/text/hyphenate-limit-lines-expected.txt: progression

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

2 years agoAdd support for recognizing data interaction gestures in WebKit2
wenson_hsieh@apple.com [Thu, 26 Jan 2017 20:58:08 +0000 (20:58 +0000)]
Add support for recognizing data interaction gestures in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=167444

Reviewed by Beth Dakin.

Source/WebCore:

Minor tweaks to pasteboard code to support data interaction.

* WebCore.xcodeproj/project.pbxproj:
* platform/PlatformPasteboard.h:
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::read):
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::PlatformPasteboard):

If the pasteboard is the special data interaction type, use the shared item provider pasteboard; otherwise,
fall back to the general pasteboard.

(WebCore::PlatformPasteboard::getTypes):

Actually populate the list of available types using available pasteboardTypes.

(WebCore::PlatformPasteboard::write):

Add UTF8 plaintext type (kUTTypeUTF8PlainText) when vending data representations of rich text.

* platform/ios/WebItemProviderPasteboard.mm:
(-[WebItemProviderPasteboard setItems:]):
(-[WebItemProviderPasteboard dataForPasteboardType:inItemSet:]):
(-[WebItemProviderPasteboard valuesForPasteboardType:inItemSet:]):

Move off of deprecated methods when retrieving and supplying data to the item provider pasteboard.

* platform/spi/ios/UIKitSPI.h:

Source/WebKit2:

Adds a new data interaction gesture recognizer, responsible for determining when to begin data interaction. This
is a new long press gesture recognizer that fires simultaneously with the existing long press gesture
recognizers (for performing long-press actions, and for showing the tap highlight).

Also tweaks logic for determining whether selection gesture recognizers should fire to account for data
interaction -- in particular, we don't want selection gesture recognizers to cause the current selection to
change while data interaction is possible. See -hasSelectablePositionAtPoint and -pointIsInAssistedNode for
more details.

* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didPerformDataInteractionControllerOperation):
(WebKit::PageClientImpl::startDataInteractionWithImage):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _createAndConfigureLongPressGestureRecognizer]):
(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView _removeDefaultGestureRecognizers]):
(-[WKContentView _addDefaultGestureRecognizers]):
(-[WKContentView resignFirstResponder]):
(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView hasSelectablePositionAtPoint:]):
(-[WKContentView pointIsInDataInteractionContent:]):
(-[WKContentView pointIsInAssistedNode:]):

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

2 years agoNotify clients when the user plays media otherwise prevented from autoplaying
commit-queue@webkit.org [Thu, 26 Jan 2017 20:41:13 +0000 (20:41 +0000)]
Notify clients when the user plays media otherwise prevented from autoplaying
https://bugs.webkit.org/show_bug.cgi?id=167390

Patch by Matt Rajca <mrajca@apple.com> on 2017-01-26
Reviewed by Alex Christensen.

Source/WebCore:

The API is tested.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::playInternal):
* page/ChromeClient.h:

Source/WebKit2:

* UIProcess/API/APIUIClient.h:
(API::UIClient::didPlayMediaPreventedFromPlayingWithoutUserGesture):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/API/C/WKPageUIClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didPlayMediaPreventedFromPlayingWithoutUserGesture):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::didPlayMediaPreventedFromPlayingWithoutUserGesture):
* WebProcess/WebCoreSupport/WebChromeClient.h:

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/autoplay-with-controls.html: Added.
* TestWebKitAPI/Tests/WebKit2/js-play-with-controls.html: Added.
* TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm:
(didPlayMediaPreventedFromPlayingWithoutUserGesture):
(TEST):
* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebViewHostWindow _mouseUpAtPoint:]):
(-[TestWKWebView waitForLoad]):
(-[TestWKWebView mouseUpAtPoint:]):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):
(WTR::TestController::createWebViewWithOptions):

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

2 years ago[GStreamer] ASSERTION FAILED: !g_object_is_floating(ptr) in adoptGRef(GstContext...
eocanha@igalia.com [Thu, 26 Jan 2017 20:39:57 +0000 (20:39 +0000)]
[GStreamer] ASSERTION FAILED: !g_object_is_floating(ptr) in adoptGRef(GstContext* ptr)
https://bugs.webkit.org/show_bug.cgi?id=167458

Reviewed by Xabier Rodriguez-Calvar.

GstContext is a mini_object, not a GObject. Therefore it shouldn't (and can't) be checked for floatingness.

* platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
(WTF::adoptGRef): Removed incorrect assertion.

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

2 years agoOSR entry: delay outer-loop compilation when at inner-loop
jfbastien@apple.com [Thu, 26 Jan 2017 19:52:35 +0000 (19:52 +0000)]
OSR entry: delay outer-loop compilation when at inner-loop
https://bugs.webkit.org/show_bug.cgi?id=167149

Reviewed by Filip Pizlo.

JSTests:

Try to be mean to OSR entry by using nested loops, and having
non-int32 types or truly varying types.

Mandelbrot currently never tiers up to FTL because it exits too
many times before this. That shouldn't happen because it's just
numbers and int32s. I'll file a bug to fix this.

* microbenchmarks/mandelbrot.js: Added.
(mandelbrot):
(printable):
* microbenchmarks/nonude.js: Added.
(Array.prototype.remove):
(const.u):
(const.load):
(const.scan):
(const.main):

Source/JavaScriptCore:

As of https://bugs.webkit.org/show_bug.cgi?id=155217 OSR
compilation can be kicked off for an entry into an outer-loop,
while executing an inner-loop. This is desirable because often the
codegen from an inner-entry isn't as good as the codegen from an
outer-entry, but execution from an inner-loop is often pretty hot
and likely to kick off compilation. This approach provided nice
speedups on Kraken because we'd select to enter to the outer-loop
very reliably, which reduces variability (the inner-loop was
selected roughly 1/5 times from my unscientific measurements).

When compilation starts we take a snapshot of the JSValues at the
current execution state using OSR's recovery mechanism. These
values are passed to the compiler and are used as way to perform
type profiling, and could be used to observe cell types as well as
to perform predictions such as through constant propagation.

It's therefore desired to enter from the outer-loop when we can,
but we need to be executing from that location to capture the
right JSValues, otherwise we're confusing the compiler and giving
it inaccurate JSValues which can lead it to predict the wrong
things, leading to suboptimal code or recompilation due to
misprediction, or in super-corner-cases a crash.

These effects are pretty hard to measure: Fil points out that
marsalis-osr-entry really needs mustHandleValues (the JSValues
from the point of execution) because right now it just happens to
correctly guess int32. I tried removing mustHandleValues entirely
and saw no slowdowns, but our benchmarks probably aren't
sufficient to reliably find issues, sometimes because we happen to
have sufficient mitigations.

DFG tier-up was added here:
https://bugs.webkit.org/show_bug.cgi?id=112838

* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGJITCode.h:
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::JITCompiler):
* dfg/DFGOSREntry.cpp:
(JSC::DFG::prepareOSREntry):
* dfg/DFGOSREntry.h:
(JSC::DFG::prepareOSREntry):
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGTierUpEntryTrigger.h: Copied from Source/JavaScriptCore/ftl/FTLOSREntry.h.
* dfg/DFGToFTLForOSREntryDeferredCompilationCallback.cpp:
(JSC::DFG::ToFTLForOSREntryDeferredCompilationCallback::ToFTLForOSREntryDeferredCompilationCallback):
(JSC::DFG::Ref<ToFTLForOSREntryDeferredCompilationCallback>ToFTLForOSREntryDeferredCompilationCallback::create):
(JSC::DFG::ToFTLForOSREntryDeferredCompilationCallback::compilationDidBecomeReadyAsynchronously):
(JSC::DFG::ToFTLForOSREntryDeferredCompilationCallback::compilationDidComplete):
* dfg/DFGToFTLForOSREntryDeferredCompilationCallback.h:
* ftl/FTLOSREntry.cpp:
(JSC::FTL::prepareOSREntry):
* ftl/FTLOSREntry.h:
* jit/JITOperations.cpp:

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

2 years agoDon't use _CFBundleCreateUnique on Yosemite, it's not available there
andersca@apple.com [Thu, 26 Jan 2017 19:50:14 +0000 (19:50 +0000)]
Don't use _CFBundleCreateUnique on Yosemite, it's not available there
https://bugs.webkit.org/show_bug.cgi?id=167459
rdar://problem/30181179

Reviewed by Beth Dakin.

* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::NetscapePluginModule::getPluginInfo):

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

2 years agoSimple line layout: Add support for -webkit-hyphenate-limit-after and -webkit-hyphena...
zalan@apple.com [Thu, 26 Jan 2017 19:36:27 +0000 (19:36 +0000)]
Simple line layout: Add support for -webkit-hyphenate-limit-after and -webkit-hyphenate-limit-before
https://bugs.webkit.org/show_bug.cgi?id=167439
<rdar://problem/30180184>

Reviewed by Antti Koivisto.

Source/WebCore:

Implement pre and post hyphen length constrains for simple line layout.

Tests: fast/text/simple-line-layout-hyphen-limit-after.html
       fast/text/simple-line-layout-hyphen-limit-before.html

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForStyle):
(WebCore::SimpleLineLayout::printReason):
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style): Same as normal line layout default values.
(WebCore::SimpleLineLayout::TextFragmentIterator::lastHyphenPosition):
* rendering/SimpleLineLayoutTextFragmentIterator.h:

LayoutTests:

* fast/text/simple-line-layout-hyphen-limit-after.html: Added.
* fast/text/simple-line-layout-hyphen-limit-before-expected.html: Added.
* fast/text/simple-line-layout-hyphen-limit-before.html: Added.
* platform/mac/fast/text/hyphenate-limit-before-after-expected.txt: progression.

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

2 years agoAdd SPI for updating WebsitePolicies
commit-queue@webkit.org [Thu, 26 Jan 2017 19:25:12 +0000 (19:25 +0000)]
Add SPI for updating WebsitePolicies
https://bugs.webkit.org/show_bug.cgi?id=167040

Patch by Alex Christensen <achristensen@webkit.org> on 2017-01-26
Reviewed by Brady Eidson.

In r209558 we added a way to send a WebsitePolicies structure to the WebProcess during navigation.
If the UIProcess wants to update these policies on a WKWebView while a page is open, we will
need to have SPI for doing so. This adds such SPI, but it's not hooked up to change functionality yet.

* UIProcess/API/C/WKPage.cpp:
(WKPageUpdateWebsitePolicies):
* UIProcess/API/C/WKPage.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateWebsitePolicies:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::updateWebsitePolicies):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updateWebsitePolicies):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

2 years agoGamepad support shows wrong values for PS4 controllers (D-pad is missing).
beidson@apple.com [Thu, 26 Jan 2017 19:21:39 +0000 (19:21 +0000)]
Gamepad support shows wrong values for PS4 controllers (D-pad is missing).
<rdar://problem/29578619> and https://bugs.webkit.org/show_bug.cgi?id=165588

Reviewed by Alex Christensen.

No new tests (Currently unable to test HID backend directly)

DPads report their HID type as "a button", but their HID usage is "Hatswitch".
This patch adds a new element type that maps a "hatswitch" value to 4 additional buttons.

* platform/gamepad/mac/HIDGamepad.cpp:
(WebCore::HIDGamepad::initElements):
(WebCore::HIDGamepad::initElementsFromArray):
(WebCore::HIDGamepad::maybeAddButton):
(WebCore::HIDGamepad::maybeAddDPad):
(WebCore::HIDGamepad::maybeAddAxis):
(WebCore::fillInButtonValues):
(WebCore::HIDGamepad::valueChanged):

* platform/gamepad/mac/HIDGamepad.h:
(WebCore::HIDGamepadElement::isDPad):
(WebCore::HIDGamepadDPad::HIDGamepadDPad):
(WebCore::HIDGamepadDPad::normalizedValue):

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

2 years agoMarking swipe/main-frame-pinning-requirement.html as flaky on El Capitan.
ryanhaddad@apple.com [Thu, 26 Jan 2017 18:55:34 +0000 (18:55 +0000)]
Marking swipe/main-frame-pinning-requirement.html as flaky on El Capitan.
https://bugs.webkit.org/show_bug.cgi?id=161887

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

2 years agoMarking media/modern-media-controls/tracks-support/tracks-support-click-track-in...
ryanhaddad@apple.com [Thu, 26 Jan 2017 18:49:57 +0000 (18:49 +0000)]
Marking media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=165319

Unreviewed test gardening.

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

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

2 years agoMarking inspector/heap/gc.html as slow on macOS debug.
ryanhaddad@apple.com [Thu, 26 Jan 2017 18:49:55 +0000 (18:49 +0000)]
Marking inspector/heap/gc.html as slow on macOS debug.
https://bugs.webkit.org/show_bug.cgi?id=167408

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

2 years ago[Modern Media Controls] Hiding controls, changing their width and showing them again...
commit-queue@webkit.org [Thu, 26 Jan 2017 14:58:10 +0000 (14:58 +0000)]
[Modern Media Controls] Hiding controls, changing their width and showing them again shows an incorrect layout
https://bugs.webkit.org/show_bug.cgi?id=167160
<rdar://problem/29612318>

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

Source/WebCore:

When we toggle visibility of the controls bar, we notify the hosting media controls and in the case of the
macOS inline media controls, we update the controls layout which would have failed to run last time it tried
due to the controls bar being hidden.

Test: media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-resize-with-hidden-controls-bar.html

* Modules/modern-media-controls/controls/controls-bar.js:
(ControlsBar.prototype.set visible):
* Modules/modern-media-controls/controls/macos-inline-media-controls.js:
(MacOSInlineMediaControls.prototype.controlsBarVisibilityDidChange):
* Modules/modern-media-controls/controls/media-controls.js:
(MediaControls.prototype.controlsBarVisibilityDidChange):

LayoutTests:

Add a new test that creates media controls at a given width, hides the controls bar, increases the width, makes
the controls bar visible again, and checks that the layout was correctly updated as a result.

* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-resize-with-hidden-controls-bar-expected.txt: Added.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-resize-with-hidden-controls-bar.html: Added.

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

2 years ago[Mac][cmake] Unreviewed speculative buildfix after r211161.
ossy@webkit.org [Thu, 26 Jan 2017 10:52:20 +0000 (10:52 +0000)]
[Mac][cmake] Unreviewed speculative buildfix after r211161.
https://bugs.webkit.org/show_bug.cgi?id=167294

* PlatformMac.cmake:

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

2 years agoCrash when setting custom scale factor.
pvollan@apple.com [Thu, 26 Jan 2017 10:09:07 +0000 (10:09 +0000)]
Crash when setting custom scale factor.
https://bugs.webkit.org/show_bug.cgi?id=167369

Reviewed by Sam Weinig.

Source/WebKit/mac:

Add null pointer check.

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

Source/WebKit/win:

Add null pointer check.

* WebView.cpp:
(WebView::setCustomBackingScaleFactor):

Tools:

Added API test.

* TestWebKitAPI/PlatformWin.cmake:
* TestWebKitAPI/Tests/WebKit/win/ScaleWebView.cpp: Added.
(TestWebKitAPI::WebKitCreateInstance):
(TestWebKitAPI::ScaleWebView::SetUp):
(TestWebKitAPI::ScaleWebView::TearDown):
(TestWebKitAPI::TEST_F):

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

2 years agoImageBufferCairo: cairo_image_surface should use bmalloc-allocated memory
zandobersek@gmail.com [Thu, 26 Jan 2017 09:21:46 +0000 (09:21 +0000)]
ImageBufferCairo: cairo_image_surface should use bmalloc-allocated memory
https://bugs.webkit.org/show_bug.cgi?id=165751

Reviewed by Carlos Garcia Campos.

Allocate the underlying memory for cairo_image_surface objects through FastMalloc.
This way we can steer such large allocations away from the default libc allocator.

Objects of this class can create Cairo surfaces that need as much as 4MB of memory
for the underlying pixel buffer. Allocating such objects through the default
libc allocator can lead to increased memory usage because of non-optimal allocation
strategy in libc. In contrast, bmalloc performs large allocations by directly using
mmap() to reserve the necessary memory.

The improvements can be significant. On nytimes.com, with the threaded version of
the CoordinatedGraphics system, the memory consumption can drop by roughly 20%.

* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::ImageBuffer): Zero-allocate the necessary memory via FastMalloc.
Tie that memory lifetime to the lifetime of the surface by using
cairo_surface_set_user_data() with the specific user data key.

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

2 years ago[Threaded Compositor] Update also the contents size when creating the threaded compositor
carlosgc@webkit.org [Thu, 26 Jan 2017 09:19:48 +0000 (09:19 +0000)]
[Threaded Compositor] Update also the contents size when creating the threaded compositor
https://bugs.webkit.org/show_bug.cgi?id=167452

Reviewed by Žan Doberšek.

In r210954 we ensured that the threaded compositor and the viewport controller were created with the initial web
page size. If we don't update the contents size, the visible rectangle will be empty and tiles won't be created
until contentsSizeDidChange is called. It's even possible, when entering AC mode on demand, that we create the
layer tree host after the contents size changed, in which case nothing is rendered unless we resize the window.

* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
(WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost):

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

2 years ago[GTK] WebProcess from WebKitGtk+ 2.15.3 SIGSEVs in WebCore::GraphicsContext3D::drawAr...
magomez@igalia.com [Thu, 26 Jan 2017 09:05:01 +0000 (09:05 +0000)]
[GTK] WebProcess from WebKitGtk+ 2.15.3 SIGSEVs in WebCore::GraphicsContext3D::drawArrays(unsigned int, int, int) at Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:740
https://bugs.webkit.org/show_bug.cgi?id=167296

Reviewed by Sergio Villar Senin.

Use a VBO to pass the vertex data when using the stencil for clipping. Passing a custom array without
using an VBO is deprecated when using OpenGL >= 3.0 and a Core profile.

No behaviour change, no new tests.

* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::beginClip):

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

2 years ago[Mac][cmake] Fix the build after r211160
ossy@webkit.org [Thu, 26 Jan 2017 08:55:34 +0000 (08:55 +0000)]
[Mac][cmake] Fix the build after r211160
https://bugs.webkit.org/show_bug.cgi?id=167451

Unreviewed buildfix.

* UIProcess/API/Cocoa/WKWebView.mm:

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

2 years agorun-benchmark nests MotionMark results by the suite name twice
rniwa@webkit.org [Thu, 26 Jan 2017 04:55:32 +0000 (04:55 +0000)]
run-benchmark nests MotionMark results by the suite name twice
https://bugs.webkit.org/show_bug.cgi?id=164948

Reviewed by Said Abou-Hallawa.

Use a single level MotionMark now that this is the name of the benchmark,
and we no longer have tests that aren't part of the MotionMark suite.

* Scripts/webkitpy/benchmark_runner/data/patches/MotionMark.patch:

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

2 years agoCrash under DOMSelection::deleteFromDocument()
rniwa@webkit.org [Thu, 26 Jan 2017 04:50:01 +0000 (04:50 +0000)]
Crash under DOMSelection::deleteFromDocument()
https://bugs.webkit.org/show_bug.cgi?id=167232

Reviewed by Chris Dumez.

Source/WebCore:

The crash was caused by DOMSelection's deleteFromDocument() mutating contents inside the user-agent
shadow tree of an input element when the text field is readonly. Fixed the bug by exiting early
whenever the selection is inside a shadow tree since getSelection().getRangeAt(0) always returns
a range outside the input element or any shadow tree for that matter.

New behavior matches that of Gecko. The working draft spec of which I'm the editor states that
deleteFromDocument() must invoke Range's deleteContents() on the associated range, which is
the collapsed range returned by getSelection().getRangeAt(0) in the spec:
https://www.w3.org/TR/2016/WD-selection-api-20160921/#widl-Selection-deleteFromDocument-void
And Range's deleteContents() immediately terminates in step 1 when start and end are identical:
https://dom.spec.whatwg.org/commit-snapshots/6b7621282c2e3b222ac585650e484abf4c0a416b/

Note that Range's DOM mutating methods are not available inside an user-agent shadow tree because
WebKit never returns a Range whose end boundary points are inside the tree to author scripts.
Editing commands (ones executable from document.execCommand) that mutate DOM like this check whether
the content is editable or not. Since VisibleSelection's validate() function makes sure the selection
is either entirely within or outside of an root editable element (editing host in the W3C spec lingo),
editing commands should never mutate a random node inside an user-agent shadow tree.

Test: editing/selection/deleteFromDocument-shadow-tree-crash.html

* page/DOMSelection.cpp:
(WebCore::DOMSelection::deleteFromDocument):

LayoutTests:

Based on a patch by Chris Dumez. Add a regression test and rebaseline a Blink test as WebKit's
new behavior matches that of Gecko instead of Blink.

* editing/selection/deleteFromDocument-shadow-tree-crash-expected.txt: Added.
* editing/selection/deleteFromDocument-shadow-tree-crash.html: Added.
* imported/blink/editing/selection/deleteFromDocument-crash-expected.html:

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

2 years agoUnreviewed, rolling out r211193.
ryanhaddad@apple.com [Thu, 26 Jan 2017 04:24:10 +0000 (04:24 +0000)]
Unreviewed, rolling out r211193.

This change broke internal builds.

Reverted changeset:

"Notify clients when the user plays media otherwise prevented
from autoplaying"
https://bugs.webkit.org/show_bug.cgi?id=167390
http://trac.webkit.org/changeset/211193

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

2 years agoAdd infrastructure to support data interaction in WebKit2
wenson_hsieh@apple.com [Thu, 26 Jan 2017 04:22:05 +0000 (04:22 +0000)]
Add infrastructure to support data interaction in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=167443

Reviewed by Simon Fraser.

Source/WebCore:

Adds support in WebCore to determine whether there is interactive data at a given position. No new tests, since
there should be no behavior change yet.

* page/EventHandler.h:
* page/Page.cpp:
(WebCore::Page::hasDataInteractionAtPosition):
* page/Page.h:

Source/WebKit2:

Adds plumbing for two new XPC messages: WebPageProxy::DidPerformDataInteractionControllerOperation and
WebPage::RequestStartDataInteraction. Additionally, adds a new field to InteractionInformationAtPosition that
indicates whether or not there is data to interact with at a given location.

This patch only adds infrastructure, and does not change any behavior.

* Shared/ios/InteractionInformationAtPosition.h:
* Shared/ios/InteractionInformationAtPosition.mm:
(WebKit::InteractionInformationAtPosition::encode):
(WebKit::InteractionInformationAtPosition::decode):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didPerformDataInteractionControllerOperation):
(WebKit::PageClientImpl::startDataInteractionWithImage):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didPerformDataInteractionControllerOperation):
(WebKit::requestStartDataInteraction):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformDataInteractionControllerOperation):
(WebKit::PageClientImpl::startDataInteractionWithImage):
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::requestStartDataInteraction):
(WebKit::WebPage::getPositionInformation):

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

2 years agoMarking media/modern-media-controls/airplay-support/airplay-support.html as flaky.
ryanhaddad@apple.com [Thu, 26 Jan 2017 04:19:00 +0000 (04:19 +0000)]
Marking media/modern-media-controls/airplay-support/airplay-support.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=167442

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

2 years agoStop inheriting from UIWebScrollView, just use UIScrollView
timothy_horton@apple.com [Thu, 26 Jan 2017 04:05:25 +0000 (04:05 +0000)]
Stop inheriting from UIWebScrollView, just use UIScrollView
https://bugs.webkit.org/show_bug.cgi?id=167440
<rdar://problem/7729691>

Reviewed by Simon Fraser.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView scrollViewWillBeginDragging:]):
* UIProcess/ios/WKScrollView.h:
* UIProcess/ios/WKScrollView.mm:
(-[WKScrollView initWithFrame:]): Deleted.
(-[WKScrollView setDecelerationRate:]): Deleted.
Inherit directly from UIScrollView, no need for UIWebScrollView.
Set the few settings we care about directly.
This has the side effect of reducing the default rate of scroll deceleration.

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

2 years agoModernize editable-text component and add tests
rniwa@webkit.org [Thu, 26 Jan 2017 04:00:41 +0000 (04:00 +0000)]
Modernize editable-text component and add tests
https://bugs.webkit.org/show_bug.cgi?id=167398

Reviewed by Yusuke Suzuki.

Modernized EditableText component to use the action feature added in r210938.

* browser-tests/editable-text-tests.js: Added. Added tests for EditableText component.
(.waitToRender):
* browser-tests/index.html:
* public/v3/components/base.js:
(ComponentBase.prototype.dispatchAction): Return the result from the callback.
* public/v3/components/editable-text.js:
(EditableText): Removed a bunch of instance variables that are no longer needed.
(EditableText.prototype.didConstructShadowTree): Added. Add event listeners on the Edit/Save button and the host.
(EditableText.prototype.editedText): Return the text field's value directly.
(EditableText.prototype.text): Added.
(EditableText.prototype.setText): Call enqueueToRender automatically instead of relying on the parent component
to do so in _startedEditingCallback, which has been removed.
(EditableText.prototype.render): Modernized the code.
(EditableText.prototype._didClick): No longer prevents the default action manually since that's automatically done
in createEventHandler. Handle the case where the update action is not handled.
(EditableText.prototype._endEditingMode): Renamed from _didUpdate.
(EditableText.htmlTemplate): Added ids on various elements in the shadow tree.
(EditableText.cssTemplate): Updated the CSS selectors per above change.
* public/v3/main.js:
(main): Fixed a typo.
* public/v3/pages/analysis-task-page.js:
(AnalysisTaskPage): Use the action listener instead of manually setting callbacks.
(AnalysisTaskPage.prototype._createTestGroupListItem): Ditto.
(AnalysisTaskPage.prototype._didStartEditingTaskName): Deleted.

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

2 years agoWebAssembly JS API: coerce return values from imports
sbarati@apple.com [Thu, 26 Jan 2017 02:38:41 +0000 (02:38 +0000)]
WebAssembly JS API: coerce return values from imports
https://bugs.webkit.org/show_bug.cgi?id=165480
<rdar://problem/29760318>

Reviewed by Yusuke Suzuki.

JSTests:

* wasm/function-tests/function-import-return-value.js: Added.
(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.const.tests.x.assert.eq):
(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.const.tests.Math.fround):
(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.let.type.of.Reflect.ownKeys):
(test.1):
(assert.truthy):
(assert.throws):

Source/JavaScriptCore:

This patch does proper coercion for all possible
JSValue return types from an imported function.

It also adds the spec-compliant code to throw an exception
when calling an import that has an i64 parameter or return
value.

* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::emitJumpIfException):
* jit/AssemblyHelpers.h:
* wasm/WasmB3IRGenerator.cpp:
* wasm/WasmBinding.cpp:
(JSC::Wasm::wasmToJs):

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

2 years agojsc.cpp should have the $.agent stuff for testing SAB
fpizlo@apple.com [Thu, 26 Jan 2017 02:34:30 +0000 (02:34 +0000)]
jsc.cpp should have the $.agent stuff for testing SAB
https://bugs.webkit.org/show_bug.cgi?id=167431

Reviewed by Saam Barati.

JSTests:

Add a very basic test of Atomics using $.agent. This is based on
LayoutTests/workers/sab/simple.html.

* stress/lars-sab-workers.js: Added.
(startWorker):
(resources):
(wake):
(else):

Source/JavaScriptCore:

This adds some stuff that the SAB branch of test262 needs. None of this is exposed except for our
own tests and the SAB branch of test262. We now pass all of the Atomics tests in the SAB branch
of test262.

* jsc.cpp:
(Message::releaseContents):
(Message::index):
(GlobalObject::finishCreation):
(GlobalObject::addFunction):
(Message::Message):
(Message::~Message):
(Worker::Worker):
(Worker::~Worker):
(Worker::send):
(Worker::receive):
(Worker::current):
(Worker::currentWorker):
(Workers::Workers):
(Workers::~Workers):
(Workers::broadcast):
(Workers::report):
(Workers::tryGetReport):
(Workers::getReport):
(Workers::singleton):
(functionDollarCreateRealm):
(functionDollarDetachArrayBuffer):
(functionDollarEvalScript):
(functionDollarAgentStart):
(functionDollarAgentReceiveBroadcast):
(functionDollarAgentReport):
(functionDollarAgentSleep):
(functionDollarAgentBroadcast):
(functionDollarAgentGetReport):
(functionWaitForReport):
(checkException):
(runWithScripts):
(runJSC):
(jscmain):
* runtime/JSArrayBuffer.h:

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

2 years agoNotify clients when the user plays media otherwise prevented from autoplaying
commit-queue@webkit.org [Thu, 26 Jan 2017 02:18:00 +0000 (02:18 +0000)]
Notify clients when the user plays media otherwise prevented from autoplaying
https://bugs.webkit.org/show_bug.cgi?id=167390

Patch by Matt Rajca <mrajca@apple.com> on 2017-01-25
Reviewed by Alex Christensen.

Source/WebCore:

The API is tested.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::playInternal):
* page/ChromeClient.h:

Source/WebKit2:

* UIProcess/API/APIUIClient.h:
(API::UIClient::didPlayMediaPreventedFromPlayingWithoutUserGesture):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/API/C/WKPageUIClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didPlayMediaPreventedFromPlayingWithoutUserGesture):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::didPlayMediaPreventedFromPlayingWithoutUserGesture):
* WebProcess/WebCoreSupport/WebChromeClient.h:

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/autoplay-with-controls.html: Added.
* TestWebKitAPI/Tests/WebKit2/js-play-with-controls.html: Added.
* TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm:
(didPlayMediaPreventedFromPlayingWithoutUserGesture):
(TEST):
* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebViewHostWindow _mouseUpAtPoint:]):
(-[TestWKWebView waitForLoad]):
(-[TestWKWebView mouseUpAtPoint:]):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):
(WTR::TestController::createWebViewWithOptions):

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

2 years agoRefactor drag and drop implementation on Mac
wenson_hsieh@apple.com [Thu, 26 Jan 2017 02:01:29 +0000 (02:01 +0000)]
Refactor drag and drop implementation on Mac
https://bugs.webkit.org/show_bug.cgi?id=167427

Reviewed by Enrica Casucci.

Source/WebCore:

Refactors some code around drag and drop on Mac, and cleans up some other related code as needed. This patch
should result in no behavior change.

* dom/DataTransfer.cpp:
* page/EventHandler.cpp:
* page/ios/EventHandlerIOS.mm:
(WebCore::EventHandler::eventLoopHandleMouseDragged):
* page/mac/EventHandlerMac.mm:
* platform/DragImage.cpp:
* platform/Pasteboard.h:
* platform/ios/DragImageIOS.mm:
* platform/ios/PasteboardIOS.mm:
* platform/mac/DragDataMac.mm:
(rtfPasteboardType):
(rtfdPasteboardType):
(stringPasteboardType):
(urlPasteboardType):
(htmlPasteboardType):
(colorPasteboardType):
(pdfPasteboardType):
(tiffPasteboardType):
(WebCore::DragData::DragData):
(WebCore::DragData::containsColor):
(WebCore::DragData::containsFiles):
(WebCore::DragData::numberOfFiles):
(WebCore::DragData::asFilenames):
(WebCore::DragData::containsPlainText):
(WebCore::DragData::containsCompatibleContent):
(WebCore::DragData::containsPromise):
(WebCore::DragData::asURL):
* platform/mac/DragImageMac.mm:

Source/WebKit/mac:

Refactor some WebKit1 code on the Mac pertaining to drag and drop. See WebCore ChangeLog for more details.

* Misc/WebNSPasteboardExtras.h:
* WebCoreSupport/WebDragClient.mm:
* WebView/WebFrame.mm:
* WebView/WebFrameInternal.h:
* WebView/WebHTMLView.mm:
* WebView/WebView.mm:
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

Source/WebKit2:

See WebCore ChangeLog for more details.

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<DragData>::encode):
(IPC::ArgumentCoder<DragData>::decode):
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:

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

2 years ago[WebRTC] Add support for incoming and outgoing libwebrtc audio tracks
commit-queue@webkit.org [Thu, 26 Jan 2017 01:43:44 +0000 (01:43 +0000)]
[WebRTC] Add support for incoming and outgoing libwebrtc audio tracks
https://bugs.webkit.org/show_bug.cgi?id=167438

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

RealtimeIncomingAudioSource consumes audio buffers given by libwebrtc.
RealtimeOutgoingAudioSource consumes audio buffers from WebCore tracks (capture typically) and feeds libwebrtc with them.
To be covered by Layout/mock tests once LibWebRTC peer connection will be added.
These are only skeletons right now, the conversion between WebCore and LibWebRTC data is not yet implemented.

* WebCore.xcodeproj/project.pbxproj:
* platform/mediastream/mac/RealtimeIncomingAudioSource.cpp: Added.
(WebCore::RealtimeIncomingAudioSource::create):
(WebCore::RealtimeIncomingAudioSource::RealtimeIncomingAudioSource):
(WebCore::RealtimeIncomingAudioSource::OnData):
(WebCore::RealtimeIncomingAudioSource::startProducingData):
(WebCore::RealtimeIncomingAudioSource::stopProducingData):
(WebCore::RealtimeIncomingAudioSource::capabilities):
(WebCore::RealtimeIncomingAudioSource::settings):
(WebCore::RealtimeIncomingAudioSource::supportedConstraints):
(WebCore::RealtimeIncomingAudioSource::addObserver):
(WebCore::RealtimeIncomingAudioSource::removeObserver):
(WebCore::RealtimeIncomingAudioSource::start):
(WebCore::RealtimeIncomingAudioSource::audioSourceProvider):
* platform/mediastream/mac/RealtimeIncomingAudioSource.h: Added.
* platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp: Added.
(WebCore::RealtimeOutgoingAudioSource::sourceHasMoreMediaData):
* platform/mediastream/mac/RealtimeOutgoingAudioSource.h: Added.

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

2 years agomodern-media-test gardening.
ryanhaddad@apple.com [Thu, 26 Jan 2017 01:01:12 +0000 (01:01 +0000)]
modern-media-test gardening.

Unreviewed test gardening.

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

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

2 years agoRebaseline fast/forms/ios/ipad/focus-input-via-button.html.
ryanhaddad@apple.com [Thu, 26 Jan 2017 01:01:08 +0000 (01:01 +0000)]
Rebaseline fast/forms/ios/ipad/focus-input-via-button.html.

Unreviewed test gardening.

* fast/forms/ios/ipad/focus-input-via-button-expected.txt:

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

2 years ago[WebRTC] Add support for libwebrtc video incoming and outgoing video tracks
commit-queue@webkit.org [Thu, 26 Jan 2017 00:31:51 +0000 (00:31 +0000)]
[WebRTC] Add support for libwebrtc video incoming and outgoing video tracks
https://bugs.webkit.org/show_bug.cgi?id=167432

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

Not covered by tests right now, this will be covered by layout/mock tests.
RealtimeIncomingVideoSource consumes video frames given by libwebrtc.
RealtimeOutgoingVideoSource consumes video frames from WebCore tracks (capture typically) and feeds libwebrtc with them.

* platform/mediastream/mac/RealtimeIncomingVideoSource.cpp: Added.
(WebCore::RealtimeIncomingVideoSource::create):
(WebCore::RealtimeIncomingVideoSource::RealtimeIncomingVideoSource):
(WebCore::RealtimeIncomingVideoSource::startProducingData):
(WebCore::RealtimeIncomingVideoSource::stopProducingData):
(WebCore::RealtimeIncomingVideoSource::OnFrame):
(WebCore::RealtimeIncomingVideoSource::processNewSample):
(WebCore::drawImage):
(WebCore::RealtimeIncomingVideoSource::currentFrameImage):
(WebCore::RealtimeIncomingVideoSource::paintCurrentFrameInContext):
(WebCore::RealtimeIncomingVideoSource::capabilities):
(WebCore::RealtimeIncomingVideoSource::settings):
(WebCore::RealtimeIncomingVideoSource::supportedConstraints):
* platform/mediastream/mac/RealtimeIncomingVideoSource.h: Added.
* platform/mediastream/mac/RealtimeOutgoingVideoSource.cpp: Added.
(WebCore::RealtimeOutgoingVideoSource::RealtimeOutgoingVideoSource):
(WebCore::RealtimeOutgoingVideoSource::GetStats):
(WebCore::RealtimeOutgoingVideoSource::AddOrUpdateSink):
(WebCore::RealtimeOutgoingVideoSource::RemoveSink):
(WebCore::RealtimeOutgoingVideoSource::sourceHasMoreMediaData):
* platform/mediastream/mac/RealtimeOutgoingVideoSource.h: Added.

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

2 years agoTry to fix the Mac CMake build after r211160.
aestes@apple.com [Thu, 26 Jan 2017 00:24:19 +0000 (00:24 +0000)]
Try to fix the Mac CMake build after r211160.

* PlatformMac.cmake:

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

2 years agoIntroduce an item-provider-based pasteboard wrapper
wenson_hsieh@apple.com [Wed, 25 Jan 2017 23:50:12 +0000 (23:50 +0000)]
Introduce an item-provider-based pasteboard wrapper
https://bugs.webkit.org/show_bug.cgi?id=167410

Reviewed by Enrica Casucci.

Source/WebCore:

Introduces WebItemProviderPasteboard, a pasteboard-like object backed by a number of item providers. No new
tests, since there is no behavior change.

* WebCore.xcodeproj/project.pbxproj:
* platform/ios/AbstractPasteboard.h: Copied from Source/WebCore/platform/spi/ios/UIKitSPI.h.
* platform/ios/WebItemProviderPasteboard.h: Copied from Source/WebCore/platform/spi/ios/UIKitSPI.h.
* platform/ios/WebItemProviderPasteboard.mm: Added.
(isRichTextType):
(isStringType):
(isURLType):
(isColorType):
(isImageType):
(+[WebItemProviderPasteboard sharedInstance]):
(-[WebItemProviderPasteboard init]):
(-[WebItemProviderPasteboard dealloc]):
(-[WebItemProviderPasteboard pasteboardTypes]):
(-[WebItemProviderPasteboard setItemProviders:]):
(-[WebItemProviderPasteboard numberOfItems]):
(-[WebItemProviderPasteboard setItems:]):
(-[WebItemProviderPasteboard dataForPasteboardType:inItemSet:]):
(-[WebItemProviderPasteboard valuesForPasteboardType:inItemSet:]):
(-[WebItemProviderPasteboard changeCount]):
(-[WebItemProviderPasteboard itemProviderAtIndex:]):
* platform/spi/ios/UIKitSPI.h:

Source/WTF:

Adds an additional feature flag.

* wtf/FeatureDefines.h:

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

2 years ago[ios-simulator] API test WebKit2.WebsitePoliciesAutoplayEnabled timing out
commit-queue@webkit.org [Wed, 25 Jan 2017 23:43:01 +0000 (23:43 +0000)]
[ios-simulator] API test WebKit2.WebsitePoliciesAutoplayEnabled timing out
https://bugs.webkit.org/show_bug.cgi?id=167385

Patch by Matt Rajca <mrajca@apple.com> on 2017-01-25
Reviewed by Alex Christensen.

* TestWebKitAPI/Tests/WebKit2/autoplay-check.html: Avoid arbitrary timeouts in favor of promises.
* TestWebKitAPI/Tests/WebKit2/autoplay-no-audio-check.html:
* TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm:
(TEST): Allow inline (rather than full screen) media playback on iOS.

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

2 years agoRemoved leftovers of pre-2015 VisualStudio support
annulen@yandex.ru [Wed, 25 Jan 2017 23:37:26 +0000 (23:37 +0000)]
Removed leftovers of pre-2015 VisualStudio support
https://bugs.webkit.org/show_bug.cgi?id=167434

Reviewed by Alex Christensen.

Source/WebCore:

No new tests needed.

* platform/graphics/filters/FEConvolveMatrix.cpp: Replaced MSC_VER
usage with COMPILER(MSVC)

Source/WTF:

* wtf/Compiler.h:
* wtf/Platform.h:
* wtf/StringExtras.h:

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

2 years agoUse #pragma once in a few places
aestes@apple.com [Wed, 25 Jan 2017 23:20:45 +0000 (23:20 +0000)]
Use #pragma once in a few places
https://bugs.webkit.org/show_bug.cgi?id=167435

Reviewed by Alex Christensen.

* UIProcess/PageClient.h:
* UIProcess/ios/PageClientImplIOS.h:
* WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.h:

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

2 years agoFixing typos in r211161
commit-queue@webkit.org [Wed, 25 Jan 2017 23:14:38 +0000 (23:14 +0000)]
Fixing typos in r211161
https://bugs.webkit.org/show_bug.cgi?id=167433

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

* platform/mediastream/libwebrtc/LibWebRTCProvider.h:

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

2 years agoREGRESSION(r203110): LayoutTest http/tests/preload/single_download_preload_runner...
yoav@yoav.ws [Wed, 25 Jan 2017 22:51:54 +0000 (22:51 +0000)]
REGRESSION(r203110): LayoutTest http/tests/preload/single_download_preload_runner.html timing out
https://bugs.webkit.org/show_bug.cgi?id=159678

Move the single_download_preload test to be in a single document rather than a frame, as the frame based version was timing out.
I suspect that recent changes to handling of feature flags resulted in feature flags turned off for frames, which caused this test
to fail. As the frame doesn't seem required in this case, we can fold the entire test to a single document.
On top of that, I added per resource verification for the number of requests, which makes the test clearer, and avoided verifying
result for resource types that are currently failing/flaky.

Reviewed by Alex Christensen

* TestExpectations: Removed the timeout expectation for the test.
* http/tests/preload/single_download_preload-expected.txt: Renamed from LayoutTests/http/tests/preload/single_download_preload_runner-expected.txt.
* http/tests/preload/single_download_preload.html: Renamed from LayoutTests/http/tests/preload/resources/single_download_preload.html as well as fixed.
* http/tests/preload/single_download_preload_runner.html: Removed.
* http/tests/resources/dummy.xml: Added.
* http/tests/resources/test.oga: Added.
* platform/mac/TestExpectations: Removed the timeout expectation for the test.

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

2 years agoDisable Download attribute support on iOS
cdumez@apple.com [Wed, 25 Jan 2017 22:44:15 +0000 (22:44 +0000)]
Disable Download attribute support on iOS
https://bugs.webkit.org/show_bug.cgi?id=167337
<rdar://problem/30154148>

Reviewed by Alexey Proskuryakov.

Disable Download attribute support on iOS as it currently does not work.

* wtf/FeatureDefines.h:

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

2 years agoARM/ARM64 stress/atomics-store-return.js fails
fpizlo@apple.com [Wed, 25 Jan 2017 22:42:22 +0000 (22:42 +0000)]
ARM/ARM64 stress/atomics-store-return.js fails
<rdar://problem/30192652>

Reviewed by Michael Saboff.

The problem was relying on double->int casts for anything. We need to use toInt32().

* runtime/AtomicsObject.cpp:
(JSC::atomicsFuncCompareExchange):
(JSC::atomicsFuncExchange):
(JSC::atomicsFuncStore):

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

2 years agoFix a typo in TestExpectations.
ryanhaddad@apple.com [Wed, 25 Jan 2017 22:36:48 +0000 (22:36 +0000)]
Fix a typo in TestExpectations.

Unreviewed test gardening.

* TestExpectations:

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

2 years ago[QuickLook] Display a WKPasswordView when a document is password-protected
aestes@apple.com [Wed, 25 Jan 2017 22:31:24 +0000 (22:31 +0000)]
[QuickLook] Display a WKPasswordView when a document is password-protected
https://bugs.webkit.org/show_bug.cgi?id=167407
<rdar://problem/28544527>

Reviewed by Alex Christensen.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _hidePasswordView]): Added an early return if there is no _passwordView.
* UIProcess/PageClient.h: Declared requestPasswordForQuickLookDocument().
(WebKit::PageClient::didStartProvisionalLoadForMainFrame): Added an no-op base class
implementation.
(WebKit::PageClient::didFailProvisionalLoadForMainFrame): Ditto.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame): Called
PageClient::didStartProvisionalLoadForMainFrame() if frame is the main frame.
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame): Ditto for
PageClient::didFailProvisionalLoadForMainFrame().
* UIProcess/WebPageProxy.h: Declared didRequestPasswordForQuickLookDocumentInMainFrame().
* UIProcess/WebPageProxy.messages.in: Added message
DidRequestPasswordForQuickLookDocumentInMainFrame.
* UIProcess/ios/PageClientImplIOS.h: Overrode requestPasswordForQuickLookDocument(),
didStartProvisionalLoadForMainFrame(), and didFailProvisionalLoadForMainFrame().
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didStartProvisionalLoadForMainFrame): Called
-[WKWebView _hidePasswordView].
(WebKit::PageClientImpl::didFailProvisionalLoadForMainFrame): Ditto.
(WebKit::PageClientImpl::didCommitLoadForMainFrame): Ditto.
(WebKit::PageClientImpl::requestPasswordForQuickLookDocument): If there is already a
password view, assert that it is for the same fileName. Call
-[WKPasswordView showPasswordFailureAlert] and update the userDidEnterPassword block.
Otherwise, call -[WKWebView _showPasswordViewWithDocumentName:passwordHandler:].
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didRequestPasswordForQuickLookDocumentInMainFrame): Called
PageClient::requestPasswordForQuickLookDocument() with a completion handler that send
message WebPage::DidReceivePasswordForQuickLookDocument.
* WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.cpp:
(WebKit::passwordCallbacks): Stores a map of page IDs to completion handler functions.
(WebKit::WebQuickLookHandleClient::~WebQuickLookHandleClient): Removes the current page ID
from passwordCallbacks().
(WebKit::WebQuickLookHandleClient::didRequestPassword): Asserts there is no current function
for this page ID in passwordCallbacks(), adds completionHandler to passwordCallbacks(), and
sends message WebPageProxy::DidRequestPasswordForQuickLookDocumentInMainFrame.
(WebKit::WebQuickLookHandleClient::didReceivePassword): Asserts there is a function for this
page ID in passwordCallbacks(), takes the completionHandler from passwordCallbacks(), and
calls it with the received password.
* WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.h: Declared didReceivePassword()
and overrode supportsPasswordEntry() and didRequestPassword().
* WebProcess/WebPage/WebPage.h: Declared didReceivePasswordForQuickLookDocument().
* WebProcess/WebPage/WebPage.messages.in: Added message
DidReceivePasswordForQuickLookDocument.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::didReceivePasswordForQuickLookDocument): Called
WebQuickLookHandleClient::didReceivePassword() with the received password and current page ID.

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

2 years agoRevert r210882, removing support for background-repeat-x/y
simon.fraser@apple.com [Wed, 25 Jan 2017 22:05:02 +0000 (22:05 +0000)]
Revert r210882, removing support for background-repeat-x/y
https://bugs.webkit.org/show_bug.cgi?id=167223

Reviewed by Myles C. Maxfield.

Followup from r211149; I missed part of the patch when committing.

* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isKeywordPropertyID):

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