WebKit-https.git
7 months agoREGRESSION: (r255821) [ iOS Mac wk1 ] imported/w3c/web-platform-tests/web-animations...
graouts@webkit.org [Wed, 11 Mar 2020 20:06:22 +0000 (20:06 +0000)]
REGRESSION: (r255821) [ iOS Mac wk1 ] imported/w3c/web-platform-tests/web-animations/timing-model/animations/finishing-an-animation.html
https://bugs.webkit.org/show_bug.cgi?id=207278
<rdar://problem/59195524>

Patch by Antoine Quint <graouts@webkit.org> on 2020-03-11
Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

We silence the unhandled Promise warning so that the test output is both cleaner and more stable.

* web-platform-tests/web-animations/timing-model/animations/finishing-an-animation.html:

LayoutTests:

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

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

7 months ago[Mac wk2 Release] imported/w3c/web-platform-tests/web-animations/timing-model/animati...
graouts@webkit.org [Wed, 11 Mar 2020 20:04:18 +0000 (20:04 +0000)]
[Mac wk2 Release] imported/w3c/web-platform-tests/web-animations/timing-model/animations/updating-the-finished-state.html flaky fail
https://bugs.webkit.org/show_bug.cgi?id=206746
<rdar://problem/58867580>

Patch by Antoine Quint <graouts@webkit.org> on 2020-03-11
Reviewed by Dean Jackson.

Source/WebCore:

Because we could end up in situation where localTime was very marginally smaller than endTime inside of WebAnimation::play(), we would end up
with an unresolved hold time and we would return before calling WebAnimation::timingDidChange() and thus scheduling an animation update from
the timeline because we'd assume it was paused. As a result, the animation would never end and the test would wait for a "finish" event which
would never come.

We now account for an epsilon value when comparing times to account for such situations.

* animation/WebAnimation.cpp:
(WebCore::WebAnimation::play):

LayoutTests:

* platform/mac-wk2/TestExpectations:

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

7 months agoFix the macCatalyst build after r258250
timothy_horton@apple.com [Wed, 11 Mar 2020 19:50:41 +0000 (19:50 +0000)]
Fix the macCatalyst build after r258250

* WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.mm:

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

7 months agoAssertion hit under WebPageProxy::suspendCurrentPageIfPossible() when bypassing certi...
cdumez@apple.com [Wed, 11 Mar 2020 19:34:01 +0000 (19:34 +0000)]
Assertion hit under WebPageProxy::suspendCurrentPageIfPossible() when bypassing certificate warning page
https://bugs.webkit.org/show_bug.cgi?id=208927
<rdar://problem/55448331>

Reviewed by Alex Christensen.

Source/WebKit:

When suspending a previous page after a process-swap, we refuse to do the suspension if the currently
committed URL does not match the url of the current back/forward list item. This makes sense since we
will store the suspended page on the back/forward list item and restore that back when navigating back
to that item. I had a debug assertion in there to help me figure out how this could happen. It turns
out that calling loadAlternateHTML on the view will replace the content of the view with the provided
HTML string, update the committed URL but not create a new back/forward list item. This is so that
if you reload or go/back to this back/forward list item, we will attempt to load the original URL
again. This would however trip my assertion. I am therefore removing my debug assertion and adding API
test coverage.

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

Tools:

Add API test coverage.

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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

7 months ago[GTK] Switch EWS api-gtk bot from buildAndTest to testOnly
dpino@igalia.com [Wed, 11 Mar 2020 18:34:18 +0000 (18:34 +0000)]
[GTK] Switch EWS api-gtk bot from buildAndTest to testOnly
https://bugs.webkit.org/show_bug.cgi?id=208860

Reviewed by Carlos Alberto Lopez Perez.

* BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
(StatusBubble): Added 'api-gtk'.
* BuildSlaveSupport/ews-build/config.json:
* BuildSlaveSupport/ews-build/factories.py:
(BuildFactory.__init__): Call InstallGTKDependencies() if platform is
GTK.
(TestFactory.__init__): Call InstallGTKDependencies() if platform is
GTK.
(GTKBuildFactory):
(GTKBuildFactory.__init__): Deleted.
(GTKBuildAndTestFactory): Deleted.
(GTKBuildAndTestFactory.__init__): Deleted.
(GTKAPIBuildAndTestFactory): Deleted.
* BuildSlaveSupport/ews-build/loadConfig.py:

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

7 months agoREGRESSION: (r257915?) [ Mac ] accessibility/accessibility-node-memory-management...
lawrence.j@apple.com [Wed, 11 Mar 2020 18:01:24 +0000 (18:01 +0000)]
REGRESSION: (r257915?) [ Mac ] accessibility/accessibility-node-memory-management.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=208930

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

7 months agoIntroduce ResourceLoadStatisticsParameters and move members from NetworkSessionCreati...
commit-queue@webkit.org [Wed, 11 Mar 2020 17:42:39 +0000 (17:42 +0000)]
Introduce ResourceLoadStatisticsParameters and move members from NetworkSessionCreationParameters
https://bugs.webkit.org/show_bug.cgi?id=208895

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

No change in behavior yet, but this will help us organize things better.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
* NetworkProcess/NetworkSession.cpp:
(WebKit::NetworkSession::NetworkSession):
* NetworkProcess/NetworkSessionCreationParameters.cpp:
(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):
* NetworkProcess/NetworkSessionCreationParameters.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
* Shared/ResourceLoadStatisticsParameters.h: Added.
(WebKit::ResourceLoadStatisticsParameters::encode const):
(WebKit::ResourceLoadStatisticsParameters::decode):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::parameters):
* WebKit.xcodeproj/project.pbxproj:

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

7 months agoDefer async scripts until DOMContentLoaded or first paint, whichever comes first
cdumez@apple.com [Wed, 11 Mar 2020 17:30:48 +0000 (17:30 +0000)]
Defer async scripts until DOMContentLoaded or first paint, whichever comes first
https://bugs.webkit.org/show_bug.cgi?id=208896

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebbaseline WPT test due to script execution timing change.

* web-platform-tests/html/semantics/scripting-1/the-script-element/execution-timing/085-expected.txt:

Source/WebCore:

Defer async scripts until DOMContentLoaded or first paint, whichever comes first. In
Bug 207698, we deferred them until DOMContentLoaded, as a first-paint optimization.
However, this seems overly aggressive on pages like wikipedia and it is sufficient
to defer those scripts until first-paint to get the performance win.

* dom/Document.cpp:
(WebCore::Document::shouldDeferAsynchronousScriptsUntilParsingFinishes const):
* page/Settings.yaml:

Source/WebKit:

Defer async scripts until DOMContentLoaded or first paint, whichever comes first. In
Bug 207698, we deferred them until DOMContentLoaded, as a first-paint optimization.
However, this seems overly aggressive on pages like wikipedia and it is sufficient
to defer those scripts until first-paint to get the performance win.

* Shared/WebPreferences.yaml:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setupPageConfiguration:]):

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

7 months agoConsolidate detachment of document timeline into Document::commonTeardown.
commit-queue@webkit.org [Wed, 11 Mar 2020 17:05:28 +0000 (17:05 +0000)]
Consolidate detachment of document timeline into Document::commonTeardown.
https://bugs.webkit.org/show_bug.cgi?id=208786
<rdar://problem/59936716>

Patch by Jack Lee <shihchieh_lee@apple.com> on 2020-03-11
Reviewed by Ryosuke Niwa.

Move detachment of DocumentTimeline to Document::commonTeardown().

No new tests. Covered by existing document tests.

* dom/Document.cpp:
(WebCore::Document::removedLastRef):
(WebCore::Document::commonTeardown):
(WebCore::Document::prepareForDestruction):

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

7 months agoUnreviewed, reverting r258263.
commit-queue@webkit.org [Wed, 11 Mar 2020 16:50:10 +0000 (16:50 +0000)]
Unreviewed, reverting r258263.
https://bugs.webkit.org/show_bug.cgi?id=208922

it is breaking internal builds (Requested by youenn on
#webkit).

Reverted changeset:

"Move AudioSession interruption listener code to AudioSession"
https://bugs.webkit.org/show_bug.cgi?id=208714
https://trac.webkit.org/changeset/258263

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

7 months agoMove AudioSession interruption listener code to AudioSession
youenn@apple.com [Wed, 11 Mar 2020 15:46:53 +0000 (15:46 +0000)]
Move AudioSession interruption listener code to AudioSession
https://bugs.webkit.org/show_bug.cgi?id=208714

Reviewed by Jer Noble.

Source/WebCore:

Move AudioSession interruption detection code from MediaSessionManagerIOS helper to AudioSessionIOS.
Add interruption observer capabilities to AudioSession and make MediaSessionManagerIOS an observer of it.
Manually tested.

* platform/audio/AudioSession.cpp:
(WebCore::AudioSession::addInterruptionObserver):
(WebCore::AudioSession::removeInterruptionObserver):
(WebCore::AudioSession::beginInterruption):
(WebCore::AudioSession::endInterruption):
* platform/audio/AudioSession.h:
* platform/audio/ios/AudioSessionIOS.mm:
(-[WebInterruptionObserverHelper initWithCallback:]):
(-[WebInterruptionObserverHelper dealloc]):
(-[WebInterruptionObserverHelper clearCallback]):
(-[WebInterruptionObserverHelper interruption:]):
(WebCore::AudioSessionPrivate::AudioSessionPrivate):
(WebCore::AudioSessionPrivate::~AudioSessionPrivate):
(WebCore::AudioSession::addInterruptionObserver):
(WebCore::AudioSession::removeInterruptionObserver):
(WebCore::AudioSession::beginInterruption):
(WebCore::AudioSession::endInterruption):
* platform/audio/ios/MediaSessionHelperIOS.h:
* platform/audio/ios/MediaSessionHelperIOS.mm:
(-[WebMediaSessionHelper initWithCallback:]):
* platform/audio/ios/MediaSessionManagerIOS.h:
* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::MediaSessionManageriOS):
(WebCore::MediaSessionManageriOS::~MediaSessionManageriOS):
(WebCore::MediaSessionManageriOS::providePresentingApplicationPIDIfNecessary):

Source/WebKit:

Make RemoteAudioSessionProxyManager an observer for AudioSession interruptions.
When being interrupted, notify all WebProcesses and trigger begin/end interruption mechanisms.
We only send interruption to sessions that are active in RemoteAudioSessionProxyManager.
Minor refactorting to move manager proxies from a map to a weak hash set.

* GPUProcess/GPUConnectionToWebProcess.cpp:
(WebKit::GPUConnectionToWebProcess::didClose):
(WebKit::GPUConnectionToWebProcess::audioSessionProxy):
* GPUProcess/media/RemoteAudioSessionProxy.cpp:
(WebKit::RemoteAudioSessionProxy::setCategory):
(WebKit::RemoteAudioSessionProxy::setPreferredBufferSize):
(WebKit::RemoteAudioSessionProxy::tryToSetActive):
* GPUProcess/media/RemoteAudioSessionProxyManager.cpp:
(WebKit::RemoteAudioSessionProxyManager::RemoteAudioSessionProxyManager):
(WebKit::RemoteAudioSessionProxyManager::~RemoteAudioSessionProxyManager):
(WebKit::RemoteAudioSessionProxyManager::addProxy):
(WebKit::RemoteAudioSessionProxyManager::removeProxy):
(WebKit::RemoteAudioSessionProxyManager::setCategoryForProcess):
(WebKit::RemoteAudioSessionProxyManager::setPreferredBufferSizeForProcess):
(WebKit::RemoteAudioSessionProxyManager::tryToSetActiveForProcess):
(WebKit::RemoteAudioSessionProxyManager::beginAudioSessionInterruption):
(WebKit::RemoteAudioSessionProxyManager::endAudioSessionInterruption):
* GPUProcess/media/RemoteAudioSessionProxyManager.h:
* GPUProcess/media/ios/RemoteMediaSessionHelperProxy.cpp:
* GPUProcess/media/ios/RemoteMediaSessionHelperProxy.h:
* WebProcess/GPU/media/ios/RemoteMediaSessionHelper.cpp:
* WebProcess/GPU/media/ios/RemoteMediaSessionHelper.h:
* WebProcess/GPU/media/ios/RemoteMediaSessionHelper.messages.in:

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

