Commit Graph

240929 Commits

Author SHA1 Message Date
Lauro Moura 34f1058370 [WPE] WebExtension API test /webkit/WebKitWebView/web-process-crashed is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=229067

Reviewed by Carlos Garcia Campos.

* TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp:
(testWebKitWebViewProcessCrashed): Make warnings non-fatal while waiting for the crash.
* TestWebKitAPI/glib/TestExpectations.json: Remove expectation


Canonical link: https://commits.webkit.org/240505@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281015 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-13 14:40:23 +00:00
Tim Nguyen f851a491b8 Check for dialog existence in top layer in HTMLDialogElement::showModal & close
https://bugs.webkit.org/show_bug.cgi?id=227907

Reviewed by Antti Koivisto.

Test: imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal.html

Test expectations are unchanged because the test uses elementFromPoint, meaning that behaviour difference isn't noticeable
until top layer rendering bits are implemented (which would change elementFromPoint's result by shuffling z-order based on top layer elements).

* dom/Element.h:
(WebCore::Element::isInTopLayer const):
* html/HTMLDialogElement.cpp:
(WebCore::HTMLDialogElement::showModal):
(WebCore::HTMLDialogElement::close):

Canonical link: https://commits.webkit.org/240504@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281014 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-13 14:16:31 +00:00
Jean-Yves Avenard 54ccd12b0d nexttrack and previoustrack MediaSession handlers not working
https://bugs.webkit.org/show_bug.cgi?id=229068
rdar://80100092

Reviewed by Youenn Fablet.

Map between MediaSession action next/previousTrack and RemoteControlCommandType ones
were inverted.
There is no infrastrure in place to ensure that the right MRMediaRemoteCommand is
used with the MediaRemote backend, which prevents automating the test.

* Modules/mediasession/MediaSession.cpp:
(WebCore::platformCommandForMediaSessionAction):


Canonical link: https://commits.webkit.org/240503@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281013 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-13 11:57:19 +00:00
Youenn Fablet 0004e55c9c Overly verbose catchable fetch error messages lead to cross-origin leaks
https://bugs.webkit.org/show_bug.cgi?id=228861

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

Rebasing tests with new error message.

* web-platform-tests/FileAPI/url/url-with-fetch.any-expected.txt:
* web-platform-tests/FileAPI/url/url-with-fetch.any.worker-expected.txt:
* web-platform-tests/clipboard-apis/async-navigator-clipboard-basics.https-expected.txt:
* web-platform-tests/content-security-policy/inside-worker/dedicatedworker-report-only-expected.txt:
* web-platform-tests/content-security-policy/inside-worker/serviceworker-report-only.https.sub-expected.txt:
* web-platform-tests/fetch/api/cors/cors-cookies.any.worker-expected.txt:
* web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-service-worker.https-expected.txt:
* web-platform-tests/fetch/http-cache/cc-request.any-expected.txt:
* web-platform-tests/fetch/http-cache/cc-request.any.worker-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/coep-on-response-from-service-worker.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/none-sw-from-none.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/none-sw-from-require-corp.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/require-corp-sw-from-none.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/require-corp-sw-from-require-corp.https-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/credentials.sub-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/credentials.sub-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/credentials.sub-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-credentials-setTimeout.sub-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-credentials.sub-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-event-referrer-policy.https-expected.txt:
* web-platform-tests/service-workers/service-worker/import-scripts-cross-origin.https-expected.txt:
* web-platform-tests/service-workers/service-worker/redirected-response.https-expected.txt:
* web-platform-tests/wasm/jsapi/table/constructor-reftypes.tentative.any.worker-expected.txt:
* web-platform-tests/wasm/jsapi/table/grow-reftypes.tentative.any.worker-expected.txt:
* web-platform-tests/wasm/jsapi/table/set-reftypes.tentative.any.worker-expected.txt:

Source/WebCore:

Standardize error messages to get more uniform with other browsers.
To continue supporting service worker errors going to page errors,
we add a boolean to ResourceError to control whether sanitizing the error message or not.
This allows to keep error messages from service worker type exceptions to be exposed in window environments through fetch rejection.
Also handle ScriptModuleLoader since it is doing its own SRI checks.
Covered by rebased tests.

* Modules/fetch/FetchBodyOwner.cpp:
(WebCore::FetchBodyOwner::loadingException const):
* Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::BodyLoader::didFail):
* platform/network/ResourceErrorBase.h:
(WebCore::ResourceErrorBase::sanitizedDescription const):
(WebCore::ResourceErrorBase::isSanitized const):
(WebCore::ResourceErrorBase::setAsSanitized):
(WebCore::ResourceErrorBase::ResourceErrorBase):
* platform/network/cf/ResourceError.h:
(WebCore::ResourceError::ResourceError):
* platform/network/curl/ResourceError.h:
(WebCore::ResourceError::ResourceError):
* platform/network/soup/ResourceError.h:
(WebCore::ResourceError::ResourceError):
* workers/WorkerScriptLoader.cpp:
(WebCore::WorkerScriptLoader::loadSynchronously):
* workers/service/FetchEvent.cpp:
(WebCore::FetchEvent::createResponseError):
(WebCore::FetchEvent::respondWith):
(WebCore::FetchEvent::promiseIsSettled):
* workers/service/FetchEvent.h:
* workers/service/context/ServiceWorkerFetch.cpp:
(WebCore::ServiceWorkerFetch::processResponse):
(WebCore::ServiceWorkerFetch::dispatchFetchEvent):
* bindings/js/ScriptModuleLoader.cpp:
(WebCore::ScriptModuleLoader::notifyFinished):

Source/WebKit:

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

LayoutTests:

* http/tests/contentextensions/block-ping-resource-type-raw-expected.txt:
* http/tests/contentextensions/fetch-redirect-blocked.html:
* http/tests/security/contentSecurityPolicy/worker-blob-inherits-csp-importScripts-redirect-cross-origin-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/worker-csp-importScripts-redirect-cross-origin-blocked-expected.txt:
* http/tests/subresource-integrity/sri-module-expected.txt:
* http/tests/workers/service/shift-reload-navigation-expected.txt:
* http/tests/workers/resources/worker-importScripts.js: changed error logging for better readability.
* http/tests/workers/worker-importScripts-expected.txt:
* http/wpt/service-workers/cors-preflight-star.any-serviceworker-expected.txt:
* js/dom/modules/module-fetch-failure-not-cached-expected.txt:
* platform/mac-wk1/http/tests/security/contentSecurityPolicy/worker-blob-inherits-csp-importScripts-redirect-cross-origin-blocked-expected.txt:
* platform/mac-wk1/http/tests/security/contentSecurityPolicy/worker-csp-importScripts-redirect-cross-origin-blocked-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/FileAPI/url/url-with-fetch.any-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/FileAPI/url/url-with-fetch.any.worker-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/clipboard-apis/async-navigator-clipboard-basics.https-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/content-security-policy/inside-worker/dedicatedworker-report-only-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-cache-only-if-cached.any-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-cache-only-if-cached.any.worker-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/cc-request.any-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/cc-request.any.worker-expected.txt:


Canonical link: https://commits.webkit.org/240502@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281012 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-13 10:22:38 +00:00
Sergio Villar Senin b31302ab13 Crash in MockMediaSourcePrivate
https://bugs.webkit.org/show_bug.cgi?id=226795

Reviewed by Darin Adler.

The MockMediaPlayerMediaSource uses callOnMainThread() to execute advanceCurrentTime(). It might
happen that the object is destructed before the callback is executed as it isn't a ref counted
object. That leads to a crash on ASAN builds.

Made the object capable of creating weak ptrs so that we could check whether the _this_ object
has been freed in the meantime or not. For the former case we just bail out.

* platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
(WebCore::MockMediaPlayerMediaSource::play): Create a WeakPtr.
(WebCore::MockMediaPlayerMediaSource::seekWithTolerance): Ditto.
(WebCore::MockMediaPlayerMediaSource::seekCompleted): Ditto.
* platform/mock/mediasource/MockMediaPlayerMediaSource.h: inherit from CanMakeWeakPtr.

Canonical link: https://commits.webkit.org/240501@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281011 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-13 09:38:55 +00:00
Martin Robinson 30c57c6430 Get lint-test-expectations passing
https://bugs.webkit.org/show_bug.cgi?id=228999

Reviewed by Ryan Haddad.

Tools:

* Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py:
(LayoutTestFinder._is_test_file): Added a list of patterns for tests to skip
and ensured that 'boot.xml' and 'root.xml' (spurious files created during
the run of the WebKit1 bot) are on the list.
* Scripts/webkitpy/layout_tests/controllers/layout_test_finder_unittest.py:
(LayoutTestFinderTests.test_is_test_file): Added a test for the changes.

LayoutTests:

* TestExpectations: Remove expectation for non-existent test.
* platform/ios-simulator/TestExpectations: Ditto.
* platform/ios-wk2/TestExpectations: Ditto.
* platform/ios/TestExpectations: Dito.
* platform/mac-wk1/TestExpectations: Ditto. Also, the expectations for the non-test
'boot.xml' and 'root.xml' have been moved to workarounds in webkitpy.
* platform/mac/TestExpectations: Remove references to non-existent tests. Also combined
one expectation that was not linting due to a problem like the one described in bug
120081.
* platform/win/TestExpectations: Ditto.


Canonical link: https://commits.webkit.org/240500@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281010 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-13 08:40:04 +00:00
Alex Christensen bfca3aabec Unprefix -webkit-backface-visibility
https://bugs.webkit.org/show_bug.cgi?id=170983

Patch by Alex Christensen <achristensen@webkit.org> on 2021-08-12
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* web-platform-tests/css/css-transforms/css-transform-property-existence-expected.txt: Added.
* web-platform-tests/css/css-transforms/css-transform-property-existence.html: Added.
* web-platform-tests/css/css-transforms/parsing/backface-visibility-computed-expected.txt:
* web-platform-tests/css/css-transforms/parsing/backface-visibility-valid-expected.txt:
* web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
* web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt:
* web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt:
* web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt:

Source/WebCore:

This has already been done by Chrome and Firefox.
Keep the prefixed version as an alias.

Test: imported/w3c/web-platform-tests/css/css-transforms/css-transform-property-existence.html

* animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
* css/CSSProperties.json:
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):

LayoutTests:

* platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
* platform/ios/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/ios/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
* platform/ios/svg/css/getComputedStyle-basic-expected.txt:
* platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/mac/svg/css/getComputedStyle-basic-expected.txt:

Canonical link: https://commits.webkit.org/240499@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281009 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-13 06:46:31 +00:00
Cameron McCormack 76ba1483ff Fix bounds checks for WhitespaceCache string lengths
https://bugs.webkit.org/show_bug.cgi?id=229066
<rdar://81850871>

