WebKit-https.git
4 months agoFix build with gstreamer 1.12
commit-queue@webkit.org [Fri, 20 Mar 2020 09:15:53 +0000 (09:15 +0000)]
Fix build with gstreamer 1.12
https://bugs.webkit.org/show_bug.cgi?id=209296

Patch by Mike Gorse <mgorse@suse.com> on 2020-03-20
Reviewed by Philippe Normand.

No new tests (build fix only).

* platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:
(webKitGLVideoSinkChangeState): Add GST_VERSION_CHECK around check for
GST_STATE_CHANGE_READY_TO_READY.

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

4 months ago[Unix] Allow runtime release logging levels configuration
philn@webkit.org [Fri, 20 Mar 2020 09:01:04 +0000 (09:01 +0000)]
[Unix] Allow runtime release logging levels configuration
https://bugs.webkit.org/show_bug.cgi?id=209286

Reviewed by Adrian Perez de Castro.

Setting to a comma-separated list like in this example should now work as expected:

WEBKIT_DEBUG="Media=debug,MediaSource=info" run-minibrowser --gtk ...

* platform/unix/LoggingUnix.cpp:
(WebCore::logLevelString):

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

4 months agoSome scroll snapping tests are still flaky
simon.fraser@apple.com [Fri, 20 Mar 2020 06:03:34 +0000 (06:03 +0000)]
Some scroll snapping tests are still flaky
https://bugs.webkit.org/show_bug.cgi?id=165196

Reviewed by Wenson Hsieh.

WheelEventTestMonitor could trigger too early if the main thread was bogged down, delaying
the firing of the m_updateNodeScrollPositionTimer scheduled from
AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll().

Fix by extending the life of the "ScrollingThreadSyncNeeded" reason until after the m_updateNodeScrollPositionTimer
has fired

Fixes flakiness of tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html
and others.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::noteScrollingThreadSyncCompleteForNode):
(WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScrollTimerFired):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):

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

4 months agoSharedMemory::allocate() should initialize `address`
ddkilzer@apple.com [Fri, 20 Mar 2020 05:06:59 +0000 (05:06 +0000)]
SharedMemory::allocate() should initialize `address`
<https://webkit.org/b/209315>
<rdar://problem/60606720>

Reviewed by Geoffrey Garen.

* Platform/cocoa/SharedMemoryCocoa.cpp:
(WebKit::SharedMemory::allocate): Initialize `address` to zero.

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

4 months agoUnable to build WebKit with iOS 13.4 SDK
timothy_horton@apple.com [Fri, 20 Mar 2020 04:41:23 +0000 (04:41 +0000)]
Unable to build WebKit with iOS 13.4 SDK
https://bugs.webkit.org/show_bug.cgi?id=209317

Reviewed by Simon Fraser.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKMouseGestureRecognizer.mm:

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

4 months ago[macoOS] Remove access to 'apple-extension-services' from the WebContent sandbox
bfulgham@apple.com [Fri, 20 Mar 2020 03:05:51 +0000 (03:05 +0000)]
[macoOS] Remove access to 'apple-extension-services' from the WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=209324
<rdar://problem/58089661>

Reviewed by Per Arne Vollan.

Remove the last of permissions for the unused 'apple-extension-services' mach service.

* GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
* Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
* WebProcess/com.apple.WebProcess.sb.in:

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

4 months agoSafari video gravity changes performance improvements
peng.liu6@apple.com [Fri, 20 Mar 2020 03:05:11 +0000 (03:05 +0000)]
Safari video gravity changes performance improvements
https://bugs.webkit.org/show_bug.cgi?id=209316

Reviewed by Eric Carlson.

Remove an unnecessary (and harmful) call of setVideoLayerFrame in WebAVPlayerLayer:layoutSublayers.

When a video with the gravity AVLayerVideoGravityResizeAspectFill needs to enter the
picture-in-picture mode from fullscreen, the extra call of setVideoLayerFrame will send
an extra IPC message to the Web process to set the video layer bounds. So the [CATransaction commit]
will need to wait for three property changes to complete - two in the Web process, and one in the
UI process. The interval of the two property changes in the Web process is over 100 ms, because we
delay the call of resolveBounds (which calls the second setVideoLayerFrame) at least 100 ms
in WebAVPlayerLayer:layoutSublayers. That leads to long durations of core animation commits.
In the test, the longest duration of commits is over 500 ms. After applying this patch,
the longest duration in the test is about 50 ms.

* platform/ios/VideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerLayer layoutSublayers]):

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

4 months agoUpstream a variety of Cocoa-platform HAVE and ENABLE macros
timothy_horton@apple.com [Fri, 20 Mar 2020 01:59:05 +0000 (01:59 +0000)]
Upstream a variety of Cocoa-platform HAVE and ENABLE macros
https://bugs.webkit.org/show_bug.cgi?id=209307

Reviewed by Andy Estes.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:
* pal/spi/cocoa/AVFoundationSPI.h:
* pal/spi/cocoa/RevealSPI.h:
* pal/spi/ios/UIKitSPI.h:

Source/WebKit:

* Configurations/FeatureDefines.xcconfig:
* Platform/spi/ios/PDFKitSPI.h:
* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::createRemoteView):
* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_initWithFrame:webView:mimeType:]):

Source/WebKitLegacy/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/PlatformEnableCocoa.h:
* wtf/PlatformHave.h:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

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

4 months ago[ Mac WK1 ] REGRESSION (r240537) Layout Test media/video-background-tab-playback...
eric.carlson@apple.com [Fri, 20 Mar 2020 00:50:24 +0000 (00:50 +0000)]
[ Mac WK1 ] REGRESSION (r240537) Layout Test media/video-background-tab-playback.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=196502
<rdar://problem/49532580>

Reviewed by Jer Noble.

* media/video-background-tab-playback-expected.txt:
* media/video-background-tab-playback.html: Don't assume the state will change in 100ms.
* platform/ios/TestExpectations:
* platform/mac-wk1/TestExpectations:
* platform/mac-wk2/TestExpectations:

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

4 months agoUnreviewed test fixing.
simon.fraser@apple.com [Fri, 20 Mar 2020 00:42:02 +0000 (00:42 +0000)]
Unreviewed test fixing.

Tests that fire multiple wheel event sequences need to call eventSender.monitorWheelEvents() between each one.

* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html:

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

4 months agoRemove test failing after r258734
achristensen@apple.com [Fri, 20 Mar 2020 00:03:39 +0000 (00:03 +0000)]
Remove test failing after r258734
https://bugs.webkit.org/show_bug.cgi?id=209303

We removed the functionality it was testing because it did nothing useful except call the callback.
I'm about to remove the only user of WKContextGetStatistics.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/WebCoreStatisticsWithNoWebProcess.cpp: Removed.

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

4 months agoScriptDisallowedScope should disable isEventAllowedInMainThread and isEventDispatchAl...
commit-queue@webkit.org [Thu, 19 Mar 2020 23:48:18 +0000 (23:48 +0000)]
ScriptDisallowedScope should disable isEventAllowedInMainThread and isEventDispatchAllowedInSubtree asserts in WebKit1
https://bugs.webkit.org/show_bug.cgi?id=209165

Patch by Sunny He <sunny_he@apple.com> on 2020-03-19
Reviewed by Ryosuke Niwa.

Under very intricate sequences of event dispatch in WebKit1, it is
possible for security asserts to be triggered even if there is no
underlying security issue soley due to the design patterns of
WebKit1.

No new tests since the conditions for reproduction are very delicate
and difficult to reliably capture in a test case.

* dom/ScriptDisallowedScope.h:
(WebCore::ScriptDisallowedScope::isEventAllowedInMainThread):
(WebCore::ScriptDisallowedScope::InMainThread::isEventDispatchAllowedInSubtree):

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

4 months agocommit-queue status-bubble shows incorrect position in queue
aakash_jain@apple.com [Thu, 19 Mar 2020 23:41:31 +0000 (23:41 +0000)]
commit-queue status-bubble shows incorrect position in queue
https://bugs.webkit.org/show_bug.cgi?id=209313

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
(StatusBubble._queue_position):

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

4 months agoREGRESSION (r258707): storage/indexeddb/cursor-leak.html is flaky timing out
jacob_uphoff@apple.com [Thu, 19 Mar 2020 23:38:21 +0000 (23:38 +0000)]
REGRESSION (r258707): storage/indexeddb/cursor-leak.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=209318

Fixing expectations

Unreviewed test gardening.

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

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

4 months agoSanitize suggested download filename received from web process
commit-queue@webkit.org [Thu, 19 Mar 2020 23:32:45 +0000 (23:32 +0000)]
Sanitize suggested download filename received from web process
https://bugs.webkit.org/show_bug.cgi?id=209300
<rdar://problem/59487723>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-03-19
Reviewed by Chris Dumez.

Source/WebKit:

* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilenameAsync):

LayoutTests:

* fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash-expected.txt:
* fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash.html:

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

4 months agoREGRESSION (r258707): storage/indexeddb/cursor-leak.html is flaky timing out
jacob_uphoff@apple.com [Thu, 19 Mar 2020 23:26:29 +0000 (23:26 +0000)]
REGRESSION (r258707): storage/indexeddb/cursor-leak.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=209318

Unreviewed test gardening

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

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

4 months agoAllow for some tolerance when checking canvas pixels in fast/mediastream tests
eric.carlson@apple.com [Thu, 19 Mar 2020 23:05:24 +0000 (23:05 +0000)]
Allow for some tolerance when checking canvas pixels in fast/mediastream tests
https://bugs.webkit.org/show_bug.cgi?id=209259
<rdar://problem/60609789>

Unreviewed tweak of r258700, increase the maximum tolerance to +/- 2.

* resources/platform-helper.js:
(videoCanvasPixelComparisonTolerance):
(checkPixelColorWithTolerance):

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

4 months agoHandle failed ITP Database insert attempts
katherine_cheney@apple.com [Thu, 19 Mar 2020 22:55:12 +0000 (22:55 +0000)]
Handle failed ITP Database insert attempts
https://bugs.webkit.org/show_bug.cgi?id=209253
<rdar://problem/58886756>

Reviewed by David Kilzer.

A first step toward handling I/O errors in the database. Adds checks
so that in the case where a domain insert fails, we don't execute
code which relies on this domain being in the database.

Future steps will be figuring out a way to schedule failed queries
to execute when the database is accepting inputs in the future.

* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
(WebKit::ResourceLoadStatisticsDatabaseStore::ensureResourceStatisticsForRegistrableDomain):
Check if the query to insert a domain failed. If so, return
WTF::nullopt in place of the domain ID to indicate the failure.

(WebKit::ResourceLoadStatisticsDatabaseStore::ensureAndMakeDomainList):
The simplest solution here was to only append strings to this list
if they are already in the database, or are successfully inserted,
because insertDomainRelationshipList() relies on these being in the database.

(WebKit::ResourceLoadStatisticsDatabaseStore::hasStorageAccess):
(WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccess):
(WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccess):
(WebKit::ResourceLoadStatisticsDatabaseStore::grantStorageAccessInternal):
(WebKit::ResourceLoadStatisticsDatabaseStore::grandfatherDataForDomains):
(WebKit::ResourceLoadStatisticsDatabaseStore::ensurePrevalentResourcesForDebugMode):
(WebKit::ResourceLoadStatisticsDatabaseStore::logFrameNavigation):
(WebKit::ResourceLoadStatisticsDatabaseStore::logCrossSiteLoadWithLinkDecoration):
(WebKit::ResourceLoadStatisticsDatabaseStore::logUserInteraction):
(WebKit::ResourceLoadStatisticsDatabaseStore::clearUserInteraction):
(WebKit::ResourceLoadStatisticsDatabaseStore::clearPrevalentResource):
(WebKit::ResourceLoadStatisticsDatabaseStore::setGrandfathered):
(WebKit::ResourceLoadStatisticsDatabaseStore::setIsScheduledForAllButCookieDataRemoval):
(WebKit::ResourceLoadStatisticsDatabaseStore::setSubframeUnderTopFrameDomain):
(WebKit::ResourceLoadStatisticsDatabaseStore::setSubresourceUnderTopFrameDomain):
(WebKit::ResourceLoadStatisticsDatabaseStore::setSubresourceUniqueRedirectTo):
(WebKit::ResourceLoadStatisticsDatabaseStore::setSubresourceUniqueRedirectFrom):
(WebKit::ResourceLoadStatisticsDatabaseStore::setTopFrameUniqueRedirectTo):
(WebKit::ResourceLoadStatisticsDatabaseStore::setTopFrameUniqueRedirectFrom):
(WebKit::ResourceLoadStatisticsDatabaseStore::setLastSeen):
(WebKit::ResourceLoadStatisticsDatabaseStore::setPrevalentResource):
(WebKit::ResourceLoadStatisticsDatabaseStore::setVeryPrevalentResource):
Every call to ensureResourceStatisticsForRegistrableDomain should
check the result to make sure the domain was inserted before
continuing, and return early (or return a value that does not further
rely on the database information, like an empty vector). Log these
errors but don't add a debug assert because there already is one in
ensureResourceStatisticsForRegistrableDomain.

