Commit Graph

6352 Commits

Author SHA1 Message Date
Myles C. Maxfield 8c589fafa5 overwriteCodePoint() in createAndFillGlyphPage() is wrong
https://bugs.webkit.org/show_bug.cgi?id=215643
<rdar://problem/67430461>

Reviewed by Alan Bujtas.

Source/WebCore:

The CSS spec says that certain characters have to be invisible. Previously, we were doing this
by just treating these characters as if they were the zero width space character. However, this
is wrong for 2 reasons:

1. If the primary font supports the desired character but doesn't support the zero width space
       character, we'll fallback past it and trigger a download for secondary fonts until
       we find one that supports the ZWS character (which the page didn't even ask for!)
2. Shaping is Turing-complete, and expects that the correct glyphIDs are fed into the shaper.
       We can't just arbitrarily swap out glyphIDs before shaping just because we feel like it.

Instead, the solution is to handle these invisible characters after font fallback, and after
shaping. This patch does it just like we handle adding letter-spacing, word-spacing, and
justification after shaping - by iterating over the glyphs output by the shaper and seeing if
any need to be adjusted.

This patch also includes a fix for the situation where the glyph buffer might be left in an
inconsistent state, where the array of glyphs is shorter than the array of characters -
this new codepath added in this patch revealed this existing problem, and fixes it here too.

Test: fast/text/zwj-ligature.html

* platform/graphics/Font.cpp:
(WebCore::createAndFillGlyphPage):
(WebCore::overrideControlCharacters): Deleted.
* platform/graphics/GlyphBuffer.h:
(WebCore::GlyphBuffer::glyphAt const):
(WebCore::GlyphBuffer::deleteGlyphWithoutAffectingSize):
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::applyCSSVisibilityRules):
(WebCore::WidthIterator::advance):
* platform/graphics/WidthIterator.h:

Source/WTF:

* wtf/unicode/CharacterNames.h:

LayoutTests:

* fast/text/resources/Ahem-GSUB-ligatures.ttf: Added.
* fast/text/zwj-ligature-expected.html: Added.
* fast/text/zwj-ligature.html: Added.
* platform/mac/fast/text/format-control-expected.txt: Progression! A new ligature is formed that wasn't formed before.
      Also, this ligature is formed in both Chrome and Firefox, so we match them now.
* platform/win/TestExpectations:

Canonical link: https://commits.webkit.org/240804@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281389 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-22 05:41:27 +00:00
Sihui Liu 190e8e04b1 IndexedDB: crash when triggering IDBOpenRequest completion back on a worker thread
https://bugs.webkit.org/show_bug.cgi?id=229375

Source/WebCore:

Reviewed by Brady Eidson.

Client may dispatch custom events to an IDBRequest, and we should only change request state based on events
created internally.

* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::dispatchEvent):

Source/WTF:

Protect callee in CrossThreadTask if it inherits from ThreadSafeRefCounted<T>.

Reviewed by Brady Eidson.

* wtf/CrossThreadTask.h:


Canonical link: https://commits.webkit.org/240799@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281384 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-22 01:33:10 +00:00
Mark Lam f3da8cd954 Make ptrTagName and tagForPtr WTF_EXPORT_PRIVATE.
https://bugs.webkit.org/show_bug.cgi?id=229328

Reviewed by Yusuke Suzuki.

If ptrTagName and tagForPtr are defined, make them WTF_EXPORT_PRIVATE instead of
static functions.  This allows us to call them from the debugger during
interactive debugging sessions.

* wtf/PtrTag.cpp:
(WTF::tagForPtr):
(WTF::ptrTagName):
* wtf/PtrTag.h:


Canonical link: https://commits.webkit.org/240735@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281318 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-20 15:56:05 +00:00
Mark Lam 66cb4799e3 Remove assertIsTagged and assertIsNullOrTagged.
https://bugs.webkit.org/show_bug.cgi?id=229329
rdar://82162851

Reviewed by Yusuke Suzuki.

These assertion utility functions rely on tagged pointers always having non-zero
PAC bits.  This is an incorrect assumption.  A tagged pointer can have PAC bits
that are completely zero.  Hence, these assert functions cannot be made to work
reliably.  We should remove them to prevent them from being used, and potentially
resulting in flaky assertion failures that will be hard to debug later.

Note: assertIsNotTagged is fine to keep.  It asserts that PAC bits of a pointer
are all 0.  As a result, this assertion can have false positives where it may think
a tagged pointer is an untagged pointer.  However, this is rare because it is not
common to have 0 PAC bits in tagged pointers.  False positives on this assertion
won't result in flaky test failures that will waste our time later.  Hence,
keeping the assertion will do more good (it will tend to help us find bugs) than
bad (it will rarely let false positives thru).  As a result, I'm opting to not
remove it.

* wtf/PtrTag.h:
(WTF::assertIsTagged): Deleted.
(WTF::assertIsNullOrTagged): Deleted.


Canonical link: https://commits.webkit.org/240734@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281317 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-20 15:53:13 +00:00
Antti Koivisto 7089c76408 [:has() pseudo-class] Basic support
https://bugs.webkit.org/show_bug.cgi?id=228894

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

* web-platform-tests/css/selectors/has-basic-expected.txt:
* web-platform-tests/css/selectors/has-relative-argument-expected.txt:
* web-platform-tests/css/selectors/parsing/parse-has-expected.txt:
* web-platform-tests/dom/nodes/Element-closest-expected.txt:

Source/WebCore:

This patch adds basic support for :has() pseudo-class, https://drafts.csswg.org/selectors/#has-pseudo.
The initial implementation is very inefficient. There is no support for invalidation yet.

The feature is disabled by default.

* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText const):

Serialization.

* css/CSSSelector.h:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne const):

Selector matching using nested SelectorChecker.

* css/SelectorPseudoClassAndCompatibilityElementMap.in:
* css/parser/CSSParserContext.cpp:
(WebCore::operator==):
(WebCore::add):
* css/parser/CSSParserContext.h:
* css/parser/CSSParserSelector.h:
(WebCore::CSSParserSelector::setPseudoClassType):
* css/parser/CSSSelectorParser.cpp:
(WebCore::CSSSelectorParser::consumeForgivingSelectorList):

Add a template version of the forgiving parsing function.

(WebCore::CSSSelectorParser::consumeForgivingComplexSelectorList):

Use it for complex selector lists.

(WebCore::CSSSelectorParser::consumeForgivingRelativeSelectorList):

And the new relative selector lists.

(WebCore::CSSSelectorParser::consumeRelativeSelector):

Parse relative selectors like "> foo".

(WebCore::CSSSelectorParser::consumePseudo):
(WebCore::CSSSelectorParser::consumeComplexForgivingSelectorList): Deleted.
* css/parser/CSSSelectorParser.h:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):

No compiler support yet.

Source/WTF:

* Scripts/Preferences/WebPreferencesExperimental.yaml:

Add off-by-default HasPseudoClassEnabled preference value.


Canonical link: https://commits.webkit.org/240719@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-20 05:15:47 +00:00
Myles C. Maxfield 2e35f7f8a9 [Cocoa] Stop treating the system font as a non-variable font
https://bugs.webkit.org/show_bug.cgi?id=228176

Reviewed by Sam Weinig.

Source/WebCore:

Modern versions of macOS and iOS can treat the system font as a variable font,
and be able to apply weights like "342" instead of just "300" or "400".

Tests: fast/text/variable-system-font-2.html
       fast/text/variable-system-font.html

* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::preparePlatformFont):

Source/WTF:

* wtf/PlatformUse.h:

LayoutTests:

Update tests.

* fast/text/resources/Ahem-trak.ttf: Added. This is a font which has a trak table.
* fast/text/trak-optimizeLegibility-expected-mismatch.html: Added.
* fast/text/trak-optimizeLegibility-expected.txt: Removed.
* fast/text/trak-optimizeLegibility.html:
* fast/text/variable-system-font-2-expected-mismatch.html: Added.
* fast/text/variable-system-font-2.html: Added.
* fast/text/variable-system-font-expected-mismatch.html: Added.
* fast/text/variable-system-font.html: Added.
* svg/dom/altGlyph-dom-expected.txt:
* svg/dom/resources/altGlyph-dom.js:

Canonical link: https://commits.webkit.org/240715@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281291 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-20 03:21:05 +00:00
Aditya Keerthi 13a9afce1f Remove __has_include guard for _UIDatePickerOverlayPresentation
https://bugs.webkit.org/show_bug.cgi?id=227298
rdar://79970171

Reviewed by Tim Horton.

Source/WebKit:

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/forms/WKDateTimeInputControl.mm:
(-[WKDateTimePicker showDateTimePicker]):

Source/WTF:

* wtf/PlatformHave.h:


Canonical link: https://commits.webkit.org/240703@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281278 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-19 23:13:51 +00:00
David Kilzer ad480671ae [WTF] Fix static analyzer warnings for clang tidy bugprone-move-forwarding-reference checker
<https://webkit.org/b/229114>

Reviewed by Darin Adler.

* wtf/Deque.h:
(WTF::inlineCapacity>::appendAndBubble):
* wtf/Scope.h:
(WTF::ScopeExit::ScopeExit):
* wtf/ScopedLambda.h:
(WTF::scopedLambda):
* wtf/SharedTask.h:
(WTF::createSharedTask):
- Replace WTFMove() with std::forward<>().


Canonical link: https://commits.webkit.org/240695@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281270 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-19 21:25:12 +00:00
Alex Christensen 607c7b06a9 Remove more non-inclusive language from Source
https://bugs.webkit.org/show_bug.cgi?id=229230

Patch by Alex Christensen <achristensen@webkit.org> on 2021-08-19
Reviewed by Myles C. Maxfield.

Source/WebCore:

No change in behavior.

* WebCore.order:
* features.json:

Source/WebInspectorUI:

* UserInterface/External/three.js/three.js:
(return.parseTrackName):
(parseTrackName):
* UserInterface/Views/ConsoleMessageView.js:
(WI.ConsoleMessageView.prototype._formatWithSubstitutionString.styleFormatter):
(WI.ConsoleMessageView.prototype._formatWithSubstitutionString.isAllowedProperty):
(WI.ConsoleMessageView.prototype._formatWithSubstitutionString.isWhitelistedProperty): Deleted.
* UserInterface/Views/DOMTreeElement.js:
(WI.DOMTreeElement.prototype.populateDOMNodeContextMenu):

Source/WebKit:

* mac/WebKit2.order:

Source/WebKitLegacy/mac:

* WebKit.order:
* WebView/WebViewPrivate.h:

Source/WTF:

* icu/unicode/uspoof.h:
This comment change comes from upstream ICU.
* wtf/URL.h:

Canonical link: https://commits.webkit.org/240693@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281258 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-19 19:58:33 +00:00
Ryosuke Niwa f8a029b168 [ iOS Debug ] 12 TestWebKitAPI.WebKitLegacy. tests are crashing
https://bugs.webkit.org/show_bug.cgi?id=229250

Reviewed by Wenson Hsieh.

Disable the assertion when Web Thread is enabled for now.

* wtf/CheckedRef.h:
(WTF::SingleThreadIntegralWrapper::assertThread const):


Canonical link: https://commits.webkit.org/240654@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281217 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-19 00:20:53 +00:00
Megan Gardner 8a606cafdd Remove unneeded UIKitSPI declarations
https://bugs.webkit.org/show_bug.cgi?id=210075

Reviewed by Wenson Hsieh.

Source/WebKit:

No code changes, just using the now fully public API.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _webTouchEventsRecognized:]):
(-[WKContentView _highlightLongPressRecognized:]):
(-[WKContentView _doubleTapRecognizedForDoubleClick:]):
(-[WKContentView _twoFingerSingleTapGestureRecognized:]):
(-[WKContentView _singleTapRecognized:]):
(gestureRecognizerModifierFlags): Deleted.

Source/WTF:

Remove unneeded feature define.

* wtf/PlatformHave.h:


Canonical link: https://commits.webkit.org/240649@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281210 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 21:17:26 +00:00
Xabier Rodriguez-Calvar 28c9945267 [GStreamer][EME] Try to parse XML init datas that could possibly come from MPD manifests
https://bugs.webkit.org/show_bug.cgi?id=229145

Reviewed by Alicia Boya Garcia.

Source/WebCore:

Added GStreamerEMEUtilities to include implementation of
InitData::extractCencIfNeeded. This tries to parse the possible
XML inside an init data that could come from MPD manifests. If it
succeeds, it keeps the parsed init data, if not, it returns the
original one.

Based on a patch by Philippe Normand.

* platform/GStreamer.cmake:
* platform/graphics/gstreamer/eme/GStreamerEMEUtilities.cpp: Added.
(WebCore::markupStartElement):
(WebCore::markupEndElement):
(WebCore::markupText):
(WebCore::markupPassthrough):
(WebCore::markupError):
(WebCore::InitData::extractCencIfNeeded):
* platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h:
(WebCore::InitData::InitData):

Source/WTF:

* wtf/glib/GUniquePtr.h: Added deleter for GMarkupParseContext.


Canonical link: https://commits.webkit.org/240628@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281183 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-18 08:26:33 +00:00
Alex Christensen 988a6bd73c Enable PerformanceNavigationAPI by default
https://bugs.webkit.org/show_bug.cgi?id=227336

Patch by Alex Christensen <achristensen@webkit.org> on 2021-08-16
Reviewed by Chris Dumez.

It passes WPT tests except the following:

navigation-timing/nav2_test_redirect_chain_xserver_partial_opt_in.html and navigation-timing/nav2_test_redirect_xserver.html pass when run from wpt.live,
and other browsers also don't pass when run from our local hosting infrastructure, which doesn't have a good cross-domain redirect.

nav2_test_attributes_values.html fails in Chrome and Firefox.  There's something wrong with the port detection in the test.

* Scripts/Preferences/WebPreferencesExperimental.yaml:

Canonical link: https://commits.webkit.org/240570@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281111 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 21:45:04 +00:00
Ryosuke Niwa a8662ed1bf Add thread safe version of CanMakeCheckedPtr
https://bugs.webkit.org/show_bug.cgi?id=229018

Reviewed by Geoffrey Garen.

Source/WTF:

Introduce CanMakeThreadSafeCheckedPtr which is a thread safe version of CanMakeCheckedPtr.

* wtf/CheckedRef.h:
(WTF::CanMakeCheckedPtrBase): Extracted from CanMakeCheckedPtr.
(WTF::CanMakeCheckedPtrBase::~CanMakeCheckedPtrBase):
(WTF::CanMakeCheckedPtrBase::ptrCount const):
(WTF::SingleThreadIntegralWrapper): Added.
(WTF::SingleThreadIntegralWrapper::SingleThreadIntegralWrapper):
(WTF::SingleThreadIntegralWrapper::operator IntegralType const):
(WTF::SingleThreadIntegralWrapper::operator! const):
(WTF::SingleThreadIntegralWrapper::operator++):
(WTF::SingleThreadIntegralWrapper::operator--):
(WTF::SingleThreadIntegralWrapper::assertThread const):
(WTF::CanMakeCheckedPtr): Redefined using CanMakeCheckedPtrBase and SimpleNonAtomicType.
(WTF::CanMakeThreadSafeCheckedPtr): Added.

Tools:

Added a unit test for CanMakeThreadSafeCheckedPtr

* TestWebKitAPI/Tests/WTF/CheckedPtr.cpp:
(TestWebKitAPI.ThreadSafeCheckedPtrObject)
(WTF_CheckedPtr.CanMakeThreadSafeCheckedPtr): Added.


Canonical link: https://commits.webkit.org/240564@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 20:42:00 +00:00
David Kilzer 371a901118 ThreadSanitizer: ignore uninteresting data races for reference counting of static WTF::StringImpl objects
<https://webkit.org/b/229113>

Reviewed by Chris Dumez.

* wtf/text/StringImpl.h:
(WTF::StringImpl::isStatic const):
- Add SUPPRESS_TSAN attribute since the 0x1 bit is set at
  construction and refcounting occurs in increments of 0x2, so
  the static bit never changes.
(WTF::StringImpl::ref):
(WTF::StringImpl::deref):
- Return early for static WTF::StringImpl objects to prevent
  TSan from reporting data races for m_refCount.


Canonical link: https://commits.webkit.org/240551@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281091 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 16:49:55 +00:00
Miguel Gomez fa52cc6b54 [GTK][WPE] Add API to pass WebKitMemoryPressureHandler parameters to the network processes
https://bugs.webkit.org/show_bug.cgi?id=228227

Reviewed by Carlos Garcia Campos.

Source/WebKit:

Added webkit_website_data_manager_set_memory_pressure_settings() API function to pass a
WebKitMemoryPressureSettings instance as the settings to use by all the network processes.

* NetworkProcess/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):
* NetworkProcess/NetworkProcessCreationParameters.h:
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::platformInitializeNetworkProcess):
* UIProcess/API/glib/WebKitMemoryPressureSettings.cpp:
* UIProcess/API/glib/WebKitWebsiteDataManager.cpp:
(webkit_website_data_manager_set_memory_pressure_settings):
* UIProcess/API/gtk/WebKitWebsiteDataManager.h:
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
* UIProcess/API/wpe/WebKitWebsiteDataManager.h:
* UIProcess/API/wpe/docs/wpe-1.0-sections.txt:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didExceedMemoryLimit):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:
* UIProcess/WebProcessPool.h:
* UIProcess/soup/WebProcessPoolSoup.cpp:
(WebKit::memoryPressureMonitorDisabled):
(WebKit::WebProcessPool::platformInitializeNetworkProcess):