7 months ago[WPE] Gardening, update TestExpectations related with WebGL 2.0.0 tests
dpino@igalia.com [Wed, 11 Mar 2020 14:50:55 +0000 (14:50 +0000)]
[WPE] Gardening, update TestExpectations related with WebGL 2.0.0 tests
https://bugs.webkit.org/show_bug.cgi?id=208916

Unreviewed gardening.

* platform/wpe/TestExpectations:

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

7 months ago[ews] Add unit test to prevent multiple schedulers for a builder.
aakash_jain@apple.com [Wed, 11 Mar 2020 14:47:19 +0000 (14:47 +0000)]
[ews] Add unit test to prevent multiple schedulers for a builder.
https://bugs.webkit.org/show_bug.cgi?id=208917

Reviewed by Carlos Alberto Lopez Perez.

* BuildSlaveSupport/ews-build/loadConfig_unittest.py:
(ConfigDotJSONTest.test_multiple_scheduers_for_builder): Added unit test.
(TagsForBuilderTest): Fixed a typo.

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

7 months agoCrash in KeyframeEffect::getAnimatedStyle
commit-queue@webkit.org [Wed, 11 Mar 2020 14:40:27 +0000 (14:40 +0000)]
Crash in KeyframeEffect::getAnimatedStyle
https://bugs.webkit.org/show_bug.cgi?id=208318
<rdar://problem/59848234>

Patch by Jack Lee <shihchieh_lee@apple.com> on 2020-03-11
Reviewed by Antoine Quint.

Source/WebCore:

Quit getAnimatedStyle if element is rendererless.

Test: fast/animation/keyframe-rendererless-element-crash.html

* animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::getAnimatedStyle):

LayoutTests:

Quit getAnimatedStyle if element is rendererless.

* fast/animation/keyframe-rendererless-element-crash-expected.txt: Added.
* fast/animation/keyframe-rendererless-element-crash.html: Added.

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

7 months ago[WPE] Gardening, update TestExpectations
dpino@igalia.com [Wed, 11 Mar 2020 12:44:07 +0000 (12:44 +0000)]
[WPE] Gardening, update TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=208912

Unreviewed gardening.

* platform/wpe/TestExpectations:

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

7 months agoRegression r258148: js/dom/navigator-maxtouchpoints.html is consistently failing...
graouts@webkit.org [Wed, 11 Mar 2020 10:48:14 +0000 (10:48 +0000)]
Regression r258148: js/dom/navigator-maxtouchpoints.html is consistently failing on windows
https://bugs.webkit.org/show_bug.cgi?id=208856

Unreviewed test gardening.

Since Pointer Events are now enabled by default everywhere, we can remove platform-specific results
and rely on the generic expectation where the navigator.maxTouchPoints property is 0.

* js/dom/navigator-maxtouchpoints-expected.txt:
* platform/gtk/js/dom/navigator-maxtouchpoints-expected.txt: Removed.
* platform/ios/js/dom/navigator-maxtouchpoints-expected.txt: Removed.
* platform/mac/js/dom/navigator-maxtouchpoints-expected.txt: Removed.
* platform/win/js/dom/navigator-maxtouchpoints-expected.txt: Removed.
* platform/wpe/js/dom/navigator-maxtouchpoints-expected.txt: Removed.

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

7 months ago[WPE] Gardening, remove WPE specific expected results
dpino@igalia.com [Wed, 11 Mar 2020 09:53:55 +0000 (09:53 +0000)]
[WPE] Gardening, remove WPE specific expected results
https://bugs.webkit.org/show_bug.cgi?id=208909

Unreviewed gardening.

* platform/wpe/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.any-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.any.worker-expected.txt: Removed.

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

7 months ago[GTK] Failing API tests under the Flatpak SDK environment
philn@webkit.org [Wed, 11 Mar 2020 09:20:49 +0000 (09:20 +0000)]
[GTK] Failing API tests under the Flatpak SDK environment
https://bugs.webkit.org/show_bug.cgi?id=208871

Reviewed by Michael Catanzaro.

The load-failed signal callback should return a boolean result,
otherwise we enter in unknown territory depending on how the
toolchain compiles this, possibly triggering bad behavior (with
GCC 9.2 from the Flatpak SDK) or not caring at all (with current
GCC toolchain on buildbots).

Patch suggested by Michael Catanzaro.

* TestWebKitAPI/glib/WebKitGLib/LoadTrackingTest.cpp:
(loadFailedCallback):

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

7 months ago[iOS] Unskip fast/mediastream tests
youenn@apple.com [Wed, 11 Mar 2020 09:00:32 +0000 (09:00 +0000)]
[iOS] Unskip fast/mediastream tests
https://bugs.webkit.org/show_bug.cgi?id=208636

Reviewed by Eric Carlson.

Source/WebCore:

Add label to the settings so that we correctly send this information back to WebProcess.
Covered by existing tests.

* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::settings):
* platform/mock/MockRealtimeAudioSource.cpp:
(WebCore::MockRealtimeAudioSource::settings):
* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::settings):

LayoutTests:

* fast/mediastream/MediaStream-video-element-expected.txt:
* fast/mediastream/MediaStream-video-element.html:
Do not output sourceBuffer which is not supported in all platforms.
* fast/mediastream/MediaStreamTrack-getSettings-expected.txt:
* platform/ios/TestExpectations:

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

7 months ago[OpenSSL] Implement WebCrypto APIs for AES-CTR and AES-KW
commit-queue@webkit.org [Wed, 11 Mar 2020 06:22:21 +0000 (06:22 +0000)]
[OpenSSL] Implement WebCrypto APIs for AES-CTR and AES-KW
https://bugs.webkit.org/show_bug.cgi?id=208186

Patch by Tomoki Imai <Tomoki.Imai@sony.com> on 2020-03-10
Reviewed by Fujii Hironori.

Source/WebCore:

Added WebCrypto implementations for the following algorithms with OpenSSL.
- AES-CTR
- AES-KW

Enabled WebCrypto LayoutTests for AES-CTR and AES-KW.

* crypto/openssl/CryptoAlgorithmAES_CTROpenSSL.cpp:
(WebCore::aesAlgorithm): Added. Helper function to select which AES-CTR algorithm to be used by checking key size.
(WebCore::crypt): Added. Helper function shared by platformEncrypt/platformDecrypt.
(WebCore::CryptoAlgorithmAES_CTR::platformEncrypt): Implemented.
(WebCore::CryptoAlgorithmAES_CTR::platformDecrypt): Implemented.
* crypto/openssl/CryptoAlgorithmAES_KWOpenSSL.cpp:
(WebCore::aesAlgorithm): Added. Helper function to select which AES-KW algorithm to be used by checking key size.
(WebCore::cryptWrapKey):  Added. Helper function for platformWrapKey.
(WebCore::cryptUnwrapKey): Added. Helper function for platformUnwrapKey.
(WebCore::CryptoAlgorithmAES_KW::platformWrapKey): Implemented.
(WebCore::CryptoAlgorithmAES_KW::platformUnwrapKey): Implemented.
* crypto/openssl/CryptoAlgorithmRegistryOpenSSL.cpp:
(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Registered CryptoAlgorithmAES_CTR and CryptoAlgorithmAES_KW.

LayoutTests:

Enabled WebCrypto LayoutTests for AES-CTR and AES-KW along with the implementations.

* platform/wincairo/TestExpectations:

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

7 months ago[GPU Process] Work towards compiling out on non-Cocoa ports
don.olmstead@sony.com [Wed, 11 Mar 2020 05:44:47 +0000 (05:44 +0000)]
[GPU Process] Work towards compiling out on non-Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=208899

Reviewed by Darin Adler.

Source/WebCore:

Add in additional headers required for GPU Process build.

* Headers.cmake:

Source/WebKit:

Work through some compilation issues on non-Cocoa ports when attempting to build
out the GPU Process. Fix platform guards for some methods. Fix compilation issues
for non-unified builds.

Add in CMake listing of messages.in and include directories required for building
with ENABLE_GPU_PROCESS.

* CMakeLists.txt:
* GPUProcess/GPUConnectionToWebProcess.cpp:
(WebKit::GPUConnectionToWebProcess::didClose):
* GPUProcess/GPUConnectionToWebProcess.messages.in:
* GPUProcess/GPUProcess.cpp:
* GPUProcess/graphics/RemoteImageBufferMessageHandlerProxy.h:
* GPUProcess/graphics/RemoteImageBufferProxy.h:
(WebKit::RemoteImageBufferProxy::create):
* GPUProcess/graphics/RemoteRenderingBackendProxy.cpp:
* GPUProcess/graphics/RemoteRenderingBackendProxy.h:
* GPUProcess/media/RemoteMediaPlayerProxy.cpp:
(WebKit::RemoteMediaPlayerProxy::getConfiguration):
(WebKit::RemoteMediaPlayerProxy::setVideoFullscreenGravity):
(WebKit::RemoteMediaPlayerProxy::updateVideoFullscreenInlineImage):
(WebKit::RemoteMediaPlayerProxy::setVideoFullscreenMode):
(WebKit::RemoteMediaPlayerProxy::videoFullscreenStandbyChanged):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerReadyStateChanged):
(WebKit::RemoteMediaPlayerProxy::notifyTrackModeChanged):
* GPUProcess/media/RemoteMediaPlayerProxy.h:
* GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
* UIProcess/GPU/GPUProcessProxy.h:
* WebProcess/GPU/GPUProcessConnection.cpp:
* WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp:
* WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h:
* WebProcess/GPU/graphics/RemoteImageBufferMessageHandler.h:
* WebProcess/GPU/graphics/RemoteRenderingBackend.cpp:
* WebProcess/GPU/media/AudioTrackPrivateRemote.h:
* WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
* WebProcess/GPU/media/TextTrackPrivateRemote.h:

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

7 months ago[iOS] A syscall is denied by the sandbox
pvollan@apple.com [Wed, 11 Mar 2020 04:51:25 +0000 (04:51 +0000)]
[iOS] A syscall is denied by the sandbox
https://bugs.webkit.org/show_bug.cgi?id=208892
<rdar://problem/60294880>

Reviewed by Brent Fulgham.

Add denied syscall to sandbox on iOS.

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

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

7 months agoRe-import test262 to acquire DST fix
ross.kirsling@sony.com [Wed, 11 Mar 2020 04:25:22 +0000 (04:25 +0000)]
Re-import test262 to acquire DST fix
https://bugs.webkit.org/show_bug.cgi?id=208901

Reviewed by Don Olmstead.

* test262/latest-changes-summary.txt:
* test262/test/built-ins/AggregateError/newtarget-proto-fallback.js:
* test262/test/built-ins/Array/prototype/filter/create-proto-from-ctor-realm-array.js:
* test262/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-4.js:
* test262/test/built-ins/Date/parse/without-utc-offset.js:
* test262/test262-Revision.txt:

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

7 months agoMake TextIterator::range return a SimpleRange
darin@apple.com [Wed, 11 Mar 2020 04:07:19 +0000 (04:07 +0000)]
Make TextIterator::range return a SimpleRange
https://bugs.webkit.org/show_bug.cgi?id=208797

Reviewed by Don Olmstead.

Source/WebCore:

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::traverseToOffsetInRange): Updated since
TextIterator::range returns a SimpleRange. Also use TextIterator::node where
appropriate instead of repeating the code for it here.
(WebCore::AXObjectCache::lengthForRange): Use TextIterator::node.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::stringForRange const): Use TextIterator::node.
(WebCore::AccessibilityObject::stringForVisiblePositionRange): Ditto.
(WebCore::AccessibilityObject::lengthForVisiblePositionRange const): Ditto.

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
Use TextIterator::node and createLiveRange.

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm: Added include
of SimpleRange and removed "using namespace HTMLNames".
(AXAttributeStringSetStyle): Use HTMLNames namespace explicitly.
(-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
Use TextIterator::node.
(-[WebAccessibilityObjectWrapper subrole]): Use HTMLNames namespace explicitly.

* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::collectTextRanges): Use createLiveRange
here since we don't want to convert move the class to SimpleRange at this time.

* dom/Position.cpp: Added include of Range.h.