* (WebKit::ResourceLoadStatisticsDatabaseStore::populateFromMemoryStore):
* (WebKit::ResourceLoadStatisticsDatabaseStore::mergeStatistics):
The simplest thing to do in this case is to return early if any domain
inserts fail before inserting domain relationships as a best-effort
approach. A future step could be maintaining a vector of statistics
which successfully inserted, and only adding those relationships.

* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
ensureResourceStatisticsForRegistrableDomain should return an
Optional domain ID to account for failed inserts.

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

4 months agoUpstream the definition of HAVE_READ_ONLY_SYSTEM_VOLUME
timothy_horton@apple.com [Thu, 19 Mar 2020 22:50:16 +0000 (22:50 +0000)]
Upstream the definition of HAVE_READ_ONLY_SYSTEM_VOLUME
https://bugs.webkit.org/show_bug.cgi?id=209305

Reviewed by Andy Estes.

Source/WebCore:

* platform/mac/BlacklistUpdater.mm:

Source/WebKit:

* Shared/mac/AuxiliaryProcessMac.mm:
(WebKit::AuxiliaryProcess::isSystemWebKit):

Source/WTF:

* wtf/PlatformHave.h:

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

4 months agoRemove Mobile Asset access from the WebContent process
bfulgham@apple.com [Thu, 19 Mar 2020 22:44:56 +0000 (22:44 +0000)]
Remove Mobile Asset access from the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=209302
<rdar://problem/56305023>

Reviewed by Per Arne Vollan.

Source/WebKit:

Tested by fast/sandbox/ios/sandbox-mach-lookup.html

* Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

LayoutTests:

* fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
* fast/sandbox/ios/sandbox-mach-lookup.html:

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

4 months ago[css-grid] Changes in grid or elements inside the grid affects margin on other elemen...
jfernandez@igalia.com [Thu, 19 Mar 2020 22:27:06 +0000 (22:27 +0000)]
[css-grid] Changes in grid or elements inside the grid affects margin on other elements in the grid
https://bugs.webkit.org/show_bug.cgi?id=209203

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Imported new Web Platform tests to detect regressions in the auto-margins logic durignn relayouts.

* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-001-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-001.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-002-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-002.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-003-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-003.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-004-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-004.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-005-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-005.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-006-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-006.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-007-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-007.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-008-expected.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-008.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-001-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-001.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-002-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-002.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-003-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-003.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-004-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-004.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-005-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-005.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-006-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-006.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-007-expected.txt: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-007.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-008-expected.html: Added.
* web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-008.html: Added.

Source/WebCore:

We should ignore the previously computed auto margins wheneven a relayout is performed.

Tests: imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-001.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-002.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-003.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-004.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-005.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-006.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-007.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-block-axis-alignment-auto-margins-008.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-001.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-002.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-003.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-004.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-005.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-006.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-007.html
       imported/w3c/web-platform-tests/css/css-grid/alignment/grid-inline-axis-alignment-auto-margins-008.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::updateAutoMarginsInRowAxisIfNeeded):
(WebCore::RenderGrid::updateAutoMarginsInColumnAxisIfNeeded):

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

4 months agoRemove unused WebProcessPool::didGetStatistics
commit-queue@webkit.org [Thu, 19 Mar 2020 22:18:30 +0000 (22:18 +0000)]
Remove unused WebProcessPool::didGetStatistics
https://bugs.webkit.org/show_bug.cgi?id=209303
<rdar://problem/60648454>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-03-19
Reviewed by Geoffrey Garen.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::didGetStatistics): Deleted.
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessPool.messages.in:

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

4 months agoRemove caching of isOnScreen since it is not used.
andresg_22@apple.com [Thu, 19 Mar 2020 22:06:17 +0000 (22:06 +0000)]
Remove caching of isOnScreen since it is not used.
https://bugs.webkit.org/show_bug.cgi?id=209306

Reviewed by Chris Fleizach.

AXIsolatedObject was caching isOnScreen and it wasn't used. It has a
performance impact since it needs to run on the main thread. thus this
change removes it from the cache.

* accessibility/AccessibilityObjectInterface.h:
* accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::initializeAttributeData):
* accessibility/isolatedtree/AXIsolatedObject.h:

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

4 months ago[JSC] StructureStubInfo::bufferedStructures should not ref/deref UniquedStringImpl
ysuzuki@apple.com [Thu, 19 Mar 2020 21:59:22 +0000 (21:59 +0000)]
[JSC] StructureStubInfo::bufferedStructures should not ref/deref UniquedStringImpl
https://bugs.webkit.org/show_bug.cgi?id=209266
<rdar://problem/60508312>

Reviewed by Saam Barati.

StructureStubInfo::bufferedStructures includes RefPtr<UniquedStringImpl>. So destroying StructureStubInfo in
CodeBlock::finalizeUnconditionally can access to AtomStringTable, and get nullptr AtomStringTable since
CodeBlock::finalizeUnconditionally can be executed in heap-thread.

Temporarily setting AtomStringTable in the heap-thread when executing GC End phase is dangerous: Web worker's
JSC VM is releasing heapAccess when waiting for the next message in the RunLoop. This potentially means that
Web worker's main thread can run concurrently with Web worker's JSC VM's End phase heap-thread until the web
worker takes JSLock. (This is not a problem in WebCore since WebCore JSC VM never releases heapAccess. We cannot
take the same design since we would like to run End phase even if web worker is not getting any messages).

And removing resetJITData in CodeBlock::finalizeUnconditionally does not fix as well since CodeBlock::finalizeUnconditionally
calls StructureStubInfo::visitWeakReferences, and it removes some of entries of StructureStubInfo::bufferedStructures after
ByVal extension is introduced into StructureStubInfo.

This patch uses CacheableIdentifier for bufferedStructures. We make BufferedStructure class which holds Structure and CacheableIdentifier.
And StructureStubInfo holds HashSet<BufferedStructure>. We also visit CacheableIdentifier in StructureStubInfo::visitAggregate. To allow
concurrent collector to run this, we introduce m_bufferedStructuresLock in StructureStubInfo to guard m_bufferedStructures.

* bytecode/StructureStubInfo.cpp:
(JSC::StructureStubInfo::StructureStubInfo):
(JSC::StructureStubInfo::addAccessCase):
(JSC::StructureStubInfo::reset):
(JSC::StructureStubInfo::visitAggregate):
(JSC::StructureStubInfo::visitWeakReferences):
* bytecode/StructureStubInfo.h:
(JSC::StructureStubInfo::considerCaching):
(JSC::StructureStubInfo::getByIdSelfIdentifier):
(JSC::StructureStubInfo::cacheType const):
(JSC::StructureStubInfo::clearBufferedStructures):
(JSC::StructureStubInfo::BufferedStructure::BufferedStructure):
(JSC::StructureStubInfo::BufferedStructure::isHashTableDeletedValue const):
(JSC::StructureStubInfo::BufferedStructure::hash const):
(JSC::StructureStubInfo::BufferedStructure::operator==):
(JSC::StructureStubInfo::BufferedStructure::operator!=):
(JSC::StructureStubInfo::BufferedStructure::Hash::hash):
(JSC::StructureStubInfo::BufferedStructure::Hash::equal):
(JSC::StructureStubInfo::BufferedStructure::structure const):
(JSC::StructureStubInfo::BufferedStructure::byValId const):
* jit/JITOperations.cpp:
* runtime/CacheableIdentifier.h:
(JSC::CacheableIdentifier::hash const):

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

4 months agoURL needs to be isolatedCopied when cached in AXIsolatedObject.
andresg_22@apple.com [Thu, 19 Mar 2020 21:57:00 +0000 (21:57 +0000)]
URL needs to be isolatedCopied when cached in AXIsolatedObject.
https://bugs.webkit.org/show_bug.cgi?id=209298

Reviewed by Chris Fleizach.

AXIsolatedObject needs to isolatedCopy the URL property in order to use
it on the secondary thread.

* accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::initializeAttributeData):

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

4 months agoWeb Inspector: AXI: disabled buttons shouldn't be focusable
nvasilyev@apple.com [Thu, 19 Mar 2020 21:41:33 +0000 (21:41 +0000)]
Web Inspector: AXI: disabled buttons shouldn't be focusable
https://bugs.webkit.org/show_bug.cgi?id=208283
<rdar://problem/59832150>

Reviewed by Devin Rousso.

Set tabIndex to "-1" when button becomes disabled.

* UserInterface/Views/ActivateButtonNavigationItem.js:
(WI.ActivateButtonNavigationItem):
* UserInterface/Views/ButtonNavigationItem.js:
`_role` is defined in the parent class now.

(WI.ButtonNavigationItem):
(WI.ButtonNavigationItem.prototype.set enabled):
(WI.ButtonNavigationItem.prototype.get tabbable):
(WI.ButtonNavigationItem.prototype._updateTabIndex):
* UserInterface/Views/RadioButtonNavigationItem.js:
(WI.RadioButtonNavigationItem.prototype.get tabbable):
(WI.RadioButtonNavigationItem):

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

4 months agoWeb Inspector: remove redundant code in TreeOutline.prototype.removeChildAtIndex
nvasilyev@apple.com [Thu, 19 Mar 2020 21:35:47 +0000 (21:35 +0000)]
Web Inspector: remove redundant code in TreeOutline.prototype.removeChildAtIndex
https://bugs.webkit.org/show_bug.cgi?id=209301

Reviewed by Joseph Pecoraro.

* UserInterface/Views/TreeOutline.js:
(WI.TreeOutline.prototype.removeChildAtIndex):
Check `suppressSelectSibling` once instead of three times.

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

4 months ago[Curl] Add an API returns description of verification errors.
commit-queue@webkit.org [Thu, 19 Mar 2020 21:18:56 +0000 (21:18 +0000)]
[Curl] Add an API returns description of verification errors.
https://bugs.webkit.org/show_bug.cgi?id=208913

Patch by Takashi Komori <Takashi.Komori@sony.com> on 2020-03-19
Reviewed by Fujii Hironori.

WKCertificateInfoCopyVerificationErrorDescription returns the description of SSL verification error as human readable string.
Browser can display more precise error information with this API.

API Test: Curl.CertificateAPI

Source/WebCore:

* platform/network/curl/CertificateInfo.h:
* platform/network/curl/CertificateInfoCurl.cpp:
(WebCore::CertificateInfo::verificationErrorDescription const):

Source/WebKit:

* Shared/API/c/curl/WKCertificateInfoCurl.cpp:
(WKCertificateInfoCopyVerificationErrorDescription):
* Shared/API/c/curl/WKCertificateInfoCurl.h:

Tools:

* MiniBrowser/win/Common.cpp:
(askServerTrustEvaluation):
* MiniBrowser/win/Common.h:
* MiniBrowser/win/WebKitBrowserWindow.cpp:
(createPEMString):
(WebKitBrowserWindow::canTrustServerCertificate):
* TestWebKitAPI/Tests/WebKit/curl/Certificates.cpp:
(TestWebKitAPI::Curl::TEST):

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