Source/WTF:

Added a new method to MemoryPressureHandler to set the configuration by copying the parameter
instead of moving it.

* wtf/MemoryPressureHandler.h:
(WTF::MemoryPressureHandler::setConfiguration):

Tools:

Added an API test for webkit_website_data_manager_set_memory_pressure_settings().

* TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:
(MemoryPressureTest::setup):
(MemoryPressureTest::teardown):
(MemoryPressureTest::loadFailedCallback):
(MemoryPressureTest::waitUntilLoadFailed):
(testMemoryPressureSettings):
(beforeAll):


Canonical link: https://commits.webkit.org/240531@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281070 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-16 06:55:58 +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
Sihui Liu d90b20a162 Suspend WorkQueue of ResourceLoadStatistics and LocalStorage sooner
https://bugs.webkit.org/show_bug.cgi?id=228748
<rdar://problem/81626714>

Reviewed by Chris Dumez.

Source/WebKit:

When suspending ResourceLoadStatistics and LocalStorage, we dispatched a suspend task, which waits on a
condition, to their WorkQueue. That means the queue will be suspended after completing all tasks scheduled
before the suspend task. These tasks may take a long time to complete and assertion may be timed out.

When network process receives PrepareToSuspend message, we want the queues to suspend as soon as possible. To
achieve that, now we check if the queue needs to be suspended before each task, which ensures the queue
execute as most one task after suspend().

* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
(WebKit::ResourceLoadStatisticsDatabaseStore::ResourceLoadStatisticsDatabaseStore):
* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
* NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
(WebKit::ResourceLoadStatisticsMemoryStore::ResourceLoadStatisticsMemoryStore):
* NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h:
* NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:
(WebKit::ResourceLoadStatisticsStore::ResourceLoadStatisticsStore):
* NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:
(WebKit::ResourceLoadStatisticsStore::workQueue):
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::sharedStatisticsQueue):
(WebKit::WebResourceLoadStatisticsStore::suspend):
(WebKit::WebResourceLoadStatisticsStore::resume):
(WebKit::WTF_GUARDED_BY_LOCK): Deleted.
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
* NetworkProcess/WebStorage/LocalStorageDatabase.cpp:
(WebKit::LocalStorageDatabase::create):
(WebKit::LocalStorageDatabase::LocalStorageDatabase):
* NetworkProcess/WebStorage/LocalStorageDatabase.h:
* NetworkProcess/WebStorage/LocalStorageNamespace.cpp:
(WebKit::LocalStorageNamespace::getOrCreateStorageArea):
* NetworkProcess/WebStorage/LocalStorageNamespace.h:
* NetworkProcess/WebStorage/SessionStorageNamespace.cpp:
(WebKit::SessionStorageNamespace::getOrCreateStorageArea):
* NetworkProcess/WebStorage/SessionStorageNamespace.h:
* NetworkProcess/WebStorage/StorageArea.cpp:
(WebKit::StorageArea::StorageArea):
* NetworkProcess/WebStorage/StorageArea.h:
* NetworkProcess/WebStorage/StorageManager.cpp:
(WebKit::StorageManager::createLocalStorageArea):
(WebKit::StorageManager::createTransientLocalStorageArea):
(WebKit::StorageManager::createSessionStorageArea):
* NetworkProcess/WebStorage/StorageManager.h:
* NetworkProcess/WebStorage/StorageManagerSet.cpp:
(WebKit::StorageManagerSet::StorageManagerSet):
(WebKit::StorageManagerSet::suspend):
(WebKit::StorageManagerSet::resume):
* NetworkProcess/WebStorage/StorageManagerSet.h:
(WebKit::StorageManagerSet::WTF_GUARDED_BY_LOCK): Deleted.
* NetworkProcess/WebStorage/TransientLocalStorageNamespace.cpp:
(WebKit::TransientLocalStorageNamespace::getOrCreateStorageArea):
* NetworkProcess/WebStorage/TransientLocalStorageNamespace.h:

Source/WTF:

Add SuspendableWorkQueue that would perform suspend check before each task.

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/Forward.h:
* wtf/SuspendableWorkQueue.cpp: Added.
(WTF::SuspendableWorkQueue::create):
(WTF::SuspendableWorkQueue::SuspendableWorkQueue):
(WTF::SuspendableWorkQueue::suspend):
(WTF::SuspendableWorkQueue::resume):
(WTF::SuspendableWorkQueue::dispatch):
(WTF::SuspendableWorkQueue::dispatchAfter):
(WTF::SuspendableWorkQueue::dispatchSync):
(WTF::SuspendableWorkQueue::invokeAllSuspensionCompletionHandlers):
(WTF::SuspendableWorkQueue::suspendIfNeeded):
* wtf/SuspendableWorkQueue.h: Added.
* wtf/WorkQueue.h:
(): Deleted.


Canonical link: https://commits.webkit.org/240451@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280934 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 22:25:56 +00:00
Youenn Fablet ec7ed5bc5e Enable WebRTC relay by default
https://bugs.webkit.org/show_bug.cgi?id=229000
<rdar://78767922>

Reviewed by Eric Carlson.

* Scripts/Preferences/WebPreferencesExperimental.yaml:


Canonical link: https://commits.webkit.org/240430@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 15:09:00 +00:00
Peng Liu 74fbbe8a1b Disable SYSTEM_FEATURE_FLAGS on iOS 14
https://bugs.webkit.org/show_bug.cgi?id=228979
<rdar://problem/81764452>

Reviewed by Tim Horton.

Stop using feature flags mechanism on iOS 14 to avoid some issues on iOS simulators.

* wtf/PlatformHave.h:


Canonical link: https://commits.webkit.org/240422@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280885 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-11 06:57:42 +00:00
Stephan Szabo 894ef64697 [WTF][PlayStation] REGRESSION(r280795) error: undefined symbol: WTF::logLevelString()
https://bugs.webkit.org/show_bug.cgi?id=228959

Reviewed by Fujii Hironori.

As per followup win fix, for declspec platforms, LoggingUnix needs
to include LogInitialization to get the export declaration.

* wtf/unix/LoggingUnix.cpp:


Canonical link: https://commits.webkit.org/240406@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280866 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-10 21:53:12 +00:00
Keith Miller c44db5fb09 CallFrame::returnPC should untag the return address before passing it to ReturnAddressPtr
https://bugs.webkit.org/show_bug.cgi?id=228931

Reviewed by Mark Lam.

Source/JavaScriptCore:

Right now current debugging code expects that the JS return PC on
the stack is already unsigned. This is not true on arm64e.
This patch now properly unsigns the return PC before passing it to
the ReturnAddressPC constructor.

* assembler/MacroAssemblerCodeRef.h:
(JSC::ReturnAddressPtr::fromTaggedPC):
* interpreter/AbstractPC.cpp:
(JSC::AbstractPC::AbstractPC):
* interpreter/AbstractPC.h:
(JSC::AbstractPC::AbstractPC):
(JSC::AbstractPC::jitReturnAddress const):
* interpreter/CallFrame.h:
(JSC::CallFrame::returnPC const):

Source/WTF:

Add a new helper to untag the return pc from a stack frame.

* wtf/PtrTag.h:
(WTF::untagReturnPC):


Canonical link: https://commits.webkit.org/240399@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280858 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-10 18:17:15 +00:00
Fujii Hironori 174eb57810 [GTK][WPE] REGRESSION(r280795): MemoryPressureHandlerUnix.cpp:45:28: error: ‘LogMemoryPressure’ was not declared in this scope
https://bugs.webkit.org/show_bug.cgi?id=228938

Unreviewed build fix.


* wtf/unix/MemoryPressureHandlerUnix.cpp:


Canonical link: https://commits.webkit.org/240384@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280821 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-10 02:29:56 +00:00
Fujii Hironori 5a4f13a7f0 [WTF][Win] REGRESSION(r280795) error LNK2019: unresolved external symbol "class WTF::String __cdecl WTF::logLevelString(void)"
https://bugs.webkit.org/show_bug.cgi?id=228937
<rdar://problem/81722757>

Unresolved build fix.
The previous attempt (r280819) didn't actually fix the build
error. LoggingWin.cpp has to include LogInitialization.h.

* wtf/win/LoggingWin.cpp:

Canonical link: https://commits.webkit.org/240383@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-10 02:15:01 +00:00
Fujii Hironori b10fd9c02b [WTF][Win] REGRESSION(r280795) error LNK2019: unresolved external symbol "class WTF::String __cdecl WTF::logLevelString(void)"
https://bugs.webkit.org/show_bug.cgi?id=228937

Unreviewed build fix.

> error LNK2019: unresolved external symbol "class WTF::String __cdecl WTF::logLevelString(void)" (?logLevelString@WTF@@YA?AVString@1@XZ)
>   referenced in function "private: void __cdecl WebKit::GPUProcessProxy::platformInitializeGPUProcessParameters(struct WebKit::GPUProcessCreationParameters &)"
>   (?platformInitializeGPUProcessParameters@GPUProcessProxy@WebKit@@AEAAXAEAUGPUProcessCreationParameters@2@@Z)
>   bin64\WebKit2.dll : fatal error LNK1120: 1 unresolved externals

* wtf/LogInitialization.h: Added WTF_EXPORT_PRIVATE for logLevelString.

Canonical link: https://commits.webkit.org/240382@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280819 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-10 01:36:48 +00:00
Myles C. Maxfield 90d4d2118d Create a Language log channel
https://bugs.webkit.org/show_bug.cgi?id=228764

Reviewed by Simon Fraser.

Source/WebKit:

* Platform/Logging.h:
* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
(WebKit::setAppleLanguagesPreference):
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::setOverrideLanguages):
(WebKit::WebProcessPool::initializeNewWebProcess):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getLaunchOptions):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::userPreferredLanguagesChanged const):

Source/WTF:

There have been a variety of bug reports over the past months/years about the procedure
by which we determine navigator.language. It's actually somewhat convoluted, so this
patch adds a (debug) log channel for it so we can follow what it's doing easily.

To enable all the logging, run these commands:

% defaults write com.apple.WebKit.WebContent.Development WTFLogging Language
% defaults write com.apple.WebKit.WebContent.Development WebKit2Logging Language
% defaults write com.apple.WebKit.WebContent WTFLogging Language
% defaults write com.apple.WebKit.WebContent WebKit2Logging Language
% defaults write -g WTFLogging Language
% defaults write -g WebKit2Logging Language
% defaults write /Users/$USER/Library/Containers/com.apple.Safari/Data/Library/Preferences/com.apple.Safari.plist WTFLogging Language
% defaults write /Users/$USER/Library/Containers/com.apple.Safari/Data/Library/Preferences/com.apple.Safari.plist WebKit2Logging Language

* wtf/Language.cpp:
(WTF::defaultLanguage):
(WTF::overrideUserPreferredLanguages):
(WTF::userPreferredLanguages):
* wtf/Logging.cpp:
* wtf/Logging.h:
* wtf/cf/LanguageCF.cpp:
(WTF::platformUserPreferredLanguages):
* wtf/cocoa/LanguageCocoa.mm:
(WTF::minimizedLanguagesFromLanguages):

Canonical link: https://commits.webkit.org/240381@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280811 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-10 00:07:45 +00:00
Myles C. Maxfield 99dc96c5a5 Support WTF logging channels
https://bugs.webkit.org/show_bug.cgi?id=228768

Source/WebKit:

Reviewed by Fujii Hironori.

No new tests because there is no behavior change.

* GPUProcess/GPUProcess.cpp:
(WebKit::GPUProcess::initializeGPUProcess):
* GPUProcess/GPUProcessCreationParameters.cpp:
(WebKit::GPUProcessCreationParameters::encode const):
(WebKit::GPUProcessCreationParameters::decode):
* GPUProcess/GPUProcessCreationParameters.h:
* Shared/AuxiliaryProcess.cpp:
(WebKit::AuxiliaryProcess::initialize):
* Shared/WebKit2Initialize.cpp:
(WebKit::InitializeWebKit2):
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/GPUProcessProxyCocoa.mm:
(WebKit::GPUProcessProxy::platformInitializeGPUProcessParameters):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* UIProcess/GPU/GPUProcessProxy.cpp:
(WebKit::GPUProcessProxy::platformInitializeGPUProcessParameters):
* UIProcess/WebProcessPool.cpp:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Source/WebKitLegacy/mac:

Reviewed by Fujii Hironori.

* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):

Source/WTF:

This patch builds on top of https://bugs.webkit.org/show_bug.cgi?id=228809, which added shared infrastructure
for logging. This patch simply triggers that shared infrastructure for WTF. There is no change in behavior -
the existing WTF logging channels currently are all implemented independently in custom ways, so this patch
just migrates them over to use the shared infrastructure.

Reviewed by Fujii Hironori.

* WTF.xcodeproj/project.pbxproj:
* wtf/Assertions.h:
* wtf/CMakeLists.txt:
* wtf/LogInitialization.cpp: Added.
(WTF::logChannels):
* wtf/LogInitialization.h: Added.
* wtf/Logging.cpp: Added.
* wtf/Logging.h: Added.
* wtf/MemoryPressureHandler.cpp:
(WTF::MemoryPressureHandler::singleton):
* wtf/MemoryPressureHandler.h:
* wtf/PlatformFTW.cmake:
* wtf/PlatformGTK.cmake:
* wtf/PlatformJSCOnly.cmake:
* wtf/PlatformMac.cmake:
* wtf/PlatformPlayStation.cmake:
* wtf/PlatformWPE.cmake:
* wtf/PlatformWin.cmake:
* wtf/RefCountedLeakCounter.cpp:
* wtf/cocoa/LoggingCocoa.mm: Copied from Source/WebKit/UIProcess/Cocoa/GPUProcessProxyCocoa.mm.
(WTF::logLevelString):
* wtf/cocoa/MachSendRight.cpp:
* wtf/cocoa/MainThreadCocoa.mm:
* wtf/cocoa/MemoryPressureHandlerCocoa.mm:
* wtf/unix/LoggingUnix.cpp: Added.
(WTF::logLevelString):
* wtf/win/LoggingWin.cpp: Added.
(WTF::logLevelString):

Canonical link: https://commits.webkit.org/240373@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280795 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-09 21:14:53 +00:00
Myles C. Maxfield c289a85df4 Deduplicate logging channel algorithms
https://bugs.webkit.org/show_bug.cgi?id=228809

Reviewed by Fujii Hironori.

Source/WebCore:

No new tests because there is no behavior change.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AXLogger.cpp:
* inspector/agents/page/PageConsoleAgent.cpp:
* page/Page.cpp:
* platform/LogInitialization.cpp: Copied from Source/WebCore/platform/LogInitialization.h.
(WebCore::logChannels):
(WebCore::getLogChannel):
* platform/LogInitialization.h:
* platform/Logging.cpp:
(WebCore::isLogChannelEnabled): Deleted.
(WebCore::setLogChannelToAccumulate): Deleted.
(WebCore::clearAllLogChannelsToAccumulate): Deleted.
(WebCore::initializeLogChannelsIfNecessary): Deleted.
(WebCore::getLogChannel): Deleted.
* platform/Logging.h:
* testing/js/WebCoreTestSupport.cpp:
(WebCoreTestSupport::setLogChannelToAccumulate):
(WebCoreTestSupport::clearAllLogChannelsToAccumulate):
(WebCoreTestSupport::initializeLogChannelsIfNecessary):

Source/WebKit:

* GPUProcess/GPUConnectionToWebProcess.cpp:
* GPUProcess/GPUProcess.cpp:
(WebKit::GPUProcess::initializeGPUProcess):
* Platform/LogInitialization.cpp: Copied from Source/WebKit/Shared/WebKit2Initialize.cpp.
(WebKit::logChannels):
(WebKit::getLogChannel):
* Platform/LogInitialization.h:
* Platform/Logging.cpp:
(WebKit::initializeLogChannelsIfNecessary): Deleted.
(WebKit::getLogChannel): Deleted.
* Platform/Logging.h:
* Shared/AuxiliaryProcess.cpp:
(WebKit::AuxiliaryProcess::initialize):
* Shared/WebKit2Initialize.cpp:
(WebKit::InitializeWebKit2):
* Sources.txt:
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebProcessPool.cpp:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Source/WebKitLegacy:

* WebKitLegacy.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

* Misc/WebKitLogInitialization.h: Copied from Source/WebKit/Platform/LogInitialization.h.
* Misc/WebKitLogInitialization.mm: Copied from Source/WebKitLegacy/mac/Misc/WebKitLogging.m.
(WebKit::logChannels):
(ReportDiscardedDelegateException):
* Misc/WebKitLogging.h:
* Misc/WebKitLogging.m:
(ReportDiscardedDelegateException): Deleted.
* WebCoreSupport/WebDragClient.mm:
* WebView/WebDelegateImplementationCaching.mm:
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):

Source/WTF:

The current infrastructure (before this patch) had the following duplicated for each framework:
  - A .cpp file declared the list of logging channels for that framework
  - The .cpp file also had algorithms to search, modify, and initialize these logging channels

Each framework's .cpp file had duplicate algorithms. (The initialization algorithm was even
duplicated 3 times!)

Because the algorithms directly name their specific list of logging channels, a naive deduplication
would have had to add new parameters to these algorithms to pass in the appropriate framework's
list. That's fine, but this is exactly the sort of thing classes were designed for - classes are
an association of algorithms and data. The algorithms are shared but the data isn't, which really
just means we should have 3 instances of a shared class - one for the 3 sets of data.

So, this patch creates the LogChannels class which contains the deduplicated algorithms, and each
framework has a NeverDestroyed singleton instance of that class. There is a single virtual method
in the class, so the appropriate "default write" variable can be queried for each framework.

The instances cannot be declared in the Logging.h files in the frameworks, because certain WebKit2
files want to initialize all 3 instances of LogChannels, but you can't #include multiple Logging.h
files at the same time because their LOG_CHANNEL_PREFIX #defines will collide with each other.
Luckily, LogInitialization.h files exist exactly to solve this purpose, so that's where the
LogChannels instances are declared in. After this change, the Logging.h files are just for the
declarations of the logging channels themselves, and the LogInitialization.h files are for the
LogChannels instances which contain the searching/modifying/initializing algorithms on the list of
logging channels. If you just want to LOG(...) something, #include the relevant Logging.h file, and
if you want to search/modify/initialize across the entire list of channels, then #include the
relevant LogInitialization.h file.

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/LogChannels.cpp: Copied from Source/WebCore/platform/Logging.cpp.
(WTF::LogChannels::isLogChannelEnabled):
(WTF::LogChannels::setLogChannelToAccumulate):
(WTF::LogChannels::clearAllLogChannelsToAccumulate):
(WTF::LogChannels::initializeLogChannelsIfNecessary):
(WTF::LogChannels::getLogChannel):
* wtf/LogChannels.h: Copied from Source/WebCore/platform/LogInitialization.h.


Canonical link: https://commits.webkit.org/240343@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-07 18:50:12 +00:00
Commit Queue 689b36abb1 Unreviewed, reverting r280756.
https://bugs.webkit.org/show_bug.cgi?id=228897

Broke gtk build

Reverted changeset:

"Deduplicate logging channel algorithms"
https://bugs.webkit.org/show_bug.cgi?id=228809
https://commits.webkit.org/r280756

Canonical link: https://commits.webkit.org/240342@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-07 16:34:40 +00:00
Myles C. Maxfield 5fc4e5146b Deduplicate logging channel algorithms
https://bugs.webkit.org/show_bug.cgi?id=228809

Reviewed by Fujii Hironori.

Source/WebCore:

No new tests because there is no behavior change.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AXLogger.cpp:
* inspector/agents/page/PageConsoleAgent.cpp:
* page/Page.cpp:
* platform/LogInitialization.cpp: Copied from Source/WebCore/platform/LogInitialization.h.
(WebCore::logChannels):
(WebCore::getLogChannel):
* platform/LogInitialization.h:
* platform/Logging.cpp:
(WebCore::isLogChannelEnabled): Deleted.
(WebCore::setLogChannelToAccumulate): Deleted.
(WebCore::clearAllLogChannelsToAccumulate): Deleted.
(WebCore::initializeLogChannelsIfNecessary): Deleted.
(WebCore::getLogChannel): Deleted.
* platform/Logging.h:
* testing/js/WebCoreTestSupport.cpp:
(WebCoreTestSupport::setLogChannelToAccumulate):
(WebCoreTestSupport::clearAllLogChannelsToAccumulate):
(WebCoreTestSupport::initializeLogChannelsIfNecessary):

Source/WebKit:

* GPUProcess/GPUConnectionToWebProcess.cpp:
* GPUProcess/GPUProcess.cpp:
(WebKit::GPUProcess::initializeGPUProcess):
* Platform/LogInitialization.cpp: Copied from Source/WebKit/Shared/WebKit2Initialize.cpp.
(WebKit::logChannels):
(WebKit::getLogChannel):
* Platform/LogInitialization.h:
* Platform/Logging.cpp:
(WebKit::initializeLogChannelsIfNecessary): Deleted.
(WebKit::getLogChannel): Deleted.
* Platform/Logging.h:
* Shared/AuxiliaryProcess.cpp:
(WebKit::AuxiliaryProcess::initialize):
* Shared/WebKit2Initialize.cpp:
(WebKit::InitializeWebKit2):
* Sources.txt:
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebProcessPool.cpp:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Source/WebKitLegacy:

* WebKitLegacy.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

* Misc/WebKitLogInitialization.h: Copied from Source/WebKit/Platform/LogInitialization.h.
* Misc/WebKitLogInitialization.mm: Copied from Source/WebKitLegacy/mac/Misc/WebKitLogging.m.
(WebKit::logChannels):
(ReportDiscardedDelegateException):
* Misc/WebKitLogging.h:
* Misc/WebKitLogging.m:
(ReportDiscardedDelegateException): Deleted.
* WebCoreSupport/WebDragClient.mm:
* WebView/WebDelegateImplementationCaching.mm:
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):

Source/WTF:

The current infrastructure (before this patch) had the following duplicated for each framework:
  - A .cpp file declared the list of logging channels for that framework
  - The .cpp file also had algorithms to search, modify, and initialize these logging channels

Each framework's .cpp file had duplicate algorithms. (The initialization algorithm was even
duplicated 3 times!)

Because the algorithms directly name their specific list of logging channels, a naive deduplication
would have had to add new parameters to these algorithms to pass in the appropriate framework's
list. That's fine, but this is exactly the sort of thing classes were designed for - classes are
an association of algorithms and data. The algorithms are shared but the data isn't, which really
just means we should have 3 instances of a shared class - one for the 3 sets of data.

So, this patch creates the LogChannels class which contains the deduplicated algorithms, and each
framework has a NeverDestroyed singleton instance of that class. There is a single virtual method
in the class, so the appropriate "default write" variable can be queried for each framework.

The instances cannot be declared in the Logging.h files in the frameworks, because certain WebKit2
files want to initialize all 3 instances of LogChannels, but you can't #include multiple Logging.h
files at the same time because their LOG_CHANNEL_PREFIX #defines will collide with each other.
Luckily, LogInitialization.h files exist exactly to solve this purpose, so that's where the
LogChannels instances are declared in. After this change, the Logging.h files are just for the
declarations of the logging channels themselves, and the LogInitialization.h files are for the
LogChannels instances which contain the searching/modifying/initializing algorithms on the list of
logging channels. If you just want to LOG(...) something, #include the relevant Logging.h file, and
if you want to search/modify/initialize across the entire list of channels, then #include the
relevant LogInitialization.h file.

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/LogChannels.cpp: Copied from Source/WebCore/platform/Logging.cpp.
(WTF::LogChannels::isLogChannelEnabled):
(WTF::LogChannels::setLogChannelToAccumulate):
(WTF::LogChannels::clearAllLogChannelsToAccumulate):
(WTF::LogChannels::initializeLogChannelsIfNecessary):
(WTF::LogChannels::getLogChannel):
* wtf/LogChannels.h: Copied from Source/WebCore/platform/LogInitialization.h.

Canonical link: https://commits.webkit.org/240341@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-07 07:54:50 +00:00
Michael Catanzaro bd938eda94 GCC 11 builds should use -Wno-array-bounds, -Wno-nonnull
https://bugs.webkit.org/show_bug.cgi?id=228601

Patch by Michael Catanzaro <mcatanzaro@gnome.org> on 2021-08-05
Reviewed by Carlos Garcia Campos.

.:

Prior to GCC 11, these were good warnings that could catch serious errors. But GCC 11 has
just become too sensitive and it's flagging what appear to be harmless cases, and not
providing enough feedback to know why. This has resulted in me littering our code with
pragmas to suppress GCC's false positives, and I think it's reached the point where it's
nicer to just turn off the warnings until such time that GCC gets this under control, and
rely on Clang instead in the meantime.

The GCC developers have indicated that these warnings will *always* produce false positives
in some circumstances, but with GCC 11 it's just too become too much IMO.

* Source/cmake/WebKitCompilerFlags.cmake:

Source/JavaScriptCore:

* b3/air/AirAllocateRegistersByGraphColoring.cpp:
* jit/JITCall.cpp:
(JSC::JIT::compileOpCall):

Source/WebCore:

* css/CSSValue.h:
(WebCore::CSSValue::deref):
* css/StyleRule.h:
(WebCore::StyleRuleBase::deref const):
* dom/Node.h:
(WebCore::Node::deref const):

Source/WebKit:

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::Stream::~Stream):

Source/WTF:

* wtf/Bitmap.h:
(WTF::WordType>::clear):
* wtf/Compiler.h:
* wtf/Packed.h:
(WTF::PackedAlignedPtr::get const):
* wtf/RefPtr.h:
(WTF::DefaultRefDerefTraits::derefIfNotNull):

Canonical link: https://commits.webkit.org/240291@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280689 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-05 15:27:03 +00:00
commit-queue@webkit.org 6219a2e444 Avoid reinterpret_cast alignment increase warnings with GCC on CPU(RISCV64)
https://bugs.webkit.org/show_bug.cgi?id=228818

Patch by Zan Dobersek <zdobersek@igalia.com> on 2021-08-05
Reviewed by Adrian Perez de Castro.

* wtf/StdLibExtras.h: As with 32-bit ARM and MIPS targets, RISC-V 64-bit
builds with GCC also spawn warnings when the use of reinterpret_cast
causes an increase in alignment. Workaround via reinterpret_cast_ptr is
thus required for CPU(RISCV64).

Canonical link: https://commits.webkit.org/240285@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-05 12:57:04 +00:00
Myles C. Maxfield f512d3569c [Cocoa] Tweak the formatting for passing NSArrays to TextStreams
https://bugs.webkit.org/show_bug.cgi?id=228766

Reviewed by Simon Fraser.

Source/WTF:

Instead of using -[NSArray description], which puts its output on multiple lines,
instead use the same formatting as WTF::Vector, which puts its output on a single line.

We can also use this opportunity to tweak the implementation of operator<<(id) to
allow it to be called with Core Foundation types in raw C++ code.

* wtf/text/TextStream.h:
* wtf/text/cocoa/TextStreamCocoa.mm:
(WTF::TextStream::operator<<):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/cocoa/TextStreamCocoa.cpp: Added.
(TEST):
* TestWebKitAPI/Tests/WTF/cocoa/TextStreamCocoa.mm: Added.
(TEST):

Canonical link: https://commits.webkit.org/240262@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-04 19:37:35 +00:00
Risul Islam b3a64fcc34 Add functions for parsing URL query string
https://bugs.webkit.org/show_bug.cgi?id=228122

Patch by Risul Islam <risul_islam@apple.com> on 2021-08-03
Reviewed by Darin Adler.

Source/WTF:

Added parsing of URL query strings.

* wtf/KeyValuePair.h:
(WTF::operator== const):
* wtf/URL.cpp:
(WTF::URL::differingQueryParameters):
(WTF::lengthOfURLIgnoringQueryAndFragments):
(WTF::URL::isEqualIgnoringQueryAndFragments):
(WTF::URL::removeQueryParameters):
* wtf/URL.h:

Tools:

Added the test functions required for parsing URL query string.

* TestWebKitAPI/Tests/WTF/URL.cpp:
(TestWebKitAPI::TEST_F):

Canonical link: https://commits.webkit.org/240239@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280626 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-04 01:37:22 +00:00
Youenn Fablet ebcaa703a8 RealtimeMediaSource::audioSamplesAvailable is calling malloc as part of locking in audio thread
https://bugs.webkit.org/show_bug.cgi?id=228688

Reviewed by Eric Carlson.

Allow allocations in lockSlow since allocations might happen in rare case and not for each lockSlow call.

* wtf/Lock.cpp:
(WTF::Lock::lockSlow):
(WTF::Lock::unlockSlow):
(WTF::Lock::unlockFairlySlow):


Canonical link: https://commits.webkit.org/240218@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280600 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-03 17:05:15 +00:00
Ryosuke Niwa 42242af49f Add CheckedRef
https://bugs.webkit.org/show_bug.cgi?id=227164

Reviewed by Geoffrey Garen.

Source/WTF:

Like r278344, this patch introduces a new type of smart pointer, CheckedRef,
which lets each object keep track of pointers pointing to the object.

As with CheckedPtr, the purpose of the internal counter for CheckedRef is
to release assert that there is no outstanding pointer at the time of destruction
instead of keeping the object alive when there is one.

This patch also removes makeCheckedPtr in favor of using CheckedPtr with
template argument deduction in C++17.

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/CheckedPtr.h:
(WTF::CheckedPtr::CheckedPtr): Added variants which take CheckedRef as arguments.
(WTF::makeCheckedPtr): Deleted.
(WTF::CanMakeCheckedPtr): Moved to CheckedRef.h
* wtf/CheckedRef.h: Added.
(WTF::CheckedRef::~CheckedRef): Added.
(WTF::CheckedRef::CheckedRef): Added.
(WTF::CheckedRef::isHashTableDeletedValue const): Added.
(WTF::CheckedRef::isHashTableEmptyValue const): Added.
(WTF::CheckedRef::hashTableEmptyValue): Added.
(WTF::CheckedRef::ptrAllowingHashTableEmptyValue const): Added.
(WTF::CheckedRef::ptrAllowingHashTableEmptyValue): Added.
(WTF::CheckedRef::ptr const): Added.
(WTF::CheckedRef::ptr): Added.
(WTF::CheckedRef::get const): Added.
(WTF::CheckedRef::get): Added.
(WTF::CheckedRef::operator-> const): Added.
(WTF::CheckedRef::operator->): Added.
(WTF::CheckedRef::operator const T& const): Added.
(WTF::CheckedRef::operator T&): Added.
(WTF::CheckedRef::operator! const): Added.
(WTF::CheckedRef::operator=): Added.
(WTF::CheckedRef::releasePtr): Added. Returns m_ptr without calling decrementPtrCount.
This is equivalent of leakPtr in Ref but we don't call this that since CheckedRef or
CheckedPtr is generally not used to manage the object lifetime.
(WTF::CheckedRef::poison): Added.
(WTF::CheckedRef::unpoison): Added.
(WTF::is): Added.
(WTF::CheckedRefHashTraits): Added.
(WTF::CheckedRefHashTraits::emptyValue): Added.
(WTF::CheckedRefHashTraits::constructEmptyValue): Added.
(WTF::CheckedRefHashTraits::isEmptyValue): Added.
(WTF::CheckedRefHashTraits::peek): Added.
(WTF::CheckedRefHashTraits::take): Added.
(WTF::CanMakeCheckedPtr): Moved from CheckedPtr.h
* wtf/Forward.h:

Tools:

Added some unit tests for CheckedRef and updated the unit tests
for CheckedPtr per the removal of makeCheckedPtr.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/CheckedPtr.cpp:
(WTF_CheckedPtr.CheckedRef): Added
* TestWebKitAPI/Tests/WTF/CheckedRef.cpp: Added.
(TestWebKitAPI..CheckedObject): Added.
(TestWebKitAPI..DerivedCheckedObject): Added.
(WTF_CheckedRef.Basic): Added.
(WTF_CheckedRef.DerivedClass): Added.
(WTF_CheckedRef.HashSet): Added.


Canonical link: https://commits.webkit.org/240183@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280559 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-02 21:46:29 +00:00
Devin Rousso 9701c1c7ec [Live Text] SPI for machine readable codes is only available on iOS
https://bugs.webkit.org/show_bug.cgi?id=228711

Reviewed by Tim Horton.

Source/WebCore/PAL:

* pal/spi/cocoa/VisionKitCoreSPI.h:

Source/WebKit:

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _setUpImageAnalysis]):
(-[WKContentView _tearDownImageAnalysis]):
(-[WKContentView imageAnalysisGestureDidBegin:]):
(-[WKContentView imageAnalysisGestureDidTimeOut:]):
(-[WKContentView continueContextMenuInteraction:]):
(-[WKContentView contextMenuInteraction:willEndForConfiguration:animator:]):

Source/WTF:

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


Canonical link: https://commits.webkit.org/240182@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280558 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-02 21:39:02 +00:00
Youenn Fablet 2d70b3bde7 Enable WebRTCPlatformUDPSocketsEnabled experimental feature by default
https://bugs.webkit.org/show_bug.cgi?id=228689
<rdar://problem/81383711>

Reviewed by Eric Carlson.

Enable WebRTCPlatformUDPSocketsEnabled experimental feature by default, WebRTC proxying being off by default for now.

* Scripts/Preferences/WebPreferencesExperimental.yaml:


Canonical link: https://commits.webkit.org/240172@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280545 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-02 18:39:53 +00:00
Yusuke Suzuki 77a1ed0139 [JSC] Yarr should use Bitmap instead of ByteVector for BoyerMoore search
https://bugs.webkit.org/show_bug.cgi?id=228676

Reviewed by Saam Barati.

Source/JavaScriptCore:

We observed that using Bitmap instead of ByteVector does not pose performance
issue. It was neutral in jquery-todomvc-regexp.js. In that case, we should use
Bitmap since it is 8x smaller.