* dom/RangeBoundaryPoint.h: Removed a bogus "const" on the return value of
RangeBoundaryPoint::toPosition.

* editing/TextIterator.cpp:
(WebCore::BitStack::BitStack): Deleted.
(WebCore::BitStack::size const): Deleted.
(WebCore::TextIterator::range const): Return a SimpleRange.
(WebCore::TextIterator::node const): Updated for the above.
(WebCore::CharacterIterator::range const): Use SimpleRange right up until the
return statement, where we do createLiveRange. Will come back and remove that soon.
(WebCore::TextIterator::rangeFromLocationAndLength): Use createLiveRange in
one place, SimpleRange in another.

* editing/TextIterator.h: Removed include of "Range.h" since we can just use
a forward declaration instead. Removed unneeded forward declarations. Simplified
the BitStack and TextIteratorCopyableText classes by initializing data members
and removing explicit definitions of the constructors and destructors. Took out
a stray "explicit" that wasn't needed. Changed the return value of
TextIterator::range to SimpleRange.

* editing/TextManipulationController.cpp:
(WebCore::ParagraphContentIterator::ParagraphContentIterator): Call
createLiveRange.
(WebCore::ParagraphContentIterator::advance): Ditto.
(WebCore::ParagraphContentIterator::startPosition): Ditto.
(WebCore::ParagraphContentIterator::endPosition): Ditto.

* editing/cocoa/DataDetection.mm:
(WebCore::DataDetection::detectContentInRange): Use createLiveRange.

* editing/cocoa/HTMLConverter.mm:
(WebCore::editingAttributedStringFromRange): Use SimpleRange instead
of a live range.

Source/WebKit:

* WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.mm:
(-[WKDOMTextIterator currentRange]): Use createLiveRange.

* WebProcess/WebPage/Cocoa/WebPageCocoa.mm: Added includes.

Source/WebKitLegacy/mac:

* WebView/WebTextIterator.mm:
(-[WebTextIterator currentRange]): Use createLiveRange.

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

7 months agoTrack "scrolling scope" on RenderLayers
simon.fraser@apple.com [Wed, 11 Mar 2020 03:26:03 +0000 (03:26 +0000)]
Track "scrolling scope" on RenderLayers
https://bugs.webkit.org/show_bug.cgi?id=208620

Reviewed by Zalan Bujtas.
Source/WebCore:

The scrolling scope code added in r257920 failed to recompute m_contentsScrollingScope
when hasCompositedScrollableOverflow() changed, causing bugs on gmail.

Recompute the m_contentsScrollingScope to match or not match the m_boxScrollingScope
based on whether the layer is composited-scrollable.

Test: fast/scrolling/mac/absolute-in-overflow-scroll-dynamic.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPosition):
* rendering/RenderLayerCompositor.cpp:
(WebCore::isScrolledByOverflowScrollLayer):

LayoutTests:

* fast/scrolling/mac/absolute-in-overflow-scroll-dynamic-expected.html: Added.
* fast/scrolling/mac/absolute-in-overflow-scroll-dynamic.html: Added.
* fast/scrolling/mac/absolute-in-overflow-scroll.html: Fix typo.

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

7 months agoNon-unified build fixes early March 2020 edition
don.olmstead@sony.com [Wed, 11 Mar 2020 02:40:57 +0000 (02:40 +0000)]
Non-unified build fixes early March 2020 edition
https://bugs.webkit.org/show_bug.cgi?id=208897

Unreviewed build fix.

Source/WebCore:

* Modules/mediacontrols/MediaControlsHost.h:
* dom/BoundaryPoint.h:
* dom/StaticRange.cpp:
* editing/FrameSelection.cpp:
* loader/cache/CachedResourceRequest.cpp:
* page/scrolling/ScrollingTreeFrameScrollingNode.h:

Source/WebKit:

* NetworkProcess/NetworkLoadChecker.h:

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

7 months agoSome common domains should always be App-bound domains
katherine_cheney@apple.com [Wed, 11 Mar 2020 02:00:16 +0000 (02:00 +0000)]
Some common domains should always be App-bound domains
https://bugs.webkit.org/show_bug.cgi?id=208893
 <rdar://problem/60280943>

Reviewed by Brent Fulgham.

Some domains, like about:blank and pages loaded from files should
always be considered app-bound.

* UIProcess/WebPageProxy.cpp:
(WebKit::shouldBeTreatedAsAppBound):
(WebKit::WebPageProxy::setIsNavigatingToAppBoundDomain):

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

7 months agoREGRESSION(r253759): Web Inspector: Audits: results folder doesn't get selected by...
drousso@apple.com [Wed, 11 Mar 2020 01:35:56 +0000 (01:35 +0000)]
REGRESSION(r253759): Web Inspector: Audits: results folder doesn't get selected by pressing Arrow Down key
https://bugs.webkit.org/show_bug.cgi?id=208679
<rdar://problem/60108942>

Reviewed by Timothy Hatcher.

* UserInterface/Views/AuditNavigationSidebarPanel.js:
(WI.AuditNavigationSidebarPanel.prototype.initialLayout):
(WI.AuditNavigationSidebarPanel.prototype._handleAuditManagerEditingChanged):
We do actually want to prevent repeat selection, as we may end up attempting to select the
same `WI.TreeElement` twice due to the nature of `WI.SelectionController`, which would call
through to `WI.NavigationSidebarPanel.prototype.showDefaultContentView()` which deselects
any selected `WI.TreeElement`. Reselecting the previously selected `WI.TreeElement` when
exiting edit mode is much more of a special case than any of the ways for moving selection
to a `WI.FolderTreeElement`, so add logic just for that case instead of affecting the entire
`WI.TreeOutline`. When restoring the selection after leaving edit mode, if the currently
selected `WI.TreeElement` was also the previously selected `WI.TreeElement`, deselect and
reselect it so we're "reset" back to a fresh state.

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

7 months agoWeb Inspector: make `WebKit::WebInspectorProxy::m_isOpening` GTK only
drousso@apple.com [Wed, 11 Mar 2020 01:32:47 +0000 (01:32 +0000)]
Web Inspector: make `WebKit::WebInspectorProxy::m_isOpening` GTK only
https://bugs.webkit.org/show_bug.cgi?id=208831
<rdar://problem/57720692>

Reviewed by Brian Burg.

* UIProcess/Inspector/WebInspectorProxy.h:
* UIProcess/Inspector/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::open):

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

7 months agoREGRESSION(iOS): editing/selection/ios/selection-after-changing-text-with-callout...
rniwa@webkit.org [Wed, 11 Mar 2020 01:24:42 +0000 (01:24 +0000)]
REGRESSION(iOS): editing/selection/ios/selection-after-changing-text-with-callout-menu.html intermittently fails
https://bugs.webkit.org/show_bug.cgi?id=208898

Reviewed by Wenson Hsieh.

iOS no longer shows the callout bar upon Cmd+A. Click on the selection to bring up the callout bar manually.

* editing/selection/ios/selection-after-changing-text-with-callout-menu.html:

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

7 months agoVersioning.
alancoon@apple.com [Wed, 11 Mar 2020 00:28:54 +0000 (00:28 +0000)]
Versioning.

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

7 months ago[CoreIPC] WebPasteboardProxy::SetPasteboardBufferForType uses "0" for both uint64_t...
ddkilzer@apple.com [Wed, 11 Mar 2020 00:02:26 +0000 (00:02 +0000)]
[CoreIPC] WebPasteboardProxy::SetPasteboardBufferForType uses "0" for both uint64_t and a pointer value
<https://webkit.org/b/208879>
<rdar://problem/60165624>

Reviewed by Wenson Hsieh.

* UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
(WebKit::WebPasteboardProxy::setPasteboardBufferForType):
- Change 0 to nullptr to make code easier to read.

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

7 months agoNullptr crash in CompositeEditCommand::moveParagraphWithClones when indenting non...
commit-queue@webkit.org [Tue, 10 Mar 2020 23:41:17 +0000 (23:41 +0000)]
Nullptr crash in CompositeEditCommand::moveParagraphWithClones when indenting non-enclosed elements.
https://bugs.webkit.org/show_bug.cgi?id=208628
<rdar://problem/52011509>

Patch by Jack Lee <shihchieh_lee@apple.com> on 2020-03-10
Reviewed by Ryosuke Niwa.

When indenting a non-enclosed paragraph, quit if start of contents is not a descendant or sibling of outer block.

Source/WebCore:

Test: fast/editing/indent-non-enclosed-element-crash.html

* editing/IndentOutdentCommand.cpp:
(WebCore::IndentOutdentCommand::indentIntoBlockquote):

LayoutTests:

* fast/editing/indent-non-enclosed-element-crash-expected.txt: Added.
* fast/editing/indent-non-enclosed-element-crash.html: Added.

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

7 months ago[PlayStation] incomplete type 'WebCore::ScrollingStateFrameScrollingNode' named in...
stephan.szabo@sony.com [Tue, 10 Mar 2020 23:36:37 +0000 (23:36 +0000)]
[PlayStation] incomplete type 'WebCore::ScrollingStateFrameScrollingNode' named in nested name specifier
https://bugs.webkit.org/show_bug.cgi?id=208882

Reviewed by Simon Fraser.

No new tests, build fix.

* page/scrolling/ScrollingTreeScrollingNode.cpp:
  Add include of ScrollingStateFrameScrollingNode
  when ENABLE(SCROLLING_THREAD) is true.

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

7 months agoBuild fix.
achristensen@apple.com [Tue, 10 Mar 2020 22:57:44 +0000 (22:57 +0000)]
Build fix.

* platform/audio/ios/MediaSessionHelperIOS.mm:
(MediaSessionHelperiOS::providePresentingApplicationPID):
Fix an unused parameter warning.

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

7 months ago[ macOS iOS ] imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_openKeyCursor...
jacob_uphoff@apple.com [Tue, 10 Mar 2020 22:54:41 +0000 (22:54 +0000)]
[ macOS iOS ] imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_openKeyCursor.htm is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=208890

Unreviewed test gardening.

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

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

7 months agoEnable accessibility IsolatedTree in WebKit.
andresg_22@apple.com [Tue, 10 Mar 2020 22:41:50 +0000 (22:41 +0000)]
Enable accessibility IsolatedTree in WebKit.
https://bugs.webkit.org/show_bug.cgi?id=208881

Reviewed by Chris Fleizach.

Sets the default value of accessibility IsolatedTree support to true.

* Shared/WebPreferences.yaml:

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

7 months agoREGRESSION: (r257944?) [ Mac wk2 ] fast/images/decode-render-animated-image.html...
lawrence.j@apple.com [Tue, 10 Mar 2020 22:37:29 +0000 (22:37 +0000)]
REGRESSION: (r257944?) [ Mac wk2 ] fast/images/decode-render-animated-image.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=208889

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

7 months ago[ iOS ] fast/css-custom-paint/image.html is flaky timing out
jacob_uphoff@apple.com [Tue, 10 Mar 2020 22:21:02 +0000 (22:21 +0000)]
[ iOS ] fast/css-custom-paint/image.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=208887

Unreviewed test gardening

* platform/ios-wk2/TestExpectations:

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

7 months ago[WebGL] Additional gardening for webgl bot DEQP expectations
justin_fan@apple.com [Tue, 10 Mar 2020 21:47:44 +0000 (21:47 +0000)]
[WebGL] Additional gardening for webgl bot DEQP expectations
https://bugs.webkit.org/show_bug.cgi?id=208884

Unreviewed test gardening.

* webgl/2.0.0/deqp/functional/gles3/pixelbufferobject-expected.txt:
* webgl/TestExpectations:

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

7 months agoREGRESSION (r257920): inbox flickers and disappears when scrolling gmail
simon.fraser@apple.com [Tue, 10 Mar 2020 21:27:17 +0000 (21:27 +0000)]
REGRESSION (r257920): inbox flickers and disappears when scrolling gmail
https://bugs.webkit.org/show_bug.cgi?id=208883
rdar://problem/60287447

Partially revert r257920 since it caused gmail scrolling flickers.

* rendering/RenderLayerCompositor.cpp:
(WebCore::isScrolledByOverflowScrollLayer):

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