4 months agoUpdate imported/w3c/web-platform-tests/css/css-text/line-break/line-break-{strict...
mmaxfield@apple.com [Thu, 19 Mar 2020 21:17:12 +0000 (21:17 +0000)]
Update imported/w3c/web-platform-tests/css/css-text/line-break/line-break-{strict,normal}-015.xht
https://bugs.webkit.org/show_bug.cgi?id=209250
<rdar://problem/59957596>

Update them according to https://github.com/web-platform-tests/wpt/commit/7d24adef541b2e836f2b2f9534ce3f0e078f5782

Reviewed by Antti Koivisto.

* platform/ios/TestExpectations: Mark as failing on old OSes
* platform/mac/TestExpectations: Mark as failing on old OSes
* web-platform-tests/css/css-text/line-break/line-break-normal-015-expected.xht:
* web-platform-tests/css/css-text/line-break/line-break-normal-015.xht:
* web-platform-tests/css/css-text/line-break/line-break-strict-015-expected.xht:
* web-platform-tests/css/css-text/line-break/line-break-strict-015.xht:

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

4 months ago[iOS] Deny mach lookup access to power service
pvollan@apple.com [Thu, 19 Mar 2020 21:13:28 +0000 (21:13 +0000)]
[iOS] Deny mach lookup access to power service
https://bugs.webkit.org/show_bug.cgi?id=208460
<rdar://problem/57026325>

Reviewed by Darin Adler.

Source/WebKit:

On iOS, deny mach lookup access to the power service in the WebContent process.

Test: fast/sandbox/ios/sandbox-mach-lookup.html

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

LayoutTests:

* fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
* fast/sandbox/ios/sandbox-mach-lookup.html:

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

4 months ago[ iOS wk2 ] http/tests/workers/service/service-worker-cache-api.https.html is flaky...
lawrence.j@apple.com [Thu, 19 Mar 2020 21:03:29 +0000 (21:03 +0000)]
[ iOS wk2 ] http/tests/workers/service/service-worker-cache-api.https.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=209304

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

4 months agoImplement support for cursor interactions on iPad
timothy_horton@apple.com [Thu, 19 Mar 2020 19:16:33 +0000 (19:16 +0000)]
Implement support for cursor interactions on iPad
https://bugs.webkit.org/show_bug.cgi?id=209268

Reviewed by Darin Adler.

No new tests in this patch, just upstreaming. Will attempt to enable
some macOS mouse event tests on iOS in the future, though.

* wtf/PlatformEnableCocoa.h:
Don't disable the contextmenu event on iOS anymore.

* wtf/PlatformHave.h:
Rename HAVE_HOVER_GESTURE_RECOGNIZER to HAVE_UIKIT_WITH_MOUSE_SUPPORT.
Add HAVE_UI_CURSOR_INTERACTION.
Enable HAVE_UI_PARALLAX_TRANSITION_GESTURE_RECOGNIZER on iOS.

* platform/RuntimeApplicationChecks.h:
* platform/cocoa/RuntimeApplicationChecksCocoa.mm:
(WebCore::IOSApplication::isNews):
(WebCore::IOSApplication::isStocks):
(WebCore::IOSApplication::isFeedly):
Add some bundle ID checks needed in WebKit.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/Cocoa/VersionChecks.h:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView _removeDefaultGestureRecognizers]):
(-[WKContentView _addDefaultGestureRecognizers]):
(-[WKContentView gestureRecognizer:shouldReceiveTouch:]):
(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKContentView _showShareSheet:inRect:completionHandler:]):
(-[WKContentView setupDragAndDropInteractions]):
(-[WKContentView shouldUseMouseGestureRecognizer]):
(-[WKContentView setupMouseGestureRecognizer]):
(-[WKContentView mouseGestureRecognizerChanged:]):
(-[WKContentView setupCursorInteraction]):
(-[WKContentView _cursorInteraction:regionForLocation:defaultRegion:completion:]):
(-[WKContentView cursorRegionForPositionInformation:point:]):
(-[WKContentView cursorInteraction:styleForRegion:modifiers:]):
(-[WKContentView _mouseGestureRecognizerChanged:]): Deleted.
* UIProcess/ios/WKMouseGestureRecognizer.h:
* UIProcess/ios/WKMouseGestureRecognizer.mm:
* WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
(WebKit::WebChromeClient::shouldUseMouseEventForSelection):

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

4 months agoFix test expectation for fast/scrolling/mac/absolute-in-overflow-scroll-dynamic.html
tsavell@apple.com [Thu, 19 Mar 2020 18:43:51 +0000 (18:43 +0000)]
Fix test expectation for fast/scrolling/mac/absolute-in-overflow-scroll-dynamic.html
https://bugs.webkit.org/show_bug.cgi?id=209052

unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

4 months agoUnreviewed, build fix after r258717
ysuzuki@apple.com [Thu, 19 Mar 2020 18:41:16 +0000 (18:41 +0000)]
Unreviewed, build fix after r258717
https://bugs.webkit.org/show_bug.cgi?id=199295

* llint/LowLevelInterpreter.asm:

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

4 months ago[ iOS wk2 and Mac Debug wk2 ] imported/w3c/web-platform-tests/service-workers/service...
lawrence.j@apple.com [Thu, 19 Mar 2020 18:32:21 +0000 (18:32 +0000)]
[ iOS wk2 and Mac Debug wk2 ] imported/w3c/web-platform-tests/service-workers/service-worker/respond-with-body-accessed-response.https.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209295

Unreviewed test gardening.

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

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

4 months agosanitizeStackForVMImpl writes below stack pointer, triggers huge warning spam from...
ysuzuki@apple.com [Thu, 19 Mar 2020 18:28:58 +0000 (18:28 +0000)]
sanitizeStackForVMImpl writes below stack pointer, triggers huge warning spam from valgrind
https://bugs.webkit.org/show_bug.cgi?id=199295

Reviewed by Mark Lam.

During sanitizeStackForVMImpl, we should not access to the region beyond the stack-pointer.
This patch changes stack-pointer while sanitizeStackForVMImpl is zero-filling the old stack region.

* llint/LowLevelInterpreter.asm:

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

4 months ago[ Mac wk2 ] tiled-drawing/scrolling/scroll-iframe-latched-selects.html is flaky failing.
lawrence.j@apple.com [Thu, 19 Mar 2020 18:06:22 +0000 (18:06 +0000)]
[ Mac wk2 ] tiled-drawing/scrolling/scroll-iframe-latched-selects.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209283

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

4 months ago[iOS] Add telemetry for message filtering
pvollan@apple.com [Thu, 19 Mar 2020 17:59:26 +0000 (17:59 +0000)]
[iOS] Add telemetry for message filtering
https://bugs.webkit.org/show_bug.cgi?id=208925
<rdar://problem/58885485>

Reviewed by Darin Adler.

On iOS, add telemetry for message filtering in the WebContent process' sandbox.

No new tests, no behavior change.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

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

4 months agoAXIsolatedObject implementation of the title method.
andresg_22@apple.com [Thu, 19 Mar 2020 17:51:59 +0000 (17:51 +0000)]
AXIsolatedObject implementation of the title method.
https://bugs.webkit.org/show_bug.cgi?id=209291

Reviewed by Chris Fleizach.

- Implements AXIsolatedObgject::title.
- Modified implementation of AXIsolatedObject::titleAttributeValue to
use its appropriate key.

* accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::initializeAttributeData):
(WebCore::AXIsolatedObject::title const): Deleted.
* accessibility/isolatedtree/AXIsolatedObject.h:

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

4 months agoSource/WebCore:
cfleizach@apple.com [Thu, 19 Mar 2020 17:45:37 +0000 (17:45 +0000)]
Source/WebCore:
AX: VO and safari: can't press the play button
https://bugs.webkit.org/show_bug.cgi?id=209249

Reviewed by Darin Adler.

Test: accessibility/ios-simulator/has-touch-event-listener-with-shadow.html

If a node is in a shadowRoot, going up the node parent tree will stop and not check the entire tree for touch event listeners
and a touch event won't be dispatched. We need to change to use the parentInComposedTree instead to go up the chain.

* accessibility/ios/AccessibilityObjectIOS.mm:
(WebCore::AccessibilityObject::hasTouchEventListener const):

LayoutTests:
AX: VO and safari: caan't press the play button
https://bugs.webkit.org/show_bug.cgi?id=209249

Reviewed by Darin Adler.

* accessibility/ios-simulator/has-touch-event-listener-with-shadow-expected.txt: Added.
* accessibility/ios-simulator/has-touch-event-listener-with-shadow.html: Added.

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

4 months ago[JSC][BigEndians] Several JSC stress tests failing
tpopela@redhat.com [Thu, 19 Mar 2020 17:44:22 +0000 (17:44 +0000)]
[JSC][BigEndians] Several JSC stress tests failing
https://bugs.webkit.org/show_bug.cgi?id=194007

Reviewed by Michael Catanzaro.

Adapt the DataView tests to be able to pass on little endian as well
as the big endian hardware. Do so by introducing method that determine
the endianess and based on its value it saves the expected results in
the right format.

* stress/dataview-get-cse.js:
(getIsLittleEndian):
(adjustForEndianess):
(test3.foo):
(test3):
* stress/dataview-jit-get.js:
(getIsLittleEndian):
(test1.adjustForEndianess):
(test1):
(test2.adjustForEndianess):
(test2):
(test3.adjustForEndianess):
(test3):
(adjustForEndianessUint32):
(test4):
(test5):
(test6):
(test7):
(test8):
* stress/dataview-jit-neuter.js:
(getIsLittleEndian):
(adjustForEndianess):
(test):
(test2):
* stress/dataview-jit-set-nan.js:
(getIsLittleEndian):
(adjustForEndianessFloat32):
(test):
* stress/dataview-jit-set.js:
(getIsLittleEndian):
(readHex):
(adjustForEndianessUint16):
(test):
(test2):
(adjustForEndianessUint32):
(test3):
(test4):
(adjustForEndianessFloat32):
(test5):
(adjustForEndianessFloat64):
(test6):
(isLittleEndian): Deleted.

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

4 months agoFlaky Test: storage/indexeddb/cursor-leak.html and storage/indexeddb/cursor-leak...
sihui_liu@apple.com [Thu, 19 Mar 2020 17:23:58 +0000 (17:23 +0000)]
Flaky Test: storage/indexeddb/cursor-leak.html and storage/indexeddb/cursor-leak-private.html
https://bugs.webkit.org/show_bug.cgi?id=209256
<rdar://problem/60097171>

Reviewed by Geoffrey Garen.

gc() does not guarantee all objects to be collected due to our conservative GC. To make the test more stable, we
now test if there is at lease one object is collected, which is enough to show cursor does not hold strong
reference to script value properties.

* storage/indexeddb/cursor-leak-expected.txt:
* storage/indexeddb/cursor-leak-private-expected.txt:
* storage/indexeddb/resources/cursor-leak.js:
(onOpen.tx.oncomplete):
(onOpen.cursorRequest.onsuccess): Deleted.

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

4 months agoUpdate build.webkit.org link for EWS
aakash_jain@apple.com [Thu, 19 Mar 2020 17:14:23 +0000 (17:14 +0000)]
Update build.webkit.org link for EWS
https://bugs.webkit.org/show_bug.cgi?id=209280

Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/build.webkit.org-config/templates/root.html:

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

4 months ago[WinCairo] extract-built-product fails after r258612
stephan.szabo@sony.com [Thu, 19 Mar 2020 17:07:37 +0000 (17:07 +0000)]
[WinCairo] extract-built-product fails after r258612
https://bugs.webkit.org/show_bug.cgi?id=209285

extractBuiltProduct also references the old name for the
requirements on wincairo.

Reviewed by Ross Kirsling.

* BuildSlaveSupport/built-product-archive:

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

4 months ago[WebAccessibilityObjectWrapper remoteAccessibilityParentObject] must run on the main...
andresg_22@apple.com [Thu, 19 Mar 2020 17:02:26 +0000 (17:02 +0000)]
[WebAccessibilityObjectWrapper remoteAccessibilityParentObject] must run on the main thread.
https://bugs.webkit.org/show_bug.cgi?id=209284

Reviewed by Chris Fleizach.

- Dispatch [WebAccessibilityObjectWrapper remoteAccessibilityParentObject] to the main thread.
- [WebAccessibilityObjectWrapper windowElement:] must then call it outside the dispatched lambda.

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

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

4 months ago[ iOS wk2 and Mac wk2 ] imported/w3c/web-platform-tests/fetch/stale-while-revalidate...
lawrence.j@apple.com [Thu, 19 Mar 2020 16:49:56 +0000 (16:49 +0000)]
[ iOS wk2 and Mac wk2 ] imported/w3c/web-platform-tests/fetch/stale-while-revalidate/frame-removal.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209281