We also search reusable Bitmap from Vector since comparing 128bit Bitmap is
super fast so we do not need to bother about linear search here (# of Bitmap
is currently up to 4).

To make code simplified, we add regT2 to ARMv7 and MIPS backend of YarrJIT.

                                      ToT                     Patched

    jquery-todomvc-regexp      555.9566+-0.8856          555.0737+-0.9717

* yarr/YarrJIT.cpp:
(JSC::Yarr::BoyerMooreInfo::index const): Deleted.
(JSC::Yarr::BoyerMooreInfo::setIndex): Deleted.
* yarr/YarrJIT.h:
(JSC::Yarr::YarrCodeBlock::set8BitCode):
(JSC::Yarr::YarrCodeBlock::set16BitCode):
(JSC::Yarr::YarrCodeBlock::set8BitCodeMatchOnly):
(JSC::Yarr::YarrCodeBlock::set16BitCodeMatchOnly):
(JSC::Yarr::YarrCodeBlock::tryReuseBoyerMooreBitmap const):
(JSC::Yarr::BoyerMooreByteVector::BoyerMooreByteVector): Deleted.
(JSC::Yarr::YarrCodeBlock::tryReuseBoyerMooreByteVector const): Deleted.

Source/WTF:

* wtf/Bitmap.h:

Canonical link: https://commits.webkit.org/240171@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280544 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-02 17:46:27 +00:00
Youenn Fablet 819994b1f1 Introduce an experimental feature to toggle WebRTC socket proxying
https://bugs.webkit.org/show_bug.cgi?id=228681

Reviewed by Eric Carlson.

Source/WebKit:

Decide whether to disable proxying based on experimental feature in WebProcess.
Send the disable relay value from WebProcess to NetworkProcess for TCP sockets.
Manually tested.

* NetworkProcess/webrtc/NetworkRTCProvider.cpp:
(WebKit::NetworkRTCProvider::createClientTCPSocket):
* NetworkProcess/webrtc/NetworkRTCProvider.h:
* NetworkProcess/webrtc/NetworkRTCProvider.messages.in:
* NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.h:
* NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.mm:
(WebKit::NetworkRTCTCPSocketCocoa::createClientTCPSocket):
(WebKit::NetworkRTCTCPSocketCocoa::NetworkRTCTCPSocketCocoa):
* WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
(WebKit::RTCSocketFactory::CreateClientTcpSocket):
(WebKit::LibWebRTCProvider::createSocketFactory):
* WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:
(WebKit::LibWebRTCSocketFactory::createClientTcpSocket):
* WebProcess/Network/webrtc/LibWebRTCSocketFactory.h:

Source/WTF:

* Scripts/Preferences/WebPreferencesExperimental.yaml:


Canonical link: https://commits.webkit.org/240155@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280523 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-01 16:02:21 +00:00
Yusuke Suzuki db4dc5218a [JSC] Move JIT_UNICODE_EXPRESSIONS to ENABLE(YARR_JIT_UNICODE_EXPRESSIONS) in PlatformEnable.h
https://bugs.webkit.org/show_bug.cgi?id=228669

Reviewed by Alexey Shvayka.

Source/JavaScriptCore:

Move JIT_UNICODE_EXPRESSIONS to PlatformEnable.h to align to the other YarrJIT flags.
This makes it easy to read that this is enabled on ARM64 and X86_64.

* yarr/YarrJIT.cpp:

Source/WTF:

* wtf/PlatformEnable.h:

Canonical link: https://commits.webkit.org/240152@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280520 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-31 20:47:46 +00:00
Rob Buis 5b42ab6b1f [css-overflow] Implement clip value for overflow
https://bugs.webkit.org/show_bug.cgi?id=198230

Patch by Rob Buis <rbuis@igalia.com> on 2021-07-30
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-overflow/overflow-clip-hit-testing-expected.txt: Added.
* web-platform-tests/css/css-overflow/overflow-clip-scroll-size-expected.txt: Added.
* web-platform-tests/css/css-overflow/parsing/overflow-computed-expected.txt:
* web-platform-tests/css/css-overflow/parsing/overflow-valid-expected.txt:

Source/WebCore:

Implement overflow: clip. Parsing is like the other
overflow values but special logic is added to handle
the case where only one of overflow-x/overflow-y uses
'clip' [1]. Also adjusts code that computes layout and
visual overflow to take overflow: clip into account.

This matches Chrome and Firefox.

[1] https://drafts.csswg.org/css-overflow/#propdef-overflow-x

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator Overflow const):
* css/CSSProperties.json:
* css/parser/CSSParserContext.cpp:
(WebCore::operator==):
(WebCore::add):
* css/parser/CSSParserContext.h:
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
* page/FrameView.cpp: handle scrollbars
on viewport element same as overflow: hidden.
(WebCore::FrameView::applyOverflowToViewport):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::updateFromStyle):
(WebCore::RenderBox::scrollWidth const): overflow clip
forbids all scrolling.
(WebCore::RenderBox::scrollHeight const): Ditto.
(WebCore::RenderBox::setScrollLeft): Ditto.
(WebCore::RenderBox::setScrollTop): Ditto.
(WebCore::RenderBox::setScrollPosition): Ditto.
(WebCore::RenderBox::requiresLayerWithScrollableArea const): do
not create layer with scrollable area for overflow: clip.
(WebCore::RenderBox::canBeProgramaticallyScrolled const): overflow clip
forbids all scrolling.
(WebCore::RenderBox::scrollPosition const): overflow clip
forbids all scrolling.
(WebCore::RenderBox::overflowClipRect const): only clip the rect horizontally
for overflow-x: clip and only vertically for overflow-y: clip.
(WebCore::RenderBox::createsNewFormattingContext const): do
not create formatting context for overflow: clip.
(WebCore::RenderBox::addOverflowFromChild):
(WebCore::RenderBox::addLayoutOverflow):
(WebCore::RenderBox::layoutOverflowRectForPropagation const):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::enclosingScrollableContainerForSnapping const):
* rendering/RenderObject.h: Add helper method that excludes overflow-x/y: clip.
(WebCore::RenderObject::hasPotentiallyScrollableOverflow const):
* rendering/style/RenderStyleConstants.cpp:
(WebCore::operator<<):
* rendering/style/RenderStyleConstants.h:
* style/StyleAdjuster.cpp: Add special logic is to handle the case where only
one of overflow-x/overflow-y uses 'clip'.
(WebCore::Style::Adjuster::adjust const):

Source/WTF:

Add preference for overflow: clip support.

* Scripts/Preferences/WebPreferencesExperimental.yaml:

LayoutTests:

* TestExpectations:

Canonical link: https://commits.webkit.org/240141@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280509 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-31 06:07:09 +00:00
Chris Dumez c0421a46a7 Add initial support for 'Cross-Origin-Opener-Policy' HTTP header
https://bugs.webkit.org/show_bug.cgi?id=192193
<rdar://problem/42013525>

Reviewed by Geoff Garen.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that most tests are passing.

* web-platform-tests/IndexedDB/serialize-sharedarraybuffer-throws.https-expected.txt:
* web-platform-tests/html/cross-origin-embedder-policy/cross-origin-isolated-permission.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/blob-popup.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/coep-blob-popup.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/coep-navigate-popup.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/coep-redirect.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/coep.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/coop-coep-sandbox.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/coop-csp-sandbox-navigate.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/coop-csp-sandbox.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/coop-navigated-history-popup.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/coop-navigated-popup.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/coop-sandbox.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/header-parsing.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/historical/coep-navigate-popup-unsafe-inherit.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-origin-unsafe-allow-outgoing-with-cross-origin.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-origin-unsafe-allow-outgoing-with-same-origin.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-origin-unsafe-allow-outgoing-with-same-site.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-site-unsafe-allow-outgoing-with-cross-origin.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-site-unsafe-allow-outgoing-with-same-origin.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-site-unsafe-allow-outgoing-with-same-site.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-site-with-cross-origin.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-site-with-same-origin.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/historical/popup-same-site-with-same-site.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/iframe-popup-same-origin-allow-popups-to-same-origin-allow-popups.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/iframe-popup-same-origin-allow-popups-to-same-origin.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/iframe-popup-same-origin-to-same-origin.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/iframe-popup-same-origin-to-unsafe-none.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/iframe-popup-unsafe-none-to-same-origin.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/javascript-url.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/navigate-to-aboutblank.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/no-https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/popup-coop-by-sw-from-coop.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/popup-coop-by-sw.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/popup-redirect-cache.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/popup-redirect-same-origin-allow-popups.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/popup-same-origin-allow-popups-with-cross-origin.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/popup-same-origin-allow-popups-with-same-origin.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/popup-same-origin-allow-popups-with-same-site.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/popup-same-origin-with-cross-origin.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/popup-same-origin-with-same-origin.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/popup-same-origin-with-same-site.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/popup-unsafe-none-with-cross-origin.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/popup-unsafe-none-with-same-origin.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/popup-unsafe-none-with-same-site.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/popup-unspecified-with-cross-origin.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/popup-unspecified-with-same-origin.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/popup-unspecified-with-same-site.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/popup-with-structured-header.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/resource-popup.https-expected.txt:
* web-platform-tests/html/cross-origin-opener-policy/resources/resource-popup.html:
* web-platform-tests/html/dom/idlharness.worker-expected.txt:

Source/WebCore:

Add initial support for 'Cross-Origin-Opener-Policy' HTTP header:
- https://html.spec.whatwg.org/multipage/origin.html#cross-origin-opener-policy-value

Support is complete enough to pass most WPT tests with the exception of:
- The ones involving blob. Support for Blob does not seem trivial so I will address
  separately (https://github.com/whatwg/html/issues/5198).
- The ones that requires reporting COOP enforcement as this is not supported yet.
  This is a fairly large task so I'll handle separately.
- The ones that involve Cross-Origin-Embedder-Policy (COEP) and this is not yet
  supported.

I tried to stay as close as possible to the HTML specification as possible in terms
of structuring and naming. I also have code comments to link to the relevant HTML
spec sections.

Note that as it stands, we do not currently swap process based on COOP header. We
merely do isolation of the new browsing context at JS level for now. At some point,
we'll want to actually process-swap, once we support COEP and we want to re-enable
some Web APIs such as SharedArrayBuffer.

No new tests, covered by web-plaform-tests/html/cross-origin-opener-policy.

* Headers.cmake:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:
* dom/Document.cpp:
(WebCore::Document::initSecurityContext):
(WebCore::Document::shouldForceNoOpenerBasedOnCOOP const):
(WebCore::Document::crossOriginOpenerPolicy const):
(WebCore::Document::setCrossOriginOpenerPolicy):
* dom/Document.h:
(WebCore::Document::isSameOriginAsTopDocument const):
* dom/SecurityContext.cpp:
(WebCore::SecurityContext::enforceSandboxFlags):
* dom/SecurityContext.h:
(WebCore::SecurityContext::creationSandboxFlags const):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::openURLExternally):
* loader/CrossOriginEmbedderPolicy.cpp: Copied from Source/WebCore/page/AbstractFrame.cpp.
(WebCore::obtainCrossOriginEmbedderPolicy):
* loader/CrossOriginEmbedderPolicy.h: Copied from Source/WebCore/page/AbstractFrame.cpp.
* loader/CrossOriginOpenerPolicy.cpp: Added.
(WebCore::obtainCrossOriginOpenerPolicy):
* loader/CrossOriginOpenerPolicy.h: Copied from Source/WebCore/page/AbstractFrame.h.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willSendRequest):
(WebCore::checkIfCOOPValuesRequireBrowsingContextGroupSwitch):
(WebCore::computeResponseOriginAndCOOP):
(WebCore::DocumentLoader::doCrossOriginOpenerHandlingOfResponse):
(WebCore::DocumentLoader::enforceResponseCrossOriginOpenerPolicy):
(WebCore::DocumentLoader::responseReceived):
(WebCore::DocumentLoader::maybeLoadEmpty):
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::crossOriginOpenerPolicy const):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::begin):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::didBeginDocument):
(WebCore::FrameLoader::setOpener):
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadPostRequest):
(WebCore::createWindow):
(WebCore::FrameLoader::switchBrowsingContextsGroup):
* loader/FrameLoader.h:
* loader/NavigationAction.cpp:
* loader/NavigationAction.h:
(WebCore::NavigationAction::Requester::securityOrigin const):
(WebCore::NavigationAction::Requester::topOrigin const):
(WebCore::NavigationAction::Requester::crossOriginOpenerPolicy const):
* page/AbstractFrame.cpp:
(WebCore::AbstractFrame::resetWindowProxy):
* page/AbstractFrame.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::crossOriginIsolated const):
(WebCore::DOMWindow::createWindow):
* page/DOMWindow.h:
* page/Frame.cpp:
(WebCore::Frame::resetScript):
* page/Frame.h:
* page/Page.h:
(WebCore::Page::setOpenedByDOMWithOpener):
* page/WindowOrWorkerGlobalScope.idl:
* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::applyPolicyToScriptExecutionContext):
* platform/network/HTTPHeaderNames.in:
* platform/network/HTTPParsers.cpp:
(WebCore::parseStructuredFieldValue):
* platform/network/HTTPParsers.h:
* platform/network/ResourceResponseBase.cpp:
(WebCore::isSafeRedirectionResponseHeader):
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::crossOriginIsolated const):
* workers/WorkerGlobalScope.h:

Source/WTF:

Add experimental feature flag for 'Cross-Origin-Opener-Policy' HTTP header
support.

* Scripts/Preferences/WebPreferencesExperimental.yaml:

LayoutTests:

Update test expectations.

* TestExpectations:
* platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
* platform/mac-wk2/TestExpectations:
* platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
* platform/mac/TestExpectations:


Canonical link: https://commits.webkit.org/240136@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-31 00:07:37 +00:00
Myles C. Maxfield f11022e79e Stop building WebGPU and the WHLSL compiler to decrease binary size
https://bugs.webkit.org/show_bug.cgi?id=228179

Reviewed by Dean Jackson, Robin Morisset, and Devin Rousso.

.:

* Source/cmake/OptionsFTW.cmake:
* Source/cmake/OptionsMac.cmake:
* Source/cmake/OptionsWinCairo.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmake/tools/vsprops/FeatureDefines.props:
* Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Source/JavaScriptCore:

This patch deletes the existing implementation just to reduce binary size in releases of WebKit
which don't enable WebGPU by default. It doesn't represent a change in direction or policy or
anything regarding WebGPU. It's a (somewhat temporary) pragmatic change.

Our current implementation of WebGPU:
1. Is off by default on all platforms
2. Is extremely outdated
3. Has no notion of the GPU Process, and therefore needs to be redesigned and largely rewritten
4. Only implements a fraction of what is in the spec

Removing the code from the tree doesn't delete it from existence; it's still in source control.
The benefit of reducing binary size seems to outweigh having this code in the tree.

* inspector/protocol/Canvas.json:
* inspector/scripts/codegen/generator.py:

Source/WebCore:

No new tests because there is no behavior change.

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Modules/webgpu/GPUBindGroupLayoutBinding.h: Removed.
* Modules/webgpu/GPUBindGroupLayoutBinding.idl: Removed.
* Modules/webgpu/GPUBindGroupLayoutDescriptor.h: Removed.
* Modules/webgpu/GPUBindGroupLayoutDescriptor.idl: Removed.
* Modules/webgpu/GPUBlendDescriptor.idl: Removed.
* Modules/webgpu/GPUBufferDescriptor.idl: Removed.
* Modules/webgpu/GPUBufferUsage.idl: Removed.
* Modules/webgpu/GPUCanvasContext.cpp: Removed.
* Modules/webgpu/GPUCanvasContext.h: Removed.
* Modules/webgpu/GPUCanvasContext.idl: Removed.
* Modules/webgpu/GPUColor.idl: Removed.
* Modules/webgpu/GPUColorStateDescriptor.idl: Removed.
* Modules/webgpu/GPUColorWrite.idl: Removed.
* Modules/webgpu/GPUCompareFunction.idl: Removed.
* Modules/webgpu/GPUDepthStencilStateDescriptor.idl: Removed.
* Modules/webgpu/GPUErrorFilter.idl: Removed.
* Modules/webgpu/GPUExtent3D.idl: Removed.
* Modules/webgpu/GPULoadOp.idl: Removed.
* Modules/webgpu/GPUOrigin3D.h: Removed.
* Modules/webgpu/GPUOrigin3D.idl: Removed.
* Modules/webgpu/GPUOutOfMemoryError.idl: Removed.
* Modules/webgpu/GPURequestAdapterOptions.idl: Removed.
* Modules/webgpu/GPUSamplerDescriptor.idl: Removed.
* Modules/webgpu/GPUShaderStage.h: Removed.
* Modules/webgpu/GPUShaderStage.idl: Removed.
* Modules/webgpu/GPUStoreOp.idl: Removed.
* Modules/webgpu/GPUTextureDescriptor.idl: Removed.
* Modules/webgpu/GPUTextureFormat.idl: Removed.
* Modules/webgpu/GPUTextureUsage.idl: Removed.
* Modules/webgpu/GPUUncapturedErrorEvent.cpp: Removed.
* Modules/webgpu/GPUUncapturedErrorEvent.h: Removed.
* Modules/webgpu/GPUUncapturedErrorEvent.idl: Removed.
* Modules/webgpu/GPUValidationError.idl: Removed.
* Modules/webgpu/GPUVertexAttributeDescriptor.idl: Removed.
* Modules/webgpu/GPUVertexBufferDescriptor.idl: Removed.
* Modules/webgpu/GPUVertexInputDescriptor.idl: Removed.
* Modules/webgpu/Navigator+GPU.idl: Removed.
* Modules/webgpu/NavigatorGPU.cpp: Removed.
* Modules/webgpu/NavigatorGPU.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLAST.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLAddressEscapeMode.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLAddressSpace.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLArrayType.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLAssignmentExpression.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLBaseFunctionAttribute.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLBaseSemantic.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLBlock.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLBooleanLiteral.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLBreak.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLBuiltInSemantic.cpp: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLBuiltInSemantic.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLCallExpression.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLCommaExpression.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLConstantExpression.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLContinue.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLDefaultDelete.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLDereferenceExpression.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLDoWhileLoop.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLDotExpression.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLEffectfulExpressionStatement.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLEntryPointType.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLEnumerationMember.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLEnumerationMemberLiteral.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLExpression.cpp: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLExpression.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLFallthrough.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLFloatLiteral.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.cpp: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLForLoop.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLFunctionAttribute.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLFunctionDefinition.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLGlobalVariableReference.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLIfStatement.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteral.cpp: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteral.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.cpp: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLLogicalExpression.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLLogicalNotExpression.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLMakeArrayReferenceExpression.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLMakePointerExpression.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLNameSpace.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLNamedType.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLNativeFunctionDeclaration.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLNumThreadsFunctionAttribute.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLPointerType.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLPropertyAccessExpression.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLQualifier.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLReadModifyWriteExpression.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLReplaceWith.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLResolvableType.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.cpp: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLReturn.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLSemantic.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLSpecializationConstantSemantic.cpp: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLSpecializationConstantSemantic.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLStageInOutSemantic.cpp: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLStageInOutSemantic.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLStatement.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLStructureDefinition.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLStructureElement.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLSwitchCase.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLSwitchStatement.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLTernaryExpression.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLType.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLTypeArgument.cpp: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLTypeArgument.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLTypeDefinition.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLTypeReference.cpp: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.cpp: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLUnnamedTypeHash.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteral.cpp: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteral.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.cpp: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLVariableDeclarationsStatement.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLVariableReference.h: Removed.
* Modules/webgpu/WHLSL/AST/WHLSLWhileLoop.h: Removed.
* Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp: Removed.
* Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h: Removed.
* Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp: Removed.
* Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.h: Removed.
* Modules/webgpu/WHLSL/Metal/WHLSLMangledNames.h: Removed.
* Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.cpp: Removed.
* Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.h: Removed.
* Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp: Removed.
* Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h: Removed.
* Modules/webgpu/WHLSL/Metal/WHLSLNativeTypeWriter.cpp: Removed.
* Modules/webgpu/WHLSL/Metal/WHLSLNativeTypeWriter.h: Removed.
* Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp: Removed.
* Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.h: Removed.
* Modules/webgpu/WHLSL/Metal/WHLSLVertexBufferIndexCalculator.cpp: Removed.
* Modules/webgpu/WHLSL/Metal/WHLSLVertexBufferIndexCalculator.h: Removed.
* Modules/webgpu/WHLSL/WHLSLASTDumper.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLASTDumper.h: Removed.
* Modules/webgpu/WHLSL/WHLSLBuildStandardLibraryFunctionMap.py: Removed.
* Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.h: Removed.
* Modules/webgpu/WHLSL/WHLSLCheckReferenceTypes.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLCheckReferenceTypes.h: Removed.
* Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.h: Removed.
* Modules/webgpu/WHLSL/WHLSLChecker.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLChecker.h: Removed.
* Modules/webgpu/WHLSL/WHLSLCodeLocation.h: Removed.
* Modules/webgpu/WHLSL/WHLSLComputeDimensions.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLComputeDimensions.h: Removed.
* Modules/webgpu/WHLSL/WHLSLError.h: Removed.
* Modules/webgpu/WHLSL/WHLSLFunctionStageChecker.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLFunctionStageChecker.h: Removed.
* Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.h: Removed.
* Modules/webgpu/WHLSL/WHLSLHighZombieFinder.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLHighZombieFinder.h: Removed.
* Modules/webgpu/WHLSL/WHLSLInferTypes.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLInferTypes.h: Removed.
* Modules/webgpu/WHLSL/WHLSLIntrinsics.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLIntrinsics.h: Removed.
* Modules/webgpu/WHLSL/WHLSLLexer.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLLexer.h: Removed.
* Modules/webgpu/WHLSL/WHLSLLiteralTypeChecker.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLLiteralTypeChecker.h: Removed.
* Modules/webgpu/WHLSL/WHLSLNameContext.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLNameContext.h: Removed.
* Modules/webgpu/WHLSL/WHLSLNameResolver.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLNameResolver.h: Removed.
* Modules/webgpu/WHLSL/WHLSLParser.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLParser.h: Removed.
* Modules/webgpu/WHLSL/WHLSLParsingMode.h: Removed.
* Modules/webgpu/WHLSL/WHLSLPipelineDescriptor.h: Removed.
* Modules/webgpu/WHLSL/WHLSLPrepare.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLPrepare.h: Removed.
* Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.h: Removed.
* Modules/webgpu/WHLSL/WHLSLProgram.h: Removed.
* Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLPropertyResolver.h: Removed.
* Modules/webgpu/WHLSL/WHLSLPruneUnreachableStandardLibraryFunctions.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLPruneUnreachableStandardLibraryFunctions.h: Removed.
* Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLRecursionChecker.h: Removed.
* Modules/webgpu/WHLSL/WHLSLRecursiveTypeChecker.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLRecursiveTypeChecker.h: Removed.
* Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.h: Removed.
* Modules/webgpu/WHLSL/WHLSLResolvingType.h: Removed.
* Modules/webgpu/WHLSL/WHLSLScopedSetAdder.h: Removed.
* Modules/webgpu/WHLSL/WHLSLSemanticMatcher.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLSemanticMatcher.h: Removed.
* Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt: Removed.
* Modules/webgpu/WHLSL/WHLSLStandardLibraryFunctionMap.h: Removed.
* Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.h: Removed.
* Modules/webgpu/WHLSL/WHLSLStatementBehaviorChecker.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLStatementBehaviorChecker.h: Removed.
* Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.h: Removed.
* Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.h: Removed.
* Modules/webgpu/WHLSL/WHLSLVisitor.cpp: Removed.
* Modules/webgpu/WHLSL/WHLSLVisitor.h: Removed.
* Modules/webgpu/WebGPU.cpp: Removed.
* Modules/webgpu/WebGPU.h: Removed.
* Modules/webgpu/WebGPU.idl: Removed.
* Modules/webgpu/WebGPUAdapter.cpp: Removed.
* Modules/webgpu/WebGPUAdapter.h: Removed.
* Modules/webgpu/WebGPUAdapter.idl: Removed.
* Modules/webgpu/WebGPUBindGroup.cpp: Removed.
* Modules/webgpu/WebGPUBindGroup.h: Removed.
* Modules/webgpu/WebGPUBindGroup.idl: Removed.
* Modules/webgpu/WebGPUBindGroupBinding.h: Removed.
* Modules/webgpu/WebGPUBindGroupBinding.idl: Removed.
* Modules/webgpu/WebGPUBindGroupDescriptor.cpp: Removed.
* Modules/webgpu/WebGPUBindGroupDescriptor.h: Removed.
* Modules/webgpu/WebGPUBindGroupDescriptor.idl: Removed.
* Modules/webgpu/WebGPUBindGroupLayout.cpp: Removed.
* Modules/webgpu/WebGPUBindGroupLayout.h: Removed.
* Modules/webgpu/WebGPUBindGroupLayout.idl: Removed.
* Modules/webgpu/WebGPUBuffer.cpp: Removed.
* Modules/webgpu/WebGPUBuffer.h: Removed.
* Modules/webgpu/WebGPUBuffer.idl: Removed.
* Modules/webgpu/WebGPUBufferBinding.h: Removed.
* Modules/webgpu/WebGPUBufferBinding.idl: Removed.
* Modules/webgpu/WebGPUCommandBuffer.cpp: Removed.
* Modules/webgpu/WebGPUCommandBuffer.h: Removed.
* Modules/webgpu/WebGPUCommandBuffer.idl: Removed.
* Modules/webgpu/WebGPUCommandEncoder.cpp: Removed.
* Modules/webgpu/WebGPUCommandEncoder.h: Removed.
* Modules/webgpu/WebGPUCommandEncoder.idl: Removed.
* Modules/webgpu/WebGPUComputePassEncoder.cpp: Removed.
* Modules/webgpu/WebGPUComputePassEncoder.h: Removed.
* Modules/webgpu/WebGPUComputePassEncoder.idl: Removed.
* Modules/webgpu/WebGPUComputePipeline.cpp: Removed.
* Modules/webgpu/WebGPUComputePipeline.h: Removed.
* Modules/webgpu/WebGPUComputePipeline.idl: Removed.
* Modules/webgpu/WebGPUComputePipelineDescriptor.cpp: Removed.
* Modules/webgpu/WebGPUComputePipelineDescriptor.h: Removed.
* Modules/webgpu/WebGPUComputePipelineDescriptor.idl: Removed.
* Modules/webgpu/WebGPUDevice.cpp: Removed.
* Modules/webgpu/WebGPUDevice.h: Removed.
* Modules/webgpu/WebGPUDevice.idl: Removed.
* Modules/webgpu/WebGPUDeviceErrorScopes.cpp: Removed.
* Modules/webgpu/WebGPUDeviceErrorScopes.h: Removed.
* Modules/webgpu/WebGPUDeviceErrorScopes.idl: Removed.
* Modules/webgpu/WebGPUDeviceEventHandler.idl: Removed.
* Modules/webgpu/WebGPUPipeline.cpp: Removed.
* Modules/webgpu/WebGPUPipeline.h: Removed.
* Modules/webgpu/WebGPUPipelineDescriptorBase.h: Removed.
* Modules/webgpu/WebGPUPipelineDescriptorBase.idl: Removed.
* Modules/webgpu/WebGPUPipelineLayout.cpp: Removed.
* Modules/webgpu/WebGPUPipelineLayout.h: Removed.
* Modules/webgpu/WebGPUPipelineLayout.idl: Removed.
* Modules/webgpu/WebGPUPipelineLayoutDescriptor.cpp: Removed.
* Modules/webgpu/WebGPUPipelineLayoutDescriptor.h: Removed.
* Modules/webgpu/WebGPUPipelineLayoutDescriptor.idl: Removed.
* Modules/webgpu/WebGPUProgrammablePassEncoder.cpp: Removed.
* Modules/webgpu/WebGPUProgrammablePassEncoder.h: Removed.
* Modules/webgpu/WebGPUProgrammablePassEncoder.idl: Removed.
* Modules/webgpu/WebGPUProgrammableStageDescriptor.cpp: Removed.
* Modules/webgpu/WebGPUProgrammableStageDescriptor.h: Removed.
* Modules/webgpu/WebGPUProgrammableStageDescriptor.idl: Removed.
* Modules/webgpu/WebGPUQueue.cpp: Removed.
* Modules/webgpu/WebGPUQueue.h: Removed.
* Modules/webgpu/WebGPUQueue.idl: Removed.
* Modules/webgpu/WebGPURenderPassDescriptor.cpp: Removed.
* Modules/webgpu/WebGPURenderPassDescriptor.h: Removed.
* Modules/webgpu/WebGPURenderPassDescriptor.idl: Removed.
* Modules/webgpu/WebGPURenderPassEncoder.cpp: Removed.
* Modules/webgpu/WebGPURenderPassEncoder.h: Removed.
* Modules/webgpu/WebGPURenderPassEncoder.idl: Removed.
* Modules/webgpu/WebGPURenderPipeline.cpp: Removed.
* Modules/webgpu/WebGPURenderPipeline.h: Removed.
* Modules/webgpu/WebGPURenderPipeline.idl: Removed.
* Modules/webgpu/WebGPURenderPipelineDescriptor.cpp: Removed.
* Modules/webgpu/WebGPURenderPipelineDescriptor.h: Removed.
* Modules/webgpu/WebGPURenderPipelineDescriptor.idl: Removed.
* Modules/webgpu/WebGPUSampler.cpp: Removed.
* Modules/webgpu/WebGPUSampler.h: Removed.
* Modules/webgpu/WebGPUSampler.idl: Removed.
* Modules/webgpu/WebGPUShaderModule.cpp: Removed.
* Modules/webgpu/WebGPUShaderModule.h: Removed.
* Modules/webgpu/WebGPUShaderModule.idl: Removed.
* Modules/webgpu/WebGPUShaderModuleDescriptor.h: Removed.
* Modules/webgpu/WebGPUShaderModuleDescriptor.idl: Removed.
* Modules/webgpu/WebGPUSwapChain.cpp: Removed.
* Modules/webgpu/WebGPUSwapChain.h: Removed.
* Modules/webgpu/WebGPUSwapChain.idl: Removed.
* Modules/webgpu/WebGPUSwapChainDescriptor.cpp: Removed.
* Modules/webgpu/WebGPUSwapChainDescriptor.h: Removed.
* Modules/webgpu/WebGPUTexture.cpp: Removed.
* Modules/webgpu/WebGPUTexture.h: Removed.
* Modules/webgpu/WebGPUTexture.idl: Removed.
* Modules/webgpu/WebGPUTextureView.cpp: Removed.
* Modules/webgpu/WebGPUTextureView.h: Removed.
* Modules/webgpu/WebGPUTextureView.idl: Removed.
* Modules/webgpu/WorkerNavigator+GPU.idl: Removed.
* Modules/webgpu/WorkerNavigatorGPU.cpp: Removed.
* Modules/webgpu/WorkerNavigatorGPU.h: Removed.
* Sources.txt:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:
* dom/Document.cpp:
(WebCore::Document::getCSSCanvasContext):
* dom/Document.h:
* dom/Document.idl:
* dom/EventNames.in:
* dom/EventTargetFactory.in:
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext):
(WebCore::HTMLCanvasElement::isWebGPUType): Deleted.
(WebCore::HTMLCanvasElement::createContextWebGPU): Deleted.
(WebCore::HTMLCanvasElement::getContextWebGPU): Deleted.
* html/HTMLCanvasElement.h:
* html/HTMLCanvasElement.idl:
* html/canvas/CanvasRenderingContext.h:
(WebCore::CanvasRenderingContext::isWebGL const):
(WebCore::CanvasRenderingContext::isWebGPU const): Deleted.
* inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::InspectorCanvas):
(WebCore::InspectorCanvas::canvasElement const):
(WebCore::InspectorCanvas::scriptExecutionContext const):
(WebCore::InspectorCanvas::resolveContext const):
(WebCore:: const):
(WebCore::InspectorCanvas::resetRecordingData):
(WebCore::InspectorCanvas::recordAction):
(WebCore::InspectorCanvas::buildObjectForCanvas):
(WebCore::InspectorCanvas::releaseObjectForRecording):
(WebCore::InspectorCanvas::buildInitialState):
(WebCore::canvasIfContextMatchesDevice): Deleted.
(WebCore::InspectorCanvas::deviceContext const): Deleted.
(WebCore::InspectorCanvas::isDeviceForCanvasContext const): Deleted.
* inspector/InspectorCanvas.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didCreateWebGPUDeviceImpl): Deleted.
(WebCore::InspectorInstrumentation::willDestroyWebGPUDeviceImpl): Deleted.
(WebCore::InspectorInstrumentation::willConfigureSwapChainImpl): Deleted.
(WebCore::InspectorInstrumentation::didCreateWebGPUPipelineImpl): Deleted.
(WebCore::InspectorInstrumentation::willDestroyWebGPUPipelineImpl): Deleted.
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didCreateWebGPUDevice): Deleted.
(WebCore::InspectorInstrumentation::willDestroyWebGPUDevice): Deleted.
(WebCore::InspectorInstrumentation::willConfigureSwapChain): Deleted.
(WebCore::InspectorInstrumentation::didCreateWebGPUPipeline): Deleted.
(WebCore::InspectorInstrumentation::willDestroyWebGPUPipeline): Deleted.
* inspector/InspectorShaderProgram.cpp:
(WebCore::InspectorShaderProgram::requestShaderSource):
(WebCore::InspectorShaderProgram::updateShader):
(WebCore::InspectorShaderProgram::buildObjectForShaderProgram):
(WebCore::InspectorShaderProgram::pipeline const): Deleted.
* inspector/InspectorShaderProgram.h:
* inspector/agents/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
(WebCore::InspectorCanvasAgent::enable):
(WebCore::InspectorCanvasAgent::startRecording):
(WebCore::InspectorCanvasAgent::stopRecording):
(WebCore::InspectorCanvasAgent::didChangeCanvasMemory):
(WebCore::InspectorCanvasAgent::recordAction):
(WebCore::InspectorCanvasAgent::reset):
(WebCore::InspectorCanvasAgent::didCreateWebGPUDevice): Deleted.
(WebCore::InspectorCanvasAgent::willDestroyWebGPUDevice): Deleted.
(WebCore::InspectorCanvasAgent::willConfigureSwapChain): Deleted.
(WebCore::InspectorCanvasAgent::didCreateWebGPUPipeline): Deleted.
(WebCore::InspectorCanvasAgent::willDestroyWebGPUPipeline): Deleted.
* inspector/agents/InspectorCanvasAgent.h:
* page/ProcessWarming.cpp:
(WebCore::ProcessWarming::prewarmGlobally):
* platform/Logging.h:
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
(WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
* platform/graphics/cocoa/WebGPULayer.h: Removed.
* platform/graphics/cocoa/WebGPULayer.mm: Removed.
* platform/graphics/gpu/GPUBindGroup.h: Removed.
* platform/graphics/gpu/GPUBindGroupAllocator.h: Removed.
* platform/graphics/gpu/GPUBindGroupBinding.h: Removed.
* platform/graphics/gpu/GPUBindGroupDescriptor.h: Removed.
* platform/graphics/gpu/GPUBindGroupLayout.h: Removed.
* platform/graphics/gpu/GPUBlendDescriptor.h: Removed.
* platform/graphics/gpu/GPUBuffer.cpp: Removed.
* platform/graphics/gpu/GPUBuffer.h: Removed.
* platform/graphics/gpu/GPUBufferBinding.h: Removed.
* platform/graphics/gpu/GPUBufferDescriptor.h: Removed.
* platform/graphics/gpu/GPUBufferUsage.h: Removed.
* platform/graphics/gpu/GPUColor.h: Removed.
* platform/graphics/gpu/GPUColorStateDescriptor.h: Removed.
* platform/graphics/gpu/GPUColorWrite.h: Removed.
* platform/graphics/gpu/GPUCommandBuffer.h: Removed.
* platform/graphics/gpu/GPUCompareFunction.h: Removed.
* platform/graphics/gpu/GPUComputePassEncoder.h: Removed.
* platform/graphics/gpu/GPUComputePipeline.h: Removed.
* platform/graphics/gpu/GPUComputePipelineDescriptor.h: Removed.
* platform/graphics/gpu/GPUDepthStencilStateDescriptor.h: Removed.
* platform/graphics/gpu/GPUDevice.cpp: Removed.
* platform/graphics/gpu/GPUDevice.h:
(WebCore::GPUDevice::platformDevice const): Deleted.
(WebCore::GPUDevice::swapChain const): Deleted.
(WebCore::GPUDevice::setErrorScopes): Deleted.
* platform/graphics/gpu/GPUError.cpp: Removed.
* platform/graphics/gpu/GPUError.h: Removed.
* platform/graphics/gpu/GPUErrorFilter.h: Removed.
* platform/graphics/gpu/GPUErrorScopes.cpp: Removed.
* platform/graphics/gpu/GPUErrorScopes.h: Removed.
* platform/graphics/gpu/GPUExtent3D.h: Removed.
* platform/graphics/gpu/GPULimits.h: Removed.
* platform/graphics/gpu/GPULoadOp.h: Removed.
* platform/graphics/gpu/GPUObjectBase.h: Removed.
* platform/graphics/gpu/GPUOutOfMemoryError.h: Removed.
* platform/graphics/gpu/GPUPipeline.cpp: Removed.
* platform/graphics/gpu/GPUPipeline.h: Removed.
* platform/graphics/gpu/GPUPipelineDescriptorBase.h: Removed.
* platform/graphics/gpu/GPUPipelineLayout.cpp: Removed.
* platform/graphics/gpu/GPUPipelineLayout.h: Removed.
* platform/graphics/gpu/GPUPipelineLayoutDescriptor.h: Removed.
* platform/graphics/gpu/GPUPlatformTypes.h: Removed.
* platform/graphics/gpu/GPUProgrammablePassEncoder.cpp: Removed.
* platform/graphics/gpu/GPUProgrammablePassEncoder.h: Removed.
* platform/graphics/gpu/GPUProgrammableStageDescriptor.h: Removed.
* platform/graphics/gpu/GPUQueue.h: Removed.
* platform/graphics/gpu/GPURenderPassDescriptor.h: Removed.
* platform/graphics/gpu/GPURenderPassEncoder.h: Removed.
* platform/graphics/gpu/GPURenderPipeline.h: Removed.
* platform/graphics/gpu/GPURenderPipelineDescriptor.h: Removed.
* platform/graphics/gpu/GPURequestAdapterOptions.h: Removed.
* platform/graphics/gpu/GPUSampler.h: Removed.
* platform/graphics/gpu/GPUSamplerDescriptor.h: Removed.
* platform/graphics/gpu/GPUShaderModule.h: Removed.
* platform/graphics/gpu/GPUShaderModuleDescriptor.h: Removed.
* platform/graphics/gpu/GPUStoreOp.h: Removed.
* platform/graphics/gpu/GPUSwapChain.h: Removed.
* platform/graphics/gpu/GPUSwapChainDescriptor.h: Removed.
* platform/graphics/gpu/GPUTexture.h: Removed.
* platform/graphics/gpu/GPUTextureDescriptor.h: Removed.
* platform/graphics/gpu/GPUTextureFormat.h: Removed.
* platform/graphics/gpu/GPUTextureUsage.h: Removed.
* platform/graphics/gpu/GPUUtils.h: Removed.
* platform/graphics/gpu/GPUValidationError.cpp: Removed.
* platform/graphics/gpu/GPUValidationError.h: Removed.
* platform/graphics/gpu/GPUVertexAttributeDescriptor.h: Removed.
* platform/graphics/gpu/GPUVertexBufferDescriptor.h: Removed.
* platform/graphics/gpu/GPUVertexInputDescriptor.h: Removed.
* platform/graphics/gpu/cocoa/GPUBindGroupAllocatorMetal.mm: Removed.
* platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm: Removed.
* platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm: Removed.
* platform/graphics/gpu/cocoa/GPUBufferMetal.mm: Removed.
* platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm: Removed.
* platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm: Removed.
* platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm: Removed.
* platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
(WebCore::prewarmGPU):
(WebCore::isAcceptableDevice): Deleted.
(WebCore::GPUDevice::prewarm): Deleted.
(WebCore::GPUDevice::tryCreate): Deleted.
(WebCore::GPUDevice::GPUDevice): Deleted.
* platform/graphics/gpu/cocoa/GPUPipelineMetalConvertLayout.cpp: Removed.
* platform/graphics/gpu/cocoa/GPUPipelineMetalConvertLayout.h: Removed.
* platform/graphics/gpu/cocoa/GPUPlatformTypesMetal.h: Removed.
* platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm: Removed.
* platform/graphics/gpu/cocoa/GPUQueueMetal.mm: Removed.
* platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm: Removed.
* platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm: Removed.
* platform/graphics/gpu/cocoa/GPUSamplerMetal.mm: Removed.
* platform/graphics/gpu/cocoa/GPUShaderModuleMetal.mm: Removed.
* platform/graphics/gpu/cocoa/GPUSwapChainMetal.mm: Removed.
* platform/graphics/gpu/cocoa/GPUTextureMetal.mm: Removed.
* platform/graphics/gpu/cocoa/GPUUtilsMetal.mm: Removed.
* platform/graphics/gpu/dawn/GPUBindGroupAllocatorDawn.cpp: Removed.
* platform/graphics/gpu/dawn/GPUBindGroupDawn.cpp: Removed.
* platform/graphics/gpu/dawn/GPUBindGroupLayoutDawn.cpp: Removed.
* platform/graphics/gpu/dawn/GPUBufferDawn.cpp: Removed.
* platform/graphics/gpu/dawn/GPUCommandBufferDawn.cpp: Removed.
* platform/graphics/gpu/dawn/GPUComputePassEncoderDawn.cpp: Removed.
* platform/graphics/gpu/dawn/GPUComputePipelineDawn.cpp: Removed.
* platform/graphics/gpu/dawn/GPUDeviceDawn.cpp: Removed.
* platform/graphics/gpu/dawn/GPUPlatformTypesDawn.h: Removed.
* platform/graphics/gpu/dawn/GPUProgrammablePassEncoderDawn.cpp: Removed.
* platform/graphics/gpu/dawn/GPUQueueDawn.cpp: Removed.
* platform/graphics/gpu/dawn/GPURenderPassEncoderDawn.cpp: Removed.
* platform/graphics/gpu/dawn/GPURenderPipelineDawn.cpp: Removed.
* platform/graphics/gpu/dawn/GPUSamplerDawn.cpp: Removed.
* platform/graphics/gpu/dawn/GPUShaderModuleDawn.cpp: Removed.
* platform/graphics/gpu/dawn/GPUSwapChainDawn.cpp: Removed.
* platform/graphics/gpu/dawn/GPUTextureDawn.cpp: Removed.
* platform/ios/DragImageIOS.mm:
* platform/mediastream/mac/WindowDisplayCapturerMac.mm:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::RenderLayerBacking::contentChanged):