7 months agoSet important EGL context attributes
dino@apple.com [Tue, 10 Mar 2020 20:09:09 +0000 (20:09 +0000)]
Set important EGL context attributes
https://bugs.webkit.org/show_bug.cgi?id=208724
<rdar://problem/60168306>

Temporarily revert r258025 while investigating a crash.

* platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):

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

7 months agoFile upload cancels before files can be uploaded.
megan_gardner@apple.com [Tue, 10 Mar 2020 19:16:23 +0000 (19:16 +0000)]
File upload cancels before files can be uploaded.
https://bugs.webkit.org/show_bug.cgi?id=208846
<rdar://problem/60244249>

Reviewed by Tim Horton.

With the new UIContextMenus, we needed to cancel in order for everything to be
reset correctly in WebCore. But this can only be done in the animation completion
handler, but we only want to cancel if we aren't presenting a different picker.

* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel contextMenuInteraction:configurationForMenuAtLocation:]):
(-[WKFileUploadPanel contextMenuInteraction:willEndForConfiguration:animator:]):
(-[WKFileUploadPanel ensureContextMenuInteraction]):

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

7 months ago[JSC] Fix iso-subspace static_assert for JSJavaScriptCallFramePrototype
ysuzuki@apple.com [Tue, 10 Mar 2020 19:08:48 +0000 (19:08 +0000)]
[JSC] Fix iso-subspace static_assert for JSJavaScriptCallFramePrototype
https://bugs.webkit.org/show_bug.cgi?id=208874

Reviewed by Saam Barati.

This static_assert should ensure the condition for JSJavaScriptCallFramePrototype, not for JSInjectedScriptHostPrototype.

* inspector/JSJavaScriptCallFramePrototype.h:

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

7 months agoMake sure that ServiceWorkerFrameLoaderClient lifetime exceeds its frame lifetime
youenn@apple.com [Tue, 10 Mar 2020 18:46:17 +0000 (18:46 +0000)]
Make sure that ServiceWorkerFrameLoaderClient lifetime exceeds its frame lifetime
https://bugs.webkit.org/show_bug.cgi?id=208855
<rdar://problem/60187332>

Reviewed by Geoffrey Garen.

Source/WebCore:

Add lifetime management of the loader client to SWContextManager instead of its connection, which has a shorter lifetime.
No JS observable change of behavior.

* workers/service/context/SWContextManager.cpp:
(WebCore::SWContextManager::addServiceWorkerFrameLoaderClient):
(WebCore::SWContextManager::removeServiceWorkerFrameLoaderClient):
* workers/service/context/SWContextManager.h:

Source/WebKit:

In case connection is destroyed, for instance due to network process crashing,
we destroy all service worker frame loader clients.
This is too soon as service worker thread proxy is refcounted and can last longer.
For that reason, we now let the SWContextManager handle the lifetime of the frame loader clients.
Drive-by fix: generate a new frame identifier instead of using an internal counter which can be wrong in case of new connection
and might clash with other frame identifiers now that service workers can run in process with pages.

* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::ServiceWorkerFrameLoaderClient::create):
(WebKit::ServiceWorkerFrameLoaderClient::ServiceWorkerFrameLoaderClient):
(WebKit::ServiceWorkerFrameLoaderClient::frameLoaderDestroyed):
(WebKit::WebSWContextManagerConnection::installServiceWorker):
* WebProcess/Storage/WebSWContextManagerConnection.h:

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

7 months ago[WPE] Gardening, emit new baselines of WebGL 1.0.3 conformance tests
dpino@igalia.com [Tue, 10 Mar 2020 18:30:09 +0000 (18:30 +0000)]
[WPE] Gardening, emit new baselines of WebGL 1.0.3 conformance tests
https://bugs.webkit.org/show_bug.cgi?id=208854

Unreviewed gardening.

* platform/wpe/webgl/1.0.3/conformance/glsl/misc/shaders-with-name-conflicts-expected.txt: Added.
* platform/wpe/webgl/1.0.3/conformance/misc/webgl-specific-expected.txt: Added.
* platform/wpe/webgl/1.0.3/conformance/rendering/point-no-attributes-expected.txt: Added.
* platform/wpe/webgl/1.0.3/conformance/textures/texture-copying-feedback-loops-expected.txt: Added.

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

7 months agoAdd logging for Modern EME methods.
jer.noble@apple.com [Tue, 10 Mar 2020 18:25:31 +0000 (18:25 +0000)]
Add logging for Modern EME methods.
https://bugs.webkit.org/show_bug.cgi?id=205519

Reviewed by Eric Carlson.

* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::create):
(WebCore::MediaKeySession::MediaKeySession):
(WebCore::MediaKeySession::generateRequest):
(WebCore::MediaKeySession::load):
(WebCore::MediaKeySession::update):
(WebCore::MediaKeySession::close):
(WebCore::MediaKeySession::remove):
(WebCore::MediaKeySession::sessionClosed):
(WebCore::MediaKeySession::logChannel const):
* Modules/encryptedmedia/MediaKeySession.h:
* Modules/encryptedmedia/MediaKeys.cpp:
(WebCore::MediaKeys::createSession):
(WebCore::MediaKeys::setServerCertificate):
* Modules/encryptedmedia/MediaKeys.h:
* Modules/encryptedmedia/MediaKeys.idl:
* Modules/encryptedmedia/NavigatorEME.cpp:
(WTF::LogArgument<Vector<T>>::toString):
(WTF::LogArgument<Optional<T>>::toString):
(WebCore::NavigatorEME::requestMediaKeySystemAccess):
(WebCore::tryNextSupportedConfiguration):
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/encryptedmedia/CDMLogging.cpp: Added.
(WebCore::toJSONObject):
(WebCore::toJSONString):
(WTF::LogArgument<WebCore::CDMKeySystemConfiguration>::toString):
(WTF::LogArgument<WebCore::CDMMediaCapability>::toString):
(WTF::LogArgument<WebCore::CDMRestrictions>::toString):
(WTF::LogArgument<WebCore::CDMEncryptionScheme>::toString):
(WTF::LogArgument<WebCore::CDMKeyStatus>::toString):
(WTF::LogArgument<WebCore::CDMMessageType>::toString):
(WTF::LogArgument<WebCore::CDMRequirement>::toString):
(WTF::LogArgument<WebCore::CDMSessionType>::toString):
* platform/encryptedmedia/CDMLogging.h: Added.
* platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:

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

7 months agoSync FeatureList.pm with CMake definitions
don.olmstead@sony.com [Tue, 10 Mar 2020 18:14:24 +0000 (18:14 +0000)]
Sync FeatureList.pm with CMake definitions
https://bugs.webkit.org/show_bug.cgi?id=208866

Reviewed by Michael Catanzaro.

* Scripts/webkitperl/FeatureList.pm:

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

7 months agoRemove the special DisplayList handling in CanvasRenderingContext2DBase
commit-queue@webkit.org [Tue, 10 Mar 2020 17:52:08 +0000 (17:52 +0000)]
Remove the special DisplayList handling in CanvasRenderingContext2DBase
https://bugs.webkit.org/show_bug.cgi?id=208828

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-03-10
Reviewed by Myles C. Maxfield.

Remove DisplayListDrawingContext and use DisplayList::DrawingContext
instead. Remove 'tracksDisplayListReplay' since it is always 'false'.
Remove contextDisplayListMap() since items are added to it only if
'tracksDisplayListReplay' is true which never happens.

* html/CustomPaintCanvas.cpp:
(WebCore::CustomPaintCanvas::getContext):
* html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::~CanvasRenderingContext2DBase):
(WebCore::CanvasRenderingContext2DBase::paintRenderingResultsToCanvas):
(WebCore::CanvasRenderingContext2DBase::drawingContext const):
(WebCore::DisplayListDrawingContext::DisplayListDrawingContext): Deleted.
(WebCore::contextDisplayListMap): Deleted.
(WebCore::CanvasRenderingContext2DBase::setTracksDisplayListReplay): Deleted.
(WebCore::CanvasRenderingContext2DBase::displayListAsText const): Deleted.
(WebCore::CanvasRenderingContext2DBase::replayDisplayListAsText const): Deleted.
* html/canvas/CanvasRenderingContext2DBase.h:
(WebCore::CanvasRenderingContext2DBase::tracksDisplayListReplay const): Deleted.
* platform/graphics/displaylists/DisplayListDrawingContext.h:

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

7 months ago[ews] Add unit tests for commit queue factory
aakash_jain@apple.com [Tue, 10 Mar 2020 17:44:33 +0000 (17:44 +0000)]
[ews] Add unit tests for commit queue factory
https://bugs.webkit.org/show_bug.cgi?id=208862

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/factories_unittest.py:
(TestCommitQueueFactory):
(TestCommitQueueFactory.test_commit_queue_factory): Added unit-test for commit-queue factory.

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

7 months ago[ews-app] Status bubble should only display important messages in pop-over - part 3
aakash_jain@apple.com [Tue, 10 Mar 2020 17:43:26 +0000 (17:43 +0000)]
[ews-app] Status bubble should only display important messages in pop-over - part 3
https://bugs.webkit.org/show_bug.cgi?id=208865

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
(StatusBubble): Added more strings to STEPS_TO_HIDE.

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

7 months ago[MSE] Use CMSampleBufferGetOutputPresentationTimeStamp / CMSampleBufferGetOutputDurat...
jer.noble@apple.com [Tue, 10 Mar 2020 17:36:25 +0000 (17:36 +0000)]
[MSE] Use CMSampleBufferGetOutputPresentationTimeStamp / CMSampleBufferGetOutputDuration for all presentation times and durations
https://bugs.webkit.org/show_bug.cgi?id=208827

Reviewed by Eric Carlson.

CMSampleBufferGetOutputPresentationTimeStamp takes into account pre-roll trim durations and
movie edit lists, and as such, should be used as the "correct" value for "presentation
time".

outputPresentationTime() is inconsistently used, so rather than replacing all references of
outputPresentationTime() with presentationTime(), simply redefine presetationTime() in terms
of CMSampleBufferGetPresentationTimeStamp() and remove outputPresentationTime() entirely.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::updateMinimumUpcomingPresentationTime):
* platform/MediaSample.h:
(WebCore::MediaSample::outputPresentationTime const): Deleted.
(WebCore::MediaSample::outputDuration const): Deleted.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::calculateTimelineOffset):
* platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
(WebCore::MediaSampleAVFObjC::presentationTime const):
(WebCore::MediaSampleAVFObjC::duration const):
(WebCore::MediaSampleAVFObjC::outputDuration const):
(WebCore::MediaSampleAVFObjC::dump const):
(WebCore::MediaSampleAVFObjC::toJSONString const):
(WebCore::MediaSampleAVFObjC::outputPresentationTime const): Deleted.
* platform/mediastream/RealtimeVideoCaptureSource.cpp:
(WebCore::RealtimeVideoCaptureSource::adaptVideoSample):

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

7 months agoAdd release logging for when a navigation by a third-party (or untrusted) iframe...
cdumez@apple.com [Tue, 10 Mar 2020 17:26:45 +0000 (17:26 +0000)]
Add release logging for when a navigation by a third-party (or untrusted) iframe is blocked
https://bugs.webkit.org/show_bug.cgi?id=208863

Reviewed by Youenn Fablet.

Add release logging for when a navigation by a third-party (or untrusted) iframe is blocked, to
help identify potential regressions in behavior.

* dom/Document.cpp:
(WebCore::Document::canNavigate):
(WebCore::Document::frameID const):
(WebCore::Document::isAlwaysOnLoggingAllowed const):
* dom/Document.h:

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

7 months agoDo not create a service worker connection if service worker is not enabled in network...
youenn@apple.com [Tue, 10 Mar 2020 16:27:42 +0000 (16:27 +0000)]
Do not create a service worker connection if service worker is not enabled in network process
https://bugs.webkit.org/show_bug.cgi?id=208851

Reviewed by Simon Fraser.

In case of navigation redirection, we were trying to go to service worker without checking the service worker entitlement.
Instead, we should check the service worker entitlement and return early in that case.

Covered by manually running minibrowser on simulator.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::isServiceWorkerAllowed const):
(WebKit::NetworkConnectionToWebProcess::createFetchTask):
(WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::continueWillSendRequest):
(WebKit::NetworkResourceLoader::startWithServiceWorker):

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