Reviewed by Simon Fraser.

When the whitespace string length is maximumWhitespaceStringLength,
we read from and write to one element past the end of m_codes and
m_indexes. Since we don't need to store codes and indexes for zero
length strings, subtract one from the index we use.

* html/parser/HTMLConstructionSite.cpp:
(WebCore::WhitespaceCache::lookup):
* html/parser/HTMLConstructionSite.h:


Canonical link: https://commits.webkit.org/240498@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281008 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-13 05:45:45 +00:00
Peng Liu 2e739b9f26 REGRESSION (r280951): [ Big Sur ] TestWebKitAPI.AudioRoutingArbitration.Close is failing
https://bugs.webkit.org/show_bug.cgi?id=229040

Reviewed by Eric Carlson.

Function `AudioSessionRoutingArbitratorProxy::processDidTerminate()` should
be called only in the case that the corresponding WebContent process exits,
whereas `GPUProcessConnection::didClose()` (in WebContent process) deals with
the case that the GPU process crashes.

No new tests. Fix an API test failure.

* UIProcess/Media/cocoa/AudioSessionRoutingArbitratorProxyCocoa.mm:
(WebKit::AudioSessionRoutingArbitratorProxy::processDidTerminate):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::gpuProcessExited):


Canonical link: https://commits.webkit.org/240497@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281007 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-13 03:58:52 +00:00
Lauro Moura 98ed0104d8 [WPE] Gardening web-process-crashed API test failure
Unreviewed test gardening.

* TestWebKitAPI/glib/TestExpectations.json:

Canonical link: https://commits.webkit.org/240496@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-13 03:34:00 +00:00
Carlos Alberto Lopez Perez 9a0ef8bd7c [GTK][WPE] Gardening of layout test failures
Unreviewed gardening

Rebaseline tests after r280953 and r279838 and report and mark new expected failures.

* platform/glib/TestExpectations:
* platform/glib/imported/w3c/web-platform-tests/content-security-policy/inside-worker/dedicatedworker-report-only-expected.txt: Added.
* platform/glib/imported/w3c/web-platform-tests/content-security-policy/inside-worker/serviceworker-report-only.https.sub-expected.txt: Added.
* platform/glib/imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/header-parsing.https-expected.txt: Added.
* platform/gtk/TestExpectations:

Canonical link: https://commits.webkit.org/240495@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281002 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-13 01:26:01 +00:00
David Kilzer c9eac933d4 ThreadSanitizer: data race in WebCore::CARingBufferStorageVector::setCurrentFrameBounds() / getCurrentFrameBounds()
<https://webkit.org/b/229014>
<rdar://problem/81817224>

Reviewed by Chris Dumez.

This turned out to be a false-positive since reads and writes
are protected differently, and it's okay if a read returns data
from the ring buffer that is one slot older than the current
write.

Covered by layout tests running with TSan:
    fast/mediastream/getUserMedia-webaudio.html
    fast/mediastream/mediastreamtrack-audio-clone.html
    imported/w3c/web-platform-tests/webrtc/RTCDTMFSender-insertDTMF.https.html
    imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState.https.html
    imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-track-stats.https.html
    imported/w3c/web-platform-tests/webrtc/protocol/missing-fields.html
    webrtc/audio-peer-connection-g722.html
    webrtc/audio-peer-connection-webaudio.html
    webrtc/audio-replace-track.html
    webrtc/peer-connection-audio-mute.html
    webrtc/peer-connection-audio-mute2.html
    webrtc/peer-connection-createMediaStreamDestination.html
    webrtc/peer-connection-remote-audio-mute.html
    webrtc/peer-connection-remote-audio-mute2.html

* platform/audio/cocoa/CARingBuffer.cpp:
(WebCore::CARingBufferStorageVector::getCurrentFrameBounds):
(WebCore::CARingBufferStorageVector::currentStartFrame const):
(WebCore::CARingBufferStorageVector::currentEndFrame const):
- Add SUPPRESS_TSAN attribute since reads are protected by
  std::atomic<int32_t> m_timeBoundsQueuePtr only being
  incremented after the next m_timeBoundsQueue slot is updated.
  Writes are potected by
  Locker locker { m_currentFrameBoundsLock }.


Canonical link: https://commits.webkit.org/240494@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281001 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-13 01:13:17 +00:00
Chris Dumez 6c8c7a2263 Regression(r273194) Exception being thrown in [WebMainThreadInvoker forwardInvocation] should be autoreleased
https://bugs.webkit.org/show_bug.cgi?id=229056

Reviewed by Geoffrey Garen.

Exception being thrown in [WebMainThreadInvoker forwardInvocation] should be autoreleased. I got this wrong
in r273194.

* Misc/WebNSObjectExtras.mm:
(-[WebMainThreadInvoker forwardInvocation:]):


Canonical link: https://commits.webkit.org/240493@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280999 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-13 00:08:04 +00:00
Mark Lam 365ae4fc2e Refactor some ARM64EHash code.
https://bugs.webkit.org/show_bug.cgi?id=229054

Reviewed by Keith Miller and Robin Morisset.

This patch only refactors ARM64EHash code by moving some methods into the private
section, and removing some unneeded static_casts.

Verified with a diff of `otool -tv` dumps of the built JavaScriptCore binaries,
that there are no diffs in the generated code from this change.

* assembler/AssemblerBuffer.h:
(JSC::ARM64EHash::ARM64EHash):
(JSC::ARM64EHash::update):
(JSC::ARM64EHash::makeDiversifier):
(JSC::ARM64EHash::nextValue):
(JSC::ARM64EHash::bitsForDiversifier):
(JSC::ARM64EHash::currentHash):



Canonical link: https://commits.webkit.org/240492@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280996 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 23:49:42 +00:00
Ayumi Kojima fd829377ee [ Mac wk1 ] imported/w3c/web-platform-tests/FileAPI/url/url-in-tags.window.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=229058

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

Canonical link: https://commits.webkit.org/240491@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280994 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 23:31:26 +00:00
Chris Dumez 874b3cae87 REGRESSION (iPadOS 14): [ iPadOS wk2 ] TestWebKitAPI.ServiceWorkers.SuspendNetworkProcess is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=217714
<rdar://problem/70296664>

Reviewed by Geoffrey Garen.

Give the database some time to get written out to disk before we try and suspend the network process, to try
and address the flakiness.

* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:


Canonical link: https://commits.webkit.org/240490@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280992 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 23:26:58 +00:00
Ayumi Kojima 15c93f4cf6 [ MacOS EWS ] 3 inspector/canvas/* tests are flaky failing/ crashing.
https://bugs.webkit.org/show_bug.cgi?id=229043

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

Canonical link: https://commits.webkit.org/240489@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280990 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 23:02:26 +00:00
Patrick Angle c509abdd0d Web Inspector: Adding execution contexts after page load doesn't show a hidden execution selector
https://bugs.webkit.org/show_bug.cgi?id=229053

Reviewed by Devin Rousso.

Add a handler for execution contexts being added to update the display of the execution context list, as when
there is only a single context at page load the dropdown will be hidden and thus needs to be shown when an
execution context is added after page load.

* UserInterface/Views/QuickConsole.js:
(WI.QuickConsole):
(WI.QuickConsole.prototype._handleFrameExecutionContextAdded):


Canonical link: https://commits.webkit.org/240488@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280989 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 22:50:45 +00:00
Alex Christensen e038744aab Unreviewed, reverting r280977.
Seems to have broken a test in debug

Reverted changeset:

"Migrate Performance::resourceTimingBufferFullTimerFired to
HTML event loop"
https://bugs.webkit.org/show_bug.cgi?id=229044
https://commits.webkit.org/r280977



Canonical link: https://commits.webkit.org/240487@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280988 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 22:27:09 +00:00
Wenson Hsieh dba3abc6e2 [ iOS Debug] 3 editing/pasteboard/smart-paste-paragraph tests are flaky failing
https://bugs.webkit.org/show_bug.cgi?id=228285
rdar://81118724

Reviewed by Tim Horton and Aditya Keerthi.

Source/WebKit:

Add SPI declarations. See Tools/ChangeLog for more details.

* Platform/spi/ios/TextInputSPI.h:
* Platform/spi/ios/UIKitSPI.h:

Tools:

These three editing tests occasionally fail when synthesizing a double-tap gesture in order to select a word in
editable content. This happens because unless UIKit has observed at least one keypress event (e.g. from a
previous editing test), it presents the software keyboard underneath `-[UIKeyboardImpl showKeyboardIfNeeded]`
when setting the selection via UITextSelectionInteraction. This causes the input view frame to expand from the
collapsed (UCB) height of 44pt to the full software keyboard height, which in turn causes the second touch in
the synthesized double tap gesture to _sometimes_ hit-test to the wrong location, resulting in these test
failures.

To mitigate this, ensure that we have consistent behavior in layout tests when changing the text selection in
editable content by directly setting a TextInput default to make the keyboard behave as if it has previously
seen a keypress via the hardware keyboard.

* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::platformResetStateToConsistentValues):

LayoutTests:

Remove the flaky test failure expectations.

* platform/ios-wk2/TestExpectations:


Canonical link: https://commits.webkit.org/240486@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 21:13:45 +00:00
Ayumi Kojima 9c324732f2 [ MacOS EWS ] inspector/canvas/recording-webgl-snapshots.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=229043

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

Canonical link: https://commits.webkit.org/240485@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 20:49:58 +00:00
Saam Barati 3b12d65915 Update ARM64EHash
https://bugs.webkit.org/show_bug.cgi?id=228962
<rdar://79883337>

Reviewed by Mark Lam.

* assembler/AssemblerBuffer.h:
(JSC::ARM64EHash::makeDiversifier):
(JSC::ARM64EHash::nextValue):
(JSC::ARM64EHash::bitsForDiversifier):
(JSC::ARM64EHash::currentHash):
(JSC::ARM64EHash::setUpdatedHash):
(JSC::ARM64EHash::ARM64EHash):
(JSC::ARM64EHash::update):
(JSC::ARM64EHash::finalize):
(JSC::AssemblerBuffer::AssemblerBuffer):
(JSC::AssemblerBuffer::putIntegralUnchecked):
(JSC::AssemblerBuffer::hash const):
* assembler/LinkBuffer.cpp:
(JSC::LinkBuffer::copyCompactAndLinkCode):


Canonical link: https://commits.webkit.org/240484@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280984 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 20:45:02 +00:00
Patrick Angle b51b1c8bd1 Add myself (Patrick Angle) to watchlist for Inspector code changes
https://bugs.webkit.org/show_bug.cgi?id=229046

Reviewed by Darin Adler.

* Scripts/webkitpy/common/config/watchlist:


Canonical link: https://commits.webkit.org/240483@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 20:35:58 +00:00
Said Abou-Hallawa d6141282fb [GPU Process] REGRESSION: WebContent often crashes when using iCloud photos
https://bugs.webkit.org/show_bug.cgi?id=228969
<rdar://81761078>

Reviewed by Simon Fraser.

Terminating the GPUProcess is very stressful situation which has to be
handled carefully. The side effect of each function which is called through
gpuProcessConnectionDidClose() has to be understood to get the right
sequence of calls. There are problems in releasing all kinds of resources.

- Releasing NativeImage: Calling clearNativeImageMap() after clearing the
backend of the ImageBuffers was causing a problem. When clearing the
backend of an ImageBuffer, it will clear its DisplayList which may have
the last reference to a NativeImage. The destructor of NativeImage calls
releaseRemoteResource() before it is removed from the the NativeImageMap.
This will send a message to the relaunched GPUP to release a NativeImage
which is not in its cache.

- Releasing Font: clearFontMap() was always calling releaseRemoteResource()
even if it is called form  remoteResourceCacheWasDestroyed(). This should
not happen because the connection with GPUProcess has been closed.

- Releasing ImageBuffer: This happen when a DisplayList of an ImageBuffer
'A' holds the last reference to another ImageBuffer 'B' and we call
clearBackend() for 'A'. clearBackend() will clear the DisplayList of 'A'
and causes the deletion of 'B'. In this case we should not call
releaseImageBuffer() for 'B' because the GPUPProcess is closed.

* WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
(WebKit::RemoteImageBufferProxy::~RemoteImageBufferProxy):
If the ImageBuffer is being released because of the clean-up we do when
the GPUProcess is terminated, we should not release the corresponding
RemoteImageBuffer since it is already gone.

* WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
(WebKit::RemoteRenderingBackendProxy::isGPUProcessConnectionClosed const):
This will return true if we are deleting a RemoteImageBufferProxy through
RemoteResourceCacheProxy::remoteResourceCacheWasDestroyed().

* WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp:
(WebKit::RemoteResourceCacheProxy::releaseAllRemoteFonts):
This function will be used to release the remote fonts. It should be called
from RemoteResourceCacheProxy::releaseMemory() where we sure the GPUP is
alive and all the fonts are cached there.

(WebKit::RemoteResourceCacheProxy::clearFontMap):
The part of releasing the remote fonts was moved from this function to
releaseAllRemoteFonts().

(WebKit::RemoteResourceCacheProxy::remoteResourceCacheWasDestroyed):
1. Clearing the NativeImages and the Fonts has to come before clearing
the backends of the ImageBuffers. The reason is clearBackend() clears the
DisplayList which may release the last reference of a NativeImage or Font.
We want to detach the NativeImages and the Fonts from the cache before then.
2. We should have two different loops: one for clearing the backends of
the ImageBuffers and another one for recreating these backends. The reason
for this is clearBackend() clears the DisplayList which may release the
last reference of a another source RemoteImageBufferProxy used by a
DrawImageBuffer item for example.

(WebKit::RemoteResourceCacheProxy::releaseMemory):
* WebProcess/GPU/graphics/RemoteResourceCacheProxy.h:


Canonical link: https://commits.webkit.org/240482@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 20:28:00 +00:00
Sam Weinig 9cc977ee4d Allow testing of the final UIView tree on iOS platforms
https://bugs.webkit.org/show_bug.cgi?id=229016

Reviewed by Tim Horton.

Source/WebKit:

Test: remote-layer-tree/ios/uiview-tree-basic.html

* UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h:
* UIProcess/API/ios/WKWebViewTestingIOS.mm:
(allowListedClassToString):
(dumpUIView):
(-[WKWebView _uiViewTreeAsText]):
Add partner SPI called _uiViewTreeAsText that dumps the WKWebView's
UIView tree as constructed via remote layer creation. It currently
dumps some basic properties of each view and uses an allow list of
class names so changes to implementation details in frameworks below
us, like UIKit, don't cause tests to fail.

Tools:

* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.h:
(WTR::UIScriptController::uiViewTreeAsText const):
* WebKitTestRunner/ios/UIScriptControllerIOS.h:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptControllerIOS::uiViewTreeAsText const):
Pipe new _uiViewTreeAsText SPI through to UIScriptController, matching the pattern
established by scrollingTreeAsText.

LayoutTests:

* remote-layer-tree: Added.
* remote-layer-tree/ios: Added.
* remote-layer-tree/ios/uiview-tree-basic-expected.txt: Added.
* remote-layer-tree/ios/uiview-tree-basic.html: Added.
Add basic test case excercising UIView tree dumping to ensure
it is working properly.

* resources/ui-helper.js:
(window.UIHelper.getUIViewTree):
Add helper to use get the UIView tree as text.

* TestExpectations:
* platform/ios/TestExpectations:
Ensure these tests are only run on iOS.


Canonical link: https://commits.webkit.org/240481@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280980 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 20:16:51 +00:00
Alex Christensen 5a8a506c71 Migrate Performance::resourceTimingBufferFullTimerFired to HTML event loop
https://bugs.webkit.org/show_bug.cgi?id=229044

Patch by Alex Christensen <achristensen@webkit.org> on 2021-08-12
Reviewed by Geoff Garen.

Covered by existing tests.
There should be no change in behavior.

* page/Performance.cpp:
(WebCore::Performance::Performance):
(WebCore::Performance::addResourceTiming):
(WebCore::Performance::dispatchResourceTimingBufferFullEvent):
(WebCore::Performance::contextDestroyed): Deleted.
(WebCore::Performance::resourceTimingBufferFullTimerFired): Deleted.
* page/Performance.h:

Canonical link: https://commits.webkit.org/240480@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 19:25:04 +00:00
Jer Noble e3995c6bd6 [macOS] Enter fullscreen animation interferes with auto-hiding menu bar
https://bugs.webkit.org/show_bug.cgi?id=229039
<rdar://79150656>

Reviewed by Eric Carlson.

Source/WebCore:

Add a new utility method to calculate the available screen rect taking menu bar
hiding into account.

* platform/PlatformScreen.h:
* platform/mac/PlatformScreenMac.mm:
(WebCore::screenRectAvoidingMenuBar):

Source/WebKit:

When entering fullscreen, if a user has unchecked the "auto-hide menu bar in fullscreen"
setting, the fullscreen animation will enter to the full screen frame, then snap down once
the animation completes to reveal the menu bar. Instead, use a WebCore utility method to
calculate the screen's frame taking that menu bar into account, and use it for the initial
enter fullscreen animation.

* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController enterFullScreen:]):


Canonical link: https://commits.webkit.org/240479@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280976 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 19:16:04 +00:00
Nikita Vasilyev 9de8879fe6 REGRESSION (r271348): Web Inspector: Table headers have vertical scrollbar
https://bugs.webkit.org/show_bug.cgi?id=228671
<rdar://problem/81638278>

Reviewed by Devin Rousso.

* UserInterface/Views/Table.css:
(.table > .header):
Set overflow hidden for the y axis, not just x axis.


Canonical link: https://commits.webkit.org/240478@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280974 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 19:07:27 +00:00
Devin Rousso dad2a5dec4 Fix some `NSAttributedString` inconsistencies between WK1 and WK2
https://bugs.webkit.org/show_bug.cgi?id=229013
<rdar://problem/81215696>

Reviewed by Timothy Hatcher.

Source/WebCore:

`NSAttributedString` now uses WK2, which has caused us to discover some inconsistencies (and bugs).

Tests: NSAttributedStringWebKitAdditions.DefaultFontSize
       NSAttributedStringWebKitAdditions.MultipleParagraphs

* editing/cocoa/HTMLConverter.mm:
(HTMLConverter::_blockLevelElementForNode):
Check the given node before looking at the parent as it could already be a block. This
allows for sequental `<p>` to each have their own positioning instead of only the first one.
(HTMLConverter::computedAttributesForElement):
Fix typo that used `margin-right` instead of `margin-bottom` when setting `paragraphSpacing`.

Source/WebKit:

`NSAttributedString` now uses WK2, which has caused us to discover some inconsistencies (and bugs).

* UIProcess/API/Cocoa/NSAttributedString.mm:
(+[_WKAttributedStringWebViewCache configuration]):
Change the default font size to 12 to match WK1.

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/NSAttributedStringWebKitAdditions.mm: Added.
(TEST.NSAttributedStringWebKitAdditions.DefaultFontSize):
(TEST.NSAttributedStringWebKitAdditions.MultipleParagraphs):

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:


Canonical link: https://commits.webkit.org/240477@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280973 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 18:58:47 +00:00
Youenn Fablet 3bcf265b55 Adopt span in RTCRtpSFrameTransform
https://bugs.webkit.org/show_bug.cgi?id=229029

Reviewed by Eric Carlson.

Source/WebCore:

Transition to Span for improved readability, no change of behavior.

* Modules/mediastream/RTCEncodedFrame.cpp:
(WebCore::RTCEncodedFrame::data const):
* Modules/mediastream/RTCRtpSFrameTransform.cpp:
(WebCore::processFrame):
(WebCore::RTCRtpSFrameTransform::initializeTransformer):
(WebCore::transformFrame):
(WebCore::RTCRtpSFrameTransform::createStreams):
* Modules/mediastream/RTCRtpSFrameTransformer.cpp:
(WebCore::RTCRtpSFrameTransformer::decryptFrame):
(WebCore::RTCRtpSFrameTransformer::encryptFrame):
(WebCore::RTCRtpSFrameTransformer::transform):
* Modules/mediastream/RTCRtpSFrameTransformer.h:
* Modules/mediastream/RTCRtpScriptTransformer.cpp:
(WebCore::RTCRtpScriptTransformer::writable):
* Modules/mediastream/RTCRtpTransformableFrame.h:
(): Deleted.
* Modules/mediastream/libwebrtc/LibWebRTCRtpTransformableFrame.cpp:
(WebCore::LibWebRTCRtpTransformableFrame::data const):
(WebCore::LibWebRTCRtpTransformableFrame::setData):
* Modules/mediastream/libwebrtc/LibWebRTCRtpTransformableFrame.h:

Tools:

* TestWebKitAPI/Tests/WebCore/RTCRtpSFrameTransformerTests.cpp:
(TestWebKitAPI::TEST):


Canonical link: https://commits.webkit.org/240476@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280972 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 17:13:11 +00:00
Chris Dumez 5d7cb25d03 Unreviewed API test build fix with recent MacOS SDK.
* TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:
(verifyCertificateAndPublicKey):

Canonical link: https://commits.webkit.org/240475@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280969 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 15:48:58 +00:00
Johnson Zhou 88f650a340 Removal of "TypedOM" prefix for CSSOM Object names
https://bugs.webkit.org/show_bug.cgi?id=229028

Patch by Johnson Zhou <qiaosong_zhou@apple.com> on 2021-08-12
Reviewed by Alex Christensen.

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCSSStyleValueCustom.cpp: Renamed from Source/WebCore/bindings/js/JSTypedOMCSSStyleValueCustom.cpp.
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* css/typedom/CSSNumericValue.cpp: Renamed from Source/WebCore/css/typedom/TypedOMCSSUnitValue.cpp.
* css/typedom/CSSNumericValue.h: Renamed from Source/WebCore/css/typedom/TypedOMCSSNumericValue.h.
* css/typedom/CSSNumericValue.idl: Renamed from Source/WebCore/css/typedom/TypedOMCSSNumericValue.idl.
* css/typedom/CSSStyleImageValue.cpp: Renamed from Source/WebCore/css/typedom/TypedOMCSSImageValue.cpp.
(WebCore::CSSStyleImageValue::CSSStyleImageValue):
(WebCore::CSSStyleImageValue::document const):
* css/typedom/CSSStyleImageValue.h: Renamed from Source/WebCore/css/typedom/TypedOMCSSImageValue.h.
* css/typedom/CSSStyleImageValue.idl: Renamed from Source/WebCore/css/typedom/TypedOMCSSImageValue.idl.
* css/typedom/CSSStyleValue.cpp: Renamed from Source/WebCore/css/typedom/TypedOMCSSStyleValue.cpp.
* css/typedom/CSSStyleValue.h: Renamed from Source/WebCore/css/typedom/TypedOMCSSStyleValue.h.
* css/typedom/CSSStyleValue.idl: Renamed from Source/WebCore/css/typedom/TypedOMCSSStyleValue.idl.
* css/typedom/CSSUnitValue.cpp: Renamed from Source/WebCore/css/typedom/TypedOMCSSNumericValue.cpp.
* css/typedom/CSSUnitValue.h: Renamed from Source/WebCore/css/typedom/TypedOMCSSUnitValue.h.
* css/typedom/CSSUnitValue.idl: Renamed from Source/WebCore/css/typedom/TypedOMCSSUnitValue.idl.
* css/typedom/CSSUnparsedValue.cpp: Renamed from Source/WebCore/css/typedom/TypedOMCSSUnparsedValue.cpp.
* css/typedom/CSSUnparsedValue.h: Renamed from Source/WebCore/css/typedom/TypedOMCSSUnparsedValue.h.
* css/typedom/CSSUnparsedValue.idl: Renamed from Source/WebCore/css/typedom/TypedOMCSSUnparsedValue.idl.
* css/typedom/StylePropertyMapReadOnly.cpp:
(WebCore::StylePropertyMapReadOnly::reifyValue):
(WebCore::StylePropertyMapReadOnly::customPropertyValueOrDefault):
* css/typedom/StylePropertyMapReadOnly.h:
* css/typedom/StylePropertyMapReadOnly.idl:
* dom/StyledElement.cpp:
* html/CustomPaintImage.cpp:
(WebCore::extractComputedProperty):
(WebCore::CustomPaintImage::doCustomPaint):
* html/ImageBitmap.cpp:
(WebCore::ImageBitmap::createPromise):
* html/ImageBitmap.h:
* html/canvas/CanvasDrawImage.idl:
* html/canvas/CanvasFillStrokeStyles.idl:
* html/canvas/CanvasRenderingContext.cpp:
(WebCore::CanvasRenderingContext::checkOrigin):
* html/canvas/CanvasRenderingContext.h:
* html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::size):
(WebCore::CanvasRenderingContext2DBase::drawImage):
(WebCore::CanvasRenderingContext2DBase::createPattern):
* html/canvas/CanvasRenderingContext2DBase.h:
* inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::processArgument):
(WebCore::InspectorCanvas::indexForData):
* inspector/InspectorCanvas.h:
* inspector/InspectorCanvasCallTracer.cpp:
* inspector/InspectorCanvasCallTracer.h:
* inspector/agents/InspectorCanvasAgent.cpp:
* page/WindowOrWorkerGlobalScope.idl:

Canonical link: https://commits.webkit.org/240474@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280968 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 15:47:18 +00:00
Jonathan Bedard c178e01d60 [check-github-mirror-integrity] Differentiate between slow sync and collapsed commits
https://bugs.webkit.org/show_bug.cgi?id=229004
<rdar://problem/81795644>

Reviewed by Aakash Jain.

* Scripts/check-github-mirror-integrity: Use commit timestamps to differentiate between a slow sync between svn.webkit.org
and GitHub and git-svn combining commits


Canonical link: https://commits.webkit.org/240473@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280967 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 15:23:37 +00:00
Carlos Garcia Campos d757ee4433 [GTK] Simplify TestWebKitAccessibility
https://bugs.webkit.org/show_bug.cgi?id=229032

Reviewed by Michael Catanzaro.

We don't really need to have a different process to test a11y. We can remove AccessibilityTestServer and use the
same test executable. That way we don't need to spawn a process and use DBus for the communication.

* TestWebKitAPI/Tests/WebKitGtk/AccessibilityTestServer.cpp: Removed.
* TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:
(AccessibilityTest::findTestApplication): Find the accessible application corresponding to the test executable.
(AccessibilityTest::waitUntilChildrenRemoved): Use the WebViewTest main loop.
(testAtspiBasicHierarchy): Use WebViewTest::loadHtml.
* TestWebKitAPI/glib/PlatformGTK.cmake:
* TestWebKitAPI/glib/WebKitGLib/TestMain.cpp:
(main): Set the program name to the executable name. It helps to a11y test to find the accessible app.

Canonical link: https://commits.webkit.org/240472@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280966 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 13:53:44 +00:00
Carlos Garcia Campos 2f1c6ce227 [GTK] run-gtk-tests always fails to start accessibility daemons
https://bugs.webkit.org/show_bug.cgi?id=229031

Reviewed by Michael Catanzaro.

This is because it uses exec_prefix variable from atspi2 pkg-config file to try to find the executables, but
atspi2 pkg-config file doesn't have a exec_prefix variable anymore. It was always set to $prefix, so we can just
use prefix variable instead.

* Scripts/run-gtk-tests:
(GtkTestRunner._lookup_atspi2_binary):

Canonical link: https://commits.webkit.org/240471@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280965 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 13:52:29 +00:00
Carlos Garcia Campos f3ef38babd [ATK] Critical warnings on children-changed::add signal emission
https://bugs.webkit.org/show_bug.cgi?id=229030

Reviewed by Michael Catanzaro.

Implement AtkObjectClass::ref_state_set.

* WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.cpp:
(webkitWebPageAccessibilityObjectRefStateSet): Return our child state set.
(webkit_web_page_accessibility_object_class_init): Add an implementation for AtkObjectClass::ref_state_set.

Canonical link: https://commits.webkit.org/240470@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280964 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 13:51:16 +00:00
Kimmo Kinnunen ff51121570 webgl/1.0.x/conformance/textures/misc/texture-corner-case-videos.html fails on Cocoa
https://bugs.webkit.org/show_bug.cgi?id=228821
<rdar://problem/81562236>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-08-12
Reviewed by Kenneth Russell.

When uploading the WebGL texture content from videos, use the video
visible data size instead of video element size. The video data can
be scaled with its filters, but we should upload only the original
pixels.

The GPU codepath already did this, but CPU codepath did not.
This change fixes the CPU codepath.

Fixes webgl/1.0.x/conformance/textures/misc/texture-corner-case-videos.html
webgl/2.0.y/conformance/textures/misc/texture-corner-case-videos.html

* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::texImageSourceHelper):
(WebCore::WebGLRenderingContextBase::videoFrameToImage):
(WebCore::WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer):
* html/canvas/WebGLRenderingContextBase.h:

Canonical link: https://commits.webkit.org/240469@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 13:35:06 +00:00
Kimmo Kinnunen 87795dfc3b ANGLE Cocoa compiles contents of ContextEAGL on mac
https://bugs.webkit.org/show_bug.cgi?id=228987

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-08-12
Reviewed by Kenneth Russell.

Add include guards that are consistent with other EAGL files.

* src/libANGLE/renderer/gl/eagl/ContextEAGL.cpp:

Canonical link: https://commits.webkit.org/240468@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280962 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 13:01:27 +00:00
Youenn Fablet d3ca165706 REGRESSION (r280726): [ Big Sur wk1 ] 25 imported/w3c/web-platform-tests/fetch/ failing
https://bugs.webkit.org/show_bug.cgi?id=228926
<rdar://problem/81715332>

Reviewed by Eric Carlson.

isFeatureFlagEnabled is called when creating/initializing WebPreferences.
It used to check for WebView, which triggers the execution of WebView initialize method
while DumpRenderTree is in the middle of creating its testing setup, including its storage testing sessions.
Instead, check for WebResource to remove this side effect and get back to past DumpRenderTree initialization.

* WebView/WebPreferencesDefaultValues.mm:
(WebKit::isFeatureFlagEnabled):


Canonical link: https://commits.webkit.org/240467@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 11:43:55 +00:00
Martin Robinson d59c757d43 Update import of css/css-position from WPT
https://bugs.webkit.org/show_bug.cgi?id=228988

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

* resources/import-expectations.json:
* resources/resource-files.json:
* web-platform-tests/css/css-position/crashtests/position-absolute-crash-014.html: Added.
* web-platform-tests/css/css-position/crashtests/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-position/resources/w3c-import.log.
* web-platform-tests/css/css-position/fixed-z-index-blend-expected.html:
* web-platform-tests/css/css-position/fixed-z-index-blend.html:
* web-platform-tests/css/css-position/invalidate-opacity-negative-z-index-expected.html: Added.
* web-platform-tests/css/css-position/invalidate-opacity-negative-z-index.html: Added.
* web-platform-tests/css/css-position/multicol/static-position/vlr-ltr-ltr-in-multicol-expected.html: Added.
* web-platform-tests/css/css-position/multicol/static-position/vlr-ltr-ltr-in-multicol.html: Added.
* web-platform-tests/css/css-position/multicol/static-position/vlr-ltr-rtl-in-multicol.tentative-expected.html: Added.
* web-platform-tests/css/css-position/multicol/static-position/vlr-ltr-rtl-in-multicol.tentative.html: Added.
* web-platform-tests/css/css-position/multicol/static-position/vlr-rtl-ltr-in-multicol.tentative-expected.html: Added.
* web-platform-tests/css/css-position/multicol/static-position/vlr-rtl-ltr-in-multicol.tentative.html: Added.
* web-platform-tests/css/css-position/multicol/static-position/vlr-rtl-rtl-in-multicol-expected.html: Added.
* web-platform-tests/css/css-position/multicol/static-position/vlr-rtl-rtl-in-multicol.html: Added.
* web-platform-tests/css/css-position/multicol/static-position/vrl-ltr-ltr-in-multicol-expected.html: Added.
* web-platform-tests/css/css-position/multicol/static-position/vrl-ltr-ltr-in-multicol.html: Added.
* web-platform-tests/css/css-position/multicol/static-position/vrl-ltr-rtl-in-multicol.tentative-expected.html: Added.
* web-platform-tests/css/css-position/multicol/static-position/vrl-ltr-rtl-in-multicol.tentative.html: Added.
* web-platform-tests/css/css-position/multicol/static-position/vrl-rtl-ltr-in-multicol.tentative-expected.html: Added.
* web-platform-tests/css/css-position/multicol/static-position/vrl-rtl-ltr-in-multicol.tentative.html: Added.
* web-platform-tests/css/css-position/multicol/static-position/vrl-rtl-rtl-in-multicol-expected.html: Added.
* web-platform-tests/css/css-position/multicol/static-position/vrl-rtl-rtl-in-multicol.html: Added.
* web-platform-tests/css/css-position/multicol/static-position/w3c-import.log: Added.
* web-platform-tests/css/css-position/multicol/vlr-ltr-ltr-in-multicols-expected.html: Added.
* web-platform-tests/css/css-position/multicol/vlr-ltr-ltr-in-multicols.html: Added.
* web-platform-tests/css/css-position/multicol/vlr-ltr-rtl-in-multicols.tentative-expected.html: Added.
* web-platform-tests/css/css-position/multicol/vlr-ltr-rtl-in-multicols.tentative.html: Added.
* web-platform-tests/css/css-position/multicol/vlr-rtl-ltr-in-multicols.tentative-expected.html: Added.
* web-platform-tests/css/css-position/multicol/vlr-rtl-ltr-in-multicols.tentative.html: Added.
* web-platform-tests/css/css-position/multicol/vlr-rtl-rtl-in-multicols-expected.html: Added.
* web-platform-tests/css/css-position/multicol/vlr-rtl-rtl-in-multicols.html: Added.
* web-platform-tests/css/css-position/multicol/vrl-ltr-ltr-in-multicols-expected.html: Added.
* web-platform-tests/css/css-position/multicol/vrl-ltr-ltr-in-multicols.html: Added.
* web-platform-tests/css/css-position/multicol/vrl-ltr-rtl-in-multicols.tentative-expected.html: Added.
* web-platform-tests/css/css-position/multicol/vrl-ltr-rtl-in-multicols.tentative.html: Added.
* web-platform-tests/css/css-position/multicol/vrl-rtl-ltr-in-multicols.tentative-expected.html: Added.
* web-platform-tests/css/css-position/multicol/vrl-rtl-ltr-in-multicols.tentative.html: Added.
* web-platform-tests/css/css-position/multicol/vrl-rtl-rtl-in-multicols-expected.html: Added.
* web-platform-tests/css/css-position/multicol/vrl-rtl-rtl-in-multicols.html: Added.
* web-platform-tests/css/css-position/multicol/w3c-import.log: Added.
* web-platform-tests/css/css-position/parsing/inset-after-computed-expected.txt: Removed.
* web-platform-tests/css/css-position/parsing/inset-after-computed.html: Removed.
* web-platform-tests/css/css-position/parsing/inset-after-invalid-expected.txt: Removed.
* web-platform-tests/css/css-position/parsing/inset-after-invalid.html: Removed.
* web-platform-tests/css/css-position/parsing/inset-after-valid-expected.txt: Removed.
* web-platform-tests/css/css-position/parsing/inset-after-valid.html: Removed.
* web-platform-tests/css/css-position/parsing/inset-before-computed-expected.txt: Removed.
* web-platform-tests/css/css-position/parsing/inset-before-computed.html: Removed.
* web-platform-tests/css/css-position/parsing/inset-before-invalid-expected.txt: Removed.
* web-platform-tests/css/css-position/parsing/inset-before-invalid.html: Removed.
* web-platform-tests/css/css-position/parsing/inset-before-valid-expected.txt: Removed.
* web-platform-tests/css/css-position/parsing/inset-before-valid.html: Removed.
* web-platform-tests/css/css-position/parsing/inset-computed-expected.txt: Added.
* web-platform-tests/css/css-position/parsing/inset-computed.html: Added.
* web-platform-tests/css/css-position/parsing/inset-end-computed-expected.txt: Removed.
* web-platform-tests/css/css-position/parsing/inset-end-computed.html: Removed.
* web-platform-tests/css/css-position/parsing/inset-end-invalid-expected.txt: Removed.
* web-platform-tests/css/css-position/parsing/inset-end-invalid.html: Removed.
* web-platform-tests/css/css-position/parsing/inset-end-valid-expected.txt: Removed.
* web-platform-tests/css/css-position/parsing/inset-end-valid.html: Removed.
* web-platform-tests/css/css-position/parsing/inset-invalid-expected.txt: Added.
* web-platform-tests/css/css-position/parsing/inset-invalid.html: Added.
* web-platform-tests/css/css-position/parsing/inset-start-computed-expected.txt: Removed.
* web-platform-tests/css/css-position/parsing/inset-start-computed.html: Removed.
* web-platform-tests/css/css-position/parsing/inset-start-invalid-expected.txt: Removed.
* web-platform-tests/css/css-position/parsing/inset-start-invalid.html: Removed.
* web-platform-tests/css/css-position/parsing/inset-start-valid-expected.txt: Removed.
* web-platform-tests/css/css-position/parsing/inset-start-valid.html: Removed.
* web-platform-tests/css/css-position/parsing/inset-valid-expected.txt: Added.
* web-platform-tests/css/css-position/parsing/inset-valid.html: Added.
* web-platform-tests/css/css-position/parsing/w3c-import.log:
* web-platform-tests/css/css-position/position-absolute-center-001-expected.xht: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-absolute-center-001.tentative-expected.xht.
* web-platform-tests/css/css-position/position-absolute-center-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-absolute-center-001.tentative.html.
* web-platform-tests/css/css-position/position-absolute-center-002-expected.xht: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-absolute-center-002.tentative-expected.xht.
* web-platform-tests/css/css-position/position-absolute-center-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-absolute-center-002.tentative.html.
* web-platform-tests/css/css-position/position-absolute-dynamic-auto-overflow-expected.xht: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-absolute-center-001.tentative-expected.xht.
* web-platform-tests/css/css-position/position-absolute-dynamic-auto-overflow.html: Added.
* web-platform-tests/css/css-position/position-absolute-dynamic-list-marker.html:
* web-platform-tests/css/css-position/position-absolute-fit-content-expected.xht: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-absolute-center-001.tentative-expected.xht.
* web-platform-tests/css/css-position/position-absolute-fit-content.html: Added.
* web-platform-tests/css/css-position/position-absolute-iframe-print-001.sub-expected.html: Added.
* web-platform-tests/css/css-position/position-absolute-iframe-print-001.sub.html: Added.
* web-platform-tests/css/css-position/position-absolute-iframe-print-002.sub-expected.html: Added.
* web-platform-tests/css/css-position/position-absolute-iframe-print-002.sub.html: Added.
* web-platform-tests/css/css-position/position-absolute-in-inline-003-expected.xht: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-absolute-center-001.tentative-expected.xht.
* web-platform-tests/css/css-position/position-absolute-in-inline-003.html: Added.
* web-platform-tests/css/css-position/position-absolute-in-inline-004-expected.xht: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-absolute-center-001.tentative-expected.xht.
* web-platform-tests/css/css-position/position-absolute-in-inline-004.html: Added.
* web-platform-tests/css/css-position/position-absolute-large-negative-inset-expected.html: Added.
* web-platform-tests/css/css-position/position-absolute-large-negative-inset.html: Added.
* web-platform-tests/css/css-position/position-absolute-replaced-intrinsic-size.tentative-expected.html: Added.
* web-platform-tests/css/css-position/position-absolute-replaced-intrinsic-size.tentative.html: Added.
* web-platform-tests/css/css-position/position-absolute-replaced-no-intrinsic-size.tentative-expected.html: Added.
* web-platform-tests/css/css-position/position-absolute-replaced-no-intrinsic-size.tentative.html: Added.
* web-platform-tests/css/css-position/position-absolute-replaced-with-display-table-expected.html: Added.
* web-platform-tests/css/css-position/position-absolute-replaced-with-display-table.html: Added.
* web-platform-tests/css/css-position/position-fixed-overflow-print-expected.html: Added.
* web-platform-tests/css/css-position/position-fixed-overflow-print.html: Added.
* web-platform-tests/css/css-position/position-fixed-scroll-nested-fixed-expected.html: Added.
* web-platform-tests/css/css-position/position-fixed-scroll-nested-fixed.html: Added.
* web-platform-tests/css/css-position/position-relative-001-expected.xht: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-absolute-center-001.tentative-expected.xht.
* web-platform-tests/css/css-position/position-relative-001.html: Added.
* web-platform-tests/css/css-position/position-relative-002-expected.xht: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-absolute-center-001.tentative-expected.xht.
* web-platform-tests/css/css-position/position-relative-002.html: Added.
* web-platform-tests/css/css-position/position-relative-003-expected.xht: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-absolute-center-001.tentative-expected.xht.
* web-platform-tests/css/css-position/position-relative-003.html: Added.
* web-platform-tests/css/css-position/position-relative-004-expected.xht: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-absolute-center-001.tentative-expected.xht.
* web-platform-tests/css/css-position/position-relative-004.html: Added.
* web-platform-tests/css/css-position/position-relative-005-expected.xht: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-absolute-center-001.tentative-expected.xht.
* web-platform-tests/css/css-position/position-relative-005.html: Added.
* web-platform-tests/css/css-position/position-relative-006-expected.xht: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-absolute-center-001.tentative-expected.xht.
* web-platform-tests/css/css-position/position-relative-006.html: Added.
* web-platform-tests/css/css-position/position-relative-007-expected.xht: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-absolute-center-001.tentative-expected.xht.
* web-platform-tests/css/css-position/position-relative-007.html: Added.
* web-platform-tests/css/css-position/position-relative-008-expected.html: Added.
* web-platform-tests/css/css-position/position-relative-008.html: Added.
* web-platform-tests/css/css-position/position-relative-009-expected.html: Added.
* web-platform-tests/css/css-position/position-relative-009.html: Added.
* web-platform-tests/css/css-position/position-relative-010-expected.html: Added.
* web-platform-tests/css/css-position/position-relative-010.html: Added.
* web-platform-tests/css/css-position/position-relative-011-expected.html: Added.
* web-platform-tests/css/css-position/position-relative-011.html: Added.
* web-platform-tests/css/css-position/position-relative-012-expected.html: Added.
* web-platform-tests/css/css-position/position-relative-012.html: Added.
* web-platform-tests/css/css-position/position-relative-013-expected.html: Added.
* web-platform-tests/css/css-position/position-relative-013.html: Added.
* web-platform-tests/css/css-position/position-relative-table-tfoot-top-absolute-child.html:
* web-platform-tests/css/css-position/position-sticky-input-box-gets-focused-after-scroll-expected.txt: Removed.
* web-platform-tests/css/css-position/position-sticky-offset-overflow-expected.txt: Removed.
* web-platform-tests/css/css-position/position-sticky-parsing-expected.txt: Removed.
* web-platform-tests/css/css-position/positon-absolute-scrollable-overflow-001-expected.txt: Added.
* web-platform-tests/css/css-position/positon-absolute-scrollable-overflow-001.html: Added.
* web-platform-tests/css/css-position/resources/position-absolute-iframe-child-002.sub.html: Added.
* web-platform-tests/css/css-position/resources/position-absolute-iframe-child.html: Added.
* web-platform-tests/css/css-position/resources/w3c-import.log:
* web-platform-tests/css/css-position/static-position/vlr-ltr-ltr-expected.html:
* web-platform-tests/css/css-position/static-position/vlr-ltr-ltr.html:
* web-platform-tests/css/css-position/static-position/vlr-ltr-rtl.tentative-expected.html:
* web-platform-tests/css/css-position/static-position/vlr-ltr-rtl.tentative.html:
* web-platform-tests/css/css-position/static-position/vlr-rtl-ltr.tentative-expected.html:
* web-platform-tests/css/css-position/static-position/vlr-rtl-ltr.tentative.html:
* web-platform-tests/css/css-position/static-position/vlr-rtl-rtl-expected.html:
* web-platform-tests/css/css-position/static-position/vlr-rtl-rtl.html:
* web-platform-tests/css/css-position/static-position/vrl-ltr-ltr-expected.html:
* web-platform-tests/css/css-position/static-position/vrl-ltr-ltr.html:
* web-platform-tests/css/css-position/static-position/vrl-ltr-rtl.tentative-expected.html:
* web-platform-tests/css/css-position/static-position/vrl-ltr-rtl.tentative.html:
* web-platform-tests/css/css-position/static-position/vrl-rtl-ltr.tentative-expected.html:
* web-platform-tests/css/css-position/static-position/vrl-rtl-ltr.tentative.html:
* web-platform-tests/css/css-position/static-position/vrl-rtl-rtl-expected.html:
* web-platform-tests/css/css-position/static-position/vrl-rtl-rtl.html:
* web-platform-tests/css/css-position/sticky/position-sticky-bottom-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-bottom-expected.txt.
* web-platform-tests/css/css-position/sticky/position-sticky-bottom.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-bottom.html.
* web-platform-tests/css/css-position/sticky/position-sticky-change-top-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-change-top-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-change-top.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-change-top.html.
* web-platform-tests/css/css-position/sticky/position-sticky-child-multicolumn-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-child-multicolumn-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-child-multicolumn.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-child-multicolumn.html.
* web-platform-tests/css/css-position/sticky/position-sticky-fixed-ancestor-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-fixed-ancestor-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-fixed-ancestor-iframe-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-fixed-ancestor-iframe-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-fixed-ancestor-iframe.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-fixed-ancestor-iframe.html.
* web-platform-tests/css/css-position/sticky/position-sticky-fixed-ancestor.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-fixed-ancestor.html.
* web-platform-tests/css/css-position/sticky/position-sticky-flexbox-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-flexbox-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-flexbox.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-flexbox.html.
* web-platform-tests/css/css-position/sticky/position-sticky-get-bounding-client-rect-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-get-bounding-client-rect-expected.txt.
* web-platform-tests/css/css-position/sticky/position-sticky-get-bounding-client-rect.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-get-bounding-client-rect.html.
* web-platform-tests/css/css-position/sticky/position-sticky-grid-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-grid-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-grid.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-grid.html.
* web-platform-tests/css/css-position/sticky/position-sticky-hyperlink-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-hyperlink-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-hyperlink.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-hyperlink.html.
* web-platform-tests/css/css-position/sticky/position-sticky-inflow-position-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-inflow-position-expected.txt.
* web-platform-tests/css/css-position/sticky/position-sticky-inflow-position.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-inflow-position.html.
* web-platform-tests/css/css-position/sticky/position-sticky-inline-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-inline-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-inline.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-inline.html.
* web-platform-tests/css/css-position/sticky/position-sticky-input-box-gets-focused-after-scroll-expected.txt: Added.
* web-platform-tests/css/css-position/sticky/position-sticky-input-box-gets-focused-after-scroll.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-input-box-gets-focused-after-scroll.html.
* web-platform-tests/css/css-position/sticky/position-sticky-large-top-2.tentative-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-large-top-2.tentative-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-large-top-2.tentative.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-large-top-2.tentative.html.
* web-platform-tests/css/css-position/sticky/position-sticky-large-top.tentative-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-large-top.tentative-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-large-top.tentative.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-large-top.tentative.html.
* web-platform-tests/css/css-position/sticky/position-sticky-left-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-left-expected.txt.
* web-platform-tests/css/css-position/sticky/position-sticky-left.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-left.html.
* web-platform-tests/css/css-position/sticky/position-sticky-margins-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-margins-expected.txt.
* web-platform-tests/css/css-position/sticky/position-sticky-margins.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-margins.html.
* web-platform-tests/css/css-position/sticky/position-sticky-nested-bottom-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-nested-bottom-expected.txt.
* web-platform-tests/css/css-position/sticky/position-sticky-nested-bottom.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-nested-bottom.html.
* web-platform-tests/css/css-position/sticky/position-sticky-nested-inline-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-nested-inline-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-nested-inline.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-nested-inline.html.
* web-platform-tests/css/css-position/sticky/position-sticky-nested-left-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-nested-left-expected.txt.
* web-platform-tests/css/css-position/sticky/position-sticky-nested-left.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-nested-left.html.
* web-platform-tests/css/css-position/sticky/position-sticky-nested-right-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-nested-right-expected.txt.
* web-platform-tests/css/css-position/sticky/position-sticky-nested-right.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-nested-right.html.
* web-platform-tests/css/css-position/sticky/position-sticky-nested-table-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-nested-table-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-nested-table.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-nested-table.html.
* web-platform-tests/css/css-position/sticky/position-sticky-nested-thead-th-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-nested-table-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-nested-thead-th.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-nested-table.html.
* web-platform-tests/css/css-position/sticky/position-sticky-nested-top-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-nested-top-expected.txt.
* web-platform-tests/css/css-position/sticky/position-sticky-nested-top.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-nested-top.html.
* web-platform-tests/css/css-position/sticky/position-sticky-offset-overflow-expected.txt: Added.
* web-platform-tests/css/css-position/sticky/position-sticky-offset-overflow.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-offset-overflow.html.
* web-platform-tests/css/css-position/sticky/position-sticky-offset-top-left-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-offset-top-left-expected.txt.
* web-platform-tests/css/css-position/sticky/position-sticky-offset-top-left.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-offset-top-left.html.
* web-platform-tests/css/css-position/sticky/position-sticky-overflow-hidden-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-overflow-hidden-expected.txt.
* web-platform-tests/css/css-position/sticky/position-sticky-overflow-hidden.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-overflow-hidden.html.
* web-platform-tests/css/css-position/sticky/position-sticky-overflow-padding-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-overflow-padding-expected.txt.
* web-platform-tests/css/css-position/sticky/position-sticky-overflow-padding.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-overflow-padding.html.
* web-platform-tests/css/css-position/sticky/position-sticky-parsing-expected.txt: Added.
* web-platform-tests/css/css-position/sticky/position-sticky-parsing.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-parsing.html.
* web-platform-tests/css/css-position/sticky/position-sticky-rendering-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-rendering-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-rendering.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-rendering.html.
* web-platform-tests/css/css-position/sticky/position-sticky-right-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-right-expected.txt.
* web-platform-tests/css/css-position/sticky/position-sticky-right.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-right.html.
* web-platform-tests/css/css-position/sticky/position-sticky-root-scroller-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-root-scroller-expected.txt.
* web-platform-tests/css/css-position/sticky/position-sticky-root-scroller.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-root-scroller.html.
* web-platform-tests/css/css-position/sticky/position-sticky-scroll-reposition-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-scroll-reposition-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-scroll-reposition.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-scroll-reposition.html.
* web-platform-tests/css/css-position/sticky/position-sticky-scroll-with-clip-and-abspos-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-scroll-with-clip-and-abspos-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-scroll-with-clip-and-abspos.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-scroll-with-clip-and-abspos.html.
* web-platform-tests/css/css-position/sticky/position-sticky-scrollIntoView-expected.txt: Added.
* web-platform-tests/css/css-position/sticky/position-sticky-scrollIntoView.html: Added.
* web-platform-tests/css/css-position/sticky/position-sticky-scrolled-remove-sibling-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-scrolled-remove-sibling-expected.txt.
* web-platform-tests/css/css-position/sticky/position-sticky-scrolled-remove-sibling.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-scrolled-remove-sibling.html.
* web-platform-tests/css/css-position/sticky/position-sticky-stacking-context-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-stacking-context-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-stacking-context.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-stacking-context.html.
* web-platform-tests/css/css-position/sticky/position-sticky-table-parts-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-table-parts-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-table-parts.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-table-parts.html.
* web-platform-tests/css/css-position/sticky/position-sticky-table-tfoot-bottom-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-table-tfoot-bottom-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-table-tfoot-bottom.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-table-tfoot-bottom.html.
* web-platform-tests/css/css-position/sticky/position-sticky-table-th-bottom-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-table-th-bottom-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-table-th-bottom.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-table-th-bottom.html.
* web-platform-tests/css/css-position/sticky/position-sticky-table-th-left-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-table-th-left-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-table-th-left.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-table-th-left.html.
* web-platform-tests/css/css-position/sticky/position-sticky-table-th-right-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-table-th-right-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-table-th-right.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-table-th-right.html.
* web-platform-tests/css/css-position/sticky/position-sticky-table-th-top-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-table-th-top-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-table-th-top.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-table-th-top.html.
* web-platform-tests/css/css-position/sticky/position-sticky-table-thead-top-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-table-thead-top-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-table-thead-top.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-table-thead-top.html.
* web-platform-tests/css/css-position/sticky/position-sticky-table-tr-bottom-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-table-tr-bottom-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-table-tr-bottom.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-table-tr-bottom.html.
* web-platform-tests/css/css-position/sticky/position-sticky-table-tr-top-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-table-tr-top-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-table-tr-top.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-table-tr-top.html.
* web-platform-tests/css/css-position/sticky/position-sticky-top-and-bottom-expected.txt: Added.
* web-platform-tests/css/css-position/sticky/position-sticky-top-and-bottom.html: Added.
* web-platform-tests/css/css-position/sticky/position-sticky-top-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-top-expected.txt.
* web-platform-tests/css/css-position/sticky/position-sticky-top.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-top.html.
* web-platform-tests/css/css-position/sticky/position-sticky-transforms-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-transforms-expected.txt.
* web-platform-tests/css/css-position/sticky/position-sticky-transforms-translate-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-transforms-translate-expected.txt.
* web-platform-tests/css/css-position/sticky/position-sticky-transforms-translate.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-transforms-translate.html.
* web-platform-tests/css/css-position/sticky/position-sticky-transforms.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-transforms.html.
* web-platform-tests/css/css-position/sticky/position-sticky-writing-modes-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-writing-modes-expected.html.
* web-platform-tests/css/css-position/sticky/position-sticky-writing-modes.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-position/position-sticky-writing-modes.html.
* web-platform-tests/css/css-position/sticky/sticky-after-input-expected.txt: Added.
* web-platform-tests/css/css-position/sticky/sticky-after-input.html: Added.
* web-platform-tests/css/css-position/sticky/w3c-import.log: Added.
* web-platform-tests/css/css-position/w3c-import.log:

LayoutTests:

* TestExpectations: Update test expectations.
* platform/mac-wk1/TestExpectations: Ditto.
* platform/ios-wk2/imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-scrollIntoView-expected.txt: Added.
* platform/ios-wk2/imported/w3c/web-platform-tests/css/css-position/sticky/sticky-after-input-expected.txt: Added.


Canonical link: https://commits.webkit.org/240466@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280960 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 11:27:47 +00:00
Kimmo Kinnunen 349caca5b9 ANGLE Cocoa compiles parts of HLSL translator, vulkan translator, libgl api, capture redundantly
https://bugs.webkit.org/show_bug.cgi?id=228986

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-08-12
Reviewed by Kenneth Russell.

Remove following from ANGLE (dynamic) target:
- HLSL translator and tree ops used only by it
- Vulkan translator output
- libgl API validation implementation
- API trace capture implementation (was only partially compiled)

The features are not part of Cocoa use of ANGLE, and should
not be compiled as such.
Does not affect the binary size more than few kilobytes.

* ANGLE.xcodeproj/project.pbxproj:
* Configurations/ANGLE-dynamic.xcconfig:

Canonical link: https://commits.webkit.org/240465@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280959 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 10:16:20 +00:00
Youenn Fablet 830ca4f6c6 Implement SFrameTransform error handling
https://bugs.webkit.org/show_bug.cgi?id=228947

Reviewed by Eric Carlson.

Source/WebCore:

Add support for RTCRtpSFrameTransformErrorEvent.
When RTCRtpSFrameTransformer encounters an issue, dispatch a task to RTCRtpSFrameTransform context and fire a corresponding event.
This follows https://w3c.github.io/webrtc-encoded-transform/#sframe-transform-algorithm, except that:
- we are not yet exposing some fields in RTCRtpSFrameTransformErrorEvent.
- we are using errorType instead of type which should be fixed in the spec.

Test: imported/w3c/web-platform-tests/webrtc-encoded-transform/sframe-transform-error.html

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Modules/mediastream/RTCRtpSFrameTransform.cpp:
(WebCore::RTCRtpSFrameTransform::RTCRtpSFrameTransform):
(WebCore::errorTypeFromInformation):
(WebCore::processFrame):
(WebCore::RTCRtpSFrameTransform::hasKey const):
(WebCore::RTCRtpSFrameTransform::initializeTransformer):
(WebCore::transformFrame):
(WebCore::RTCRtpSFrameTransform::createStreams):
(WebCore::RTCRtpSFrameTransform::writable):
(WebCore::RTCRtpSFrameTransform::virtualHasPendingActivity const):
* Modules/mediastream/RTCRtpSFrameTransform.h:
* Modules/mediastream/RTCRtpSFrameTransform.idl:
* Modules/mediastream/RTCRtpSFrameTransformErrorEvent.cpp: Added.
(WebCore::RTCRtpSFrameTransformErrorEvent::create):
(WebCore::RTCRtpSFrameTransformErrorEvent::RTCRtpSFrameTransformErrorEvent):
(WebCore::RTCRtpSFrameTransformErrorEvent::eventInterface const):
* Modules/mediastream/RTCRtpSFrameTransformErrorEvent.h: Added.
* Modules/mediastream/RTCRtpSFrameTransformErrorEvent.idl: Added.
* Modules/mediastream/RTCRtpSFrameTransformer.cpp:
(WebCore::RTCRtpSFrameTransformer::hasKey const):
(WebCore::RTCRtpSFrameTransformer::decryptFrame):
(WebCore::RTCRtpSFrameTransformer::encryptFrame):
(WebCore::RTCRtpSFrameTransformer::transform):
* Modules/mediastream/RTCRtpSFrameTransformer.h:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:
* dom/EventNames.in:
* dom/EventTargetFactory.in:

Tools:

* TestWebKitAPI/Tests/WebCore/RTCRtpSFrameTransformerTests.cpp:
(TestWebKitAPI::TEST):

LayoutTests:

* http/wpt/webrtc/sframe-transform-error-worker.js: Added.
(onrtctransform.async event):
* http/wpt/webrtc/sframe-transform-error.html: Added.
* http/wpt/webrtc/sframe-transform-error-expected: Added.


Canonical link: https://commits.webkit.org/240464@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280958 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 09:37:05 +00:00
Peng Liu 4711a22f1b Function _os_feature_enabled_impl() expects compile-time static strings as arguments
https://bugs.webkit.org/show_bug.cgi?id=229017
<rdar://81813732>

Reviewed by Tim Horton.

There are multiple issues in the current implementation of `isFeatureFlagEnabled()`.
1. `_os_feature_enabled_impl()` expects compile-time static strings as arguments.
So we should not use `String` here.
2. As Simon Fraser pointed out, `String::characters8()` is not null terminated.

Source/WebKit:

* Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm:
(WebKit::isFeatureFlagEnabled):
* Shared/WebPreferencesDefaultValues.cpp:
(WebKit::isFeatureFlagEnabled):
* Shared/WebPreferencesDefaultValues.h:

Source/WebKitLegacy/mac:

* WebView/WebPreferencesDefaultValues.h:
* WebView/WebPreferencesDefaultValues.mm:
(WebKit::isFeatureFlagEnabled):


Canonical link: https://commits.webkit.org/240463@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280957 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 04:35:22 +00:00
Alex Christensen c69504cc37 Remove optimistic assertion added in r280931
https://bugs.webkit.org/show_bug.cgi?id=229008

* page/PerformanceTiming.cpp:
(WebCore::PerformanceTiming::fetchStart const):
This assertion is hit in the test fast/dom/Window/property-access-on-cached-window-after-frame-removed.html
when accessing window.performance.fetchStart from a detached window object from a frame that has been removed from the DOM.



Canonical link: https://commits.webkit.org/240462@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280956 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 04:29:25 +00:00
Jean-Yves Avenard 883c3d2cf8 [Monterey] WebContent process immediately crash when GPU Process is disabled
https://bugs.webkit.org/show_bug.cgi?id=228944
rdar://81727094

Reviewed by Brent Fulgham.

* WebProcess/com.apple.WebProcess.sb.in: Allow SYS_getpriority syscall.


Canonical link: https://commits.webkit.org/240461@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280955 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 03:48:28 +00:00
Lauro Moura 574c4b067a [GLIB] Gardening a few failures and passes
Unreviewed test gardening.

* platform/glib/TestExpectations:
* platform/wpe/TestExpectations:

Canonical link: https://commits.webkit.org/240460@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 02:47:47 +00:00
Chris Dumez e6c7e17d32 Add initial support for Cross-Origin-Embedder-Policy (COEP)
https://bugs.webkit.org/show_bug.cgi?id=228754

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline COEP WPT tests now that we are passing more checks.

* web-platform-tests/html/cross-origin-embedder-policy/blob.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/coep-frame-javascript.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/coep-on-response-from-service-worker.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/credentialless/iframe-coep-require-corp.tentative.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/cross-origin-isolated-permission.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/data.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/dedicated-worker-cache-storage.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/dedicated-worker.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/header-parsing.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/javascript.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/multi-globals/workers-coep-report.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/no-secure-context-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/none-sw-from-require-corp.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/none.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/require-corp-about-blank-expected.txt: Removed.
* web-platform-tests/html/cross-origin-embedder-policy/require-corp-about-blank.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/require-corp-about-srcdoc-expected.txt: Removed.
* web-platform-tests/html/cross-origin-embedder-policy/require-corp-about-srcdoc.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/require-corp-load-from-cache-storage.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/require-corp-sw-from-none.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/require-corp-sw-from-require-corp.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/require-corp-sw.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/require-corp.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/sandbox.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/service-worker-cache-storage.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/srcdoc.https-expected.txt:

Source/WebCore:

Add initial support for Cross-Origin-Embedder-Policy (COEP) behind a runtime feature flag, off by default:
- https://html.spec.whatwg.org/multipage/origin.html#coep

The COEP header has the following impacts:
- When a document with `Cross-Origin-Embedder-Policy: require-corp` loads an iframe or a worker script, if the network
  response for that iframe doesn't also contain `Cross-Origin-Embedder-Policy: require-corp`, then we fail the load.
- When a document with `Cross-Origin-Embedder-Policy: require-corp` loads cross-origin subresources, then either CORS
  must be used or the resource response must be allowed by Cross-Origin-Resource-Policy (CORP) header.

Support is only for WK2 and checks are done in the network process for better security. Support for workers and service
workers (including cache storage) is included.

Most of the Web-Platform-Tests for COEP are passing with this patch. The exceptions are:
- Some tests relying on Blob are failing. Similarly to COOP, Blobs need to inherit COEP from their
  creator. This is currently unimplemented as the change will likely be non-trivial. I will follow-up
  to fix Blob support for both COOP and COEP.
- Tests in the credentialless/ folder are failing because we do not support `Cross-Origin-Embedder-Policy: credentialless`.
  This seems to be a fairly recent extension proposed by Google and it is not part of the HTML specification yet.
- Some tests expect violation reporting and they are failing and we do not implement reporting yet.

Note that `self.crossOriginIsolated` still returns false, even if the pages opts into both COOP & COEP, and APIs such
as SharedArrayBuffer still are not permitted to use. In order to support this, we will have to actually implement process
swapping so that we know a process is not actually shared by several origins.

Test: http/wpt/html/cross-origin-embedder-policy/require-corp.https.html

* Modules/cache/DOMCache.cpp:
(WebCore::DOMCache::queryCache):
* Modules/cache/DOMCacheEngine.cpp:
(WebCore::DOMCacheEngine::convertToException):
* Modules/cache/DOMCacheEngine.h:
* Modules/cache/RetrieveRecordsOptions.h:
(WebCore::RetrieveRecordsOptions::isolatedCopy const):
(WebCore::RetrieveRecordsOptions::encode const):
(WebCore::RetrieveRecordsOptions::decode):
* dom/Document.cpp:
(WebCore::Document::initSecurityContext):
* dom/SecurityContext.h:
(WebCore::SecurityContext::crossOriginEmbedderPolicy const):
(WebCore::SecurityContext::setCrossOriginEmbedderPolicy):
* loader/CrossOriginAccessControl.cpp:
(WebCore::shouldCrossOriginResourcePolicyCancelLoad):
(WebCore::validateCrossOriginResourcePolicy):
* loader/CrossOriginAccessControl.h:
* loader/CrossOriginEmbedderPolicy.cpp:
(WebCore::obtainCrossOriginEmbedderPolicy):
(WebCore::CrossOriginEmbedderPolicy::isolatedCopy const):
* loader/CrossOriginEmbedderPolicy.h:
(WebCore::CrossOriginEmbedderPolicy::encode const):
(WebCore::CrossOriginEmbedderPolicy::decode):
* loader/CrossOriginOpenerPolicy.cpp:
(WebCore::obtainCrossOriginOpenerPolicy):
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::loadResourceSynchronously):
(WebCore::DocumentThreadableLoader::create):
(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
(WebCore::DocumentThreadableLoader::crossOriginEmbedderPolicy const):
* loader/DocumentThreadableLoader.h:
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::begin):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::didBeginDocument):
* loader/ResourceLoaderOptions.h:
* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
* page/SecurityOrigin.h:
* platform/network/HTTPParsers.cpp:
(WebCore::parseCrossOriginResourcePolicyHeader):
* platform/network/HTTPParsers.h:
* workers/Worker.cpp:
(WebCore::Worker::notifyFinished):
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::WorkerGlobalScope):
* workers/WorkerGlobalScopeProxy.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
* workers/WorkerMessagingProxy.h:
* workers/WorkerScriptLoader.cpp:
(WebCore::WorkerScriptLoader::loadSynchronously):
(WebCore::WorkerScriptLoader::loadAsynchronously):
(WebCore::WorkerScriptLoader::didReceiveResponse):
* workers/WorkerScriptLoader.h:
(WebCore::WorkerScriptLoader::crossOriginEmbedderPolicy const):
* workers/WorkerThread.cpp:
(WebCore::WorkerParameters::isolatedCopy const):
* workers/WorkerThread.h:
* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::jobFinishedLoadingScript):
* workers/service/ServiceWorkerContainer.h:
* workers/service/ServiceWorkerContextData.cpp:
(WebCore::ServiceWorkerContextData::isolatedCopy const):
* workers/service/ServiceWorkerContextData.h:
(WebCore::ServiceWorkerContextData::encode const):
(WebCore::ServiceWorkerContextData::decode):
* workers/service/ServiceWorkerFetchResult.h:
(WebCore::ServiceWorkerFetchResult::isolatedCopy const):
(WebCore::serviceWorkerFetchError):
(WebCore::ServiceWorkerFetchResult::encode const):
(WebCore::ServiceWorkerFetchResult::decode):
* workers/service/ServiceWorkerJob.cpp:
(WebCore::ServiceWorkerJob::notifyFinished):
* workers/service/ServiceWorkerJobClient.h:
* workers/service/context/ServiceWorkerThread.cpp:
(WebCore::ServiceWorkerThread::ServiceWorkerThread):
* workers/service/server/RegistrationDatabase.cpp:
(WebCore::RegistrationDatabase::doPushChanges):
(WebCore::RegistrationDatabase::importRecords):
* workers/service/server/SWServer.cpp:
(WebCore::SWServer::addRegistrationFromStore):
(WebCore::SWServer::updateWorker):
(WebCore::SWServer::installContextData):
* workers/service/server/SWServer.h:
* workers/service/server/SWServerJobQueue.cpp:
(WebCore::SWServerJobQueue::scriptFetchFinished):
* workers/service/server/SWServerWorker.cpp:
(WebCore::SWServerWorker::SWServerWorker):
(WebCore::SWServerWorker::contextData const):
* workers/service/server/SWServerWorker.h:

Source/WebKit:

As mentioned in the WebCore changelog, we do all the COEP checks in the network process
instead of WebCore for added security. As a result, we need to pass more information
to the network process when doing loads in order to do those checks. The checks are done
in NetworkResourceLoader for navigations & worker script loads (similarly to CSP,
X-FrameOptions) and in NetworkLoadChecker for CORP checks of subresource loads (similarly
to CORS checks).

* NetworkProcess/NetworkLoadChecker.cpp:
(WebKit::NetworkLoadChecker::NetworkLoadChecker):
(WebKit::NetworkLoadChecker::validateResponse):
* NetworkProcess/NetworkLoadChecker.h:
(WebKit::NetworkLoadChecker::setParentCrossOriginEmbedderPolicy):
(WebKit::NetworkLoadChecker::setCrossOriginEmbedderPolicy):
* NetworkProcess/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::parentOrigin const):
(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):
* NetworkProcess/NetworkResourceLoadParameters.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::shouldInterruptLoadForCSPFrameAncestorsOrXFrameOptions):
(WebKit::NetworkResourceLoader::shouldInterruptNavigationForCrossOriginEmbedderPolicy):
(WebKit::NetworkResourceLoader::shouldInterruptWorkerLoadForCrossOriginEmbedderPolicy):
(WebKit::NetworkResourceLoader::didReceiveResponse):
(WebKit::NetworkResourceLoader::willSendRedirectedRequest):
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/PingLoad.cpp:
(WebKit::PingLoad::PingLoad):
(WebKit::PingLoad::initialize):
* NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:
(WebKit::ServiceWorkerFetchTask::didReceiveResponse):
* NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp:
(WebKit::ServiceWorkerSoftUpdateLoader::processResponse):
(WebKit::ServiceWorkerSoftUpdateLoader::didFinishLoading):
* NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.h:
* NetworkProcess/cache/CacheStorageEngineCache.cpp:
(WebKit::CacheStorage::Cache::retrieveRecords):
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::addParametersShared):
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):

Source/WTF:

Add experimental feature flag for Cross-Origin-Embedder-Policy (COEP), off by default.

* Scripts/Preferences/WebPreferencesExperimental.yaml:

LayoutTests:

Update test expectations now that we support COEP on WK2.

* TestExpectations:
* http/wpt/html/cross-origin-embedder-policy/require-corp.https-expected.txt: Added.
* http/wpt/html/cross-origin-embedder-policy/require-corp.https.html: Added.
* http/wpt/html/cross-origin-embedder-policy/require-corp.https.html.headers: Added.
* platform/mac-wk1/TestExpectations:
* platform/win/TestExpectations:


Canonical link: https://commits.webkit.org/240459@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280953 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 02:43:53 +00:00
Darin Adler 26655c2a1a Add deduction guide to RetainPtr, use constexpr a bit more, and streamline the implementation
https://bugs.webkit.org/show_bug.cgi?id=228852

Reviewed by Sam Weinig.

Source/WebKit:

* UIProcess/mac/WKTextFinderClient.mm:
(-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]):
Test the deduction guide by writing RetainPtr instead of RetainPtr<NSProgress>.

Source/WTF:

* wtf/RetainPtr.h: Sort includes. Made many functions constexpr including the move
constructors and adoptCF. Use using instead of typedef in most places. Use
remove_pointer_t, conditional_t, is_convertible_v, is_same_v, and other such templates
to simplify expressions. Initialize the m_ptr data member and use the default constructor.
Removed unneeded StorageType synonym for CFTypeRef. Move some inline function bodies out
of the class template definition. Use if constexpr to get rid of the need for the overloaded
autoreleaseHelper function. Added a deduction guide so we can use expressions with the
type RetainPtr on the left side, and an Objective-C pointer or CFTypeRef on the right side,
and have the appropriate RetainPtr type deduced.


Canonical link: https://commits.webkit.org/240458@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280952 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 02:08:08 +00:00
Peng Liu 66b1d7c8b0 [ BigSur Debug ] TestWebKitAPI.GPUProcess.CrashWhilePlayingAudioViaCreateMediaElementSource is flaky, hitting ASSERTION FAILED: !isInRoutingArbitrationForToken(token)
https://bugs.webkit.org/show_bug.cgi?id=227728
<rdar://problem/80237464>

Reviewed by Jer Noble.

Source/WebKit:

After the GPU process crashes, the UI process will clean up the
`SharedRoutingArbitrator`, while a WebContent process might be resuming
the media playback and setup `AudioSessionRoutingArbitrator`.
There is a race condition here. If the WebContent process runs faster,
`SharedRoutingArbitrator` in the UI process will try to begin a duplicated
routing arbitration and lead to an assertion failure.

No new tests. Fixed following two API test failures:
- TestWebKitAPI.WebKit2.CrashGPUProcessWhileCapturing
- TestWebKitAPI.GPUProcess.CrashWhilePlayingAudioViaCreateMediaElementSource

* UIProcess/Media/cocoa/AudioSessionRoutingArbitratorProxyCocoa.mm:
(WebKit::AudioSessionRoutingArbitratorProxy::processDidTerminate):
* WebProcess/GPU/GPUProcessConnection.cpp:
(WebKit::GPUProcessConnection::didClose):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:
(TEST):


Canonical link: https://commits.webkit.org/240457@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280951 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 01:11:15 +00:00
Jean-Yves Avenard 5bc062f5e5 Audio buffer may contain more frames than decoded.
https://bugs.webkit.org/show_bug.cgi?id=228732
rdar://problem/81447014

Reviewed by Eric Carlson.

Source/WebCore:

It is necessary to call repeatedly ExtAudioFileRead until it explicitly indicates that
it reached EOF.
Test: webaudio/decode-audio-data-wav.html.

* platform/audio/cocoa/AudioFileReaderCocoa.cpp:
(WebCore::AudioFileReader::createBus): Ensure that all frames have been decoded and
trim length to the actual number of frames returned.
This was already done for the webm case.

LayoutTests:

* platform/mac/TestExpectations:
* webaudio/decode-audio-data-wav-expected.txt: Added.
* webaudio/decode-audio-data-wav.html: Added.
* webaudio/pinknoise.wav: Added. Generated with command
sox -b 16 -r 44100 -n pinknoise.wav synth 4 pinknoise


Canonical link: https://commits.webkit.org/240456@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-12 00:46:39 +00:00