Unreviewed test gardening.

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

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

4 months ago[Web Animations] Mark promises as handled when rejected
commit-queue@webkit.org [Thu, 19 Mar 2020 16:42:24 +0000 (16:42 +0000)]
[Web Animations] Mark promises as handled when rejected
https://bugs.webkit.org/show_bug.cgi?id=209240
<rdar://problem/60592305>

Patch by Antoine Quint <graouts@apple.com> on 2020-03-19
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Add the new WPT tests added for this spec change (https://github.com/web-platform-tests/wpt/pull/22314) and revert some workarounds
made in our copy of WPT tests to previously silence flaky console output related to promise rejections (added in r258275 and r258276).

* web-platform-tests/web-animations/interfaces/Animation/finished-expected.txt:
* web-platform-tests/web-animations/interfaces/Animation/finished.html:
* web-platform-tests/web-animations/interfaces/Animation/ready-expected.txt:
* web-platform-tests/web-animations/interfaces/Animation/ready.html:
* web-platform-tests/web-animations/timing-model/animations/finishing-an-animation.html:
* web-platform-tests/web-animations/timing-model/animations/pausing-an-animation.html:

Source/WebCore:

Implementing the spec change discussed in https://github.com/w3c/csswg-drafts/issues/4556.

* animation/WebAnimation.cpp:
(WebCore::WebAnimation::cancel):
(WebCore::WebAnimation::resetPendingTasks):

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

4 months agoMany tests relying on eventSender.monitorWheelEvents() are no longer flaky
simon.fraser@apple.com [Thu, 19 Mar 2020 16:03:04 +0000 (16:03 +0000)]
Many tests relying on eventSender.monitorWheelEvents() are no longer flaky
https://bugs.webkit.org/show_bug.cgi?id=209272

Reviewed by Wenson Hsieh.

Remove tests from TestExpectations that were flakey because of bug 197819.

Fix some scroll-snap tests which were written before CSS OM View changes made document.body
not the scrolling element.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:
* tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt:
* tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt:
* tiled-drawing/scrolling/frames/frameset-frame-scrollability-expected.txt:
* tiled-drawing/scrolling/frames/frameset-nested-frame-scrollability-expected.txt:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-iframe.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-then-horizontal.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html:

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

4 months agoAllow for some tolerance when checking canvas pixels in fast/mediastream tests
eric.carlson@apple.com [Thu, 19 Mar 2020 15:34:06 +0000 (15:34 +0000)]
Allow for some tolerance when checking canvas pixels in fast/mediastream tests
https://bugs.webkit.org/show_bug.cgi?id=209259
<rdar://problem/60609789>

Reviewed by Youenn Fablet.

* fast/mediastream/MediaStream-video-element-displays-buffer.html:
* fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled.html:
* fast/mediastream/media-stream-renders-first-frame.html:
* fast/mediastream/resize-trim.html:
* resources/platform-helper.js:
(checkPixelColorWithTolerance):
(isPixelBlack):
(isPixelTransparent):
(isPixelWhite):
(isPixelGray):

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

4 months ago[Flatpak SDK] Release logs not sent to journald when running within the SDK runtime
philn@webkit.org [Thu, 19 Mar 2020 15:24:52 +0000 (15:24 +0000)]
[Flatpak SDK] Release logs not sent to journald when running within the SDK runtime
https://bugs.webkit.org/show_bug.cgi?id=209223

Reviewed by Carlos Alberto Lopez Perez.

flatpak build doesn't expose a --socket option for white-listing
the systemd journal socket. So white-list everything in /run. 🤷

* flatpak/flatpakutils.py:
(WebkitFlatpak.run_in_sandbox):

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

4 months agoFix many warnings with Clang 7.0 on GTK x86-64 in Debug.
cturner@igalia.com [Thu, 19 Mar 2020 15:17:17 +0000 (15:17 +0000)]
Fix many warnings with Clang 7.0 on GTK x86-64 in Debug.
https://bugs.webkit.org/show_bug.cgi?id=209146

Reviewed by Darin Adler.

Source/JavaScriptCore:

* runtime/JSCellInlines.h:
(JSC::CallFrame::deprecatedVM const): A reference may not be NULL, so
this ASSERT() can never trip.

Source/WebCore:

Warning fixes, no new tests.

* Modules/encryptedmedia/MediaKeys.cpp:
(WebCore::MediaKeys::MediaKeys):
* Modules/webaudio/MediaStreamAudioSource.h: The m_numberOfFrames ivar
is platform-specific.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::load):
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGLData::getStaticVBO):
* platform/mediastream/RealtimeVideoSource.h:
* platform/mediastream/gstreamer/GStreamerAudioCapturer.h: There are
still virtual methods in this class, but no virtual destructor. Since
this won't be subclassed further (I doubt, anyway!) lets make it final
and plug the bug.
* platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
* platform/mediastream/gstreamer/GStreamerVideoCapturer.h: See
AudioCapturer.
* platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp:
(WebCore::GStreamerVideoDecoder::RegisterDecodeCompleteCallback): Deleted.
(WebCore::GStreamerVideoDecoder::ImplementationName const): Deleted.
* platform/mediastream/libwebrtc/GStreamerVideoEncoder.cpp:
* platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp: The
encoder was being used uninitialized, and hence codec support can not
be working as intended. Fix that bug.
(WebCore::GStreamerVideoEncoder::AddCodecIfSupported):
(WebCore::GStreamerVideoEncoder::InitEncode): Deleted.
(WebCore::GStreamerVideoEncoder::GetEncoderInfo const): Deleted.
* platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.h:
* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::setCookies):
* rendering/RenderLayerBacking.h: Condition the bear trap on Cocoa
platform where the crash is being seen. On GTK these traps generate
warning spam and we don't see the crash here.
* rendering/RenderThemeAdwaita.h:
* testing/Internals.cpp:
(WebCore::Internals::readPreferenceInteger):
(WebCore::Internals::encodedPreferenceValue):
(WebCore::Internals::getUTIFromMIMEType):
(WebCore::Internals::getUTIFromTag):

Source/WebDriver:

* Session.cpp:
(WebDriver::Session::newWindow):
(WebDriver::Session::elementIsFileUpload):
(WebDriver::Session::elementIsEditable):
(WebDriver::Session::setInputFileUploadFiles):

Source/WebKit:

* NetworkProcess/NetworkHTTPSUpgradeChecker.cpp:
(WebKit::NetworkHTTPSUpgradeChecker::query):
* NetworkProcess/NetworkLoadChecker.cpp: The m_isHTTPSUpgradeEnabled
ivar is only used on Cocoa platforms, on GTK it is causing warning
spam.
(WebKit::NetworkLoadChecker::NetworkLoadChecker):
* NetworkProcess/NetworkLoadChecker.h:
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::updateSceneState):
*
Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
m_inForceRepaint is not being used anymore.
(WebKit::ThreadedCompositor::forceRepaint):
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
* UIProcess/API/glib/WebKitNavigationClient.cpp:
* UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
(WebKit::RemoteInspectorProtocolHandler::RemoteInspectorProtocolHandler):
* UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.h:

Source/WTF:

* wtf/LoggerHelper.h: When the RELEASE_LOG is disabled, avoid warning
spam about unused channel names. Call sites often create locals for
the channel name outside of RELEASE_LOG ifdef's, which cause many
unused variable warnings.

Tools:

* TestWebKitAPI/Tests/WebCore/TransformationMatrix.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp:
* TestWebKitAPI/Tests/WebKitGLib/TestDownloads.cpp:
(testDownloadMIMEType):
(testContextMenuDownloadActions):
* TestWebKitAPI/Tests/WebKitGtk/TestPrinting.cpp:

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

4 months agoonwebkit{animation, transition}XX handlers missing from Document
commit-queue@webkit.org [Thu, 19 Mar 2020 14:11:32 +0000 (14:11 +0000)]
onwebkit{animation, transition}XX handlers missing from Document
https://bugs.webkit.org/show_bug.cgi?id=206170
<rdar://problem/58596373>

Patch by Antoine Quint <graouts@apple.com> on 2020-03-19
Reviewed by Youenn Fablet.

Source/WebCore:

We now specify the non-standard CSS Animations and CSS Transitions event handlers on DocumentAndElementEventHandlers.idl rather than Element.idl
such that they specified on both Element and Document.

* dom/DocumentAndElementEventHandlers.idl:
* dom/Element.idl:

LayoutTests:

* fast/dom/event-handler-attributes-expected.txt:
* fast/dom/event-handler-attributes.html:

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

4 months ago[GTK][WPE] Media controls numeric position value is not automatically updated during...
carlosgc@webkit.org [Thu, 19 Mar 2020 14:05:01 +0000 (14:05 +0000)]
[GTK][WPE] Media controls numeric position value is not automatically updated during playback
https://bugs.webkit.org/show_bug.cgi?id=209051

Reviewed by Philippe Normand.

The time label is not updated because updateTime() thinks the media controls are hidden when not hovered, but
for audio elements the controls are always visible.

* Modules/mediacontrols/mediaControlsAdwaita.js:
(Controller.prototype.controlsAreAlwaysVisible): Return true for audio elements.

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

4 months ago[GTK][WPE] REGRESSION(r258626): flatpak is used even when WEBKIT_JHBUILD is set
carlosgc@webkit.org [Thu, 19 Mar 2020 14:03:50 +0000 (14:03 +0000)]
[GTK][WPE] REGRESSION(r258626): flatpak is used even when WEBKIT_JHBUILD is set
https://bugs.webkit.org/show_bug.cgi?id=209278

Reviewed by Philippe Normand.

This happens when using an external jhbuild, because shouldUseFlatpak() assumes that no command prefix always
means flatpak.

* Scripts/webkitdirs.pm:
(shouldUseFlatpak): Return early if WEBKIT_JHBUILD is set.

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

4 months ago[CMake] cache not cleared when build-webkit options change
commit-queue@webkit.org [Thu, 19 Mar 2020 13:27:18 +0000 (13:27 +0000)]
[CMake] cache not cleared when build-webkit options change
https://bugs.webkit.org/show_bug.cgi?id=209277

Patch by Philippe Normand <pnormand@igalia.com> on 2020-03-19
Reviewed by Adrian Perez de Castro.

* Scripts/webkitdirs.pm:
(shouldRemoveCMakeCache): The expected function signature never
included the cache file path. Remove it.

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

4 months ago[GTK] media/track/track-automatic-subtitles.html is timing out
eocanha@igalia.com [Thu, 19 Mar 2020 12:06:49 +0000 (12:06 +0000)]
[GTK] media/track/track-automatic-subtitles.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=116957

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Moved CaptionUserPreferencesMediaAF::textTrackSelectionScore() implementation
to the CaptionUserPreferencesMedia superclass.

Tested by existing test.

* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::textTrackSelectionScore const):
* page/CaptionUserPreferencesMediaAF.cpp:
* page/CaptionUserPreferencesMediaAF.h:

LayoutTests:

Removed test from expectations.

* platform/gtk/TestExpectations:

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

4 months ago[GTK][WPE] Gardening, update TestExpectations
dpino@igalia.com [Thu, 19 Mar 2020 11:39:18 +0000 (11:39 +0000)]
[GTK][WPE] Gardening, update TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=209276

Unreviewed gardening.

Gardening of several WPT's css-writing-modes tests that were added for
the first time in r258661.

* platform/gtk/TestExpectations:
* platform/wpe/TestExpectations:

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

4 months ago[GTK][WPE] Unreviewed, build fixes after r258547 when disabling release logging support
philn@webkit.org [Thu, 19 Mar 2020 10:26:23 +0000 (10:26 +0000)]
[GTK][WPE] Unreviewed, build fixes after r258547 when disabling release logging support

Source/WebCore:

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:

Source/WTF:

* wtf/Logger.h:
(WTF::Logger::logAlwaysVerbose const):

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

4 months agoCherry pick usrsctp commit 790a7a2555aefb392a5a69923f1e9d17b4968467
commit-queue@webkit.org [Thu, 19 Mar 2020 10:15:02 +0000 (10:15 +0000)]
Cherry pick usrsctp commit 790a7a2555aefb392a5a69923f1e9d17b4968467
https://bugs.webkit.org/show_bug.cgi?id=209204
<rdar://problem/59362671>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-03-19
Reviewed by Youenn Fablet.

* Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_auth.c:
* Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_pcb.c:

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

4 months agoREGRESSION(r258626): webkit-dirs warning
philn@webkit.org [Thu, 19 Mar 2020 09:50:17 +0000 (09:50 +0000)]
REGRESSION(r258626): webkit-dirs warning
https://bugs.webkit.org/show_bug.cgi?id=209221

Reviewed by Adrian Perez de Castro.

* Scripts/webkitdirs.pm:
(buildCMakeProjectOrExit): Fix Perl Warning. 😎

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

4 months agoUnreviewed test gardening.
graouts@webkit.org [Thu, 19 Mar 2020 09:12:01 +0000 (09:12 +0000)]
Unreviewed test gardening.

These two platform-specific expectations are no longer necessary since we silenced the console output for these tests (see bugs 192974 and 194309).

* platform/ios/media/modern-media-controls/compact-media-controls/compact-media-controls-constructor-expected.txt: Removed.
* platform/ios/media/modern-media-controls/compact-media-controls/compact-media-controls-layout-expected.txt: Removed.

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

4 months agoAdd Chris Lord (clord@igalia.com) to the list of contributors
clord@igalia.com [Thu, 19 Mar 2020 09:02:28 +0000 (09:02 +0000)]
Add Chris Lord (clord@igalia.com) to the list of contributors
https://bugs.webkit.org/show_bug.cgi?id=209274

Unreviewed

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

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

4 months agoDelete accidentally committed file.
fred.wang@free.fr [Thu, 19 Mar 2020 08:57:35 +0000 (08:57 +0000)]
Delete accidentally committed file.
https://bugs.webkit.org/show_bug.cgi?id=209178

Unreviewed.

Patch by Frederic Wang <fwang@igalia.com> on 2020-03-19

* TestExpectations.orig: Removed.

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

4 months agoMake URL::path() return a StringView
youenn@apple.com [Thu, 19 Mar 2020 08:29:23 +0000 (08:29 +0000)]
Make URL::path() return a StringView
https://bugs.webkit.org/show_bug.cgi?id=209173

Reviewed by Alex Christensen.

Source/WebCore:

Update code according new path return type.

* Modules/plugins/YouTubePluginReplacement.cpp:
(WebCore::processAndCreateYouTubeURL):
(WebCore::YouTubePluginReplacement::youTubeURLFromAbsoluteURL):
* html/Autofill.cpp:
(WebCore::AutofillData::createFromHTMLFormControlElement):
* html/URLUtils.h:
(WebCore::URLUtils<T>::pathname const):
* loader/FormSubmission.cpp:
(WebCore::appendMailtoPostFormDataToURL):
* loader/appcache/ManifestParser.cpp:
(WebCore::manifestPath):
* page/Location.cpp:
(WebCore::Location::pathname const):
* page/UserContentURLPattern.cpp:
(WebCore::MatchTester::MatchTester):
(WebCore::UserContentURLPattern::matchesPath const):
* page/csp/ContentSecurityPolicySource.cpp:
(WebCore::ContentSecurityPolicySource::pathMatches const):
* platform/network/curl/CookieJarDB.cpp:
(WebCore::CookieJarDB::searchCookies):
(WebCore::CookieJarDB::deleteCookie):
* platform/network/curl/CookieUtil.cpp:
(WebCore::CookieUtil::defaultPathForURL):
* platform/network/curl/CurlRequest.cpp:
(WebCore::CurlRequest::invokeDidReceiveResponseForFile):
* platform/text/TextEncoding.cpp:
(WebCore::decodeURLEscapeSequences):
* platform/text/TextEncoding.h:
* workers/WorkerLocation.cpp:
(WebCore::WorkerLocation::pathname const):
* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::addRegistration):
* workers/service/ServiceWorkerJob.cpp:
(WebCore::ServiceWorkerJob::validateServiceWorkerResponse):
* workers/service/server/RegistrationDatabase.cpp:
(WebCore::RegistrationDatabase::doPushChanges):

Source/WebKit:

Update code according new path return type.

* NetworkProcess/soup/NetworkDataTaskSoup.cpp:
(WebKit::NetworkDataTaskSoup::didSendRequest):
* Shared/API/APIURL.h:
(API::URL::path const):
* UIProcess/API/glib/WebKitURISchemeRequest.cpp:
(webkitURISchemeRequestReadCallback):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::objectContentType):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):

Source/WebKitLegacy/mac:

* Misc/WebNSURLExtras.mm:
(-[NSString _webkit_stringByReplacingValidPercentEscapes]):

Source/WTF:

* wtf/URL.cpp:
(WTF::URL::path const):
* wtf/URL.h:
* wtf/text/StringView.h:
(WTF::startsWithLettersIgnoringASCIICase):
Add an overload for StringView.

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

4 months agoCorrectly set up context for Data Detectors
megan_gardner@apple.com [Thu, 19 Mar 2020 08:14:12 +0000 (08:14 +0000)]
Correctly set up context for Data Detectors
https://bugs.webkit.org/show_bug.cgi?id=209258
Source/WebCore/PAL:

Reviewed by Tim Horton.

* pal/spi/ios/DataDetectorsUISPI.h:

Source/WebKit:

<rdar://problem/60612327>

Reviewed by Tim Horton.

Stop passing in a nil context. This is OK now, but won't be in the near future.
Also, call -updateContext:withSourceRect: so that DataDetectors can populate the context appropriately.

* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant contextMenuInteraction:configurationForMenuAtLocation:]):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView dataDetectionContextForPositionInformation:]):

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

4 months agoRemove commit queue bubble from bot watchers dashboard
ryanhaddad@apple.com [Thu, 19 Mar 2020 07:04:17 +0000 (07:04 +0000)]
Remove commit queue bubble from bot watchers dashboard
https://bugs.webkit.org/show_bug.cgi?id=209271

Reviewed by Alexey Proskuryakov.

Remove commit queue bubble from bot watchers dashboard now that it has moved to the new EWS.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:
(BubbleQueueServer):

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

4 months agoThe value of [AVPlayerViewController isPictureInPicturePossible] is NO in the first...
peng.liu6@apple.com [Thu, 19 Mar 2020 05:23:14 +0000 (05:23 +0000)]
The value of [AVPlayerViewController isPictureInPicturePossible] is NO in the first attempt to enter PiP
https://bugs.webkit.org/show_bug.cgi?id=204979

Reviewed by Jer Noble.

A follow-up patch to fix build failures.
Source/WebCore:

This patch also removes a meaningless line in the dealloc of WebAVPlayerViewController.

* platform/ios/VideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerViewController initWithFullscreenInterface:]):
(-[WebAVPlayerViewController dealloc]):
(VideoFullscreenInterfaceAVKit::doEnterFullscreen):

Source/WebCore/PAL:

* pal/spi/cocoa/AVKitSPI.h:

Source/WTF:

* wtf/PlatformHave.h:

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

4 months agoUse helper function retainPtr(T*) instead of creating one.
andresg_22@apple.com [Thu, 19 Mar 2020 05:18:29 +0000 (05:18 +0000)]
Use helper function retainPtr(T*) instead of creating one.
https://bugs.webkit.org/show_bug.cgi?id=209269

Reviewed by Chris Fleizach.

This is acorrection to patch in bug: https://bugs.webkit.org/show_bug.cgi?id=209247.
Use the existing retainPtr helper funtion instead of creating a new helper.

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper attachmentView]):
(-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
(-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
(-[WebAccessibilityObjectWrapper associatedPluginParent]):
(-[WebAccessibilityObjectWrapper windowElement:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
(-[WebAccessibilityObjectWrapper textMarkerRangeAtTextMarker:forUnit:]):
(-[WebAccessibilityObjectWrapper lineTextMarkerRangeForTextMarker:forUnit:]):
(-[WebAccessibilityObjectWrapper textMarkerForTextMarker:atUnit:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
(retainWrapper): Deleted.

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

4 months ago[Multicolumn] RenderListItem::positionListMarker should not fail when the list marker...
zalan@apple.com [Thu, 19 Mar 2020 05:02:30 +0000 (05:02 +0000)]
[Multicolumn] RenderListItem::positionListMarker should not fail when the list marker is inside a spanner.
https://bugs.webkit.org/show_bug.cgi?id=209262
<rdar://problem/58447665>

Reviewed by Simon Fraser.

Source/WebCore:

When the list marker is in a column spanner and as a result it gets moved under the column flow, the
normal "let's find the list item by walking up on the ancestor chain" does not work anymore.
We need to check if this list marker is inside a spanner and climb up on the ancestor chain by
using the spanner placeholder position (see RenderListMarker::parentBox).
This patch also moves the marker's overflow computation from the list item to the marker.

Test: fast/multicol/list-item-marker-inside-column-spanner.html

* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::addOverflowFromChildren):
(WebCore::RenderListItem::positionListMarker): Deleted.
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::parentBox):
(WebCore::RenderListMarker::addOverflowFromListMarker):
(WebCore::RenderListMarker::layout):
* rendering/RenderListMarker.h:

LayoutTests:

* fast/multicol/list-item-marker-inside-column-spanner-expected.txt: Added.
* fast/multicol/list-item-marker-inside-column-spanner.html: Added.

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

4 months agoeventSender.monitorWheelEvents() is very fragile
simon.fraser@apple.com [Thu, 19 Mar 2020 04:06:37 +0000 (04:06 +0000)]
eventSender.monitorWheelEvents() is very fragile
https://bugs.webkit.org/show_bug.cgi?id=197819
<rdar://problem/51319456>

Reviewed by Tim Horton.

Source/WebCore:

Deflake tests using eventSender.monitorWheelEvents() by fixing several causes of flakiness,
adding back changes from r257844 that were reverted in r258558.

First, have EventSendingController keep track of whether it's seen then "end" event
for the scrolling and momentum phases, and pass this down to WheelEventTestMonitor, which
now waits until it sees these, which prevents premature triggering which was a common cause of
failure before.

Second, remove WheelEventTestMonitor's 1/60s timer and instead have WheelEventTestMonitor test
for completion in a callout from the end of Page::updateRendering(), which makes it test
and fire at a more consistent time.

Third, push WheelEventTestMonitor to the ScrollingTree, so that reasons for deferral
can be added on the scrolling thread. This fixes an issue where the RunLoop::main().dispatch()
used to send the "ScrollingThreadSyncNeeded" reason to the main thread would get delayed,
also resulting in a premature trigger.

* Modules/applepay/ApplePaySession.cpp: Unified sources!
* dom/WindowEventLoop.cpp: Unified sources!
* page/EventHandler.cpp:
(WebCore::EventHandler::handleWheelEvent):
* page/FrameView.cpp:
(WebCore::FrameView::scrollOffsetChangedViaPlatformWidgetImpl):
* page/Page.cpp:
(WebCore::Page::doAfterUpdateRendering):
(WebCore::Page::wheelEventTestMonitor const):
(WebCore::Page::clearWheelEventTestMonitor):
(WebCore::Page::isMonitoringWheelEvents const):
(WebCore::Page::ensureWheelEventTestMonitor):
* page/Page.h:
(WebCore::Page::wheelEventTestMonitor const): Deleted.
(WebCore::Page::clearWheelEventTestMonitor): Deleted.
(WebCore::Page::isMonitoringWheelEvents const): Deleted.
* page/WheelEventTestMonitor.cpp:
(WebCore::WheelEventTestMonitor::WheelEventTestMonitor):
(WebCore::WheelEventTestMonitor::clearAllTestDeferrals):
(WebCore::WheelEventTestMonitor::setTestCallbackAndStartMonitoring):
(WebCore::WheelEventTestMonitor::deferForReason):
(WebCore::WheelEventTestMonitor::removeDeferralForReason):
(WebCore::WheelEventTestMonitor::receivedWheelEvent):
(WebCore::WheelEventTestMonitor::scheduleCallbackCheck):
(WebCore::WheelEventTestMonitor::checkShouldFireCallbacks):
(WebCore::operator<<):
(WebCore::WheelEventTestMonitor::setTestCallbackAndStartNotificationTimer): Deleted.
(WebCore::WheelEventTestMonitor::triggerTestTimerFired): Deleted.
* page/WheelEventTestMonitor.h:
(WebCore::WheelEventTestMonitorCompletionDeferrer::WheelEventTestMonitorCompletionDeferrer):
(WebCore::WheelEventTestMonitorCompletionDeferrer::~WheelEventTestMonitorCompletionDeferrer):
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
(WebCore::AsyncScrollingCoordinator::deferWheelEventTestCompletionForReason const): Deleted.
(WebCore::AsyncScrollingCoordinator::removeWheelEventTestCompletionDeferralForReason const): Deleted.
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::startMonitoringWheelEvents):
(WebCore::ScrollingCoordinator::stopMonitoringWheelEvents):
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::handleWheelEvent):
* page/scrolling/ScrollingTree.h:
(WebCore::ScrollingTree::setWheelEventTestMonitor):
(WebCore::ScrollingTree::receivedWheelEvent):
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
(WebCore::ThreadedScrollingTree::deferWheelEventTestCompletionForReason): Deleted.
(WebCore::ThreadedScrollingTree::removeWheelEventTestCompletionDeferralForReason): Deleted.
* page/scrolling/ThreadedScrollingTree.h:
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::startMonitoringWheelEvents):
(WebCore::ScrollingCoordinatorMac::stopMonitoringWheelEvents):
* page/scrolling/mac/ScrollingTreeMac.h:
* page/scrolling/mac/ScrollingTreeMac.mm:
(ScrollingTreeMac::setWheelEventTestMonitor):
(ScrollingTreeMac::receivedWheelEvent):
(ScrollingTreeMac::deferWheelEventTestCompletionForReason):
(ScrollingTreeMac::removeWheelEventTestCompletionDeferralForReason):
* page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
(WebCore::ScrollingTreeScrollingNodeDelegateMac::deferWheelEventTestCompletionForReason const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::removeWheelEventTestCompletionDeferralForReason const):
* testing/js/WebCoreTestSupport.cpp:
(WebCoreTestSupport::setWheelEventMonitorTestCallbackAndStartMonitoring):
(WebCoreTestSupport::setTestCallbackAndStartNotificationTimer): Deleted.
* testing/js/WebCoreTestSupport.h:

Source/WebKit:

Deflake tests using eventSender.monitorWheelEvents() by fixing several causes of flakiness,
adding back changes from r257844 that were reverted in r258558.

First, have EventSendingController keep track of whether it's seen then "end" event
for the scrolling and momentum phases, and pass this down to WheelEventTestMonitor, which
now waits until it sees these, which prevents premature triggering which was a common cause of
failure before.

Second, remove WheelEventTestMonitor's 1/60s timer and instead have WheelEventTestMonitor test
for completion in a callout from the end of Page::updateRendering(), which makes it test
and fire at a more consistent time.

Third, push WheelEventTestMonitor to the ScrollingTree, so that reasons for deferral
can be added on the scrolling thread. This fixes an issue where the RunLoop::main().dispatch()
used to send the "ScrollingThreadSyncNeeded" reason to the main thread would get delayed,
also resulting in a premature trigger.

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageRegisterScrollOperationCompletionCallback):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:

Tools:

Deflake tests using eventSender.monitorWheelEvents() by fixing several causes of flakiness,
adding back changes from r257844 that were reverted in r258558.

First, have EventSendingController keep track of whether it's seen then "end" event
for the scrolling and momentum phases, and pass this down to WheelEventTestMonitor, which
now waits until it sees these, which prevents premature triggering which was a common cause of
failure before.

Second, remove WheelEventTestMonitor's 1/60s timer and instead have WheelEventTestMonitor test
for completion in a callout from the end of Page::updateRendering(), which makes it test
and fire at a more consistent time.

Third, push WheelEventTestMonitor to the ScrollingTree, so that reasons for deferral
can be added on the scrolling thread. This fixes an issue where the RunLoop::main().dispatch()
used to send the "ScrollingThreadSyncNeeded" reason to the main thread would get delayed,
also resulting in a premature trigger.

* DumpRenderTree/mac/EventSendingController.h:
* DumpRenderTree/mac/EventSendingController.mm:
(-[EventSendingController mouseScrollByX:andY:withWheel:andMomentumPhases:]):
(-[EventSendingController monitorWheelEvents]):
(-[EventSendingController callAfterScrollingCompletes:]):
* DumpRenderTree/win/EventSender.cpp:
(mouseScrollBy):
* WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
(WTR::EventSendingController::mouseScrollByWithWheelAndMomentumPhases):
(WTR::EventSendingController::monitorWheelEvents):
(WTR::EventSendingController::callAfterScrollingCompletes):
* WebKitTestRunner/InjectedBundle/EventSendingController.h:

LayoutTests:

* platform/mac-wk2/TestExpectations:
* platform/win/TestExpectations:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html: Need to call eventSender.monitorWheelEvents()
for each subtest.

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

4 months agoAdd HTTP3 as an experimental feature
commit-queue@webkit.org [Thu, 19 Mar 2020 03:23:18 +0000 (03:23 +0000)]
Add HTTP3 as an experimental feature
https://bugs.webkit.org/show_bug.cgi?id=209267
<rdar://problem/60245262> and <rdar://problem/60245168>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-03-18
Reviewed by Brent Fulgham.

Source/WebCore/PAL:

* pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

Manually verified this sets the CFNetwork SPI as expected.

* NetworkProcess/NetworkSessionCreationParameters.cpp:
(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):
* NetworkProcess/NetworkSessionCreationParameters.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
* Shared/WebPreferences.yaml:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::parameters):
(WebKit::WebsiteDataStore::http3Enabled):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::http3Enabled):
* UIProcess/WebsiteData/WebsiteDataStore.h:

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

4 months agoSharedMemory::Handle::decode shouldn't check rounded size
sbarati@apple.com [Thu, 19 Mar 2020 03:07:05 +0000 (03:07 +0000)]
SharedMemory::Handle::decode shouldn't check rounded size
https://bugs.webkit.org/show_bug.cgi?id=209263

Reviewed by Sam Weinig.

* Platform/cocoa/SharedMemoryCocoa.cpp:
(WebKit::SharedMemory::Handle::decode):
(WebKit::SharedMemory::map):

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

4 months agoAuthenticatorResponseData::decode should check bufferIsLargeEnoughToContain before...
Hironori.Fujii@sony.com [Thu, 19 Mar 2020 03:05:17 +0000 (03:05 +0000)]
AuthenticatorResponseData::decode should check bufferIsLargeEnoughToContain before allocating buffers
https://bugs.webkit.org/show_bug.cgi?id=209133

Reviewed by Darin Adler.

Check bufferIsLargeEnoughToContain with the decoded size before
allocating buffers.

Replaced ArrayBuffer::create with ArrayBuffer::tryCreate, and
added a null check.

* Modules/webauthn/AuthenticatorResponseData.h:
(WebCore::encodeArrayBuffer): Added.
(WebCore::decodeArrayBuffer): Added.
(WebCore::AuthenticatorResponseData::encode const):
(WebCore::AuthenticatorResponseData::decode):

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

4 months agoWebCoreArgumentCoders should check bufferIsLargeEnoughToContain before allocating...
Hironori.Fujii@sony.com [Thu, 19 Mar 2020 02:58:33 +0000 (02:58 +0000)]
WebCoreArgumentCoders should check bufferIsLargeEnoughToContain before allocating buffers
https://bugs.webkit.org/show_bug.cgi?id=209219

Reviewed by Darin Adler.

* Shared/WebCoreArgumentCoders.cpp:
(IPC::decodeSharedBuffer): Added checking of bufferIsLargeEnoughToContain.
(IPC::decodeTypesAndData): Don't allocate a buffer with the
decoded size. bufferIsLargeEnoughToContain can't be used in this
case because SharedBuffer is encoded as variable length data.
Instead, append items one-by-one.

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

4 months agosvg/custom/animate-initial-pause-unpause.html is flaky
commit-queue@webkit.org [Thu, 19 Mar 2020 02:27:56 +0000 (02:27 +0000)]
svg/custom/animate-initial-pause-unpause.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=127116
<rdar://problem/59430898>

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-03-18
Reviewed by Ryosuke Niwa.

Use the 'onend' event to perform post-animation actions instead of relying
on setTimeout() which can be flaky if the bots are really slow.

* platform/gtk/TestExpectations:
* platform/ios-wk2/TestExpectations:
* platform/mac/TestExpectations:
* svg/custom/animate-initial-pause-unpause.html:

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

4 months agoSeveral TextMarker attributes need to run on the main thread.
andresg_22@apple.com [Thu, 19 Mar 2020 02:09:44 +0000 (02:09 +0000)]
Several TextMarker attributes need to run on the main thread.
https://bugs.webkit.org/show_bug.cgi?id=209247

Reviewed by Chris Fleizach.

- Dispatch several TextMarker parameterized attributes to the main
thread.
- Added helper methods to return TextMarkers and TextMarkerRanges for
diffferent units of text such as word or sentence.
- Added a helper function, retainWrapper to make code a bit more
readable in lambda definitions.

* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::textMarkerForVisiblePosition):
(WebCore::textMarkerRangeFromVisiblePositions):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(retainWrapper):
(-[WebAccessibilityObjectWrapper attachmentView]):
(-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
(-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
(-[WebAccessibilityObjectWrapper associatedPluginParent]):
(-[WebAccessibilityObjectWrapper windowElement:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
(-[WebAccessibilityObjectWrapper textMarkerRangeAtTextMarker:forUnit:]):
(-[WebAccessibilityObjectWrapper lineTextMarkerRangeForTextMarker:forUnit:]):
(-[WebAccessibilityObjectWrapper textMarkerForTextMarker:atUnit:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):

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

4 months agoWebResourceLoadStatisticsStore::requestStorageAccessUnderOpener() should call its...
wilander@apple.com [Thu, 19 Mar 2020 01:26:16 +0000 (01:26 +0000)]
WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener() should call its ephemeral counterpart when appropriate
https://bugs.webkit.org/show_bug.cgi?id=209245
<rdar://problem/60511121>

Reviewed by Chris Dumez.

Source/WebKit:

This change makes sure that WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener()
calls WebResourceLoadStatisticsStore::requestStorageAccessUnderOpenerEphemeral() for ephemeral
sessions.

Tests: http/tests/storageAccess/deny-storage-access-under-opener-ephemeral.html
       http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-ephemeral.html
       http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture-ephemeral.html

* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener):

Tools:

These changes to the TestRunner makes sure that
- statisticsClearInMemoryAndPersistentStore()
- statisticsClearInMemoryAndPersistentStoreModifiedSinceHours()
... use their own StatisticsDidClearInMemoryAndPersistentStoreCallbackID
and adds the infrastructure for that.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::statisticsClearInMemoryAndPersistentStore):
(WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
(WTR::TestRunner::statisticsCallClearInMemoryAndPersistentStoreCallback):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::statisticsClearInMemoryAndPersistentStore):
(WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didClearStatisticsInMemoryAndPersistentStore):
* WebKitTestRunner/TestInvocation.h:

LayoutTests:

There are new tests added for the code change. The rest of these change are to better
align test cases with asynchronous TestRunner functions that landed in
https://trac.webkit.org/changeset/258566 and https://trac.webkit.org/changeset/258598.

While working on the new tests, I found a crasher which Chris Dumez fixed in
https://trac.webkit.org/changeset/258562, so there's a dependency on that change.

* http/tests/resourceLoadStatistics/cookies-with-and-without-user-interaction-database.html:
* http/tests/resourceLoadStatistics/cookies-with-and-without-user-interaction.html:
* http/tests/resourceLoadStatistics/count-third-party-script-import-in-worker-database.html:
* http/tests/resourceLoadStatistics/count-third-party-script-import-in-worker.html:
* http/tests/resourceLoadStatistics/count-third-party-script-loads-database.html:
* http/tests/resourceLoadStatistics/count-third-party-script-loads.html:
* http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction-database.php:
* http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction.php:
* http/tests/resourceLoadStatistics/dont-count-third-party-image-as-third-party-script-database.html:
* http/tests/resourceLoadStatistics/dont-count-third-party-image-as-third-party-script.html:
* http/tests/resourceLoadStatistics/grandfathering-database.html:
* http/tests/resourceLoadStatistics/grandfathering.html:
* http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction-database.php:
* http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction.php:
* http/tests/storageAccess/deny-storage-access-under-opener-ephemeral-expected.txt: Added.
* http/tests/storageAccess/deny-storage-access-under-opener-ephemeral.html: Added.
* http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-ephemeral-expected.txt: Added.
* http/tests/storageAccess/deny-storage-access-under-opener-if-auto-dismiss-ephemeral.html: Added.
* http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture-ephemeral-expected.txt: Added.
* http/tests/storageAccess/grant-storage-access-under-opener-at-popup-user-gesture-ephemeral.html: Added.

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

4 months agoAvoid calling 'notifyThisWebProcessPoolWasCreated' inside the constructor
bfulgham@apple.com [Thu, 19 Mar 2020 00:41:36 +0000 (00:41 +0000)]
Avoid calling 'notifyThisWebProcessPoolWasCreated' inside the constructor
https://bugs.webkit.org/show_bug.cgi?id=209254
<rdar://problem/60564526>

Reviewed by Alex Christensen and Chris Dumez.

Enqueue calls to 'notifyThisWebProcessPoolWasCreated' so they are not invoked until
after the process pool is finished with its constructor.

Behavior covered by existing tests.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool):

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

4 months agoUnreviewed WinCairo build fix following r258665.
ross.kirsling@sony.com [Thu, 19 Mar 2020 00:04:50 +0000 (00:04 +0000)]
Unreviewed WinCairo build fix following r258665.

* NetworkProcess/curl/NetworkProcessCurl.cpp:
(WebKit::NetworkProcess::clearCacheForAllOrigins): Deleted.

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

4 months agosvg/as-object/object-box-sizing-no-width-height.html is a flaky failure
ryanhaddad@apple.com [Wed, 18 Mar 2020 23:45:00 +0000 (23:45 +0000)]
svg/as-object/object-box-sizing-no-width-height.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=209257

Unreviewed test gardening.

* platform/ios/TestExpectations: Mark test as flaky.
* platform/mac/TestExpectations: Ditto.

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

4 months agoUnreviewed test gardening.
ryanhaddad@apple.com [Wed, 18 Mar 2020 23:22:22 +0000 (23:22 +0000)]
Unreviewed test gardening.

* platform/ios/TestExpectations: Skip the http/wpt/notifications directory on iOS.

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

4 months agoPass isNavigatingToAppBoundDomain for speculative loads, preconnect tasks and downloads
katherine_cheney@apple.com [Wed, 18 Mar 2020 23:09:54 +0000 (23:09 +0000)]
Pass isNavigatingToAppBoundDomain for speculative loads, preconnect tasks and downloads
https://bugs.webkit.org/show_bug.cgi?id=209246
<rdar://problem/60552712>

Reviewed by Alex Christensen.

Pass isNavigatingToAppBoundDomain in 4 new places:

1) Speculative Loads
2) Preconnect Tasks
3) Downloads
4) CORS preflight checker