Source/WebKit:

* FeatureFlags/WebKit-appletvos.plist:
* FeatureFlags/WebKit-ios.plist:
* FeatureFlags/WebKit-macos.plist:
* FeatureFlags/WebKit-watchos.plist:
* Shared/WebPreferencesDefaultValues.cpp:
(WebKit::defaultWebGPUEnabled): Deleted.
* Shared/WebPreferencesDefaultValues.h:

Source/WebKitLegacy/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(-[WebPreferences webGPUEnabled]): Deleted.
(-[WebPreferences setWebGPUEnabled:]): Deleted.
* WebView/WebPreferencesDefaultValues.h:
* WebView/WebPreferencesDefaultValues.mm:
(WebKit::defaultWebGPUEnabled): Deleted.
* WebView/WebPreferencesPrivate.h:

Source/WTF:

* Scripts/Preferences/WebPreferencesExperimental.yaml:
* wtf/PlatformEnable.h:
* wtf/PlatformEnableCocoa.h:

LayoutTests:

* TestExpectations:
* fast/dom/navigator-detached-no-crash-expected.txt:
* inspector/canvas/create-context-webgpu-expected.txt: Removed.
* inspector/canvas/create-context-webgpu.html: Removed.
* inspector/canvas/requestClientNodes-webgpu-expected.txt: Removed.
* inspector/canvas/requestClientNodes-webgpu.html: Removed.
* inspector/canvas/requestShaderSource-webgpu-expected.txt: Removed.
* inspector/canvas/requestShaderSource-webgpu.html: Removed.
* inspector/canvas/resolveContext-webgpu-expected.txt: Removed.
* inspector/canvas/resolveContext-webgpu.html: Removed.
* inspector/canvas/shaderProgram-add-remove-webgpu-expected.txt: Removed.
* inspector/canvas/shaderProgram-add-remove-webgpu.html: Removed.
* inspector/canvas/updateShader-webgpu-expected.txt: Removed.
* inspector/canvas/updateShader-webgpu-sharedVertexFragment-expected.txt: Removed.
* inspector/canvas/updateShader-webgpu-sharedVertexFragment.html: Removed.
* inspector/canvas/updateShader-webgpu.html: Removed.
* platform/glib/TestExpectations:
* platform/ios/TestExpectations:
* platform/mac-wk1/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt:
* platform/mac/TestExpectations:
* platform/win/TestExpectations:
* webgpu/bind-groups-expected.txt: Removed.
* webgpu/bind-groups.html: Removed.
* webgpu/blend-color-triangle-strip-expected.html: Removed.
* webgpu/blend-color-triangle-strip.html: Removed.
* webgpu/blend-triangle-strip-expected.html: Removed.
* webgpu/blend-triangle-strip.html: Removed.
* webgpu/blit-commands-expected.html: Removed.
* webgpu/blit-commands-texture-to-texture-expected.html: Removed.
* webgpu/blit-commands-texture-to-texture.html: Removed.
* webgpu/blit-commands.html: Removed.
* webgpu/buffer-command-buffer-races-expected.html: Removed.
* webgpu/buffer-command-buffer-races.html: Removed.
* webgpu/buffer-errors-expected.txt: Removed.
* webgpu/buffer-errors.html: Removed.
* webgpu/color-write-mask-triangle-strip-expected.html: Removed.
* webgpu/color-write-mask-triangle-strip.html: Removed.
* webgpu/command-buffers-expected.txt: Removed.
* webgpu/command-buffers.html: Removed.
* webgpu/compute-pipeline-errors-expected.txt: Removed.
* webgpu/compute-pipeline-errors.html: Removed.
* webgpu/depth-enabled-triangle-strip-expected.html: Removed.
* webgpu/depth-enabled-triangle-strip.html: Removed.
* webgpu/draw-indexed-triangles-expected.html: Removed.
* webgpu/draw-indexed-triangles.html: Removed.
* webgpu/error-scopes-test-expected.txt: Removed.
* webgpu/error-scopes-test.html: Removed.
* webgpu/expando-properties-expected.txt: Removed.
* webgpu/expando-properties.html: Removed.
* webgpu/js/webgpu-functions.js: Removed.
* webgpu/map-read-buffers-expected.txt: Removed.
* webgpu/map-read-buffers.html: Removed.
* webgpu/map-write-buffers-expected.txt: Removed.
* webgpu/map-write-buffers.html: Removed.
* webgpu/pipeline-layouts-expected.txt: Removed.
* webgpu/pipeline-layouts.html: Removed.
* webgpu/queue-creation-expected.txt: Removed.
* webgpu/queue-creation.html: Removed.
* webgpu/render-command-encoding-expected.txt: Removed.
* webgpu/render-command-encoding.html: Removed.
* webgpu/render-pipeline-errors-expected.txt: Removed.
* webgpu/render-pipeline-errors.html: Removed.
* webgpu/render-pipelines-expected.txt: Removed.
* webgpu/render-pipelines.html: Removed.
* webgpu/resources/blue-checkered.png: Removed.
* webgpu/resources/green-400.png: Removed.
* webgpu/shader-modules-expected.txt: Removed.
* webgpu/shader-modules.html: Removed.
* webgpu/simple-triangle-strip-expected.html: Removed.
* webgpu/simple-triangle-strip.html: Removed.
* webgpu/texture-creation-expected.txt: Removed.
* webgpu/texture-creation.html: Removed.
* webgpu/texture-triangle-strip-expected.html: Removed.
* webgpu/texture-triangle-strip.html: Removed.
* webgpu/textures-textureviews-expected.txt: Removed.
* webgpu/textures-textureviews.html: Removed.
* webgpu/uncaptured-errors-expected.txt: Removed.
* webgpu/uncaptured-errors.html: Removed.
* webgpu/vertex-buffer-triangle-strip-expected.html: Removed.
* webgpu/vertex-buffer-triangle-strip.html: Removed.
* webgpu/viewport-scissor-rect-triangle-strip-expected.html: Removed.
* webgpu/viewport-scissor-rect-triangle-strip.html: Removed.
* webgpu/whlsl/address-of-swizzle-expected.txt: Removed.
* webgpu/whlsl/address-of-swizzle.html: Removed.
* webgpu/whlsl/arbitrary-vertex-attribute-locations-expected.html: Removed.
* webgpu/whlsl/arbitrary-vertex-attribute-locations.html: Removed.
* webgpu/whlsl/argument-evaluation-order-expected.txt: Removed.
* webgpu/whlsl/argument-evaluation-order.html: Removed.
* webgpu/whlsl/array-length-spec-tests-expected.txt: Removed.
* webgpu/whlsl/array-length-spec-tests.html: Removed.
* webgpu/whlsl/array-oob-alias-expected.txt: Removed.
* webgpu/whlsl/array-oob-alias.html: Removed.
* webgpu/whlsl/array-spec-tests-expected.txt: Removed.
* webgpu/whlsl/array-spec-tests.html: Removed.
* webgpu/whlsl/bad-add-expected.txt: Removed.
* webgpu/whlsl/bad-add.html: Removed.
* webgpu/whlsl/bad-literals-expected.txt: Removed.
* webgpu/whlsl/bad-literals.html: Removed.
* webgpu/whlsl/bitwise-bool-ops-expected.txt: Removed.
* webgpu/whlsl/bitwise-bool-ops.html: Removed.
* webgpu/whlsl/bool-matrix-expected.txt: Removed.
* webgpu/whlsl/bool-matrix.html: Removed.
* webgpu/whlsl/bools-expected.txt: Removed.
* webgpu/whlsl/bools.html: Removed.
* webgpu/whlsl/buffer-fragment-expected.html: Removed.
* webgpu/whlsl/buffer-fragment.html: Removed.
* webgpu/whlsl/buffer-length-expected.txt: Removed.
* webgpu/whlsl/buffer-length.html: Removed.
* webgpu/whlsl/buffer-vertex-expected.html: Removed.
* webgpu/whlsl/buffer-vertex.html: Removed.
* webgpu/whlsl/builtin-vectors-2-expected.txt: Removed.
* webgpu/whlsl/builtin-vectors-2.html: Removed.
* webgpu/whlsl/builtin-vectors-expected.txt: Removed.
* webgpu/whlsl/builtin-vectors.html: Removed.
* webgpu/whlsl/casts-expected.txt: Removed.
* webgpu/whlsl/casts.html: Removed.
* webgpu/whlsl/checker-should-set-type-of-read-modify-write-variables-expected.txt: Removed.
* webgpu/whlsl/checker-should-set-type-of-read-modify-write-variables.html: Removed.
* webgpu/whlsl/clamp-stdlib-expected.txt: Removed.
* webgpu/whlsl/clamp-stdlib.html: Removed.
* webgpu/whlsl/comment-parsing-expected.txt: Removed.
* webgpu/whlsl/comment-parsing.html: Removed.
* webgpu/whlsl/compute-expected.txt: Removed.
* webgpu/whlsl/compute.html: Removed.
* webgpu/whlsl/copy-expected.txt: Removed.
* webgpu/whlsl/copy.html: Removed.
* webgpu/whlsl/dereference-ordering-expected.txt: Removed.
* webgpu/whlsl/dereference-ordering.html: Removed.
* webgpu/whlsl/dereference-pointer-should-type-check-expected.html: Removed.
* webgpu/whlsl/dereference-pointer-should-type-check.html: Removed.
* webgpu/whlsl/device-proper-type-checker-expected.txt: Removed.
* webgpu/whlsl/device-proper-type-checker.html: Removed.
* webgpu/whlsl/do-while-loop-break-expected.html: Removed.
* webgpu/whlsl/do-while-loop-break.html: Removed.
* webgpu/whlsl/do-while-loop-continue-expected.html: Removed.
* webgpu/whlsl/do-while-loop-continue.html: Removed.
* webgpu/whlsl/do-while-loop-expected.html: Removed.
* webgpu/whlsl/do-while-loop.html: Removed.
* webgpu/whlsl/dont-crash-parsing-enum-expected.html: Removed.
* webgpu/whlsl/dont-crash-parsing-enum.html: Removed.
* webgpu/whlsl/dot-expressions-expected.html: Removed.
* webgpu/whlsl/dot-expressions.html: Removed.
* webgpu/whlsl/double-not-expected.txt: Removed.
* webgpu/whlsl/double-not.html: Removed.
* webgpu/whlsl/duplicate-types-should-not-produce-duplicate-ctors-expected.txt: Removed.
* webgpu/whlsl/duplicate-types-should-not-produce-duplicate-ctors.html: Removed.
* webgpu/whlsl/duplicates-expected.txt: Removed.
* webgpu/whlsl/duplicates.html: Removed.
* webgpu/whlsl/ensure-proper-pointer-usage-expected.txt: Removed.
* webgpu/whlsl/ensure-proper-pointer-usage.html: Removed.
* webgpu/whlsl/ensure-proper-variable-lifetime-2-expected.html: Removed.
* webgpu/whlsl/ensure-proper-variable-lifetime-2.html: Removed.
* webgpu/whlsl/ensure-proper-variable-lifetime-3-expected.html: Removed.
* webgpu/whlsl/ensure-proper-variable-lifetime-3.html: Removed.
* webgpu/whlsl/ensure-proper-variable-lifetime-expected.html: Removed.
* webgpu/whlsl/ensure-proper-variable-lifetime.html: Removed.
* webgpu/whlsl/enum-integer-constructor-expected.txt: Removed.
* webgpu/whlsl/enum-integer-constructor.html: Removed.
* webgpu/whlsl/enum-spec-tests-expected.txt: Removed.
* webgpu/whlsl/enum-spec-tests.html: Removed.
* webgpu/whlsl/enums-2-expected.txt: Removed.
* webgpu/whlsl/enums-2.html: Removed.
* webgpu/whlsl/enums-expected.txt: Removed.
* webgpu/whlsl/enums.html: Removed.
* webgpu/whlsl/equality-expected.txt: Removed.
* webgpu/whlsl/equality.html: Removed.
* webgpu/whlsl/float-math-expected.txt: Removed.
* webgpu/whlsl/float-math.html: Removed.
* webgpu/whlsl/getter-setter-type-expected.txt: Removed.
* webgpu/whlsl/getter-setter-type.html: Removed.
* webgpu/whlsl/huge-array-expected.txt: Removed.
* webgpu/whlsl/huge-array.html: Removed.
* webgpu/whlsl/if-statement-expected.txt: Removed.
* webgpu/whlsl/if-statement.html: Removed.
* webgpu/whlsl/increment-decrement-expected.txt: Removed.
* webgpu/whlsl/increment-decrement.html: Removed.
* webgpu/whlsl/increment-setter-expected.txt: Removed.
* webgpu/whlsl/increment-setter.html: Removed.
* webgpu/whlsl/index-getter-setter-expected.txt: Removed.
* webgpu/whlsl/index-getter-setter.html: Removed.
* webgpu/whlsl/int-bit-math-expected.txt: Removed.
* webgpu/whlsl/int-bit-math.html: Removed.
* webgpu/whlsl/int-literal-compare-expected.txt: Removed.
* webgpu/whlsl/int-literal-compare.html: Removed.
* webgpu/whlsl/js/test-harness.js: Removed.
* webgpu/whlsl/length-stdlib-expected.txt: Removed.
* webgpu/whlsl/length-stdlib.html: Removed.
* webgpu/whlsl/lexing-expected.txt: Removed.
* webgpu/whlsl/lexing.html: Removed.
* webgpu/whlsl/literals-expected.txt: Removed.
* webgpu/whlsl/literals.html: Removed.
* webgpu/whlsl/logical-negation-expected.txt: Removed.
* webgpu/whlsl/logical-negation.html: Removed.
* webgpu/whlsl/loops-break-expected.html: Removed.
* webgpu/whlsl/loops-break.html: Removed.
* webgpu/whlsl/loops-continue-expected.html: Removed.
* webgpu/whlsl/loops-continue.html: Removed.
* webgpu/whlsl/loops-expected.html: Removed.
* webgpu/whlsl/loops-spec-tests-expected.txt: Removed.
* webgpu/whlsl/loops-spec-tests.html: Removed.
* webgpu/whlsl/loops.html: Removed.
* webgpu/whlsl/lots-of-local-variables-expected.txt: Removed.
* webgpu/whlsl/lots-of-local-variables.html: Removed.
* webgpu/whlsl/lvalues-expected.txt: Removed.
* webgpu/whlsl/lvalues.html: Removed.
* webgpu/whlsl/make-array-ref-spec-tests-expected.txt: Removed.
* webgpu/whlsl/make-array-ref-spec-tests.html: Removed.
* webgpu/whlsl/make-array-reference-expected.txt: Removed.
* webgpu/whlsl/make-array-reference.html: Removed.
* webgpu/whlsl/matrices-spec-tests-expected.txt: Removed.
* webgpu/whlsl/matrices-spec-tests.html: Removed.
* webgpu/whlsl/matrix-2-expected.txt: Removed.
* webgpu/whlsl/matrix-2.html: Removed.
* webgpu/whlsl/matrix-alignment-expected.txt: Removed.
* webgpu/whlsl/matrix-alignment.html: Removed.
* webgpu/whlsl/matrix-compare-expected.txt: Removed.
* webgpu/whlsl/matrix-compare.html: Removed.
* webgpu/whlsl/matrix-constructors-expected.txt: Removed.
* webgpu/whlsl/matrix-constructors-list-of-scalars-expected.txt: Removed.
* webgpu/whlsl/matrix-constructors-list-of-scalars.html: Removed.
* webgpu/whlsl/matrix-constructors.html: Removed.
* webgpu/whlsl/matrix-expected.txt: Removed.
* webgpu/whlsl/matrix-index-assign-expected.txt: Removed.
* webgpu/whlsl/matrix-index-assign.html: Removed.
* webgpu/whlsl/matrix-index-order-expected.txt: Removed.
* webgpu/whlsl/matrix-index-order.html: Removed.
* webgpu/whlsl/matrix-memory-layout-expected.txt: Removed.
* webgpu/whlsl/matrix-memory-layout.html: Removed.
* webgpu/whlsl/matrix.html: Removed.
* webgpu/whlsl/nested-dot-expression-rvalue-expected.html: Removed.
* webgpu/whlsl/nested-dot-expression-rvalue.html: Removed.
* webgpu/whlsl/nested-loop-expected.html: Removed.
* webgpu/whlsl/nested-loop.html: Removed.
* webgpu/whlsl/null-arg-expected.txt: Removed.
* webgpu/whlsl/null-arg.html: Removed.
* webgpu/whlsl/null-array-property-access-expected.txt: Removed.
* webgpu/whlsl/null-array-property-access.html: Removed.
* webgpu/whlsl/null-array-ref.html: Removed.
* webgpu/whlsl/oob-access-2-expected.txt: Removed.
* webgpu/whlsl/oob-access-2.html: Removed.
* webgpu/whlsl/oob-access-expected.txt: Removed.
* webgpu/whlsl/oob-access.html: Removed.
* webgpu/whlsl/operator-div-expected.txt: Removed.
* webgpu/whlsl/operator-div.html: Removed.
* webgpu/whlsl/operator-equal-equal-expected.txt: Removed.
* webgpu/whlsl/operator-equal-equal.html: Removed.
* webgpu/whlsl/operator-minus-expected.txt: Removed.
* webgpu/whlsl/operator-minus.html: Removed.
* webgpu/whlsl/operator-overload-expected.txt: Removed.
* webgpu/whlsl/operator-overload.html: Removed.
* webgpu/whlsl/operator-plus-expected.txt: Removed.
* webgpu/whlsl/operator-plus.html: Removed.
* webgpu/whlsl/operator-syntax-expected.txt: Removed.
* webgpu/whlsl/operator-syntax.html: Removed.
* webgpu/whlsl/operator-times-expected.txt: Removed.
* webgpu/whlsl/operator-times.html: Removed.
* webgpu/whlsl/operator-vector-assign-expected.txt: Removed.
* webgpu/whlsl/operator-vector-assign.html: Removed.
* webgpu/whlsl/operator-vector-load-expected.txt: Removed.
* webgpu/whlsl/operator-vector-load.html: Removed.
* webgpu/whlsl/operator-xy-expected.txt: Removed.
* webgpu/whlsl/operator-xy.html: Removed.
* webgpu/whlsl/overload-expected.txt: Removed.
* webgpu/whlsl/overload.html: Removed.
* webgpu/whlsl/plus-equals-expected.txt: Removed.
* webgpu/whlsl/plus-equals.html: Removed.
* webgpu/whlsl/pointer-spec-tests-expected.txt: Removed.
* webgpu/whlsl/pointer-spec-tests.html: Removed.
* webgpu/whlsl/postfix-prefix-expected.txt: Removed.
* webgpu/whlsl/postfix-prefix.html: Removed.
* webgpu/whlsl/property-evaluation-order-expected.txt: Removed.
* webgpu/whlsl/property-evaluation-order.html: Removed.
* webgpu/whlsl/read-modify-write-expected.txt: Removed.
* webgpu/whlsl/read-modify-write-high-zombies-expected.txt: Removed.
* webgpu/whlsl/read-modify-write-high-zombies.html: Removed.
* webgpu/whlsl/read-modify-write.html: Removed.
* webgpu/whlsl/recursive-structs-expected.txt: Removed.
* webgpu/whlsl/recursive-structs.html: Removed.
* webgpu/whlsl/return-local-variable-expected.html: Removed.
* webgpu/whlsl/return-local-variable.html: Removed.
* webgpu/whlsl/return-spec-tests-expected.txt: Removed.
* webgpu/whlsl/return-spec-tests.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-10-expected.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-10.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-11-expected.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-11.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-12-expected.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-12.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-13-expected.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-13.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-14-expected.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-14.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-15-expected.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-15.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-16-expected.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-16.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-17-expected.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-17.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-18-expected.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-18.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-19-expected.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-19.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-2-expected.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-2.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-20-expected.txt: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-20.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-21-expected.txt: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-21.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-22-expected.txt: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-22.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-23-expected.txt: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-23.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-24-expected.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-24.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-25-expected.txt: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-25.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-26-expected.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-26.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-27-expected.txt: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-27.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-3-expected.txt: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-3.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-4-expected.txt: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-4.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-5-expected.txt: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-5.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-6-expected.txt: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-6.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-7-expected.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-7.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-8-expected.txt: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-8.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-9-expected.txt: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-9.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules-expected.html: Removed.
* webgpu/whlsl/separate-shader-modules/separate-shader-modules.html: Removed.
* webgpu/whlsl/setter-spec-tests-expected.txt: Removed.
* webgpu/whlsl/setter-spec-tests.html: Removed.
* webgpu/whlsl/simple-arrays-expected.txt: Removed.
* webgpu/whlsl/simple-arrays.html: Removed.
* webgpu/whlsl/simple-getter-setter-expected.txt: Removed.
* webgpu/whlsl/simple-getter-setter.html: Removed.
* webgpu/whlsl/simple-tests-expected.txt: Removed.
* webgpu/whlsl/simple-tests.html: Removed.
* webgpu/whlsl/simple-while-loop-expected.txt: Removed.
* webgpu/whlsl/simple-while-loop.html: Removed.
* webgpu/whlsl/smaller-than-32-bit-types-expected.txt: Removed.
* webgpu/whlsl/smaller-than-32-bit-types.html: Removed.
* webgpu/whlsl/sparse-bind-group-2-expected.txt: Removed.
* webgpu/whlsl/sparse-bind-group-2.html: Removed.
* webgpu/whlsl/sparse-bind-group-3-expected.txt: Removed.
* webgpu/whlsl/sparse-bind-group-3.html: Removed.
* webgpu/whlsl/sparse-bind-group-expected.txt: Removed.
* webgpu/whlsl/sparse-bind-group.html: Removed.
* webgpu/whlsl/store-null-expected.txt: Removed.
* webgpu/whlsl/store-null.html: Removed.
* webgpu/whlsl/store-to-property-updates-properly-expected.html: Removed.
* webgpu/whlsl/store-to-property-updates-properly.html: Removed.
* webgpu/whlsl/struct-expected.txt: Removed.
* webgpu/whlsl/struct.html: Removed.
* webgpu/whlsl/structure-field-enumeration-element-clash-expected.txt: Removed.
* webgpu/whlsl/structure-field-enumeration-element-clash.html: Removed.
* webgpu/whlsl/switch-expected.txt: Removed.
* webgpu/whlsl/switch.html: Removed.
* webgpu/whlsl/ternary-spec-test-expected.txt: Removed.
* webgpu/whlsl/ternary-spec-test.html: Removed.
* webgpu/whlsl/test-harness-test-expected.txt: Removed.
* webgpu/whlsl/test-harness-test.html: Removed.
* webgpu/whlsl/textures-getdimensions-expected.txt: Removed.
* webgpu/whlsl/textures-getdimensions.html: Removed.
* webgpu/whlsl/textures-load-expected.html: Removed.
* webgpu/whlsl/textures-load.html: Removed.
* webgpu/whlsl/textures-sample-bias-expected.html: Removed.
* webgpu/whlsl/textures-sample-bias.html: Removed.
* webgpu/whlsl/textures-sample-expected.html: Removed.
* webgpu/whlsl/textures-sample-grad-expected.html: Removed.
* webgpu/whlsl/textures-sample-grad.html: Removed.
* webgpu/whlsl/textures-sample-level-expected.html: Removed.
* webgpu/whlsl/textures-sample-level.html: Removed.
* webgpu/whlsl/textures-sample.html: Removed.
* webgpu/whlsl/two-dimensional-array-expected.txt: Removed.
* webgpu/whlsl/two-dimensional-array.html: Removed.
* webgpu/whlsl/type-mismatch-expected.txt: Removed.
* webgpu/whlsl/type-mismatch.html: Removed.
* webgpu/whlsl/uint-bitwise-expected.txt: Removed.
* webgpu/whlsl/uint-bitwise.html: Removed.
* webgpu/whlsl/use-undefined-variable-2-expected.txt: Removed.
* webgpu/whlsl/use-undefined-variable-2.html: Removed.
* webgpu/whlsl/use-undefined-variable-expected.txt: Removed.
* webgpu/whlsl/use-undefined-variable.html: Removed.
* webgpu/whlsl/variable-shadowing-expected.txt: Removed.
* webgpu/whlsl/variable-shadowing.html: Removed.
* webgpu/whlsl/vector-compare-expected.txt: Removed.
* webgpu/whlsl/vector-compare.html: Removed.
* webgpu/whlsl/vector-constructors-expected.txt: Removed.
* webgpu/whlsl/vector-constructors.html: Removed.
* webgpu/whlsl/vector-matrix-addition-subtraction-expected.txt: Removed.
* webgpu/whlsl/vector-matrix-addition-subtraction.html: Removed.
* webgpu/whlsl/vector-syntax-expected.txt: Removed.
* webgpu/whlsl/vector-syntax.html: Removed.
* webgpu/whlsl/void-variable-parameter-expected.txt: Removed.
* webgpu/whlsl/void-variable-parameter.html: Removed.
* webgpu/whlsl/while-loop-break-expected.html: Removed.
* webgpu/whlsl/while-loop-break.html: Removed.
* webgpu/whlsl/while-loop-continue-expected.html: Removed.
* webgpu/whlsl/while-loop-continue.html: Removed.
* webgpu/whlsl/whlsl-expected.html: Removed.
* webgpu/whlsl/whlsl.html: Removed.
* webgpu/whlsl/wrong-argument-length-expected.txt: Removed.
* webgpu/whlsl/wrong-argument-length.html: Removed.
* webgpu/whlsl/wrong-types-expected.txt: Removed.
* webgpu/whlsl/wrong-types.html: Removed.
* webgpu/whlsl/zero-initialize-values-2-expected.html: Removed.
* webgpu/whlsl/zero-initialize-values-2.html: Removed.
* webgpu/whlsl/zero-initialize-values-expected.html: Removed.
* webgpu/whlsl/zero-initialize-values.html: Removed.