7 months ago[WPE] Gardening, update TestExpectations
dpino@igalia.com [Tue, 10 Mar 2020 16:15:11 +0000 (16:15 +0000)]
[WPE] Gardening, update TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=208853

Unreviewed gardening.

* platform/wpe/TestExpectations:

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

7 months ago[WPE] MiniBrowser: Close child WebViews when exiting
lmoura@igalia.com [Tue, 10 Mar 2020 16:11:25 +0000 (16:11 +0000)]
[WPE] MiniBrowser: Close child WebViews when exiting
https://bugs.webkit.org/show_bug.cgi?id=208689

Reviewed by Carlos Garcia Campos.

Store created views so we can release them before exiting.

* MiniBrowser/wpe/main.cpp:
(webViewClose):
(createWebView):
(main):

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

7 months agoAdd ValidateCommiterAndReviewer and ValidateChangeLogAndReviewer build steps in commi...
aakash_jain@apple.com [Tue, 10 Mar 2020 15:12:19 +0000 (15:12 +0000)]
Add ValidateCommiterAndReviewer and ValidateChangeLogAndReviewer build steps in commit-queue
https://bugs.webkit.org/show_bug.cgi?id=208861

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/factories.py:
(Factory.__init__): Remove verifycqplus parameter.
(CommitQueueFactory): Inherit from factory.BuildFactory base class instead of custom Factory class.
(CommitQueueFactory.__init__): Add required build steps, especially ValidateCommiterAndReviewer,
UpdateWorkingDirectory and ValidateChangeLogAndReviewer.

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

7 months agoFlaky Test: svg/custom/object-sizing-explicit-height.xhtml
jacob_uphoff@apple.com [Tue, 10 Mar 2020 14:56:43 +0000 (14:56 +0000)]
Flaky Test: svg/custom/object-sizing-explicit-height.xhtml
https://bugs.webkit.org/show_bug.cgi?id=208592

Unreviewed test gardening

* platform/ios/TestExpectations:
* platform/mac/TestExpectations:

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

7 months agoRemove SampleBufferDisplayLayer sync IPC
youenn@apple.com [Tue, 10 Mar 2020 14:42:47 +0000 (14:42 +0000)]
Remove SampleBufferDisplayLayer sync IPC
https://bugs.webkit.org/show_bug.cgi?id=208804

Reviewed by Eric Carlson.

Source/WebCore:

Add an initialize method to initialize the sample buffer display layer.
It takes a completion handler so that the initialization can be asynchronous.
Update the player to, on initialization callback, create the necessary observers and hook the fullscreen manager.

Update MediaPlayerPrivateMediaStreamAVFObjC to no longer expose rootLayer and rootLayerBoundsDidChange.
This was used by the root layer observer.
Instead, pass the root layer to the observer when starting the observer and pass a callback to the observer.
Covered by existing tests.

* platform/graphics/avfoundation/SampleBufferDisplayLayer.cpp:
(WebCore::SampleBufferDisplayLayer::create):
* platform/graphics/avfoundation/SampleBufferDisplayLayer.h:
* platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h:
* platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:
(WebCore::LocalSampleBufferDisplayLayer::create):
(WebCore::LocalSampleBufferDisplayLayer::LocalSampleBufferDisplayLayer):
(WebCore::LocalSampleBufferDisplayLayer::initialize):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(-[WebRootSampleBufferBoundsChangeListener initWithCallback:]):
(-[WebRootSampleBufferBoundsChangeListener invalidate]):
(-[WebRootSampleBufferBoundsChangeListener begin:]):
(-[WebRootSampleBufferBoundsChangeListener stop]):
(-[WebRootSampleBufferBoundsChangeListener observeValueForKeyPath:ofObject:change:context:]):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayLayer):
(-[WebRootSampleBufferBoundsChangeListener initWithParent:]): Deleted.
(-[WebRootSampleBufferBoundsChangeListener begin]): Deleted.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::rootLayer const): Deleted.

Source/WebKit:

Implement the initialize method as an async IPC.

* GPUProcess/GPUConnectionToWebProcess.cpp:
(WebKit::GPUConnectionToWebProcess::dispatchSyncMessage):
* GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:
(WebKit::RemoteSampleBufferDisplayLayer::RemoteSampleBufferDisplayLayer):
* GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp:
(WebKit::RemoteSampleBufferDisplayLayerManager::createLayer):
* GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.h:
* GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.messages.in:
* WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:
(WebKit::RemoteMediaPlayerManager::updatePreferences):
* WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp:
(WebKit::SampleBufferDisplayLayer::create):
(WebKit::SampleBufferDisplayLayer::SampleBufferDisplayLayer):
(WebKit::SampleBufferDisplayLayer::initialize):
* WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h:
* WebProcess/GPU/webrtc/SampleBufferDisplayLayerManager.cpp:
(WebKit::SampleBufferDisplayLayerManager::createLayer):
* WebProcess/GPU/webrtc/SampleBufferDisplayLayerManager.h:

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

7 months ago[ macOS ] imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_Blob.htm...
jacob_uphoff@apple.com [Tue, 10 Mar 2020 14:26:26 +0000 (14:26 +0000)]
[ macOS ] imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_Blob.htm is flaky failing
https://bugs.webkit.org/show_bug.cgi

Unreviewed test gardening

* platform/mac/TestExpectations:

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

7 months ago[Cairo] Use std::unique_ptr for cairo_path_t
carlosgc@webkit.org [Tue, 10 Mar 2020 14:06:28 +0000 (14:06 +0000)]
[Cairo] Use std::unique_ptr for cairo_path_t
https://bugs.webkit.org/show_bug.cgi?id=208808

Reviewed by Sergio Villar Senin.

* platform/graphics/cairo/CairoOperations.cpp:
(WebCore::Cairo::clipForPatternFilling):
(WebCore::Cairo::drawPathShadow):
* platform/graphics/cairo/CairoUniquePtr.h:
(WebCore::CairoPtrDeleter<cairo_path_t>::operator() const):
* platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::appendPathToCairoContext):
* platform/graphics/cairo/PathCairo.cpp:
(WebCore::Path::Path):
(WebCore::Path::operator=):
(WebCore::Path::addPath):
(WebCore::Path::applySlowCase const):

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

7 months agoREGRESSION(r257977): [GTK] http/tests/media/hls/video-cookie.html is a flaky failure
eocanha@igalia.com [Tue, 10 Mar 2020 13:56:00 +0000 (13:56 +0000)]
REGRESSION(r257977): [GTK] http/tests/media/hls/video-cookie.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=208803

Reviewed by Philippe Normand.

Supply Content-Length, so WebKit GStreamer can actually know when the download has finished
without mistaking EOF with a stall.

* http/tests/media/resources/video-cookie-check-cookie.php: Supply Content-Length.
* platform/gtk/TestExpectations: Removed the test as failing.

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

7 months ago[Cairo] Remove PlatformPathCairo
carlosgc@webkit.org [Tue, 10 Mar 2020 13:50:26 +0000 (13:50 +0000)]
[Cairo] Remove PlatformPathCairo
https://bugs.webkit.org/show_bug.cgi?id=208807

Reviewed by Darin Adler.

We have a class CairoPath defined in PlatformPathCairo.h that simply wraps a cairo_t. We can use the cairo_t
directly as PlatformPath and simplify the cairo path implementation.

* platform/SourcesCairo.txt:
* platform/graphics/Path.h:
(WebCore::Path::platformPath const):
* platform/graphics/cairo/CairoOperations.cpp:
(WebCore::Cairo::fillRectWithRoundedHole):
(WebCore::Cairo::fillPath):
(WebCore::Cairo::strokePath):
(WebCore::Cairo::clipPath):
* platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::appendWebCorePathToCairoContext):
* platform/graphics/cairo/FontCairo.cpp:
(WebCore::Font::platformPathForGlyph const):
* platform/graphics/cairo/PathCairo.cpp:
(WebCore::Path::Path):
(WebCore::Path::ensurePlatformPath):
(WebCore::Path::operator=):
(WebCore::Path::clear):
(WebCore::Path::isEmptySlowCase const):
(WebCore::Path::currentPointSlowCase const):
(WebCore::Path::translate):
(WebCore::Path::moveToSlowCase):
(WebCore::Path::addLineToSlowCase):
(WebCore::Path::addRect):
(WebCore::Path::addQuadCurveTo):
(WebCore::Path::addBezierCurveTo):
(WebCore::Path::addArcSlowCase):
(WebCore::Path::addArcTo):
(WebCore::Path::addEllipse):
(WebCore::Path::addPath):
(WebCore::Path::closeSubpath):
(WebCore::Path::boundingRectSlowCase const):
(WebCore::Path::strokeBoundingRect const):
(WebCore::Path::contains const):
(WebCore::Path::strokeContains const):
(WebCore::Path::applySlowCase const):
(WebCore::Path::transform):
* platform/graphics/cairo/PlatformPathCairo.cpp: Removed.
* platform/graphics/cairo/PlatformPathCairo.h: Removed.

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

7 months ago[GTK] API favicon test flaky timeouts
philn@webkit.org [Tue, 10 Mar 2020 13:21:51 +0000 (13:21 +0000)]
[GTK] API favicon test flaky timeouts
https://bugs.webkit.org/show_bug.cgi?id=208189

Reviewed by Carlos Garcia Campos.

Sometimes the favicon changes already during the load. Keeping
track of it in the WebView favicon property notification handler
gets us rid of the race.

* TestWebKitAPI/Tests/WebKitGLib/TestWebKitFaviconDatabase.cpp:
(testFaviconDatabaseGetFavicon):

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

7 months ago[iOS] Make sure a MediStreamTrack clone does not interrupt the being cloned track
youenn@apple.com [Tue, 10 Mar 2020 13:02:52 +0000 (13:02 +0000)]
[iOS] Make sure a MediStreamTrack clone does not interrupt the being cloned track
https://bugs.webkit.org/show_bug.cgi?id=208634

Reviewed by Eric Carlson.

Source/WebCore:

Covered by reenabled tests.

* platform/mediastream/RealtimeMediaSourceFactory.h:
(WebCore::SingleSourceFactory::activeSource): .

Source/WebKit:

* WebProcess/cocoa/UserMediaCaptureManager.cpp:
(WebKit::UserMediaCaptureManager::VideoFactory::setActiveSource):
Do nothing since GPUProcess will handle the muting itself if it creates multiple sources.
* WebProcess/cocoa/UserMediaCaptureManager.h:

LayoutTests:

* fast/mediastream/MediaStream-clone.html:
* fast/mediastream/MediaStreamTrack-clone.html:
* fast/mediastream/mediastreamtrack-video-clone.html:
* platform/ios/TestExpectations:
* platform/ios/mediastream/getUserMedia-single-capture.html:
muting is now longer synchronous in WebProcess since it relies on GPUProcess factory to mute the remote track.
Update the test to account for this.
Also, make sure to use a different device, so that we do not use a track cloning under the hood.
* webrtc/multi-video.html:

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

7 months agoRemove sync IPC when creating a remote capture source
youenn@apple.com [Tue, 10 Mar 2020 12:53:39 +0000 (12:53 +0000)]
Remove sync IPC when creating a remote capture source
https://bugs.webkit.org/show_bug.cgi?id=208816

Reviewed by Eric Carlson.

Source/WebCore:

Add a whenInitialized method to allow for async creation of realtime media source.
Use this method when creating a MediaStream for getUserMedia/getDisplayMedia.
Covered by existing tests.

* platform/mediastream/MediaStreamPrivate.cpp:
(WebCore::MediaStreamPrivate::create):
* platform/mediastream/MediaStreamPrivate.h:
* platform/mediastream/RealtimeMediaSource.h:
* platform/mediastream/RealtimeMediaSourceCenter.cpp:
(WebCore::RealtimeMediaSourceCenter::createMediaStream):

Source/WebKit:

Use whenInitialized to wait for the async IPC that tells whether the remote source was created successfully.
Use the async response to gather the capabilities so as to remove the corresponding sync IPC.