These loads should happen in an app-bound session if isNavigatingToAppBoundDomain
is true.

* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::startDownload):
* NetworkProcess/Downloads/DownloadManager.h:
(WebKit::DownloadManager::startDownload):
* NetworkProcess/Downloads/PendingDownload.cpp:
(WebKit::PendingDownload::PendingDownload):
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::startDownload):
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
* NetworkProcess/NetworkConnectionToWebProcess.h:
(WebKit::NetworkConnectionToWebProcess::startDownload):
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::preconnectTo):
(WebKit::NetworkProcess::downloadRequest):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::start):
(WebKit::NetworkResourceLoader::retrieveCacheEntry):
(WebKit::NetworkResourceLoader::convertToDownload):
* NetworkProcess/PreconnectTask.cpp:
* NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp:
(WebKit::ServiceWorkerSoftUpdateLoader::ServiceWorkerSoftUpdateLoader):
The service worker script should be considered an app-bound load.

* NetworkProcess/cache/AsyncRevalidation.cpp:
(WebKit::NetworkCache::AsyncRevalidation::AsyncRevalidation):
* NetworkProcess/cache/AsyncRevalidation.h:
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::startAsyncRevalidationIfNeeded):
(WebKit::NetworkCache::Cache::retrieve):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
(WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
(WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
(WebKit::NetworkCache::SpeculativeLoadManager::preconnectForSubresource):
(WebKit::NetworkCache::SpeculativeLoadManager::revalidateSubresource):
(WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
(WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation):
* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::sessionWrapperForTask):
* Shared/NavigatingToAppBoundDomain.h:
Separates NavigatingToAppBoundDomain to its own file to allow for
sending over IPC.

* Shared/PolicyDecision.h:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::preconnectTo):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setIsNavigatingToAppBoundDomain):
(WebKit::WebPageProxy::preconnectTo):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::isNavigatingToAppBoundDomain const):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::download):
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::preconnectTo):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::startDownload):
(WebKit::WebFrame::convertMainResourceLoadToDownload):

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

4 months ago[MultiColumn] Ignore spanner boxes inside <legend>
zalan@apple.com [Wed, 18 Mar 2020 22:48:44 +0000 (22:48 +0000)]
[MultiColumn] Ignore spanner boxes inside <legend>
https://bugs.webkit.org/show_bug.cgi?id=209248
<rdar://problem/51857865>

Reviewed by Simon Fraser.

Source/WebCore:

<legend> boxes don't participate in the multicolumn flow, they are simply ignored.
This patch ensures that we don't include their descendants in the spanner construction.
<column>some<legend><div spanner></div></legend>content</column> <- the "spanner" div won't span the column content.

Test: fast/multicol/spanner-inside-legend-crash.html

* rendering/updating/RenderTreeBuilderMultiColumn.cpp:
(WebCore::isValidColumnSpanner):

LayoutTests:

* fast/multicol/spanner-inside-legend-crash-expected.txt: Added.
* fast/multicol/spanner-inside-legend-crash.html: Added.

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

4 months agoRemove unused IPC message NetworkProcess::ClearCacheForAllOrigins
sihui_liu@apple.com [Wed, 18 Mar 2020 22:30:11 +0000 (22:30 +0000)]
Remove unused IPC message NetworkProcess::ClearCacheForAllOrigins
https://bugs.webkit.org/show_bug.cgi?id=209152
<rdar://problem/59681717>

Reviewed by Chris Dumez.

* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/ios/NetworkProcessIOS.mm:
(WebKit::NetworkProcess::clearCacheForAllOrigins): Deleted.
* NetworkProcess/mac/NetworkProcessMac.mm:
(WebKit::NetworkProcess::clearCacheForAllOrigins): Deleted.
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::clearCacheForAllOrigins): Deleted.
* Shared/ResourceCachesToClear.h: Removed.
* UIProcess/API/C/WKAPICast.h:
(WebKit::toResourceCachesToClear): Deleted.
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::clearResourceCaches): Deleted.
* WebProcess/WebProcess.h:

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

4 months agoAdd a way to mark a rejected promise as handled
ysuzuki@apple.com [Wed, 18 Mar 2020 22:27:22 +0000 (22:27 +0000)]
Add a way to mark a rejected promise as handled
https://bugs.webkit.org/show_bug.cgi?id=209241

Reviewed by Michael Saboff.

JSTests:

* stress/reject-as-handled.js: Added.
(shouldBe):
(set new):

Source/JavaScriptCore:

Some of WebCore promise implementations (WebAnimation etc.) want to reject promise
as handled state to suppress UnhandledPromiseRejection tracking. For example, a
lot of WebCore implementations expose Promise DOM attributes which will be rejected
at some conditions. But we do not want to force users setting a handler for each such an
attribute.

This patch adds `JSPromise::rejectAsHandled` C++ function. This simply sets isHandledFlag
before executing `JSPromise::reject` if we are not calling a reject function yet.

* runtime/JSPromise.cpp:
(JSC::JSPromise::rejectAsHandled):
* runtime/JSPromise.h:
* tools/JSDollarVM.cpp:
(JSC::functionRejectPromiseAsHandled):
(JSC::JSDollarVM::finishCreation):

Source/WebCore:

This adds an interface using JSPromise::rejectAsHandled to DOMPromise classes.

* bindings/js/DOMPromiseProxy.h:
(WebCore::DOMPromiseProxy<IDLType>::reject):
(WebCore::DOMPromiseProxy<IDLVoid>::reject):
(WebCore::DOMPromiseProxyWithResolveCallback<IDLType>::reject):
* bindings/js/JSDOMPromiseDeferred.cpp:
(WebCore::DeferredPromise::callFunction):
(WebCore::DeferredPromise::reject):
* bindings/js/JSDOMPromiseDeferred.h:
(WebCore::DeferredPromise::reject):
(WebCore::DeferredPromise::rejectWithCallback):
(WebCore::DOMPromiseDeferredBase::reject):
(WebCore::DOMPromiseDeferredBase::rejectType):

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

4 months agoWebPage should own a Ref<WebFrame>
youenn@apple.com [Wed, 18 Mar 2020 20:30:02 +0000 (20:30 +0000)]
WebPage should own a Ref<WebFrame>
https://bugs.webkit.org/show_bug.cgi?id=209235

Reviewed by Geoffrey Garen.

Source/WebCore:

* loader/FrameLoaderStateMachine.h:
Export committedFirstRealDocumentLoad/

Source/WebKit:

Update code since m_mainFrame is now a Ref and no longer a RefPtr.

Update WebPage constructor to set its m_mainFrame very early.
We update WebPage::didCompletePageTransition to compute whether this is initialization or not using the frame state machine state
instead of m_mainFrame being null.

* WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction):
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithOrdinal):
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithNodeHandle):
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithName):
(WebKit::WebAutomationSessionProxy::resolveParentFrame):
(WebKit::WebAutomationSessionProxy::focusFrame):
(WebKit::WebAutomationSessionProxy::computeElementLayout):
(WebKit::WebAutomationSessionProxy::selectOptionElement):
(WebKit::WebAutomationSessionProxy::setFilesForInputFileUpload):
(WebKit::WebAutomationSessionProxy::takeScreenshot):
(WebKit::WebAutomationSessionProxy::snapshotRectForScreenshot):
(WebKit::WebAutomationSessionProxy::getCookiesForFrame):
(WebKit::WebAutomationSessionProxy::deleteCookie):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageGetMainFrame):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::findLargestFrameInFrameSet):
(WebKit::WebChromeClient::closeWindowSoon):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidReachLayoutMilestone):
(WebKit::WebFrameLoaderClient::dispatchDidLayout):
(WebKit::WebFrameLoaderClient::restoreViewState):
* WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
(WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
(WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::goToItem):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::m_processDisplayName):
(WebKit::WebPage::close):
(WebKit::WebPage::suspendForProcessSwap):
(WebKit::WebPage::loadDataInFrame):
(WebKit::WebPage::loadRequest):
(WebKit::WebPage::reload):
(WebKit::WebPage::didCompletePageTransition):
(WebKit::WebPage::runJavaScriptInFrameInScriptWorld):
(WebKit::WebPage::setIsSuspended):
(WebKit::WebPage::didLoadFromRegistrableDomain):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::mainWebFrame const):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::cancelPotentialTap):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::origin):

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

4 months agoSource/WebCore:
commit-queue@webkit.org [Wed, 18 Mar 2020 20:23:39 +0000 (20:23 +0000)]
Source/WebCore:
Fix ReplaceSelectionCommand::InsertedNodes::willRemoveNodePreservingChildren crash
https://bugs.webkit.org/show_bug.cgi?id=208312

Patch by Eugene But <eugenebut@chromium.org> on 2020-03-18
Reviewed by Ryosuke Niwa

ReplaceSelectionCommand::InsertedNodes::willRemoveNodePreservingChildren
was crashing on dereferencing m_firstNodeInserted pointer. Before the crash
ReplaceSelectionCommand::InsertedNodes object received the following calls:

respondToNodeInsertion() with node A, which set m_firstNodeInserted and m_lastNodeInserted to A
willRemoveNode() with node B, which left m_firstNodeInserted and m_lastNodeInserted unchanged (A)
(node A was destroyed setting m_firstNodeInserted and m_lastNodeInserted to null)
respondToNodeInsertion() with node C, which set m_firstNodeInserted and m_lastNodeInserted to C
willRemoveNodePreservingChildren() with node C, which set m_firstNodeInserted to null and crashed