Canonical link: https://commits.webkit.org/240102@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280467 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-30 03:53:49 +00:00
Devin Rousso 0d84a0f413 [Payment Request] `additionalShippingMethods` are not used if a `paymentMethodType` is provided
https://bugs.webkit.org/show_bug.cgi?id=228599
<rdar://problem/81190366>

Reviewed by Andy Estes.

Source/WebCore:

r275169 made it so that `paymentMethodType` is no longer `required` so that `additionalShippingMethods`
can be specified without having to limit it to a specific payment method type. While this
works in theory, WebKit doesn't know about the user's selected payment method type until the
user actually selects a payment method, meaning that until then the `additionalShippingMethods`
are not used. Unfortunately (until now) `PKPaymentRequestPaymentMethodUpdate` did not
support providing a `NSArray<PKShippingMethod *> *`, so there was no way to update the list
of shipping methods when the user changed their selected payment method, meaning that WebKit
would have to wait/rely on the user to change their shipping address _after_ selecting a
payment method in order for `additionalShippingMethods` to take effect.

This also fixes an issue with WebKit's implementation of the W3C Payment Request API by
allowing any generic (i.e. things not specific to Apple Pay) `shippingOptions` provided in
`PaymentDetailsUpdate` to actually be used and update the Apple Pay sheet accordingly.