* Platform/IPC/Connection.h:
(IPC::AsyncReplyError::create):
* UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
(WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
* UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
* UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
* WebProcess/cocoa/UserMediaCaptureManager.cpp:
(WebKit::UserMediaCaptureManager::Source::didFail):
(WebKit::UserMediaCaptureManager::Source::setAsReady):
(WebKit::UserMediaCaptureManager::Source::setCapabilities):
(WebKit::UserMediaCaptureManager::createCaptureSource):
(WebKit::UserMediaCaptureManager::Source::capabilities):

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

7 months agoDo not process RTC Network messages coming from NetworkProcess if LibWebRTCNetwork...
youenn@apple.com [Tue, 10 Mar 2020 12:49:58 +0000 (12:49 +0000)]
Do not process RTC Network messages coming from NetworkProcess if LibWebRTCNetwork is not active
https://bugs.webkit.org/show_bug.cgi?id=207376

Reviewed by Eric Carlson.

In case LibWebRTCNetwork is not active, we do not have instantiated any peer connection.
We do not have started any related RTC thread so we are not expecting any RTC message from Network Process.
Exit early in that case.

* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::didReceiveMessage):
* WebProcess/Network/webrtc/LibWebRTCNetwork.h:
(WebKit::LibWebRTCNetwork::isActive const):

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

7 months agoUnreviewed, !USE(GSTREAMER_GL) build fix after r258197.
philn@webkit.org [Tue, 10 Mar 2020 12:33:23 +0000 (12:33 +0000)]
Unreviewed, !USE(GSTREAMER_GL) build fix after r258197.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::GstVideoFrameHolder::platformLayerBuffer):

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

7 months agoGenerate commit-queue status bubble from new EWS
aakash_jain@apple.com [Tue, 10 Mar 2020 12:27:17 +0000 (12:27 +0000)]
Generate commit-queue status bubble from new EWS
https://bugs.webkit.org/show_bug.cgi?id=208811

Reviewed by Jonathan Bedard.

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

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

7 months ago[GStreamer][GL] External OES textures rendering support
philn@webkit.org [Tue, 10 Mar 2020 12:08:53 +0000 (12:08 +0000)]
[GStreamer][GL] External OES textures rendering support
https://bugs.webkit.org/show_bug.cgi?id=208572

Patch by Philippe Normand <philn@igalia.com> on 2020-03-10
Reviewed by Žan Doberšek.

For hardware that contains native YUV samplers, some drivers may
only support external-oes import of YUV textures, so by supporting
this texture target in the MediaPlayer we can avoid some costly
operations in the pipeline.

* platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:
(webKitGLVideoSinkSetMediaPlayerPrivate):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
(WebCore::GstVideoFrameHolder::platformLayerBuffer):
(WebCore::MediaPlayerPrivateGStreamer::paint):
* platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:
(WebCore::VideoTextureCopierGStreamer::copyVideoTextureToPlatformTexture):
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::drawTexturedQuadWithProgram):
(WebCore::TextureMapperGL::drawTextureExternalOES):
* platform/graphics/texmap/TextureMapperGL.h:
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
(WebCore::TextureMapperPlatformLayerBuffer::clone):
(WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper):
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
* platform/graphics/texmap/TextureMapperShaderProgram.cpp:
(WebCore::TextureMapperShaderProgram::create):
* platform/graphics/texmap/TextureMapperShaderProgram.h:

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

7 months agoRegression r258148: js/dom/navigator-maxtouchpoints.html is consistently failing...
graouts@webkit.org [Tue, 10 Mar 2020 12:08:16 +0000 (12:08 +0000)]
Regression r258148: js/dom/navigator-maxtouchpoints.html is consistently failing on windows
https://bugs.webkit.org/show_bug.cgi?id=208856

Unreviewed test gardening.

Following the removal of ENABLE_POINTER_EVENTS, the feature is on by default everywhere and this test should now return 0 instead of undefined.

* platform/win/js/dom/navigator-maxtouchpoints-expected.txt:

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

7 months agoREGRESSION(r258182): [GTK] Remove reference to unrequestedTextCheckingSequence
dpino@igalia.com [Tue, 10 Mar 2020 11:48:53 +0000 (11:48 +0000)]
REGRESSION(r258182): [GTK] Remove reference to unrequestedTextCheckingSequence
https://bugs.webkit.org/show_bug.cgi?id=208852

Reviewed by Carlos Garcia Campos.

unrequestedTextCheckingSequence was removed in r258182. This variable
was still used in an assertion, which broke GTK Debug build.

* UIProcess/gtk/TextCheckerGtk.cpp:
(WebKit::TextChecker::requestCheckingOfString):

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

7 months agoAlign with Origin header changes
commit-queue@webkit.org [Tue, 10 Mar 2020 11:27:15 +0000 (11:27 +0000)]
Align with Origin header changes
https://bugs.webkit.org/show_bug.cgi?id=199261

Patch by Rob Buis <rbuis@igalia.com> on 2020-03-10
Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Import fetch/origin tests.

* resources/import-expectations.json:
* web-platform-tests/fetch/origin/assorted.window-expected.txt: Added.
* web-platform-tests/fetch/origin/assorted.window.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/fetch/origin/no-cors.any.html.
* web-platform-tests/fetch/origin/assorted.window.js: Added.
(promise_test.async const):
(promise_test):
(await.new.Promise):
(async const):
(navigationReferrerPolicy):
(fetchReferrerPolicy):
(referrerPolicyTestString):
* web-platform-tests/fetch/origin/no-cors.any-expected.txt: Removed.
* web-platform-tests/fetch/origin/no-cors.any.js: Removed.
* web-platform-tests/fetch/origin/no-cors.any.worker-expected.txt: Removed.
* web-platform-tests/fetch/origin/no-cors.any.worker.html: Removed.
* web-platform-tests/fetch/origin/resources/redirect-and-stash.py:
(main):
* web-platform-tests/fetch/origin/resources/referrer-policy.py: Added.
(main):
* web-platform-tests/fetch/origin/resources/w3c-import.log:
* web-platform-tests/fetch/origin/w3c-import.log:

Source/WebCore:

Call generateOriginHeader in more places so that we comply
more with "append a request `Origin` header" algorithm [1].

Test: imported/w3c/web-platform-tests/fetch/origin/assorted.window.html

[1] https://fetch.spec.whatwg.org/#append-a-request-origin-header

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::submitForm):
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::updateReferrerOriginAndUserAgentHeaders):

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

7 months agoDrop unused DisableICECandidateFiltering / EnableICECandidateFiltering IPC messages
cdumez@apple.com [Tue, 10 Mar 2020 09:55:07 +0000 (09:55 +0000)]
Drop unused DisableICECandidateFiltering / EnableICECandidateFiltering IPC messages
https://bugs.webkit.org/show_bug.cgi?id=208843
<rdar://problem/59683940>

Reviewed by Youenn Fablet.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_processDisplayName):
(WebKit::WebPage::disableICECandidateFiltering): Deleted.
(WebKit::WebPage::enableICECandidateFiltering): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

7 months agoJSC 32bits is failing on new test stress/numberingSystemsForLocale-cached-strings...
commit-queue@webkit.org [Tue, 10 Mar 2020 09:19:46 +0000 (09:19 +0000)]
JSC 32bits is failing on new test stress/numberingSystemsForLocale-cached-strings-should-be-immortal-and-safe-for-concurrent-access.js
https://bugs.webkit.org/show_bug.cgi?id=206864

Patch by Paulo Matos <pmatos@igalia.com> on 2020-03-10
Reviewed by Yusuke Suzuki.

Add new test to memory limited devices - behaviour is the same as
numberingSystemsForLocale-cached-strings-should-be-immortal-and-safe-for-concurrent-access.js
but it creates 25 threads instead of 100.

* stress/numberingSystemsForLocale-cached-strings-should-be-immortal-and-safe-for-concurrent-access_memory-limited.js: Added.
(let.theCode):

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

7 months agoREGRESSION: (r257905) [ Mac wk2 Debug ] ASSERTION FAILED: !m_isolatedWorld->isNormal...
ysuzuki@apple.com [Tue, 10 Mar 2020 08:32:56 +0000 (08:32 +0000)]
REGRESSION: (r257905) [ Mac wk2 Debug ] ASSERTION FAILED: !m_isolatedWorld->isNormal() || m_wrapper || !m_jsFunction
https://bugs.webkit.org/show_bug.cgi?id=208642

Reviewed by Darin Adler.

This patch fixes stale assertions and comments in JSEventListener.h, which has various problems.

1. This assertion is saying, "If m_wrapper is dead, m_jsFunction must be dead". This is wrong. Given that we have conservative
   GC, JSC never guarantees such a condition. Even if m_wrapper is dead, m_jsFunction can be alive by various reasons: conservative
   GC finds it, user code stores this function somewhere reachable from the root, etc.
   The reason why this wrong assertion exists here is because the JSEventListener code and assertion assume that m_jsFunction is nullptr
   when it is not initialized, and once it is initialized, it should be non nullptr. This is wrong because Weak<> can collect it if it
   is not retained. This `!m_jsFunction` check mixes "it is not initialized" and "it is already initialized but collected".
   The correct assertion should be checking `m_wrapper` and `m_jsFunction` are alive (not checking deadness, which is not guaranteed) if
   the event-listener is once initialized. This patch adds m_isInitialized member to track this status separately from `m_wrapper` and
   `m_jsFunction`.
2. JSEventListener::jsFunction has `if (!m_jsFunction)` condition. But this is not correct. This can revive JSFunction if it is collected
   because m_wrapper is gone or some way, but this is not expected behavior. The correct way is checking `m_isInitialized`. Once the event-listener
   is initialized, keeping m_wrapper and m_jsFunction alive is the responsibility of JSEventListener's owner.
3. The comments about "zombie m_jsFunctions" is wrong. We are using JSC::Weak<>. So if the object gets collected, it returns
   nullptr, not getting a zombie pointer.
4. We are emitting write-barrier in a wrong order. In the heavily stressed scenario, it is possible that concurrent marking
   scans JSEventListener just after we emit the write-barrier, and this marking misses the assigned value. We must emit
   a write-barrier after the assignment. If the write-barrier code is written after the assignment, it correctly offers memory
   fence to ensure this ordering.
5. We also remove "world is not normal, anything is allowed" assertion. The assertion is allowing non-normal world to get dead m_wrapper.
   But skipping event handlers only in non-normal world does not make sense. And it is originally added as a hack to avoid assertions
   caused by non-normal world.

While we are not sure which test is causing, it seems that we found a real bug by fixing this assertion[1].

[1]: https://bugs.webkit.org/show_bug.cgi?id=208798

* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::JSEventListener):
(WebCore::JSEventListener::visitJSFunction):
* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::wrapper const):
(WebCore::JSEventListener::setWrapperWhenInitializingJSFunction const):
(WebCore::JSEventListener::jsFunction const):
(WebCore::JSEventListener::setWrapper const): Deleted.
* bindings/js/JSLazyEventListener.cpp:
(WebCore::JSLazyEventListener::initializeJSFunction const):

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

7 months agoUnreviewed, fix "no return statement".
yoshiaki.jitsukawa@sony.com [Tue, 10 Mar 2020 07:11:30 +0000 (07:11 +0000)]
Unreviewed, fix "no return statement".

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

7 months agoAdd script to search for feature defines
don.olmstead@sony.com [Tue, 10 Mar 2020 04:26:23 +0000 (04:26 +0000)]
Add script to search for feature defines
https://bugs.webkit.org/show_bug.cgi?id=208726

Reviewed by Konstantin Tokarev.

Sync feature defines with the FeatureDefines.xcconfig files present in the
repository.

* Source/cmake/WebKitFeatures.cmake:

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

7 months ago[LayoutTests] Do not expose didAddHorizontal/VerticalScrollbar and willRemoveHorizont...
zalan@apple.com [Tue, 10 Mar 2020 04:07:04 +0000 (04:07 +0000)]
[LayoutTests] Do not expose didAddHorizontal/VerticalScrollbar and willRemoveHorizontal/VerticalScrollbar
https://bugs.webkit.org/show_bug.cgi?id=208833
<rdar://problem/60244801>

Reviewed by Simon Fraser.

Source/WebCore:

didAdd* and willRemove* functions are triggered by layout. Optimal layouts can happen at any point of time.
Tests should not rely on the number/order of layouts unless they are specifically designed
to test e.g. lack of layouts (see internals.layoutCount).
It's sufficient to dump the mouse entered/moved/etc actions only.

* platform/mock/ScrollAnimatorMock.cpp:
(WebCore::ScrollAnimatorMock::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorMock::didAddHorizontalScrollbar):
(WebCore::ScrollAnimatorMock::willRemoveVerticalScrollbar):
(WebCore::ScrollAnimatorMock::willRemoveHorizontalScrollbar):

LayoutTests:

* fast/scrolling/scroll-animator-basic-events-expected.txt:
* fast/scrolling/scroll-animator-basic-events.html:
* fast/scrolling/scroll-animator-overlay-scrollbars-clicked-expected.txt:
* fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html:
* fast/scrolling/scroll-animator-overlay-scrollbars-hovered-expected.txt:
* fast/scrolling/scroll-animator-select-list-events-expected.txt:
* fast/scrolling/scroll-animator-select-list-events.html:
* platform/mac-wk2/TestExpectations:

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

7 months agoBuild Fix
megan_gardner@apple.com [Tue, 10 Mar 2020 04:04:06 +0000 (04:04 +0000)]
Build Fix
https://bugs.webkit.org/show_bug.cgi?id=208838

Source/WebKit:

Build fix of older iOS.

Reviewed by Tim Horton.

* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant showDataDetectorsSheet]):
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel showDocumentPickerMenu]):

Source/WTF:

Reviewed by Tim Horton.

* wtf/PlatformHave.h:

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

7 months agoASSERT(!m_textCheckingRequest) on editing/spelling/spellcheck-async-remove-frame...
simon.fraser@apple.com [Tue, 10 Mar 2020 02:54:03 +0000 (02:54 +0000)]
ASSERT(!m_textCheckingRequest) on editing/spelling/spellcheck-async-remove-frame.html
https://bugs.webkit.org/show_bug.cgi?id=126606

Reviewed by Wenson Hsieh.

SpellChecker's sequence numbers need to be unique between frames, because they are sent out
Source/WebCore:

to EditorClient which may be one per web view, move from a per-SpellChecker int to
TextCheckingRequestIdentifier.

Change terminology from "sequence" to "identifier" and use Optional in
TextCheckingRequestData to represent the unset state.

Tested by existing tests.

* editing/SpellChecker.cpp:
(WebCore::SpellCheckRequest::SpellCheckRequest):
(WebCore::SpellCheckRequest::didSucceed):
(WebCore::SpellCheckRequest::didCancel):
(WebCore::SpellCheckRequest::setCheckerAndIdentifier):
(WebCore::SpellChecker::SpellChecker):
(WebCore::SpellChecker::requestCheckingFor):
(WebCore::SpellChecker::didCheck):
(WebCore::SpellChecker::didCheckSucceed):
(WebCore::SpellChecker::didCheckCancel):
(WebCore::SpellCheckRequest::setCheckerAndSequence): Deleted.
* editing/SpellChecker.h:
(WebCore::SpellChecker::lastRequestIdentifier const):
(WebCore::SpellChecker::lastProcessedIdentifier const):
(WebCore::SpellChecker::lastRequestSequence const): Deleted.
(WebCore::SpellChecker::lastProcessedSequence const): Deleted.
* platform/text/TextChecking.h:
(WebCore::TextCheckingRequestData::TextCheckingRequestData):
(WebCore::TextCheckingRequestData::identifier const):
(WebCore::TextCheckingRequestData::sequence const): Deleted.
* testing/Internals.cpp:
(WebCore::Internals::lastSpellCheckRequestSequence):
(WebCore::Internals::lastSpellCheckProcessedSequence):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

to EditorClient which may be one per web view, so use a static to hold the current
sequence number.

Also convert from int to TextCheckingSequence to make them easier to find, and use
Markable and Optional in TextCheckingRequestData to represent the unset state.

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<TextCheckingRequestData>::encode):
(IPC::ArgumentCoder<TextCheckingRequestData>::decode):

Source/WebKitLegacy/mac:

to EditorClient which may be one per web view, so use a static to hold the current
sequence number.

Also convert from int to TextCheckingSequence to make them easier to find, and use
Markable and Optional in TextCheckingRequestData to represent the unset state.

* WebCoreSupport/WebEditorClient.h:
* WebCoreSupport/WebEditorClient.mm:
(-[WebEditorSpellCheckResponder initWithClient:identifier:results:]):
(-[WebEditorSpellCheckResponder perform]):
(WebEditorClient::didCheckSucceed):
(WebEditorClient::requestCheckingOfString):
(-[WebEditorSpellCheckResponder initWithClient:sequence:results:]): Deleted.

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

7 months agoRemove obsolete feature flags
don.olmstead@sony.com [Tue, 10 Mar 2020 02:10:50 +0000 (02:10 +0000)]
Remove obsolete feature flags
https://bugs.webkit.org/show_bug.cgi?id=208830

Reviewed by Alex Christensen.

.:

Remove ENABLE_CSS_IMAGE_ORIENTATION, ENABLE_CUSTOM_SCHEME_HANDLER, ENABLE_FETCH_API,
and ENABLE_WEB_PROCESS_SANDBOX from list of feature definitions since they're unused.
Rename ENABLE_ACCESSIBILITY_STATIC_TREE to ENABLE_ACCESSIBILITY_ISOLATED_TREE.
Sort the declarations within the block and always use Toggle instead of Enable within
the descriptions.

* Source/cmake/OptionsFTW.cmake:
* Source/cmake/OptionsMac.cmake:
* Source/cmake/OptionsWin.cmake:
* Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:

Remove ENABLE_CUSTOM_SCHEME_HANDLER and ENABLE_MAC_VIDEO_TOOLBOX since they
are no longer used.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Remove ENABLE_CUSTOM_SCHEME_HANDLER and ENABLE_MAC_VIDEO_TOOLBOX since they
are no longer used.

* Configurations/FeatureDefines.xcconfig:
* editing/cocoa/AlternativeTextUIController.h: USE(DICTION_ALTERNATIVES) -> USE(DICTION_ALTERNATIVES)
* html/TextFieldInputType.cpp: ENABLE(DATALIST) -> ENABLE(DATALIST_ELEMENT)
(WebCore::TextFieldInputType::destroyShadowSubtree):
* platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm: ENABLE(WEBBPU) typo

Source/WebCore/PAL:

Remove ENABLE_CUSTOM_SCHEME_HANDLER and ENABLE_MAC_VIDEO_TOOLBOX since they
are no longer used.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit:

Remove ENABLE_CUSTOM_SCHEME_HANDLER and ENABLE_MAC_VIDEO_TOOLBOX since they
are no longer used.

* Configurations/FeatureDefines.xcconfig:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm: ENABLE(WIRELESS_TARGET_PLAYBACK) -> ENABLE(WIRELESS_PLAYBACK_TARGET).
(-[WKWebViewConfiguration copyWithZone:]):

Source/WebKitLegacy/mac:

Remove ENABLE_CUSTOM_SCHEME_HANDLER and ENABLE_MAC_VIDEO_TOOLBOX since they
are no longer used.

* Configurations/FeatureDefines.xcconfig:
* WebView/WebPreferences.mm: ENABLE(WIRELESS_TARGET_PLAYBACK) -> ENABLE(WIRELESS_PLAYBACK_TARGET)
(+[WebPreferences initialize]):
(-[WebPreferences allowsAirPlayForMediaPlayback]):
(-[WebPreferences setAllowsAirPlayForMediaPlayback:]):

Source/WebKitLegacy/win:

Remove ENABLE(FETCH_API) since its always enabled.

* WebView.cpp:
(WebView::notifyPreferencesChanged):

Source/WTF:

Remove ENABLE_CUSTOM_SCHEME_HANDLER as it is unused in source.

* wtf/PlatformEnable.h:

Tools:

Remove ENABLE_CUSTOM_SCHEME_HANDLER and ENABLE_MAC_VIDEO_TOOLBOX since they
are no longer used.

Also remove ENABLE_POINTER_EVENTS since the FeaturesDefines.xcconfig was not modified
when the compilation flag was removed in r258148.

Remove ENABLE_ACCELERATED_OVERFLOW_SCROLLING, ENABLE_CSS_IMAGE_ORIENTATION,
ENABLE_CUSTOM_SCHEME_HANDLER, and ENABLE_FETCH_API from FeatureList.pm.

* Scripts/webkitperl/FeatureList.pm:
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

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

7 months ago[iOS] Replace "unexpectedly resumed" observer with RunningBoard suspendible assertions
cdumez@apple.com [Tue, 10 Mar 2020 01:17:09 +0000 (01:17 +0000)]
[iOS] Replace "unexpectedly resumed" observer with RunningBoard suspendible assertions
https://bugs.webkit.org/show_bug.cgi?id=205687
<rdar://problem/57890246>

Reviewed by Tim Horton.

Adopt new RunningBoard process assertion to indicate that WebContent processes depend on their
UIProcess (and therefore, the UIProcess must be running if the WebContent process is). This
replaces our "Unexpectedly resumed" assertion which was causing unexpected terminations in some
cases.

* Configurations/WebKit.xcconfig:
* Platform/spi/ios/RunningBoardServicesSPI.h: Added.
* Scripts/process-entitlements.sh:
* Shared/DependencyProcessAssertion.cpp: Added.
(WebKit::DependencyProcessAssertion::DependencyProcessAssertion):
(WebKit::DependencyProcessAssertion::~DependencyProcessAssertion):
* Shared/DependencyProcessAssertion.h: Added.
* Shared/ios/DependencyProcessAssertionIOS.mm: Added.
(WebKit::DependencyProcessAssertion::DependencyProcessAssertion):
(WebKit::DependencyProcessAssertion::~DependencyProcessAssertion):
* Sources.txt:
* SourcesCocoa.txt:
* UIProcess/Cocoa/WebProcessProxyCocoa.mm:
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeConnection):
* WebProcess/WebProcess.h:
* WebProcess/cocoa/WebProcessCocoa.mm:

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

7 months agoWebKitTestRunner bundleID should not be cleared before every test
katherine_cheney@apple.com [Mon, 9 Mar 2020 23:59:40 +0000 (23:59 +0000)]
WebKitTestRunner bundleID should not be cleared before every test
https://bugs.webkit.org/show_bug.cgi?id=208823
<rdar://problem/60204539>

Reviewed by Per Arne Vollan.

This is causing test failures for layout tests which rely on the Info.plist
bundle identifier (not the one set via the override method).

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createWebViewWithOptions):
(WTR::TestController::ensureViewSupportsOptionsForTest):
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:

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

7 months agoREGRESSION: (257072) [ Mac wk2 Release ] fast/harness/uiscriptcontroller/concurrent...
lawrence.j@apple.com [Mon, 9 Mar 2020 23:48:27 +0000 (23:48 +0000)]
REGRESSION: (257072) [ Mac wk2 Release ] fast/harness/uiscriptcontroller/concurrent-ui-side-scripts.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=208264

Unreviewed test gardening.

Removing expectations as the test is no longer failing.

* platform/mac-wk2/TestExpectations:

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

7 months ago[macOS] Notification observer is not removed
pvollan@apple.com [Mon, 9 Mar 2020 23:48:02 +0000 (23:48 +0000)]
[macOS] Notification observer is not removed
https://bugs.webkit.org/show_bug.cgi?id=208834

Reviewed by Tim Horton.

Source/WebKit:

The Accessibility notification observer is not being removed on macOS.

API test: WebKit.EnableAccessibilityCrash

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::unregisterNotificationObservers):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/EnableAccessibility.mm: Added.
(TEST):

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

7 months agoREGRESSION (257846) Crash on maps.google.com under Element::isVisibleWithoutResolving...
zalan@apple.com [Mon, 9 Mar 2020 23:36:22 +0000 (23:36 +0000)]
REGRESSION (257846) Crash on maps.google.com under Element::isVisibleWithoutResolvingFullStyle
https://bugs.webkit.org/show_bug.cgi?id=208841
<rdar://problem/60238539>

Reviewed by Simon Fraser.