This patch checks m_firstNodeInserted before dereferencing and sets m_lastNodeInserted to null if
m_firstNodeInserted became null. It seems like having non-null value for m_lastNodeInserted would
be an invalid state.

Test: editing/pasteboard/insert-apple-style-span-after-timeout.html

* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::InsertedNodes::willRemoveNodePreservingChildren):

LayoutTests:
Test for ReplaceSelectionCommand::InsertedNodes::willRemoveNodePreservingChildren crash fix
https://bugs.webkit.org/show_bug.cgi?id=208312

Patch by Eugene But <eugenebut@chromium.org> on 2020-03-18
Reviewed by Ryosuke Niwa

This test insers empty Apple-style-span after timeout to a non-empty document.

* editing/pasteboard/insert-apple-style-span-after-timeout.html:

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

4 months ago[CSS Writing Modes] Import css/css-writing-modes from WPT
mmaxfield@apple.com [Wed, 18 Mar 2020 19:52:37 +0000 (19:52 +0000)]
[CSS Writing Modes] Import css/css-writing-modes from WPT
https://bugs.webkit.org/show_bug.cgi?id=209088

Patch by Frank Yang <guowei_yang@apple.com> on 2020-03-18
Reviewed by Myles C. Maxfield.

LayoutTests/imported/w3c:

Imported new tests in css-writing-mode from web platform tests. Those
tests are important for testing CSS property behaviors like "text-orientation"

* resources/import-expectations.json:
* resources/resource-files.json:
* web-platform-tests/css/css-writing-modes/*: Added.

LayoutTests:

Turns out that the imported tests from w3c in LayoutTests doesn't included
css-writing-modes, which is a set of tests that checks the behavior of
css properties like "text-orientation". This patch is for importing those
tests in LayoutTests/import/w3c/css.

* TestExpectations:

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

4 months agoCrossOriginPreflightResultCacheItem::allows methods should not use out parameters
youenn@apple.com [Wed, 18 Mar 2020 19:40:23 +0000 (19:40 +0000)]
CrossOriginPreflightResultCacheItem::allows methods should not use out parameters
https://bugs.webkit.org/show_bug.cgi?id=209224

Reviewed by Alex Christensen.

Instead of having an out parameter for the error description, either return whether there is an error or not.
Covered by existing tests.

* loader/CrossOriginPreflightResultCache.cpp:
(WebCore::CrossOriginPreflightResultCacheItem::validateMethodAndHeaders const):
(WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginMethod const):
(WebCore::CrossOriginPreflightResultCacheItem::validateCrossOriginHeaders const):
(WebCore::CrossOriginPreflightResultCacheItem::allowsRequest const):
(WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders const): Deleted.
* loader/CrossOriginPreflightResultCache.h:

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

4 months agoREGRESSION (r257214): Targeted preview animates to the wrong place when dropping...
wenson_hsieh@apple.com [Wed, 18 Mar 2020 19:31:20 +0000 (19:31 +0000)]
REGRESSION (r257214): Targeted preview animates to the wrong place when dropping in editable content
https://bugs.webkit.org/show_bug.cgi?id=209218
<rdar://problem/60560831>

Reviewed by Tim Horton.

Source/WebKit:

In r257214, we split out the context menu hint preview container view into two views: one for drag and drop, and
another for the context menu hint. The container view used for both drag and drop previews was removed under
-cleanUpDragSourceSessionState, which is invoked after both drag and drop sessions have ended; however, in the
case of a drop in editable content where the drop preview is delayed, the drop animation can end up finishing
after -cleanUpDragSourceSessionState is invoked. This means we end up prematurely unparenting the preview
container, which results in a broken drop animation.

To fix this, split the drag and drop container views further, into separate container views for dragging and for
dropping. The drag preview container will continue to be removed under -cleanUpDragSourceSessionState, and the
drop preview container will now be removed under the delegate call to -dropInteraction:concludeDrop:, which is
invoked by UIKit after all drop previews are finished animating.

Covered by adding additional test assertions while running existing API tests (see Tools/ChangeLog for more
details).

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _createPreviewContainerWithLayerName:]):

Pull out common logic for creating and setting up a preview container view into a helper method. This is used by
the three methods below, which ensure container views for each of the types of previews we create when showing
the context menu, dragging an element, and dropping.

(-[WKContentView containerForDropPreviews]):
(-[WKContentView containerForDragPreviews]):
(-[WKContentView containerForContextMenuHintPreviews]):

Add a third preview container view for drop previews, and factor duplicated code in these three methods into a
common helper (see above).

(-[WKContentView _hideTargetedPreviewContainerViews]):
(-[WKContentView _deliverDelayedDropPreviewIfPossible:]):

Instead of using the container for drag previews, use the container for drop previews.

(-[WKContentView dropInteraction:concludeDrop:]):

Remove the drop preview container after the drop has concluded (i.e. all animations are complete).

Tools:

Augment the drag and drop test harness to verify that for all targeted previews, if they have container views,
those views must be parented (i.e. they must be connected to a UIWindow).

* TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
(-[DragAndDropSimulator _concludeDropAndPerformOperationIfNecessary]):
(-[DragAndDropSimulator _expectNoDropPreviewsWithUnparentedContainerViews]):
(-[DragAndDropSimulator _invokeDropAnimationCompletionBlocksAndConcludeDrop]):

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

4 months agoREGRESSION(r254389): Cordova throws an exception because it expects a hyphen inside...
mmaxfield@apple.com [Wed, 18 Mar 2020 19:28:39 +0000 (19:28 +0000)]
REGRESSION(r254389): Cordova throws an exception because it expects a hyphen inside navigator.locale
https://bugs.webkit.org/show_bug.cgi?id=208969
<rdar://problem/59845517>

Reviewed by Darin Adler.

We want to thwart fingerprinting by minimizing the list of locales, but we also don't want to break existing apps.
We can achieve both by a linked-on-or-after check.

* wtf/cocoa/LanguageCocoa.mm:
(WTF::canMinimizeLanguages):

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

4 months ago[macOS WK1] Layout Test media/modern-media-controls/compact-media-controls/compact...
graouts@webkit.org [Wed, 18 Mar 2020 19:24:22 +0000 (19:24 +0000)]
[macOS WK1] Layout Test media/modern-media-controls/compact-media-controls/compact-media-controls-constructor.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=192974
<rdar://problem/59063969>

Reviewed by Dean Jackson.

Since the console output is not guaranteed to appear in a deterministic order, we supress it.

* media/modern-media-controls/compact-media-controls/compact-media-controls-constructor-expected.txt:
* media/modern-media-controls/compact-media-controls/compact-media-controls-constructor.html:
* platform/mac-wk1/TestExpectations:

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

4 months ago[ Mac WK1 ] Layout Test media/modern-media-controls/compact-media-controls/compact...
graouts@webkit.org [Wed, 18 Mar 2020 19:22:30 +0000 (19:22 +0000)]
[ Mac WK1 ] Layout Test media/modern-media-controls/compact-media-controls/compact-media-controls-layout.html is a flaky text diff failure
https://bugs.webkit.org/show_bug.cgi?id=194309
<rdar://problem/48012947>

Reviewed by Dean Jackson.

Since the console output is not guaranteed to appear in a deterministic order, we supress it.

* media/modern-media-controls/compact-media-controls/compact-media-controls-layout-expected.txt:
* media/modern-media-controls/compact-media-controls/compact-media-controls-layout.html:
* platform/mac-wk1/TestExpectations:

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

4 months agoThe value of [AVPlayerViewController isPictureInPicturePossible] is NO in the first...
peng.liu6@apple.com [Wed, 18 Mar 2020 19:18:37 +0000 (19:18 +0000)]
The value of [AVPlayerViewController isPictureInPicturePossible] is NO in the first attempt to enter PiP
https://bugs.webkit.org/show_bug.cgi?id=204979

Reviewed by Jer Noble.

Source/WebCore:

Since [AVPlayerViewControl isPictureInPicturePossible] can be NO initially, we may fail to enter
the Picture-in-Picture mode.

This patch implements the mechanism to observe [AVPlayerViewControl isPictureInPicturePossible] after
a user requests to enter the Picture-in-Picture mode, and call [AVPlayerViewController startPictureInPicture]
when [AVPlayerViewController isPictureInPicturePossible] changes to YES.
A timer is added to monitor the status. If [AVPlayerViewController isPictureInPicturePossible] does not
change to YES in 0.5 second, we will give up the attempt.

* platform/ios/VideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerViewController initWithFullscreenInterface:]):
(-[WebAVPlayerViewController dealloc]):
(-[WebAVPlayerViewController MY_NO_RETURN]):
(VideoFullscreenInterfaceAVKit::doEnterFullscreen):

Source/WebCore/PAL:

import AVKit/AVObservationController.h

* pal/spi/cocoa/AVKitSPI.h:

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

4 months agoUnreviewed, fix iOS build with recent SDKs.
cdumez@apple.com [Wed, 18 Mar 2020 19:09:15 +0000 (19:09 +0000)]
Unreviewed, fix iOS build with recent SDKs.

* Platform/cocoa/PaymentAuthorizationViewController.mm:

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

4 months agoRemove unneeded and incorrect respondsToSelector checks.
megan_gardner@apple.com [Wed, 18 Mar 2020 18:15:41 +0000 (18:15 +0000)]
Remove unneeded and incorrect respondsToSelector checks.
https://bugs.webkit.org/show_bug.cgi?id=209208
<rdar://problem/60512470>

Reviewed by Tim Horton.

No behaviour change, no tests needed.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView continueContextMenuInteractionWithDataDetectors:]):

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

4 months ago[ews] commit-queue should comment on bug in case of test failures
aakash_jain@apple.com [Wed, 18 Mar 2020 18:15:34 +0000 (18:15 +0000)]
[ews] commit-queue should comment on bug in case of test failures
https://bugs.webkit.org/show_bug.cgi?id=209226

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/steps.py:
(AnalyzeLayoutTestsResults.report_failure): Comment on bug and set cq- in case of test failure on commit-queue.
(BuildLogLineObserver.outLineReceived): Drive-by fix to use single quotes instead of double quotes.
(SetBuildSummary): Ditto.
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-test.

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

4 months agoframe/iframe scrolling attribute does to recognize value "noscroll" or "off"
commit-queue@webkit.org [Wed, 18 Mar 2020 18:12:38 +0000 (18:12 +0000)]
frame/iframe scrolling attribute does to recognize value "noscroll" or "off"
https://bugs.webkit.org/show_bug.cgi?id=208570

Patch by Frederic Wang <fwang@igalia.com> on 2020-03-18
Reviewed by Rob Buis.

Source/WebCore:

Tests: imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/the-page/iframe-scrolling-attribute.html
       imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/the-page/iframe-scrolling-attribute-values.html

* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::scrollingMode const): Treat "noscroll" and "off" the same as "no".

LayoutTests:

* TestExpectations: Remove expectation failures.

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

4 months ago[ Mac ] imported/w3c/web-platform-tests/web-animations/timing-model/timelines/update...
lawrence.j@apple.com [Wed, 18 Mar 2020 18:09:54 +0000 (18:09 +0000)]
[ Mac ] imported/w3c/web-platform-tests/web-animations/timing-model/timelines/update-and-send-events-replacement.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=209239

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

4 months ago[ Mac wk2 ] http/wpt/beacon/beacon-quota.html is flaky failing
cdumez@apple.com [Wed, 18 Mar 2020 17:57:45 +0000 (17:57 +0000)]
[ Mac wk2 ] http/wpt/beacon/beacon-quota.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207894
<rdar://problem/59551688>

Reviewed by Geoffrey Garen.

Source/WebCore:

Add internals API exposing the number of inflight beacon loads for a given navigator object
so that the test can rely on it.

* Modules/beacon/NavigatorBeacon.h:
* testing/Internals.cpp:
(WebCore::Internals::inflightBeaconsCount const):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

Update test to address flakiness and unskip it.

* http/wpt/beacon/beacon-quota-expected.txt:
* http/wpt/beacon/beacon-quota.html:
* platform/mac-wk2/TestExpectations:

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