Test: http/tests/paymentrequest/ApplePayModifier-paymentMethodType.https.html

* Modules/applepay/ApplePayModifier.idl:
* Modules/applepay/ApplePayModifier.h:
* Modules/applepay/ApplePayPaymentMethodUpdate.idl:
* Modules/applepay/ApplePayPaymentMethodUpdate.h:
(WebCore::ApplePayPaymentMethodUpdate::encode const):
(WebCore::ApplePayPaymentMethodUpdate::decode):
* Modules/applepay/ApplePayShippingMethodUpdate.idl:
* Modules/applepay/ApplePayShippingMethodUpdate.h:
(WebCore::ApplePayShippingMethodUpdate::encode const):
(WebCore::ApplePayShippingMethodUpdate::decode):
Add (or wrap existing) `additionalShippingMethods`/`newShippingMethods` properties.

* Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
(WebCore::ApplePayPaymentHandler::computeShippingMethods):
(WebCore::ApplePayPaymentHandler::detailsUpdated):
(WebCore::ApplePayPaymentHandler::shippingOptionUpdated):
(WebCore::ApplePayPaymentHandler::paymentMethodUpdated):
Also call `computeShippingMethods()` and add the result to the update.

* testing/MockPaymentCoordinator.cpp:
(WebCore::MockPaymentCoordinator::completeShippingMethodSelection):
(WebCore::MockPaymentCoordinator::completeShippingContactSelection):
(WebCore::MockPaymentCoordinator::completePaymentMethodSelection):
(WebCore::MockPaymentCoordinator::completeCouponCodeChange):
Support for testing.

Source/WebCore/PAL:

r275169 made it so that `paymentMethodType` is no longer `required` so that `additionalShippingMethods`
can be specified without having to limit it to a specific payment method type. While this
works in theory, WebKit doesn't know about the user's selected payment method type until the
user actually selects a payment method, meaning that until then the `additionalShippingMethods`
are not used. Unfortunately (until now) `PKPaymentRequestPaymentMethodUpdate` did not
support providing a `NSArray<PKShippingMethod *> *`, so there was no way to update the list
of shipping methods when the user changed their selected payment method, meaning that WebKit
would have to wait/rely on the user to change their shipping address _after_ selecting a
payment method in order for `additionalShippingMethods` to take effect.

This also fixes an issue with WebKit's implementation of the W3C Payment Request API by
allowing any generic (i.e. things not specific to Apple Pay) `shippingOptions` provided in
`PaymentDetailsUpdate` to actually be used and update the Apple Pay sheet accordingly.

* pal/spi/cocoa/PassKitSPI.h:
 - add the new `shippingMethods` property on `PKPaymentRequestUpdate`
 - add the existing `errors` property on `PKPaymentRequestPaymentMethodUpdate`

Source/WebKit:

r275169 made it so that `paymentMethodType` is no longer `required` so that `additionalShippingMethods`
can be specified without having to limit it to a specific payment method type. While this
works in theory, WebKit doesn't know about the user's selected payment method type until the
user actually selects a payment method, meaning that until then the `additionalShippingMethods`
are not used. Unfortunately (until now) `PKPaymentRequestPaymentMethodUpdate` did not
support providing a `NSArray<PKShippingMethod *> *`, so there was no way to update the list
of shipping methods when the user changed their selected payment method, meaning that WebKit
would have to wait/rely on the user to change their shipping address _after_ selecting a
payment method in order for `additionalShippingMethods` to take effect.

This also fixes an issue with WebKit's implementation of the W3C Payment Request API by
allowing any generic (i.e. things not specific to Apple Pay) `shippingOptions` provided in
`PaymentDetailsUpdate` to actually be used and update the Apple Pay sheet accordingly.

* Platform/cocoa/PaymentAuthorizationPresenter.mm:
(WebKit::PaymentAuthorizationPresenter::completePaymentMethodSelection):
(WebKit::PaymentAuthorizationPresenter::completeShippingMethodSelection):
Also convert and set the `shippingMethods` on the update.

Source/WTF:

r275169 made it so that `paymentMethodType` is no longer `required` so that `additionalShippingMethods`
can be specified without having to limit it to a specific payment method type. While this
works in theory, WebKit doesn't know about the user's selected payment method type until the
user actually selects a payment method, meaning that until then the `additionalShippingMethods`
are not used. Unfortunately (until now) `PKPaymentRequestPaymentMethodUpdate` did not
support providing a `NSArray<PKShippingMethod *> *`, so there was no way to update the list
of shipping methods when the user changed their selected payment method, meaning that WebKit
would have to wait/rely on the user to change their shipping address _after_ selecting a
payment method in order for `additionalShippingMethods` to take effect.

This also fixes an issue with WebKit's implementation of the W3C Payment Request API by
allowing any generic (i.e. things not specific to Apple Pay) `shippingOptions` provided in
`PaymentDetailsUpdate` to actually be used and update the Apple Pay sheet accordingly.

* wtf/PlatformHave.h:
* wtf/PlatformEnableCocoa.h:
Add new compile flags for PassKit supporting modifying shipping methods with any update.

LayoutTests:

* http/tests/paymentrequest/ApplePayModifier-paymentMethodType.https.html: Added.
* http/tests/paymentrequest/ApplePayModifier-paymentMethodType.https-expected.txt: Added.

* platform/ios-14-wk2/TestExpectations:
* platform/mac-bigsur-wk2/TestExpectations: Added.
Skip on older macOS/iOS since they don't support modifying shipping methods with any update.


Canonical link: https://commits.webkit.org/240094@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280459 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-30 00:28:45 +00:00
Yusuke Suzuki 4bd770678d [JSC] Yarr should perform BoyerMoore search
https://bugs.webkit.org/show_bug.cgi?id=228301

Reviewed by Saam Barati.

JSTests:

* microbenchmarks/jquery-todomvc-regexp.js:
* stress/regexp--bm-search-long-character.js: Added.
(shouldBe):
* stress/regexp--bm-search-long-map.js: Added.
(shouldBe):
* stress/regexp-bitvector-reuse.js: Added.
(shouldBe):
* stress/regexp-non-ascii-bm-search-character.js: Added.
(shouldBe):
* stress/regexp-non-ascii-bm-search-map.js: Added.
(shouldBe):

Source/JavaScriptCore:

This patch emits skipping fast-path at the beginning of body alternatives with a large stride. So we can quickly discard unrelated characters
and attempt to find possibly related sequence in the long sequence. The method is derived from V8's implementation (with some extensions).

If we have a searching pattern /abcdef/, then we can check the 6th character against a set of {a, b, c, d, e, f}.
If it does not match, we can shift 6 characters. We use this strategy since this way can be extended easily to support
disjunction, character-class, and ignore-cases. For example, in the case of /(?:abc|def)/, we can check 3rd character
against {a, b, c, d, e, f} and shift 3 characters if it does not match.

Then, the best way to perform the above shifting is that finding the longest character sequence which does not have
many candidates. In the case of /[a-z]aaaaaaa[a-z]/, we can extract "aaaaaaa" sequence and check 8th character against {a}.
If it does not match, then we can shift 7 characters (length of "aaaaaaa"). This shifting is better than using "[a-z]aaaaaaa[a-z]"
sequence and {a-z} set since {a-z} set will almost always match.

We first collect possible characters for each character position. Then, apply heuristics to extract good character sequence from
that and construct fast searching with long stride.

Microbenchmark which performs RegExp ops in Speedometer2/jQuery-TodoMVC shows 25% improvement.

                                      ToT                     Patched

    jquery-todomvc-regexp      723.9739+-1.3997     ^    579.1698+-1.2505        ^ definitely 1.2500x faster

This improves Speedometer2/jQuery-TodoMVC by 3%.

    ----------------------------------------------------------------------------------------------------------------------------------
    |               subtest                |     ms      |     ms      |  b / a   | pValue (significance using False Discovery Rate) |
    ----------------------------------------------------------------------------------------------------------------------------------
    | Elm-TodoMVC                          |123.365625   |123.456250   |1.000735  | 0.804077                                         |
    | VueJS-TodoMVC                        |26.912500    |26.925000    |1.000464  | 0.969603                                         |
    | EmberJS-TodoMVC                      |127.540625   |127.562500   |1.000172  | 0.960474                                         |
    | BackboneJS-TodoMVC                   |50.606250    |50.518750    |0.998271  | 0.670313                                         |
    | Preact-TodoMVC                       |21.018750    |20.850000    |0.991971  | 0.563818                                         |
    | AngularJS-TodoMVC                    |136.943750   |137.271875   |1.002396  | 0.531513                                         |
    | Vanilla-ES2015-TodoMVC               |68.521875    |68.593750    |1.001049  | 0.701376                                         |
    | Inferno-TodoMVC                      |65.559375    |65.803125    |1.003718  | 0.414418                                         |
    | Flight-TodoMVC                       |77.284375    |76.715625    |0.992641  | 0.219870                                         |
    | Angular2-TypeScript-TodoMVC          |40.725000    |40.318750    |0.990025  | 0.281212                                         |
    | VanillaJS-TodoMVC                    |55.209375    |54.715625    |0.991057  | 0.056921                                         |
    | jQuery-TodoMVC                       |266.396875   |258.471875   |0.970251  | 0.000000 (significant)                           |
    | EmberJS-Debug-TodoMVC                |341.550000   |341.856250   |1.000897  | 0.618140                                         |
    | React-TodoMVC                        |88.731250    |88.871875    |1.001585  | 0.512407                                         |
    | React-Redux-TodoMVC                  |150.340625   |150.065625   |0.998171  | 0.412940                                         |
    | Vanilla-ES2015-Babel-Webpack-TodoMVC |65.390625    |65.362500    |0.999570  | 0.834760                                         |
    ----------------------------------------------------------------------------------------------------------------------------------
    a mean = 245.96997
    b mean = 246.86366
    pValue = 0.0061448402
    (Bigger means are better.)
    1.004 times better
    Results ARE significant

* runtime/OptionsList.h:
* yarr/YarrJIT.cpp:
(JSC::Yarr::BoyerMooreInfo::BoyerMooreInfo):
(JSC::Yarr::BoyerMooreInfo::length const):
(JSC::Yarr::BoyerMooreInfo::set):
(JSC::Yarr::BoyerMooreInfo::index const):
(JSC::Yarr::BoyerMooreInfo::setIndex):
(JSC::Yarr::BoyerMooreInfo::create):
(JSC::Yarr::BoyerMooreInfo::findBestCharacterSequence const):
(JSC::Yarr::BoyerMooreInfo::findWorthwhileCharacterSequenceForLookahead const):
(JSC::Yarr::BoyerMooreInfo::createCandidateBitmap const):
* yarr/YarrJIT.h:
(JSC::Yarr::BoyerMooreBitmap::count const):
(JSC::Yarr::BoyerMooreBitmap::map const):
(JSC::Yarr::BoyerMooreBitmap::isMaskEffective const):
(JSC::Yarr::BoyerMooreBitmap::add):
(JSC::Yarr::BoyerMooreByteVector::BoyerMooreByteVector):
(JSC::Yarr::YarrCodeBlock::set8BitCode):
(JSC::Yarr::YarrCodeBlock::set16BitCode):
(JSC::Yarr::YarrCodeBlock::set8BitCodeMatchOnly):
(JSC::Yarr::YarrCodeBlock::set16BitCodeMatchOnly):
(JSC::Yarr::YarrCodeBlock::clear):
(JSC::Yarr::YarrCodeBlock::findSameVector const):

Source/WTF:

* wtf/BitVector.cpp:
(WTF::BitVector::dump const):
* wtf/Bitmap.h:
(WTF::WordType>::dump const):
* wtf/UniqueRef.h:
(WTF::makeUniqueRefFromNonNullUniquePtr):
(WTF::UniqueRef::UniqueRef):

Canonical link: https://commits.webkit.org/240087@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280452 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-29 22:26:13 +00:00
Kate Cheney daf92e1975 REGRESSION (r278877) [Cocoa] WebAuthn stopped working for non-Safari browsers
https://bugs.webkit.org/show_bug.cgi?id=228116
<rdar://problem/80693607>

Patch by Brent Fulgham.

Patch by Kate Cheney <katherine_cheney@apple.com> on 2021-07-29
Reviewed by Per Arne Vollan.

Source/WebKit:

We should not be using the PAC key to confirm a valid WebContent process is the source of
WebAuthn-related messages. Instead, we should confirm the message source is an Apple-signed
executable, and that the signining identity is for the WebContent process.

* Shared/Cocoa/CodeSigning.h: Renamed from Source/WebKit/Shared/mac/CodeSigning.h.
* Shared/Cocoa/CodeSigning.mm: Renamed from Source/WebKit/Shared/mac/CodeSigning.mm.
(WebKit::codeSigningIdentifier):
(WebKit::codeSigningIdentifierForCurrentProcess):
(WebKit::currentProcessIsPlatformBinary):
(WebKit::codeSigningIdentifierAndPlatformBinaryStatus):
* Shared/Cocoa/XPCEndpoint.mm:
(WebKit::XPCEndpoint::XPCEndpoint):
* SourcesCocoa.txt:
* UIProcess/Cocoa/WebProcessProxyCocoa.mm:
(WebKit::WebProcessProxy::messageSourceIsValidWebContentProcess):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getWebAuthnProcessConnection):
* UIProcess/WebProcessProxy.h:
* UIProcess/mac/WebProcessProxyMac.mm:
* WebKit.xcodeproj/project.pbxproj:

Source/WTF:

Add new SPI header for code signing features.

* WTF.xcodeproj/project.pbxproj:
* wtf/spi/cocoa/SecuritySPI.h:
* wtf/spi/darwin/CodeSignSPI.h: Added.

Canonical link: https://commits.webkit.org/240086@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-29 22:12:16 +00:00
Eric Carlson fd15475bdc [iOS] Don't set capture attribution dynamically in the simulator
https://bugs.webkit.org/show_bug.cgi?id=228596
rdar://81176531

Reviewed by Jer Noble.

* wtf/PlatformHave.h: Don't define HAVE_SYSTEM_STATUS for the simulator.


Canonical link: https://commits.webkit.org/240080@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280445 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-29 20:43:17 +00:00
Kate Cheney 5ac971557e GetIdentifierStringForPreferredVoiceInListWithLocale() is deprecated in Monterey
<https://webkit.org/b/228066>
<rdar://problem/80577312>

Patch by David Kilzer.

Patch by Kate Cheney <katherine_cheney@apple.com> on 2021-07-29
Reviewed by David Kilzer.

Source/WebCore:

* platform/mac/PlatformSpeechSynthesizerMac.mm:
(WebCore::speechSynthesisGetDefaultVoiceIdentifierForLocale):
- Switch to use
  CopyIdentifierStringForPreferredVoiceInListWithLocale()
  in Monterey.
- Change to return RetainPtr<> to handle lifetime of
  object returned from new function.
(WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
- Change varible type to 'auto' since return type of
  speechSynthesisGetDefaultVoiceIdentifierForLocale()
  changed.

Source/WebCore/PAL:

* pal/spi/mac/SpeechSynthesisSPI.h:
* pal/spi/mac/SpeechSynthesisSPI.h:
(CopyIdentifierStringForPreferredVoiceInListWithLocale): Add.
- Define replacement function for
  GetIdentifierStringForPreferredVoiceInListWithLocale()
  in Monterey.

Source/WTF:

* wtf/PlatformHave.h:
- Add HAVE(SPEECHSYNTHESIS_MONTEREY_SPI).

Canonical link: https://commits.webkit.org/240079@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280441 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-29 19:54:30 +00:00