Resolve the computed style for the composed ancestors when not available.

* dom/Element.cpp:
(WebCore::Element::isVisibleWithoutResolvingFullStyle const):

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

7 months agoRemove required setting for libAccessibility.
andresg_22@apple.com [Mon, 9 Mar 2020 23:33:08 +0000 (23:33 +0000)]
Remove required setting for libAccessibility.
https://bugs.webkit.org/show_bug.cgi?id=208836
<rdar://problem/60227703>

Reviewed by Chris Fleizach.

Made libAccessibility an optional library for Webcore since
accessibility is soft linking it.

* WebCore.xcodeproj/project.pbxproj:

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

7 months ago@putByValDirect does not perform [[DefineOwnProperty]] correctly
shvaikalesh@gmail.com [Mon, 9 Mar 2020 23:17:41 +0000 (23:17 +0000)]
@putByValDirect does not perform [[DefineOwnProperty]] correctly
https://bugs.webkit.org/show_bug.cgi?id=208708

Reviewed by Yusuke Suzuki.

JSTests:

* test262/expectations.yaml: Mark 46 test cases as passing.

Source/JavaScriptCore:

This change adds inSparseIndexingMode() check to canDoFastPutDirectIndex(), fixing slow path
of @putByValDirect() to perform [[DefineOwnProperty]] according to spec [1] and aligning JSC
with V8 and SpiderMonkey.

This patch preserves existing behavior for Arguments exotic objects (thus the checks order)
and aligns slow path checks in JSObject::putDirectIndexSlowOrBeyondVectorLength
with JSObject::defineOwnIndexedProperty.

JetStream2 benchmark is neutral.

[1]: https://tc39.es/ecma262/#sec-validateandapplypropertydescriptor

* runtime/JSObject.cpp:
(JSC::canDoFastPutDirectIndex):

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

7 months ago[ iPadOS wk2 ] editing/selection/selection-change-in-mutation-event-by-remove-childre...
lawrence.j@apple.com [Mon, 9 Mar 2020 23:15:58 +0000 (23:15 +0000)]
[ iPadOS wk2 ] editing/selection/selection-change-in-mutation-event-by-remove-children.html is timing out.
Nhttps://bugs.webkit.org/show_bug.cgi?id=208840

Unreviewed test gardening.

* platform/ios-simulator-wk2/TestExpectations:

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

7 months ago[iOS] Only map UTI from tags in Safari
pvollan@apple.com [Mon, 9 Mar 2020 22:35:04 +0000 (22:35 +0000)]
[iOS] Only map UTI from tags in Safari
https://bugs.webkit.org/show_bug.cgi?id=208829
<rdar://problem/60234672>

Reviewed by Tim Horton.

Since this mapping caused regressions in other apps, only enable it for Safari as a temporary workaround.

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

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

7 months ago[ iPadOS wk2 Release ] fast/css-custom-paint/constructor.html is flaky timing out.
lawrence.j@apple.com [Mon, 9 Mar 2020 22:27:41 +0000 (22:27 +0000)]
[ iPadOS wk2 Release ] fast/css-custom-paint/constructor.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=208837

Unreviewed test gardening.

* platform/ios-simulator-wk2/TestExpectations:

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

7 months agoUnreviewed, drop forward declaration that is no longer needed after r258159.
cdumez@apple.com [Mon, 9 Mar 2020 21:55:13 +0000 (21:55 +0000)]
Unreviewed, drop forward declaration that is no longer needed after r258159.

* xml/XMLHttpRequestProgressEventThrottle.h:

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

7 months agoupload.py gets confused by git-svn checkouts, unable to upload test results from...
bburg@apple.com [Mon, 9 Mar 2020 21:50:24 +0000 (21:50 +0000)]
upload.py gets confused by git-svn checkouts, unable to upload test results from my desk build
https://bugs.webkit.org/show_bug.cgi?id=208729
<rdar://problem/60105447>

Reviewed by Jonathan Bedard.

Improve upload.py to look for the svn branch and revision for the 'webkit'
project and prefer those to the git equivalents (eg, prefer trunk/rNNNNN to master/<hash>).

* Scripts/webkitpy/common/checkout/scm/git.py:
(Git):
(Git.git_svn_id_regexp):
(Git._field_from_git_svn_id):
(Git.svn_revision):
(Git.svn_branch):
(Git.svn_url):
(Git.native_branch):
Refactor svn revision, branch, url to use the same regexp and helper code.

* Scripts/webkitpy/common/checkout/scm/stub_repository.py:
(StubRepository.svn_branch):
Expose a stub since this is used unconditionally by Port.commits_for_upload.

* Scripts/webkitpy/common/checkout/scm/svn.py:
(SVN.svn_branch):
(SVN.native_revision):
(SVN):
(SVN.native_branch):
Refactor so the actual implementation is contained in svn_revision / svn_branch.
The native_* methods call out to the SVN equivalents since this is an SVN repository.

* Scripts/webkitpy/port/base.py:
(Port.commits_for_upload):
Add special git-svn handling for the WebKit repository so that SVN branch and revision
is preferred over the git equivalents.

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

7 months ago[ Mac wk1 Debug ] inspector/script-profiler/event-type-Microtask.html is flaky failing.
lawrence.j@apple.com [Mon, 9 Mar 2020 21:48:51 +0000 (21:48 +0000)]
[ Mac wk1 Debug ] inspector/script-profiler/event-type-Microtask.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=208825

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

7 months agoUnreviewed build fix.
pvollan@apple.com [Mon, 9 Mar 2020 21:46:33 +0000 (21:46 +0000)]
Unreviewed build fix.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::decode):

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

7 months ago[GPUP] Implement Legacy EME API in the GPU Process
jer.noble@apple.com [Mon, 9 Mar 2020 20:23:45 +0000 (20:23 +0000)]
[GPUP] Implement Legacy EME API in the GPU Process
https://bugs.webkit.org/show_bug.cgi?id=208402
<rdar://problem/60178488>

Reviewed by Eric Carlson.

Follow-up: adding the RemoteLegacyCDMFactory as a suppliment got dropped from the initial patch by
a merge/rebase mistake.

* WebProcess/WebProcess.cpp:

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

7 months agoAlign garbage collection for XMLHttpRequest objects with the specification
cdumez@apple.com [Mon, 9 Mar 2020 20:17:21 +0000 (20:17 +0000)]
Align garbage collection for XMLHttpRequest objects with the specification
https://bugs.webkit.org/show_bug.cgi?id=208481

Reviewed by Ryosuke Niwa.

Align garbage collection for XMLHttpRequest objects with the specification:
- https://xhr.spec.whatwg.org/#garbage-collection

We now override ActiveDOMObject::hasPendingActivity() to match exactly the text
in the specification:
"""
An XMLHttpRequest object must not be garbage collected if its state is either
opened with the send() flag set, headers received, or loading, and it has one or
more event listeners registered whose type is one of readystatechange, progress,
abort, error, load, timeout, and loadend.
"""

Previously, we were trying to implement this behavior with ActiveDOMObject's
setPendingActivity() / unsetPendingActivity() but this was error and leak prone.
It was also keeping the JS wrapper alive too long in the cases where the JS
does not have any event listeners. If the JS has not event listeners, then we
can collect the JS wrapper, we just need to keep the implementation
XMLHttpRequest object for the duration of the load.

No new tests, covered by existing test such as:
fast/xmlhttprequest/xmlhttprequest-gc.html

* dom/EventTarget.cpp:
(WebCore::EventTarget::addEventListener):
(WebCore::EventTarget::removeEventListener):
(WebCore::EventTarget::removeAllEventListeners):
* dom/EventTarget.h:
(WebCore::EventTarget::eventListenersDidChange):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::XMLHttpRequest):
(WebCore::XMLHttpRequest::changeState):
(WebCore::XMLHttpRequest::open):
(WebCore::XMLHttpRequest::prepareToSend):
(WebCore::XMLHttpRequest::createRequest):
(WebCore::XMLHttpRequest::abort):
(WebCore::XMLHttpRequest::internalAbort):
(WebCore::XMLHttpRequest::networkError):
(WebCore::XMLHttpRequest::didFail):
(WebCore::XMLHttpRequest::didFinishLoading):
(WebCore::XMLHttpRequest::didReachTimeout):
(WebCore::XMLHttpRequest::contextDestroyed):
(WebCore::XMLHttpRequest::eventListenersDidChange):
(WebCore::XMLHttpRequest::hasPendingActivity const):
* xml/XMLHttpRequest.h:
* xml/XMLHttpRequestProgressEventThrottle.cpp:
(WebCore::XMLHttpRequestProgressEventThrottle::XMLHttpRequestProgressEventThrottle):
(WebCore::XMLHttpRequestProgressEventThrottle::dispatchEventWhenPossible):
(WebCore::XMLHttpRequestProgressEventThrottle::suspend):
(WebCore::XMLHttpRequestProgressEventThrottle::resume):
* xml/XMLHttpRequestProgressEventThrottle.h:

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

7 months ago[GTK] Gardening, update TestExpectations
dpino@igalia.com [Mon, 9 Mar 2020 20:10:06 +0000 (20:10 +0000)]
[GTK] Gardening, update TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=208810

Unreviewed gardening.

* platform/gtk/TestExpectations:

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

7 months agoCreating paths that are single-segment bezier or quad curves should not require a...
wenson_hsieh@apple.com [Mon, 9 Mar 2020 19:55:54 +0000 (19:55 +0000)]
Creating paths that are single-segment bezier or quad curves should not require a CGPath allocation
https://bugs.webkit.org/show_bug.cgi?id=208812

Reviewed by Tim Horton.

Extend the inline path data mechanism introduced in r258118 to encompass two more cases of simple path objects:
single-segment quad and bezier curves. In these scenarios, we can simply store the start point, end point, and
one or two control points (respectively). See below for more details; there should be no change in behavior.

* platform/graphics/InlinePathData.h:

Add the new inline path data types to the variant. Note that does not increase the size of the InlinePathData
variant, nor does it increase the size of Path, since the variant is already 32 bytes large due to ArcData.

(WebCore::QuadCurveData::encode const):
(WebCore::QuadCurveData::decode):
(WebCore::BezierCurveData::encode const):
(WebCore::BezierCurveData::decode):

Add encoders and decoders for QuadCurveData and BezierCurveData.

* platform/graphics/Path.cpp:
(WebCore::Path::apply const):

In the cases where we have quad and bezier curves, we can apply the path without having to fall back to
allocating a platform path object.

(WebCore::Path::currentPoint const):

Return endPoint in both of the new inline curve cases.

(WebCore::Path::elementCount const):

Return 2 in both of the new cases.

(WebCore::Path::addQuadCurveTo):
(WebCore::Path::addBezierCurveTo):

If the path is null (we haven't modified anything yet) or the path was only moved to some location, stuff
information about the quad or bezier curve into inline data on Path and avoid creating a CGPath on CoreGraphics
platforms (and other types of platform paths elsewhere).

* platform/graphics/Path.h:
* platform/graphics/cairo/PathCairo.cpp:
(WebCore::Path::addQuadCurveToSlowCase):
(WebCore::Path::addBezierCurveToSlowCase):
(WebCore::Path::addQuadCurveTo): Deleted.
(WebCore::Path::addBezierCurveTo): Deleted.
* platform/graphics/cg/PathCG.cpp:
(WebCore::Path::createCGPath const):
(WebCore::Path::addQuadCurveToSlowCase):
(WebCore::Path::addBezierCurveToSlowCase):

Add -SlowCase suffixes to these methods, and move the main implementation of addQuadCurve and addBezierCurve
into platform-agnostic code in Path.cpp where we update the inline path data and bail early if appropriate, and
otherwise fall back to addQuadCurveToSlowCase or addBezierCurveToSlowCase.

(WebCore::Path::addQuadCurveTo): Deleted.
(WebCore::Path::addBezierCurveTo): Deleted.
* platform/graphics/win/PathDirect2D.cpp:
(WebCore::Path::addQuadCurveToSlowCase):
(WebCore::Path::addBezierCurveToSlowCase):
(WebCore::Path::addQuadCurveTo): Deleted.
(WebCore::Path::addBezierCurveTo): Deleted.

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