[webkit-changes] [WebKit/WebKit] 60635d: Versioning.
Russell Epstein
noreply at github.com
Fri Mar 17 15:37:43 PDT 2023
Branch: refs/heads/safari-7615.2.1-branch
Home: https://github.com/WebKit/WebKit
Commit: 60635d719037e2e723734d9c86c6c91806d4a28f
https://github.com/WebKit/WebKit/commit/60635d719037e2e723734d9c86c6c91806d4a28f
Author: Alan Coon <alancoon at apple.com>
Date: 2023-01-30 (Mon, 30 Jan 2023)
Changed paths:
M Configurations/Version.xcconfig
Log Message:
-----------
Versioning.
WebKit-7615.1.19
Canonical link: https://commits.webkit.org/259548.1@safari-7615-branch
Commit: b82676592fa369882f94330e8ab345956415f771
https://github.com/WebKit/WebKit/commit/b82676592fa369882f94330e8ab345956415f771
Author: Brent Fulgham <bfulgham at apple.com>
Date: 2023-01-30 (Mon, 30 Jan 2023)
Changed paths:
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
Log Message:
-----------
Cherry-pick c4d95cca9a1f. rdar://problem/104830750
Revert `FullScreenEnabled` feature flag from `internal` back to `embedder`
https://bugs.webkit.org/show_bug.cgi?id=251390
<rdar://104830750>
Reviewed by Tim Nguyen.
The `FullScreenEnabled` preference is not meant to be an internal debugging
toggle, so should be labeled as `embedder`.
This patch is a partial revert of 259054 at main.
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
Canonical link: https://commits.webkit.org/259586@main
Canonical link: https://commits.webkit.org/259548.2@safari-7615-branch
Commit: e8f7233310fd9bcb67c6fdc4387363dea01ee243
https://github.com/WebKit/WebKit/commit/e8f7233310fd9bcb67c6fdc4387363dea01ee243
Author: David Li <jingye_li at apple.com>
Date: 2023-01-30 (Mon, 30 Jan 2023)
Changed paths:
A LayoutTests/animations/animation-set-effect-expected.txt
A LayoutTests/animations/animation-set-effect.html
M Source/WebCore/animation/CSSAnimation.cpp
Log Message:
-----------
Cherry-pick 252432.1013 at safari-7614-branch (1d545c7ebfef). rdar://104831379
[Web Animations] CSSAnimation::setBindingsEffect should also add KeyFrames to overriddenProperties
rdar://102137788
Reviewed by Jonathan Bedard and Antoine Quint.
* LayoutTests/animations/animation-set-effect-expected.txt: Added.
* LayoutTests/animations/animation-set-effect.html: Added.
* Source/WebCore/animation/CSSAnimation.cpp:
(WebCore::CSSAnimation::setBindingsEffect):
Canonical link: https://commits.webkit.org/252432.1013@safari-7614-branch
Canonical link: https://commits.webkit.org/259548.3@safari-7615-branch
Commit: 9fa8efe1b2e2564a89db574400a0c9c25beb0a73
https://github.com/WebKit/WebKit/commit/9fa8efe1b2e2564a89db574400a0c9c25beb0a73
Author: Sihui Liu <sihui_liu at apple.com>
Date: 2023-01-31 (Tue, 31 Jan 2023)
Changed paths:
M LayoutTests/platform/ios/TestExpectations
M Source/WebKit/NetworkProcess/storage/SQLiteStorageArea.cpp
Log Message:
-----------
Cherry-pick 4590ce7d98b4. rdar://problem/104498135
REGRESSION (256863 at main): [ iOS ] imported/w3c/web-platform-tests/webstorage/storage_local_window_open.window.html is a consistent timeout
https://bugs.webkit.org/show_bug.cgi?id=250922
rdar://104498135
Reviewed by Chris Dumez.
Currently quota check of LocalStorage is performed in both web process (StorageAreaMap) and network process
(SQLiteStorageArea). Web process only sends a setting item request to network process when the local quota check passes.
The issue they calculate usage differently: web process calculates usage based on size of string (WebCore::StorageMap)
and network process uses database file size. Also network process stores upconverted characters in database
(SQLiteStorageArea stores value as blob and SQLiteStatement::bindBlob upconverts characters). The result is web process
may send more requests to network process than it is supposed to.
For example, in the failing test, web process can send about 5000 setItem requests to network process, and network
process will start return error after finishing about 2500 requests. Since 256863 at main, network process will include all
stored items in the request reply when a request fails, so that web process can sync its local cache and two processes
have a consistent view of data. The reason the test starts to fail is reading all items takes time, and there are too
many failed requests.
To fix this issue, this patch increases database size limit to 10MB (double of quota), which should make quota check
results in different processes to be more closer.
* LayoutTests/platform/ios/TestExpectations:
* Source/WebKit/NetworkProcess/storage/SQLiteStorageArea.cpp:
(WebKit::SQLiteStorageArea::prepareDatabase):
Canonical link: https://commits.webkit.org/259571@main
Canonical link: https://commits.webkit.org/259548.5@safari-7615-branch
Commit: a70b0bbd3039ee0cc265602b006c770afb40f22f
https://github.com/WebKit/WebKit/commit/a70b0bbd3039ee0cc265602b006c770afb40f22f
Author: Wenson Hsieh <wenson_hsieh at apple.com>
Date: 2023-01-31 (Tue, 31 Jan 2023)
Changed paths:
M Source/WebCore/platform/mac/DataDetectorHighlight.mm
Log Message:
-----------
Cherry-pick 312ff43f570c. rdar://problem/104723803
Fix a rare crash under data detector highlight painting logic
https://bugs.webkit.org/show_bug.cgi?id=251384
rdar://104723803
Reviewed by Megan Gardner.
Add a null check for the `DDHighlightRef` before attempting to ask for `DDHighlightGetBoundingRect`.
It's not clear how to trigger this crash, so this patch only makes this painting codepath robust
against `m_highlight` being `nil`.
* Source/WebCore/platform/mac/DataDetectorHighlight.mm:
(WebCore::DataDetectorHighlight::paintContents):
Canonical link: https://commits.webkit.org/259599@main
Canonical link: https://commits.webkit.org/259548.6@safari-7615-branch
Commit: 1b17df7c206361fffed2586dc250a1f091af5498
https://github.com/WebKit/WebKit/commit/1b17df7c206361fffed2586dc250a1f091af5498
Author: Youenn Fablet <youennf at gmail.com>
Date: 2023-01-31 (Tue, 31 Jan 2023)
Changed paths:
A LayoutTests/streams/blob-and-then-expected.txt
A LayoutTests/streams/blob-and-then.html
M Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp
M Source/WebCore/Modules/streams/ReadableStreamSink.cpp
Log Message:
-----------
Cherry-pick 252432.1018 at safari-7614-branch (792c09f18dc7). rdar://103649054
Use-after-free in FetchBodyConsumer::resolve
https://bugs.webkit.org/show_bug.cgi?id=249996
rdar://103649054
Reviewed by Jonathan Bedard and Alex Christensen.
Make sure in FetchBodyConsumer that refed promise/source remain protected.
We also revert part of an unnecessary and wrong change from https://trac.webkit.org/changeset/227760.
This makes sure ReadableStreamToSharedBufferSink callback remains valid until completely executed in close case, as was the case in error case.
We use std::exchange instead of move as it is more semantically correct.
Covered by added test.
* LayoutTests/streams/blob-and-then-expected.txt: Added.
* LayoutTests/streams/blob-and-then.html: Added.
* Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp:
(WebCore::FetchBodyConsumer::resolveWithFormData):
(WebCore::FetchBodyConsumer::consumeFormDataAsStream):
(WebCore::FetchBodyConsumer::resolve):
* Source/WebCore/Modules/streams/ReadableStreamSink.cpp:
(WebCore::ReadableStreamToSharedBufferSink::close):
(WebCore::ReadableStreamToSharedBufferSink::error):
Canonical link: https://commits.webkit.org/252432.1018@safari-7614-branch
Canonical link: https://commits.webkit.org/259548.6@safari-7615-branch
Commit: 83422ec49be9a26a887566eb35a449917592fa11
https://github.com/WebKit/WebKit/commit/83422ec49be9a26a887566eb35a449917592fa11
Author: David Li <jingye_li at apple.com>
Date: 2023-01-31 (Tue, 31 Jan 2023)
Changed paths:
A LayoutTests/editing/async-clipboard/clipboard-clear-expected.txt
A LayoutTests/editing/async-clipboard/clipboard-clear.html
M Source/WebCore/Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp
M Source/WebCore/Modules/async-clipboard/ClipboardItemBindingsDataSource.h
Log Message:
-----------
Cherry-pick 252432.1019 at safari-7614-branch (1988807a5229). rdar://103307563
[Clipboard] Explicitly call completion on clearing ClipboardItemTypeLoader
rdar://103307563
Reviewed by Jonathan Bedard and Wenson Hsieh.
In m_itemTypeLoaders.clear(), ClipboardItemBindingsDataSource::invokeCompletionHandler() is called after all m_itemTypeLoaders released
and traverses the itemTypeLoaders after itemTypeLoaders is clear but before the size is updated, causing nullptr accessment.
So we should explicitly call completion before itemTypeLoader is released.
* LayoutTests/editing/async-clipboard/clipboard-clear-expected.txt: Added.
* LayoutTests/editing/async-clipboard/clipboard-clear.html: Added.
* Source/WebCore/Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:
(WebCore::ClipboardItemBindingsDataSource::clearItemTypeLoaders):
(WebCore::ClipboardItemBindingsDataSource::collectDataForWriting):
(WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::~ClipboardItemTypeLoader):
* Source/WebCore/Modules/async-clipboard/ClipboardItemBindingsDataSource.h:
Canonical link: https://commits.webkit.org/252432.1019@safari-7614-branch
Canonical link: https://commits.webkit.org/259548.7@safari-7615-branch
Commit: 5a0f792b008f1f20f03f3020ab94cc18e04e28f4
https://github.com/WebKit/WebKit/commit/5a0f792b008f1f20f03f3020ab94cc18e04e28f4
Author: JC Alvarado <joncarlo at apple.com>
Date: 2023-01-31 (Tue, 31 Jan 2023)
Changed paths:
A LayoutTests/fast/backgrounds/background-color-lch-crash-expected.txt
A LayoutTests/fast/backgrounds/background-color-lch-crash.html
M Source/WebCore/platform/graphics/ColorBlending.cpp
Log Message:
-----------
Check color opacity after lossy conversion when blending
https://bugs.webkit.org/show_bug.cgi?id=251158
rdar://104553839
Reviewed by Dean Jackson.
We check opacity to determine if we should forgo blending,
however after performing a lossy conversion we can end
up with alpha values that result in a division by zero.
Add an additional check after conversion to prevent this
case.
* LayoutTests/fast/backgrounds/background-color-lch-crash-expected.txt: Added.
* LayoutTests/fast/backgrounds/background-color-lch-crash.html: Added.
* Source/WebCore/platform/graphics/ColorBlending.cpp:
(WebCore::blendSourceOver):
Canonical link: https://commits.webkit.org/259548.8@safari-7615-branch
Commit: 2ca6487cbce8949e446d98c3070fe8f2379a7d60
https://github.com/WebKit/WebKit/commit/2ca6487cbce8949e446d98c3070fe8f2379a7d60
Author: Rob Buis <rbuis at igalia.com>
Date: 2023-01-31 (Tue, 31 Jan 2023)
Changed paths:
A LayoutTests/fast/css/content/quote-display-contents-crash-expected.txt
A LayoutTests/fast/css/content/quote-display-contents-crash.html
M Source/WebCore/dom/Element.cpp
Log Message:
-----------
Cherry-pick 256843.5 at webkit-2022.12-embargoed (312254f5776d). rdar://102807985
Check displayContentsChanged in destroyRenderTreeIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=248776
rdar://102807985>
Reviewed by Antti Koivisto.
Check displayContentsChanged in destroyRenderTreeIfNeeded since
display: contents may be removed due to focus removal while
removing subtrees but we still need to clean up pseudo elements.
* LayoutTests/fast/css/content/quote-display-contents-crash-expected.txt: Added.
* LayoutTests/fast/css/content/quote-display-contents-crash.html: Added.
* Source/WebCore/dom/ContainerNode.cpp:
(WebCore::destroyRenderTreeIfNeeded):
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::resolveComputedStyle):
Canonical link: https://commits.webkit.org/256843.5@webkit-2022.12-embargoed
Canonical link: https://commits.webkit.org/259548.9@safari-7615-branch
Commit: d0b789c9fd718e237060c07e85bb8864ee98f97c
https://github.com/WebKit/WebKit/commit/d0b789c9fd718e237060c07e85bb8864ee98f97c
Author: Richard Robinson <richard_robinson2 at apple.com>
Date: 2023-01-31 (Tue, 31 Jan 2023)
Changed paths:
M Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.h
M Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm
M Source/WebKitLegacy/mac/WebView/WebJSPDFDoc.mm
Log Message:
-----------
Cherry-pick 252432.1017 at safari-7614-branch (94d37ad7d541). rdar://102740487
WebKit`WebKit::PDFPlugin::jsPDFDocPrint - type confusion
https://bugs.webkit.org/show_bug.cgi?id=249169
rdar://102740487
Reviewed by Tim Horton, Yusuke Suzuki and Jonathan Bedard.
When JavaScript is embedded inside a PDF and it invokes the `print()` function,
the `thisObject` parameter in `PDFPlugin::jsPDFDocPrint` is not guaranteed
to be the proper type. Currently, we errenously assume it always is the proper
type, and cast it to `PDFPlugin *`, which results in an object with garbage values.
This PR protects against this by first checking if the `thisObject` is the correct
JavaScript object type, before trying to cast it.
* Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::jsPDFDocClass):
(WebKit::PDFPlugin::jsPDFDocPrint):
(WebKit::PDFPlugin::makeJSPDFDoc):
Canonical link: https://commits.webkit.org/252432.1017@safari-7614-branch
Canonical link: https://commits.webkit.org/259548.10@safari-7615-branch
Commit: d98b4a43ecd47e273238216eafa2c5254580acf2
https://github.com/WebKit/WebKit/commit/d98b4a43ecd47e273238216eafa2c5254580acf2
Author: Per Arne Vollan <pvollan at apple.com>
Date: 2023-01-31 (Tue, 31 Jan 2023)
Changed paths:
M Source/WebKit/GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in
Log Message:
-----------
Cherry-pick c070affcd03f. rdar://problem/104604967
[macOS] Modify Audio related sandbox rule
https://bugs.webkit.org/show_bug.cgi?id=251163
rdar://104604967
Reviewed by Brent Fulgham.
Modify Audio related sandbox rule in the GPU process on macOS to allow reading subpaths of Audio directory.
* Source/WebKit/GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
Canonical link: https://commits.webkit.org/259643@main
Canonical link: https://commits.webkit.org/259548.12@safari-7615-branch
Commit: 099b24dd9eb3f1a2fb67968629db80e6484ab41d
https://github.com/WebKit/WebKit/commit/099b24dd9eb3f1a2fb67968629db80e6484ab41d
Author: Richard Robinson <richard_robinson2 at apple.com>
Date: 2023-01-31 (Tue, 31 Jan 2023)
Changed paths:
M Source/WebKit/UIProcess/WebPageProxy.cpp
Log Message:
-----------
Cherry-pick 252432.1023 at safari-7614-branch (55c2b9caae92). rdar://101222657
[CoreIPC] Integer overflow in UIProcess from scaling/zoom factors
https://bugs.webkit.org/show_bug.cgi?id=250408
rdar://101222657
Reviewed by Wenson Hsieh and Jonathan Bedard.
Adds bounds checking via `MESSAGE_CHECK` to the page/plugin scale/zoom `factorDidChange`
methods in `WebPageProxy` to ensure that overflow will not occur in the web process.
The bounds were chosen to be `(0, 100]` because a factor of `<= 0.0` does not make sense,
and `100.0` ia a reasonable upper bound.
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::pageScaleFactorDidChange):
(WebKit::WebPageProxy::pluginScaleFactorDidChange):
(WebKit::WebPageProxy::pluginZoomFactorDidChange):
Canonical link: https://commits.webkit.org/252432.1023@safari-7614-branch
Canonical link: https://commits.webkit.org/259548.12@safari-7615-branch
Commit: f322e936fb840d8242edb89a6bbef6fa0509c44c
https://github.com/WebKit/WebKit/commit/f322e936fb840d8242edb89a6bbef6fa0509c44c
Author: Aditya Keerthi <akeerthi at apple.com>
Date: 2023-01-31 (Tue, 31 Jan 2023)
Changed paths:
M Source/WebCore/Modules/contact-picker/ContactsManager.cpp
M Source/WebCore/Modules/contact-picker/ContactsManager.h
Log Message:
-----------
Cherry-pick 252432.1024 at safari-7614-branch (2ea437d75522). rdar://101241436
Use-after-free in ContactsManager::select
https://bugs.webkit.org/show_bug.cgi?id=250351
rdar://101241436
Reviewed by Wenson Hsieh and Jonathan Bedard.
`ContactsManager` can be destroyed prior to receiving the user's selection, which
is performed asynchronously. Deploy `WeakPtr` to avoid a use-after-free in this
scenario.
A test was unable to be added, as the failure scenario involves opening a new
Window, using the new Window object's `navigator.contacts`, and performing user
interaction. Creating a new Window results in the creation of a new web view,
however all of our existing UIScriptController hooks only apply to the original
(main) web view. Consequently, it is not possible to use our testing
infrastructure to dismiss the contact picker and trigger the callback in the
failure scenario.
* Source/WebCore/Modules/contact-picker/ContactsManager.cpp:
(WebCore::ContactsManager::select):
* Source/WebCore/Modules/contact-picker/ContactsManager.h:
Canonical link: https://commits.webkit.org/252432.1024@safari-7614-branch
Canonical link: https://commits.webkit.org/259548.13@safari-7615-branch
Commit: 7b91f2d38778624f81cd47f7932754a72bfef77c
https://github.com/WebKit/WebKit/commit/7b91f2d38778624f81cd47f7932754a72bfef77c
Author: Ryosuke Niwa <rniwa at webkit.org>
Date: 2023-01-31 (Tue, 31 Jan 2023)
Changed paths:
A LayoutTests/editing/editability/design-mode-does-not-inherit-across-frames-expected.txt
A LayoutTests/editing/editability/design-mode-does-not-inherit-across-frames.html
M LayoutTests/fast/dom/HTMLElement/iscontenteditable-designmodeon-allinherit-subframe-expected.txt
M LayoutTests/fast/dom/HTMLElement/iscontenteditable-designmodeon-allinherit-subframe.html
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
Log Message:
-----------
Cherry-pick 252432.1026 at safari-7614-branch (2a8469e53b2f). rdar://102868995
Remove inheritance of designMode attribute
https://bugs.webkit.org/show_bug.cgi?id=248615
rdar://102868995
Reviewed by Wenson Hsieh and Jonathan Bedard.
Stop making design mode inherit across frame boundaries.
This will prevent a form element from being injected into a victim page via drag & drop
and the new behavior matches that of Firefox and Chrome.
* LayoutTests/editing/editability/design-mode-does-not-inherit-across-frames-expected.txt: Added.
* LayoutTests/editing/editability/design-mode-does-not-inherit-across-frames.html: Added.
* LayoutTests/fast/dom/HTMLElement/iscontenteditable-designmodeon-allinherit-subframe-expected.txt:
* LayoutTests/fast/dom/HTMLElement/iscontenteditable-designmodeon-allinherit-subframe.html:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::setDesignMode):
(WebCore::Document::inDesignMode const): Deleted.
* Source/WebCore/dom/Document.h:
(WebCore::Document::inDesignMode const):
Canonical link: https://commits.webkit.org/252432.1026@safari-7614-branch
Canonical link: https://commits.webkit.org/259548.14@safari-7615-branch
Commit: b971159cda2eab32b8eed71a935eee6bf1f80b40
https://github.com/WebKit/WebKit/commit/b971159cda2eab32b8eed71a935eee6bf1f80b40
Author: Yijia Huang <yijia_huang at apple.com>
Date: 2023-01-31 (Tue, 31 Jan 2023)
Changed paths:
A JSTests/wasm/stress/wasm-tuple-return.js
M Source/JavaScriptCore/wasm/WasmLLIntGenerator.cpp
Log Message:
-----------
Cherry-pick 252432.1029 at safari-7614-branch (9dda7bfe768d). rdar://103551585
LLInt WASM argument locals must be read before return values are written
https://bugs.webkit.org/show_bug.cgi?id=250482
rdar://103551585
Reviewed by Justin Michaud.
Given the wasm code which exports a wasm function `intFuncRef2` as a js function.
```
(func (export "intFuncRef2") (param $p0 f32) (param $p1 funcref) (result i32 funcref)
(i32.const 42)
(local.get $p1)
(return)
)
```
The corresponding dumped bytecodes show
```
[ 0] enter
[ 1] mov dst:loc2, src:42(const0)
[ 4] mov dst:loc3, src:loc2 // loc2 contains the funcref but now replaced with 42
[ 7] ret // return [loc2, loc3]
```
which is wrong. Instead we should do
```
[ 0] enter
[ 1] mov dst:loc18, src:42(const0)
[ 4] mov dst:loc19, src:loc2
[ 7] mov dst:loc2, src:loc18
[ 10] mov dst:loc3, src:loc19
[ 13] ret
```
Note that loc2 is both parameter and return lot.
Locals usually need to be materialized on wasm stack when they are about to be or could
be clobbered, usually before a control entry, a branch, or redefinition. Previously,
Return writes only one value to the result slot that clobber one argument slot which
is fine. Since now wasm function can return tuple that might bring us to the situation
as shown in above example. We should materialize expression stack when return more than
one values.
* JSTests/wasm/stress/tuple-return.js: Added.
(async test):
* Source/JavaScriptCore/wasm/WasmLLIntGenerator.cpp:
(JSC::Wasm::LLIntGenerator::addReturn):
Canonical link: https://commits.webkit.org/252432.1029@safari-7614-branch
Canonical link: https://commits.webkit.org/259548.15@safari-7615-branch
Commit: eed6a380fbda18a4a104de9c5a960e7a48b7ced6
https://github.com/WebKit/WebKit/commit/eed6a380fbda18a4a104de9c5a960e7a48b7ced6
Author: Myah Cobbs <mcobbs at apple.com>
Date: 2023-02-01 (Wed, 01 Feb 2023)
Changed paths:
M Configurations/Version.xcconfig
Log Message:
-----------
Versioning.
WebKit-7615.1.20
Canonical link: https://commits.webkit.org/259548.17@safari-7615-branch
Commit: 614ea47ae108a8f1ccc192f486ab6308f5894812
https://github.com/WebKit/WebKit/commit/614ea47ae108a8f1ccc192f486ab6308f5894812
Author: Chris Dumez <cdumez at apple.com>
Date: 2023-02-01 (Wed, 01 Feb 2023)
Changed paths:
M Source/WebCore/bindings/js/JSErrorHandler.cpp
M Source/WebCore/bindings/js/JSEventListener.cpp
M Source/WebCore/bindings/js/JSEventListener.h
M Source/WebCore/bindings/js/JSLazyEventListener.cpp
M Source/WebCore/bindings/js/WebCoreJSClientData.cpp
M Source/WebCore/bindings/js/WebCoreJSClientData.h
M Source/WebCore/dom/EventTarget.cpp
M Source/WebCore/inspector/CommandLineAPIHost.cpp
M Source/WebCore/inspector/WebInjectedScriptHost.cpp
M Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
Log Message:
-----------
Cherry-pick 433db4f29219. rdar://problem/100763856
Heap use-after-free in DOMWrapperWorld::~DOMWrapperWorld
https://bugs.webkit.org/show_bug.cgi?id=246022
rdar://100763856
Reviewed by Jonathan Bedard and Ryosuke Niwa.
Right before a worker terminates, it destroys its WorkerOrWorkletScriptController,
which destroys the JS VM. Certain objects like DOMWrapperWorld cannot outlive
the VM since they keep a `VM&' as data member. However, DOMWrapperWorld is
refcounted and JSEventListeners hold a strong ref to their DOMWrapperWorld. If
JSEventListeners outlive the VM, then it would lead to a use-after free in the
DOMWrapperWorld destructor when destroying those JSEventListeners later on.
We have previously made several attempts to try and unregister all event
listeners before destroying the VM. However, those attempts were either
incomplete or led to other crashes. I am therefore trying a different approach
this time.
JSEventListeners now register themselves as client of the JSVMClientData (which
is owned by the VM) and the client gets a `willDestroyVM()` call before the
VM gets destroyed. This allows JSEventListeners to clear out their data members
which rely on the VM (DOMWrapperWorld and JSC::Weak data members).
* Source/WebCore/bindings/js/JSErrorHandler.cpp:
(WebCore::JSErrorHandler::handleEvent):
* Source/WebCore/bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::JSEventListener):
(WebCore::JSEventListener::handleEvent):
(WebCore::JSEventListener::functionName const):
(WebCore::JSEventListener::willDestroyVM):
* Source/WebCore/bindings/js/JSEventListener.h:
(WebCore::JSEventListener::isolatedWorld const):
(WebCore::JSEventListener::ensureJSFunction const):
* Source/WebCore/bindings/js/JSLazyEventListener.cpp:
(WebCore::JSLazyEventListener::initializeJSFunction const):
* Source/WebCore/bindings/js/WebCoreJSClientData.cpp:
(WebCore::JSVMClientData::~JSVMClientData):
* Source/WebCore/bindings/js/WebCoreJSClientData.h:
(WebCore::JSVMClientData::addClient):
* Source/WebCore/dom/EventTarget.cpp:
(WebCore::EventTarget::attributeEventListener):
* Source/WebCore/inspector/CommandLineAPIHost.cpp:
(WebCore::CommandLineAPIHost::getEventListeners):
* Source/WebCore/inspector/WebInjectedScriptHost.cpp:
(WebCore::objectForEventTargetListeners):
* Source/WebCore/inspector/agents/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForEventListener):
Canonical link: https://commits.webkit.org/252432.1030@safari-7614-branch
Canonical link: https://commits.webkit.org/259548.18@safari-7615-branch
Commit: 1f4d2fc64a6d3745bdd038c7fb0ed1abdc5d2b39
https://github.com/WebKit/WebKit/commit/1f4d2fc64a6d3745bdd038c7fb0ed1abdc5d2b39
Author: David Degazio <d_degazio at apple.com>
Date: 2023-02-01 (Wed, 01 Feb 2023)
Changed paths:
A JSTests/stress/cell-speculated-array-indexof.js
M Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
Log Message:
-----------
Cherry-pick 252432.1031 at safari-7614-branch (9f7e401c42a8). rdar://103852510
Fix use-after-free in DFGFixupPhase for array indexOf
https://bugs.webkit.org/show_bug.cgi?id=250429
rdar://103852510
Reviewed by Jonathan Bedard and Michael Saboff.
During DFG fixup, array indexOf nodes are folded to -1 when the search element is speculated
to be a different type than the array element (for instance, JSCell instead of Int32). When
this happens, a speculation check is inserted, which can cause the DFG graph's varArgChildren
array to reallocate. This invalidates the searchElement Edge reference, which we use
immediately after the check insertion in the fixup phase. This patch fixes this potential
use-after-free by grabbing the searchElement's associated node before inserting any checks,
giving us a persistent pointer to a DFG node rather than a reference into a vector.
* JSTests/stress/cell-speculated-array-indexof.js: Added.
* Source/JavaScriptCore/dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupArrayIndexOf):
Canonical link: https://commits.webkit.org/252432.1031@safari-7614-branch
Canonical link: https://commits.webkit.org/259548.18@safari-7615-branch
Commit: b84b9ab9932b1056e77395a7e8ff91cee42fbec1
https://github.com/WebKit/WebKit/commit/b84b9ab9932b1056e77395a7e8ff91cee42fbec1
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2023-02-01 (Wed, 01 Feb 2023)
Changed paths:
M Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp
Log Message:
-----------
Cherry-pick 252432.1033 at safari-7614-branch (02e324c57689). <rdar://102373218>
Possible type confusion bug in RemoteScrollingCoordinatorTransaction::decode
https://bugs.webkit.org/show_bug.cgi?id=250742
<rdar://102373218>
Reviewed by Jonathan Bedard and Ryosuke Niwa.
RemoteScrollingCoordinatorTransaction::decode() fails to check whether the nodeID returned by
`m_scrollingStateTree->insertNode()` is a new one, different from the `nodeID` argument. If so, it
could indicate that the node type of `m_scrollingStateTree->stateNodeForID()` does not match
`nodeType`, leading to type confusion.
In the UI process, `m_scrollingStateTree->insertNode()` should never return a different nodeID; this
only happens when the given nodeType does not match the type of the existing node, which only
happens in the WebProcess. So if `insertNode()` returns a different nodeID, or when the returned
node doesn't have the expected type, we can consider it an IPC decoding error.
* Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::RemoteScrollingCoordinatorTransaction::decode):
Canonical link: https://commits.webkit.org/252432.1033@safari-7614-branch
Canonical link: https://commits.webkit.org/259548.19@safari-7615-branch
Commit: cdc9b351b5da54a789f846e5996252817e2bee99
https://github.com/WebKit/WebKit/commit/cdc9b351b5da54a789f846e5996252817e2bee99
Author: Ryan Reno <rreno at apple.com>
Date: 2023-02-01 (Wed, 01 Feb 2023)
Changed paths:
A LayoutTests/imported/w3c/web-platform-tests/content-security-policy/generic/wildcard-host-checks-path.sub-expected.txt
A LayoutTests/imported/w3c/web-platform-tests/content-security-policy/generic/wildcard-host-checks-path.sub.html
M Source/WebCore/page/csp/ContentSecurityPolicySource.cpp
Log Message:
-----------
Cherry-pick 252432.1034 at safari-7614-branch (3ee4a8321986). rdar://104335301
CSP bypass due to incorrect handling of wildcard character in host expression
https://bugs.webkit.org/show_bug.cgi?id=250709
rdar://104335301
Reviewed by Brent Fulgham and Jonathan Bedard.
We were treating something like "https://*/foo" as being a scheme-only source (so checking only against
'https'). That is fixed by not only checking for the host-part being an empty string but also whether or not
the host wildcard flag had been set by the CSP parser. Additionally, we were checking a given URL's host
against the wildcard assuming a format like "*.com" instead of the possibility of the catch-all "*" wildcard.
This change fixes our handling of the wildcard "*" in a directive's source list by correctly identifying when a
source is scheme-only and by correctly taking into account the entire host-part wildcard grammar when checking
a given host against a wildcard pattern.
* LayoutTests/imported/w3c/web-platform-tests/content-security-policy/generic/wildcard-host-checks-path.sub-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/content-security-policy/generic/wildcard-host-checks-path.sub.html: Added.
* Source/WebCore/page/csp/ContentSecurityPolicySource.cpp:
(WebCore::ContentSecurityPolicySource::hostMatches const):
(WebCore::ContentSecurityPolicySource::isSchemeOnly const):
Canonical link: https://commits.webkit.org/252432.1034@safari-7614-branch
Canonical link: https://commits.webkit.org/259548.20@safari-7615-branch
Commit: 0ddfa735c301195973e3002aef53f891e67b870c
https://github.com/WebKit/WebKit/commit/0ddfa735c301195973e3002aef53f891e67b870c
Author: Michael Saboff <msaboff at apple.com>
Date: 2023-02-01 (Wed, 01 Feb 2023)
Changed paths:
A JSTests/stress/regexp-testinline-stacklimits.js
M Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
M Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
M Source/JavaScriptCore/runtime/RegExp.h
M Source/JavaScriptCore/yarr/YarrJIT.cpp
Log Message:
-----------
Cherry-pick 252432.1036 at safari-7614-branch (c553da3adc35). rdar://104072550
[JSC] RegExp.test inline is missing some stack overflow checks
https://bugs.webkit.org/show_bug.cgi?id=250873
rdar://104072550
Reviewed by Yusuke Suzuki.
The RegExp.test inline code is missing two stack overflow checks.
1) When compiling the pattern string to a YarrPattern, we checked for stack overflow,
but didn't do anything with the failure.
2) When allocating the stack space needed to execute the JIT code for the expression
we need to first check that we have enough stack.
This change adds checks for both cases using the JSRegExpResult::JITCodeFailure return value when we
would have overflowed the stack. The results checking code after the inline code sees that error
value, it will now call out to the appropriate C++ helper function to perform the match.
Those functions are capable of throwing Out of Stack exceptions.
* JSTests/stress/regexp-testinline-stacklimits.js: Added new test.
(baz):
(bar):
(foo):
(true.string_appeared_here.repeat):
(true.catch):
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compileRegExpTestInline):
* Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
* Source/JavaScriptCore/runtime/RegExp.h:
* Source/JavaScriptCore/yarr/YarrJIT.cpp:
(JSC::Yarr::jitCompileInlinedTest):
Canonical link: https://commits.webkit.org/252432.1036@safari-7614-branch
Canonical link: https://commits.webkit.org/259548.21@safari-7615-branch
Commit: 433aae06c3e18d614bb94f59c1e9f2a652d02386
https://github.com/WebKit/WebKit/commit/433aae06c3e18d614bb94f59c1e9f2a652d02386
Author: Gerald Squelart <g_squelart at apple.com>
Date: 2023-02-01 (Wed, 01 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/IntRect.h
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
Log Message:
-----------
Validate IPC-decoded IntRect's
rdar://101324985
Reviewed by Dean Jackson.
* Source/WebCore/platform/graphics/IntRect.h:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
Canonical link: https://commits.webkit.org/259548.22@safari-7615-branch
Commit: c36c1e18ef5dd43fe0272e9cb6674f64ee69c980
https://github.com/WebKit/WebKit/commit/c36c1e18ef5dd43fe0272e9cb6674f64ee69c980
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2023-02-01 (Wed, 01 Feb 2023)
Changed paths:
M Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm
Log Message:
-----------
Cherry-pick 252432.1040 at safari-7614-branch (5f64e30a652b). <rdar://102603221>
[CoreIPC] Type confusion bugs in RemoteScrollingCoordinatorProxyIOS::establishLayerTreeScrollingRelations
https://bugs.webkit.org/show_bug.cgi?id=250812
<rdar://102603221>
Reviewed by Jonathan Bedard and Ryosuke Niwa.
Add MESSAGE_CHECKing for two node types in code that runs in response to an IPC message.
Add an early return checking the root node type in code that runs from user events.
* Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::establishLayerTreeScrollingRelations):
(WebKit::RemoteScrollingCoordinatorProxy::nearestActiveContentInsetAdjustedSnapOffset const):
Canonical link: https://commits.webkit.org/252432.1040@safari-7614-branch
Canonical link: https://commits.webkit.org/259548.23@safari-7615-branch
Commit: fe42cdb53f0fc9924206cb88650ecdfbf22ad98c
https://github.com/WebKit/WebKit/commit/fe42cdb53f0fc9924206cb88650ecdfbf22ad98c
Author: Rob Buis <rbuis at igalia.com>
Date: 2023-02-01 (Wed, 01 Feb 2023)
Changed paths:
A LayoutTests/fast/table/table-cell-crash-when-detached-state-2-expected.txt
A LayoutTests/fast/table/table-cell-crash-when-detached-state-2.html
M Source/WebCore/rendering/RenderLayerModelObject.cpp
Log Message:
-----------
Cherry-pick 256843.4 at webkit-2022.12-embargoed (6234ec9c65b9). rdar://102808328
Do not issue repaints when in detached state
https://bugs.webkit.org/show_bug.cgi?id=248773
rdar://102808328
Reviewed by Antti Koivisto.
Do not issue repaints when the RenderObject is in detached state while removing render subtrees.
* LayoutTests/fast/table/table-cell-crash-when-detached-state-2-expected.txt: Added.
* LayoutTests/fast/table/table-cell-crash-when-detached-state-2.html: Added.
* Source/WebCore/rendering/RenderLayerModelObject.cpp:
(WebCore::RenderTableCell::willBeRemovedFromTree const):
Canonical link: https://commits.webkit.org/256843.4@webkit-2022.12-embargoed
Canonical link: https://commits.webkit.org/259548.24@safari-7615-branch
Commit: 1a20160f826c5b348a2c38128cdaa79bb9b867e2
https://github.com/WebKit/WebKit/commit/1a20160f826c5b348a2c38128cdaa79bb9b867e2
Author: Justin Michaud <justin_michaud at apple.com>
Date: 2023-02-01 (Wed, 01 Feb 2023)
Changed paths:
A JSTests/wasm/stress/many-locals-small-wasm-stack.js
A JSTests/wasm/stress/many-locals-small-wasm-stack.wasm
A JSTests/wasm/stress/many-locals-small-wasm-stack.wat
M Source/JavaScriptCore/wasm/WasmLLIntGenerator.cpp
Log Message:
-----------
Locals should update max stack size
rdar://104692168
Reviewed by Yusuke Suzuki.
We can forget to update the max stack size, causing an OOB stack read in
OSR entry. This only happens if you create a bunch of locals and never
push anything to the stack, so it should be very rare and difficult to
abuse.
* JSTests/wasm/stress/many-locals-small-wasm-stack.js: Added.
(async let):
* JSTests/wasm/stress/many-locals-small-wasm-stack.wasm: Added.
* JSTests/wasm/stress/many-locals-small-wasm-stack.wat: Added.
* Source/JavaScriptCore/wasm/WasmLLIntGenerator.cpp:
(JSC::Wasm::LLIntGenerator::addLocal):
Canonical link: https://commits.webkit.org/259548.25@safari-7615-branch
Commit: 53ca7314c84e57851428d264ebdb2bbc72482f97
https://github.com/WebKit/WebKit/commit/53ca7314c84e57851428d264ebdb2bbc72482f97
Author: Rob Buis <rbuis at igalia.com>
Date: 2023-02-01 (Wed, 01 Feb 2023)
Changed paths:
A LayoutTests/fast/dom/set-outer-text-on-moved-element-expected.html
A LayoutTests/fast/dom/set-outer-text-on-moved-element.html
M Source/WebCore/rendering/updating/RenderTreeUpdater.cpp
Log Message:
-----------
Cherry-pick 256843.6 at webkit-2022.12-embargoed (c4c0ef6360b2). rdar://102808104
Verify that style update roots are for correct document
https://bugs.webkit.org/show_bug.cgi?id=248775
rdar://102808104
Reviewed by Antti Koivisto.
Verify that style update roots are for the correct document since
we may be dealing with a pending update on an element/text node that
moved to another document.
* LayoutTests/fast/dom/set-outer-text-on-moved-element-expected.html: Added.
* LayoutTests/fast/dom/set-outer-text-on-moved-element.html: Added.
* Source/WebCore/rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::commit):
Canonical link: https://commits.webkit.org/256843.6@webkit-2022.12-embargoed
Canonical link: https://commits.webkit.org/259548.26@safari-7615-branch
Commit: 97035e0981452a6db759e30f25a2492aa14a28bb
https://github.com/WebKit/WebKit/commit/97035e0981452a6db759e30f25a2492aa14a28bb
Author: Chris Dumez <cdumez at apple.com>
Date: 2023-02-01 (Wed, 01 Feb 2023)
Changed paths:
M Source/WebKit/UIProcess/WebProcessProxy.cpp
Log Message:
-----------
Use-after-free under WebProcessProxy::logDiagnosticMessageForResourceLimitTermination()
https://bugs.webkit.org/show_bug.cgi?id=251454
rdar://104818871
Reviewed by David Kilzer and Ryosuke Niwa.
The code was storing a reference to a temporary.
* Source/WebKit/UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::logDiagnosticMessageForResourceLimitTermination):
Canonical link: https://commits.webkit.org/259548.27@safari-7615-branch
Commit: edbb5f8954848a8030de37c1b85a6175bc19e7d9
https://github.com/WebKit/WebKit/commit/edbb5f8954848a8030de37c1b85a6175bc19e7d9
Author: Patrick Angle <pangle at apple.com>
Date: 2023-02-01 (Wed, 01 Feb 2023)
Changed paths:
A LayoutTests/inspector/console/console-recursive-logging-expected.txt
A LayoutTests/inspector/console/console-recursive-logging.html
M Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp
M Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.h
Log Message:
-----------
Cherry-pick 252432.1043 at safari-7614-branch (6633438abd8b). rdar://104083913
Web Inspector: Console messages that log a value that recursively logs crashes
https://bugs.webkit.org/show_bug.cgi?id=251018
rdar://104083913
Reviewed by Jonathan Bedard and Michael Saboff.
Web Inspector normally generates a preview for objects logged in the console when Web Inspector is open. However, it is
possible for authored pages to cause logging to occur when we attempt to generate the preview, as we must invoke getters
to get the values to display. In order to not recursively log messages to the console this patch turns off generating
previews for console messages that are logged while in middle of logging another console message. The user can still
generate a preview later in Web Inspector by using the disclosure triangle next to the message, which will then cause
the getter to be invoked, but the same protection will kick in to prevent recursive logging via generating previews
for objects.
* LayoutTests/inspector/console/console-recursive-logging-expected.txt: Added.
* LayoutTests/inspector/console/console-recursive-logging.html: Added.
* Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp:
(Inspector::InspectorConsoleAgent::addConsoleMessage):
* Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.h:
Canonical link: https://commits.webkit.org/252432.1043@safari-7614-branch
Canonical link: https://commits.webkit.org/259548.28@safari-7615-branch
Commit: ce8f16b1a26ec1da841191802a02bf2c28eeb9c5
https://github.com/WebKit/WebKit/commit/ce8f16b1a26ec1da841191802a02bf2c28eeb9c5
Author: Richard Robinson <richard_robinson2 at apple.com>
Date: 2023-02-01 (Wed, 01 Feb 2023)
Changed paths:
M Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
Log Message:
-----------
[CoreIPC] division by zero in _restoreScrollAndZoomStateForTransaction
https://bugs.webkit.org/show_bug.cgi?id=251095
rdar://101521038
Reviewed by Wenson Hsieh and Jonathan Bedard.
In `_restorePageStateToUnobscuredCenter`, a division-by-zero can occur if `_scaleToRestore == 0.0`.
This PR adds a `MESSAGE_CHECK` to the IPC methods which set this variable to ensure that only
positive scale values may be set.
* Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::restorePageState):
(WebKit::WebPageProxy::restorePageCenterAndScale):
Canonical link: https://commits.webkit.org/259548.29@safari-7615-branch
Commit: 49109db4ab87a715f7a8987c7ee380e63060298b
https://github.com/WebKit/WebKit/commit/49109db4ab87a715f7a8987c7ee380e63060298b
Author: Ryan Reno <rreno at apple.com>
Date: 2023-02-01 (Wed, 01 Feb 2023)
Changed paths:
M Source/JavaScriptCore/runtime/Error.cpp
M Source/JavaScriptCore/runtime/StackFrame.cpp
M Source/JavaScriptCore/runtime/StackFrame.h
M Source/WTF/wtf/URL.cpp
M Source/WTF/wtf/URL.h
M Source/WebInspectorUI/UserInterface/Base/URLUtilities.js
M Source/WebInspectorUI/UserInterface/Models/DebuggerData.js
M Tools/TestWebKitAPI/Tests/WTF/URL.cpp
Log Message:
-----------
Error object stacktraces may leak sensitive data in URL query parameters
https://bugs.webkit.org/show_bug.cgi?id=250760
rdar://104376838
Reviewed by Patrick Angle.
If a remote script is delivered after a redirect sensitive data may be present
in the post-redirect URL. If the script later throws an error the error event
object will have that post-redirect URL in its stacktrace and sourceURL properties.
* Source/JavaScriptCore/runtime/Error.cpp:
(JSC::getLineColumnAndSource):
* Source/JavaScriptCore/runtime/StackFrame.cpp:
(JSC::StackFrame::sourceURLStripped const):
This is a new function which uses the URL class to strip
potentially sensitive information from the URL of the script
which contains the code for the current stack frame.
(JSC::StackFrame::toString const):
* Source/JavaScriptCore/runtime/StackFrame.h:
* Source/WTF/wtf/URL.cpp:
(WTF::URL::strippedForUseAsReport const):
This is a function similar to strippedForUseAsReferrer except we also remove
query parameters from the URL while strippedForUseAsReferrer only strips
user information and fragment.
* Source/WTF/wtf/URL.h:
* Source/WebInspectorUI/UserInterface/Base/URLUtilities.js:
Adds a utility function similar to WTF::URL::strippedForUseAsReport.
* Source/WebInspectorUI/UserInterface/Models/DebuggerData.js:
(WI.DebuggerData.prototype.scriptsForURL):
(WI.DebuggerData.prototype.addScript):
The Web Inspector debugger maps URLs it knows about to URLs reported
by the stack frames in an error object's stack trace. This allows one
to jump to offending source lines in the web inspector. In order to
correctly map the stripped URL reported in a stack trace we need to key
the map on the stripped URL as well.
* Tools/TestWebKitAPI/Tests/WTF/URL.cpp:
(TestWebKitAPI::TEST_F):
Adds a unit test for URL::strippedForUseAsReport
Canonical link: https://commits.webkit.org/259548.30@safari-7615-branch
Commit: 647c9c9c6261e42478215ec0095b0c6112c2f067
https://github.com/WebKit/WebKit/commit/647c9c9c6261e42478215ec0095b0c6112c2f067
Author: Chirag M Shah <chirag_m_shah at apple.com>
Date: 2023-02-01 (Wed, 01 Feb 2023)
Changed paths:
A LayoutTests/fast/css-grid-layout/grid-stylechange-crash-expected.txt
A LayoutTests/fast/css-grid-layout/grid-stylechange-crash.html
M Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
M Source/WebCore/rendering/RenderGrid.cpp
M Source/WebCore/rendering/RenderGrid.h
Log Message:
-----------
Cherry-pick 252432.1044 at safari-7614-branch (22cbd76bcc96). rdar://104559684
Invalidate grid placement when style changes to subgrid
rdar://104559684
Reviewed by Jonathan Bedard and Matt Woodrow.
Before this change, we didn't invalidate parent and child placement
info, leading to a OOB read into the parent tracks information when
copying that to the child. This change fixes that.
* LayoutTests/fast/css-grid-layout/grid-stylechange-crash-expected.txt: Added.
* LayoutTests/fast/css-grid-layout/grid-stylechange-crash.html: Added.
* Source/WebCore/rendering/RenderGrid.cpp:
(WebCore::RenderGrid::styleDidChange):
(WebCore::RenderGrid::subgridDidChange const):
(WebCore::RenderGrid::dirtyGrid):
* Source/WebCore/rendering/RenderGrid.h:
* Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrackSizingAlgorithm::copyUsedTrackSizesForSubgrid):
Canonical link: https://commits.webkit.org/252432.1044@safari-7614-branch
Canonical link: https://commits.webkit.org/259548.31@safari-7615-branch
Commit: 484046c586bf34636072d726e6c0e859206314cd
https://github.com/WebKit/WebKit/commit/484046c586bf34636072d726e6c0e859206314cd
Author: Mark Lam <mark.lam at apple.com>
Date: 2023-02-01 (Wed, 01 Feb 2023)
Changed paths:
M Source/JavaScriptCore/API/JSCallbackConstructor.h
M Source/JavaScriptCore/API/JSCallbackFunction.h
M Source/JavaScriptCore/API/JSClassRef.h
M Source/JavaScriptCore/API/JSWeakObjectMapRefInternal.h
M Source/JavaScriptCore/API/ObjCCallbackFunction.h
M Source/JavaScriptCore/runtime/ClassInfo.h
M Source/JavaScriptCore/runtime/Lookup.h
Log Message:
-----------
Cherry-pick 252432.1045 at safari-7614-branch (77446d5c727e). rdar://102768157
[Re-land] Add additional PAC diversity for function pointers in JSC API data structures as we do for vtbls.
https://bugs.webkit.org/show_bug.cgi?id=248702
<rdar://problem/102768157>
Reviewed by Yusuke Suzuki.
* Source/JavaScriptCore/API/JSCallbackConstructor.h:
* Source/JavaScriptCore/API/JSCallbackFunction.h:
* Source/JavaScriptCore/API/JSClassRef.h:
* Source/JavaScriptCore/API/JSWeakObjectMapRefInternal.h:
* Source/JavaScriptCore/API/ObjCCallbackFunction.h:
* Source/JavaScriptCore/runtime/ClassInfo.h:
* Source/JavaScriptCore/runtime/Lookup.h:
Canonical link: https://commits.webkit.org/252432.1045@safari-7614-branch
Canonical link: https://commits.webkit.org/259548.32@safari-7615-branch
Commit: 76066c1ef2229e33f385b3e03cbca8b5af154442
https://github.com/WebKit/WebKit/commit/76066c1ef2229e33f385b3e03cbca8b5af154442
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-02-02 (Thu, 02 Feb 2023)
Changed paths:
M Tools/Scripts/libraries/webkitbugspy/setup.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/issue.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/bugzilla.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/data.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/radar.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/radar.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_unittest.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/radar_unittest.py
Log Message:
-----------
Cherry-pick 259639 at main (28af6286be2f). rdar://104838949
[webkitbugspy] Access keywords from Radars and bugzillas
https://bugs.webkit.org/show_bug.cgi?id=251398
rdar://104838949
Reviewed by Aakash Jain.
* Tools/Scripts/libraries/webkitbugspy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py:
(Tracker.populate): Populate keywords.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py:
(Tracker.populate): Note that keywords are unsupported.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/issue.py:
(Issue.__init__): Add keywords.
(Issue.keywords): Ditto.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/bugzilla.py:
(Bugzilla._issue): Create an issue without any keywords.
(Bugzilla._create): Return keywords.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/data.py:
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/radar.py:
(RadarModel.Keyword): Added.
(RadarModel.keywords): Ditto.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/radar.py:
(Tracker.populate): Populate keywords associated with radar.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_unittest.py:
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/radar_unittest.py:
Canonical link: https://commits.webkit.org/259639@main
Canonical link: https://commits.webkit.org/259548.33@safari-7615-branch
Commit: fae4d5c750e89a5aa5c8756befcbae3c1a711605
https://github.com/WebKit/WebKit/commit/fae4d5c750e89a5aa5c8756befcbae3c1a711605
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-02-02 (Thu, 02 Feb 2023)
Changed paths:
M Tools/Scripts/libraries/webkitscmpy/setup.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/bitbucket.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/pull_request.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py
Log Message:
-----------
Cherry-pick 259691 at main (632106470537). rdar://104889825
[webkitscmpy] Expose hash of HEAD commit
https://bugs.webkit.org/show_bug.cgi?id=251464
rdar://104889825
Reviewed by Aakash Jain.
* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/bitbucket.py:
(BitBucket.request): Return hash of PR head.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py:
(GitHub.graphql): Pass hash of PR head.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/pull_request.py:
(PullRequest.__init__): Receive hash of PR head.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py:
(BitBucket.PRGenerator.PullRequest): Pass hash of PR head.
(BitBucket.PRGenerator.create): Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
(GitHub.PRGenerator.PullRequest): Pass hash of PR head.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
Canonical link: https://commits.webkit.org/259691@main
Canonical link: https://commits.webkit.org/259548.34@safari-7615-branch
Commit: a01ddeab3a6d0612371c95e45ee6fe275ddb7cd4
https://github.com/WebKit/WebKit/commit/a01ddeab3a6d0612371c95e45ee6fe275ddb7cd4
Author: Alex Christensen <achristensen at apple.com>
Date: 2023-02-02 (Thu, 02 Feb 2023)
Changed paths:
M Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm
M Source/WebKit/UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm
Log Message:
-----------
Cherry-pick 06c8c34deeb9. rdar://problem/104569995
Enable framework version mismatch check on Catalyst builds
https://bugs.webkit.org/show_bug.cgi?id=251569
rdar://104569995
Reviewed by Chris Dumez.
We see some crashes sometimes which indicate that auxiliary processes are decoding incompatible messages.
Do the version check like we do on macOS to make it more clear what is going on.
* Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
(WebKit::XPCServiceMain):
* Source/WebKit/UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm:
(WebKit::ProcessLauncher::launchProcess):
Canonical link: https://commits.webkit.org/259756@main
Canonical link: https://commits.webkit.org/259548.36@safari-7615-branch
Commit: e397aab78e7328d62117af9e25be9f100d33c15b
https://github.com/WebKit/WebKit/commit/e397aab78e7328d62117af9e25be9f100d33c15b
Author: Chris Dumez <cdumez at apple.com>
Date: 2023-02-02 (Thu, 02 Feb 2023)
Changed paths:
M Source/WebCore/platform/mediastream/MediaConstraints.h
Log Message:
-----------
Cherry-pick 252432.1035 at safari-7614-branch (b9851bb36465). rdar://103012405
IPC hardening for MediaConstraint subclasses
https://bugs.webkit.org/show_bug.cgi?id=250722
rdar://103012405
Reviewed by Jonathan Bedard and David Kilzer.
Make sure we validate the constraint type whenever we IPC-deserialize a
MediaConstraint subclass.
* Source/WebCore/platform/mediastream/MediaConstraints.h:
(WebCore::NumericConstraint::decode):
(WebCore::StringConstraint::decode):
Canonical link: https://commits.webkit.org/252432.1035@safari-7614-branch
Canonical link: https://commits.webkit.org/259548.36@safari-7615-branch
Commit: a96eb9fd341713aeb3bb7729ec6ec1a3658ff56c
https://github.com/WebKit/WebKit/commit/a96eb9fd341713aeb3bb7729ec6ec1a3658ff56c
Author: Robert Jenner <jenner at apple.com>
Date: 2023-02-02 (Thu, 02 Feb 2023)
Changed paths:
M LayoutTests/svg/compositing/outermost-svg-with-border-padding.html
Log Message:
-----------
Cherry-pick 259646 at main (ee8e4757570e). https://bugs.webkit.org/show_bug.cgi?id=248018
REGRESSION(256180 at main): Enabling accelerated drawing caused some ImageOnly Failures (248018)
https://bugs.webkit.org/show_bug.cgi?id=248018
Unreviewed test gardening.
Follow-up fix to svg/compositing/outermost-svg-with-border-padding.html.
* LayoutTests/svg/compositing/outermost-svg-with-border-padding.html:
Canonical link: https://commits.webkit.org/259646@main
Canonical link: https://commits.webkit.org/259548.37@safari-7615-branch
Commit: 2a2126344ab5bb7b23e572c18f048236a36ffa03
https://github.com/WebKit/WebKit/commit/2a2126344ab5bb7b23e572c18f048236a36ffa03
Author: Alan Baradlay <zalan at apple.com>
Date: 2023-02-02 (Thu, 02 Feb 2023)
Changed paths:
M LayoutTests/fast/repaint/rtl-content-selection-hairline-gap-expected.txt
M LayoutTests/fast/repaint/rtl-content-selection-hairline-gap.html
Log Message:
-----------
Cherry-pick 259692 at main (c743104c1d86). <rdar://problem/104881737>
[iOS / macOS] fast/repaint/rtl-content-selection-hairline-gap.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=251452
<rdar://problem/104881737>
Unreviewed.
Do not rely on repaint order.
* LayoutTests/fast/repaint/rtl-content-selection-hairline-gap-expected.txt:
* LayoutTests/fast/repaint/rtl-content-selection-hairline-gap.html:
Canonical link: https://commits.webkit.org/259692@main
Canonical link: https://commits.webkit.org/259548.38@safari-7615-branch
Commit: c68b7da0d9b419e335b4cb6e6ee53c20948f7a9b
https://github.com/WebKit/WebKit/commit/c68b7da0d9b419e335b4cb6e6ee53c20948f7a9b
Author: Ryan Reno <rreno at apple.com>
Date: 2023-02-02 (Thu, 02 Feb 2023)
Changed paths:
M Source/JavaScriptCore/API/JSScript.mm
M Source/JavaScriptCore/API/JSScriptRef.cpp
M Source/JavaScriptCore/inspector/ScriptCallFrame.cpp
M Source/JavaScriptCore/inspector/ScriptCallFrame.h
M Source/JavaScriptCore/inspector/ScriptCallStackFactory.cpp
M Source/JavaScriptCore/interpreter/StackVisitor.cpp
M Source/JavaScriptCore/interpreter/StackVisitor.h
M Source/JavaScriptCore/parser/SourceProvider.cpp
M Source/JavaScriptCore/parser/SourceProvider.h
M Source/JavaScriptCore/runtime/CachedTypes.cpp
M Source/JavaScriptCore/runtime/ScriptExecutable.h
M Source/WebCore/bindings/js/CachedScriptSourceProvider.h
M Source/WebCore/bindings/js/ScriptBufferSourceProvider.h
M Source/WebCore/bindings/js/ScriptModuleLoader.cpp
M Source/WebCore/bindings/js/ScriptSourceCode.h
M Source/WebCore/page/csp/ContentSecurityPolicy.cpp
M Source/WebCore/workers/WorkerGlobalScope.cpp
M Source/WebCore/workers/WorkerThread.cpp
Log Message:
-----------
Cross-Site Information Leak: CSP violation reports may contain a post-redirect URL
https://bugs.webkit.org/show_bug.cgi?id=251282
rdar://104753003
Reviewed by Yusuke Suzuki.
The source-file field of a CSP violation report may contain a URL which has sensitive data in the
query string if it was the result of a redirect. The CSP spec in non-normative terms suggests
that in the case of a redirect (such as a login flow which appends a login token) we should report
violations in the resulting resource with the pre-redirect URL to avoid cross-site information leaks
via the CSP reporting API.
Source/JavaScriptCore:
Plubming code to make pre-redirect URLs available in ScriptCallStacks.
When a ScriptCallStack is created by the StackVisitor the ScriptCallFrame
objects will be populated with the pre-redirect URL by consulting the SourceProvider. WebCore
will conditionally set the preRedirectURL member if the resource was obtained via a redirected
response.
* Source/JavaScriptCore/API/JSScript.mm:
(-[JSScript sourceCode]):
* Source/JavaScriptCore/API/JSScriptRef.cpp:
* Source/JavaScriptCore/inspector/ScriptCallFrame.cpp:
(Inspector::ScriptCallFrame::ScriptCallFrame):
(Inspector::ScriptCallFrame::isEqual const):
* Source/JavaScriptCore/inspector/ScriptCallFrame.h:
* Source/JavaScriptCore/inspector/ScriptCallStackFactory.cpp:
(Inspector::CreateScriptCallStackFunctor::operator() const):
* Source/JavaScriptCore/interpreter/StackVisitor.cpp:
(JSC::StackVisitor::Frame::preRedirectURL const):
* Source/JavaScriptCore/interpreter/StackVisitor.h:
* Source/JavaScriptCore/parser/SourceProvider.cpp:
(JSC::SourceProvider::SourceProvider):
(JSC::BaseWebAssemblySourceProvider::BaseWebAssemblySourceProvider):
* Source/JavaScriptCore/parser/SourceProvider.h:
(JSC::SourceProvider::preRedirectURL const):
(JSC::StringSourceProvider::StringSourceProvider):
* Source/JavaScriptCore/runtime/CachedTypes.cpp:
(JSC::CachedSourceProviderShape::encode):
* Source/JavaScriptCore/runtime/ScriptExecutable.h:
(JSC::ScriptExecutable::preRedirectURL const):
Source/WebCore:
This updates the constructors for ScriptSourceCode objects to pass
null strings for the preRedirectURL parameter. In the cases where we can detect
whether a redirect happened or not we pass the pre-redirect URL to the SourceProvider.
* Source/WebCore/bindings/js/CachedScriptSourceProvider.h:
(WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
* Source/WebCore/bindings/js/ScriptBufferSourceProvider.h:
* Source/WebCore/bindings/js/ScriptModuleLoader.cpp:
(WebCore::ScriptModuleLoader::notifyFinished):
* Source/WebCore/bindings/js/ScriptSourceCode.h:
(WebCore::ScriptSourceCode::ScriptSourceCode):
* Source/WebCore/workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::importScripts):
* Source/WebCore/workers/WorkerThread.cpp:
(WebCore::WorkerThread::evaluateScriptIfNecessary):
* Source/WebCore/page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::reportViolation const):
To populate the source-file field of a CSP report we consult the
JavaScript call stack. The source URL of the frame may be the
result of a redirect in which case we should use the pre-redirect
URL in the report to avoid leaking potentially sensitive data in the post-redirect URL.
Canonical link: https://commits.webkit.org/259548.39@safari-7615-branch
Commit: bf2c7c5b03b0a75ec4605cf02f4a66bb1b9b875d
https://github.com/WebKit/WebKit/commit/bf2c7c5b03b0a75ec4605cf02f4a66bb1b9b875d
Author: Chirag M Shah <chirag_m_shah at apple.com>
Date: 2023-02-02 (Thu, 02 Feb 2023)
Changed paths:
A LayoutTests/mathml/mathmltoken-layout-crash-expected.txt
A LayoutTests/mathml/mathmltoken-layout-crash.html
M Source/WebCore/rendering/mathml/RenderMathMLToken.cpp
Log Message:
-----------
Fix layout for positioned children for RenderMathMLToken
rdar://104598552
Reviewed by Alan Baradlay.
Before this change, the layout method in RenderMathMLToken (<ms>) never
added positioned elements to the map for their container, which meant if
the positioned children are dirty, their layout will never be triggered.
This change fixes that by looking at direct children of
RenderMathMLToken and adding them to their container's positioned
elements map, so that their layout happens as expected.
* LayoutTests/mathml/mathmltoken-layout-crash-expected.txt: Added.
* LayoutTests/mathml/mathmltoken-layout-crash.html: Added.
* Source/WebCore/rendering/mathml/RenderMathMLToken.cpp:
(WebCore::RenderMathMLToken::layoutBlock):
Canonical link: https://commits.webkit.org/259548.40@safari-7615-branch
Commit: 569f8b660570678ccd46c80839b02feaf67a6c8a
https://github.com/WebKit/WebKit/commit/569f8b660570678ccd46c80839b02feaf67a6c8a
Author: Russell Epstein <repstein at apple.com>
Date: 2023-02-03 (Fri, 03 Feb 2023)
Changed paths:
M Configurations/Version.xcconfig
Log Message:
-----------
Versioning.
WebKit-7615.1.21
Canonical link: https://commits.webkit.org/259548.42@safari-7615-branch
Commit: dc83dd4a50e135567c3ddcb422a58df738c3c9e9
https://github.com/WebKit/WebKit/commit/dc83dd4a50e135567c3ddcb422a58df738c3c9e9
Author: Commit Queue <commit-queue at webkit.org>
Date: 2023-02-03 (Fri, 03 Feb 2023)
Changed paths:
M Source/WebKit/SourcesCocoa.txt
R Source/WebKit/UIProcess/API/Cocoa/WKApplicationManifest.h
R Source/WebKit/UIProcess/API/Cocoa/WKApplicationManifest.mm
R Source/WebKit/UIProcess/API/Cocoa/WKApplicationManifestInternal.h
R Source/WebKit/UIProcess/API/Cocoa/WKApplicationManifestPrivate.h
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.h
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
M Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm
M Source/WebKit/UIProcess/API/Cocoa/_WKInspectorInternal.h
M Source/WebKit/UIProcess/API/ios/WKWebViewTestingIOS.mm
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/Tests/WebKitCocoa/ApplicationManifest.mm
Log Message:
-----------
Cherry-pick fa74f2720e54. rdar://problem/104923240
Unreviewed, reverting r259523 at main.
https://bugs.webkit.org/show_bug.cgi?id=251525
No longer needed.
Reverted changeset:
"Add WKApplicationManifest API"
https://bugs.webkit.org/show_bug.cgi?id=251298
https://commits.webkit.org/259523@main
Canonical link: https://commits.webkit.org/259699@main
Canonical link: https://commits.webkit.org/259548.43@safari-7615-branch
Commit: 4143d9cc48ce20995597cd36e524def4023fdb83
https://github.com/WebKit/WebKit/commit/4143d9cc48ce20995597cd36e524def4023fdb83
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-02-03 (Fri, 03 Feb 2023)
Changed paths:
M metadata/contributors.json
Log Message:
-----------
Cherry-pick 259798 at main (2064be239b76).
Fix Dawn Flores's email list
Unreviewed infrastructure fix.
* metadata/contributors.json: De-duplicate email entry for Dawn Flores.
Canonical link: https://commits.webkit.org/259798@main
Canonical link: https://commits.webkit.org/259548.43@safari-7615-branch
Commit: 90861f261d6c3df22854d66996871683f466e18e
https://github.com/WebKit/WebKit/commit/90861f261d6c3df22854d66996871683f466e18e
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-02-03 (Fri, 03 Feb 2023)
Changed paths:
M Tools/Scripts/libraries/webkitscmpy/setup.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/contributor.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/contributor_unittest.py
Log Message:
-----------
Cherry-pick 259831 at main (4d725fd53b44). rdar://105011200
[webkitscmpy] Handle dual-email commit messages
https://bugs.webkit.org/show_bug.cgi?id=251698
rdar://105011200
Reviewed by Aakash Jain.
Contributors should only have a single email when committing, but git-webkti
tooling should handle situations where that is not the case.
* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/contributor.py:
(Contributor.from_scm_log): Add regex supporting multiple emails in a commit message.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/contributor_unittest.py:
(TestContributor.test_double_git_log):
Canonical link: https://commits.webkit.org/259831@main
Canonical link: https://commits.webkit.org/259548.44@safari-7615-branch
Commit: 9930b53ebce12cd824e82e06715514d29446e369
https://github.com/WebKit/WebKit/commit/9930b53ebce12cd824e82e06715514d29446e369
Author: Michael Saboff <msaboff at apple.com>
Date: 2023-02-06 (Mon, 06 Feb 2023)
Changed paths:
M Source/JavaScriptCore/yarr/YarrJIT.cpp
Log Message:
-----------
[JSC] RegExp.test inline is missing another stack overflow checks
https://bugs.webkit.org/show_bug.cgi?id=251741
rdar://104072550
Reviewed by Mark Lam.
Converted the ASSERT(!m_failureReason) into a check that when true will bail out of the inline code
and call out to the C++ operation. This check handles any errors while compiling the RegExp pattern
into YarrJIT IR during the processing of opCompileBody().
I also audited all of the other possible error cases that the YarrJIT might produce and they are already
handled by this and the prior change.
The current test already covers this case.
* Source/JavaScriptCore/yarr/YarrJIT.cpp:
Canonical link: https://commits.webkit.org/259548.45@safari-7615-branch
Commit: a00a15e7abe0140bd98cda6485e52d03b2bdf79e
https://github.com/WebKit/WebKit/commit/a00a15e7abe0140bd98cda6485e52d03b2bdf79e
Author: Chris Dumez <cdumez at apple.com>
Date: 2023-02-06 (Mon, 06 Feb 2023)
Changed paths:
M Source/WTF/wtf/PlatformUse.h
M Source/WebCore/page/MemoryRelease.cpp
M Source/WebCore/platform/audio/HRTFElevation.cpp
M Source/WebCore/platform/audio/HRTFElevation.h
Log Message:
-----------
Fix various issues with HRTFElevation's getConcatenatedImpulseResponsesForSubject()
https://bugs.webkit.org/show_bug.cgi?id=251643
rdar://104980786
Reviewed by Eric Carlson.
Fix various issues with HRTFElevation's getConcatenatedImpulseResponsesForSubject():
- Add a lock to synchronize access to the global HashMap of AudioBus objects
since this may get called from different threads.
- Make sure we call isolatedCopy() on the String key before adding it to the HashMap
for thread safety.
- Make sure we clear this global HashMap on critical memory pressure to free up
memory.
- Use smart pointers instead of raw pointers.
- Modernize the code a bit.
* Source/WTF/wtf/PlatformUse.h:
* Source/WebCore/page/MemoryRelease.cpp:
(WebCore::releaseCriticalMemory):
* Source/WebCore/platform/audio/HRTFElevation.cpp:
(WebCore::WTF_REQUIRES_LOCK):
(WebCore::getConcatenatedImpulseResponsesForSubject):
(WebCore::HRTFElevation::clearCache):
(WebCore::HRTFElevation::calculateKernelsForAzimuthElevation):
* Source/WebCore/platform/audio/HRTFElevation.h:
Canonical link: https://commits.webkit.org/259548.46@safari-7615-branch
Commit: 0f2c12121b0a488f5ce52b5d2da8d01508cec3d8
https://github.com/WebKit/WebKit/commit/0f2c12121b0a488f5ce52b5d2da8d01508cec3d8
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2023-02-06 (Mon, 06 Feb 2023)
Changed paths:
A JSTests/stress/arguments-elimination-should-happen-only-when-stack-slot-is-available-at-replacement-site.js
M Source/JavaScriptCore/dfg/DFGArgumentsEliminationPhase.cpp
Log Message:
-----------
[JSC] FTL arguments elimination should ensure that replacement sites can access to original stack slots
https://bugs.webkit.org/show_bug.cgi?id=251640
rdar://99273500
Reviewed by Mark Lam.
FTL arguments elimination does analysis and attempts to eliminate arguments allocation if it is not escaped.
We emit stack access at `arguments[0]` site for example, and remove `arguments` allocations.
But important thing is that stack slots used for the `arguments` need to be available at `arguments[0]` access site.
Since we are using stack slots for different purpose when inlining different functions, it is possible that the given
stack slot is no longer available when using `arguments[0]`. For example,
function a() { return arguments; }
function b() { do-something }
var arg = a()
b();
arg[0]; // If both "a" and "b" are inlined, stack slots used for inlined "a" can be used for the other purpose for "b"
// As a result, it is possible that the slot is not available at `arg[0]` access point.
We were doing stack slot interference analysis to avoid the above problem[1]. However, it was not complete solution since it is only
checking block-local status. So if we have branch between a() and arg[0], this analysis didn't work. Attached test
"arguments-elimination-should-happen-only-when-stack-slot-is-available-at-replacement-site.js" is literally doing this.
function empty() {}
function bar2(...a0) {
return a0;
}
function foo() {
let xs = bar2(undefined);
'' == 1 && 0;
return empty(...xs, undefined);
}
Between bar2 and `...xs` site, we have branch due to &&. And at "...xs" site, the stack slot were no longer available.
In this patch, we replace our existing interference analysis with the revised fix. We use OSR availability which can describe the
state of each stack slot. For all arguments, initially, it is flushed state with a node. Then, when slot gets unavailable or overridden,
we can see the availability change, which no longer points at the same node.
We first do this OSR availability analysis and capture availability map of each candidates. And then, we analyze whether replacement sites
are still seeing the same availability for arguments. And if it becomes different, we remove the candidate from optimization target. This change
simplifies our analysis significantly, and make it procedure global (previous one was block local).
[1]: https://commits.webkit.org/212536@main
* JSTests/stress/arguments-elimination-should-happen-only-when-stack-slot-is-available-at-replacement-site.js: Added.
(empty):
(bar2):
(foo):
(main):
* Source/JavaScriptCore/dfg/DFGArgumentsEliminationPhase.cpp:
Canonical link: https://commits.webkit.org/259548.47@safari-7615-branch
Commit: c7b07170d9d3cbd340ed682a622bf3279ee2d9ca
https://github.com/WebKit/WebKit/commit/c7b07170d9d3cbd340ed682a622bf3279ee2d9ca
Author: Russell Epstein <repstein at apple.com>
Date: 2023-02-06 (Mon, 06 Feb 2023)
Changed paths:
M Configurations/Version.xcconfig
Log Message:
-----------
Versioning.
WebKit-7615.1.22
Canonical link: https://commits.webkit.org/259548.49@safari-7615-branch
Commit: 7f9ebadce2fc535ac4a350ecab8b135a013e99c2
https://github.com/WebKit/WebKit/commit/7f9ebadce2fc535ac4a350ecab8b135a013e99c2
Author: Patrick Angle <pangle at apple.com>
Date: 2023-02-06 (Mon, 06 Feb 2023)
Changed paths:
M Source/JavaScriptCore/API/JSContext.h
M Source/JavaScriptCore/API/JSContext.mm
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.h
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
Log Message:
-----------
Cherry-pick c0769577c02d. rdar://problem/105012093
Web Inspector: `inspectable` API doesn't have a correct Objective-C getter
https://bugs.webkit.org/show_bug.cgi?id=251702
rdar://105012093
Reviewed by Tim Horton.
Boolean getters should have an `is` prefix. Currently `inspectable` is not adhering to this rule. The current getter
also doesn't match the approved API design. This API has not yet shipped, and there is no internal usage of
`[webView inspectable]`, so this change will not break existing clients. `webView.inspectable` remains correct and
unchanged.
* Source/JavaScriptCore/API/JSContext.h:
* Source/JavaScriptCore/API/JSContext.mm:
(-[JSContext isInspectable]):
(-[JSContext inspectable]): Deleted.
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView isInspectable]):
(-[WKWebView inspectable]): Deleted.
Canonical link: https://commits.webkit.org/259840@main
Canonical link: https://commits.webkit.org/259548.50@safari-7615-branch
Commit: de821d716c1ae7e7678bddbd7e61cc3271885ff4
https://github.com/WebKit/WebKit/commit/de821d716c1ae7e7678bddbd7e61cc3271885ff4
Author: Karl Rackler <rackler at apple.com>
Date: 2023-02-06 (Mon, 06 Feb 2023)
Changed paths:
M Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
M Tools/Scripts/webkitpy/port/ios_simulator.py
M Tools/Scripts/webkitpy/xcode/simulated_device_unittest.py
Log Message:
-----------
Cherry-pick 259682 at main (92607080b412). rdar://104886115
Change the default iPadOS simulator to one with a larger screen size
https://bugs.webkit.org/show_bug.cgi?id=251458
rdar://104886115
Reviewed by Jonathan Bedard and Ryan Haddad.
* Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(RunTest.test_device_type_test_division):
(RunTest.test_device_type_specific_listing):
(RunTest.test_ipad_test_division):
(RunTest.test_ipad_listing):
* Tools/Scripts/webkitpy/port/ios_simulator.py:
(IOSSimulatorPort):
(IPadSimulatorPort):
* Tools/Scripts/webkitpy/xcode/simulated_device_unittest.py:
Canonical link: https://commits.webkit.org/259682@main
Canonical link: https://commits.webkit.org/259548.50@safari-7615-branch
Commit: 44f75343da9e63ec797b17d3875b5bbc7aeec3d2
https://github.com/WebKit/WebKit/commit/44f75343da9e63ec797b17d3875b5bbc7aeec3d2
Author: Antti Koivisto <antti at apple.com>
Date: 2023-02-06 (Mon, 06 Feb 2023)
Changed paths:
A LayoutTests/fast/css/display-contents-slot-to-none-expected.txt
A LayoutTests/fast/css/display-contents-slot-to-none.html
M Source/WebCore/style/StyleTreeResolver.cpp
Log Message:
-----------
[be894cadcf68a52a] (REGRESSION 256601 at main) ASAN_SEGV | WebCore::RenderObject::pushOntoGeometryMap; WebCore::RenderInline::pushMappingToContainer;
https://bugs.webkit.org/show_bug.cgi?id=251788
rdar://104793275
Reviewed by Alan Baradlay.
* LayoutTests/fast/css/display-contents-slot-to-none-expected.txt: Added.
* LayoutTests/fast/css/display-contents-slot-to-none.html: Added.
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::affectsRenderedSubtree):
We may have had display:contents before and a rendered subtree may still be affected.
Canonical link: https://commits.webkit.org/259548.51@safari-7615-branch
Commit: 0dc9ae08a78792a5b21f6c4d403d3b3980c978a0
https://github.com/WebKit/WebKit/commit/0dc9ae08a78792a5b21f6c4d403d3b3980c978a0
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2023-02-06 (Mon, 06 Feb 2023)
Changed paths:
M Tools/DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig
M Tools/DumpRenderTree/mac/Info.plist
M Tools/Scripts/webkitpy/port/mac.py
Log Message:
-----------
Cherry-pick 259687 at main (165e0db5c729). rdar://104838472
Clear DumpRenderTree and WebKitTestRunner defaults before running tests
https://bugs.webkit.org/show_bug.cgi?id=251397
rdar://104838472
Reviewed by Jonathan Bedard.
Historically DumpRenderTree had no bundleID specified, so would save NSUserDefaults using
"DumpRenderTree". WebKitTestRunner, on the other hand, was correctly set up to use
"com.apple.WebKit.WebKitTestRunner". This patch gives DumpRenderTree a bundleID with
a "com.apple.WebKit" prefix.
These bundleIDs matter because webkitpy uses them to clear NSUserDefaults before test runs;
this worked fine for DumpRenderTree, but failed for WebKitTestRunner because the bundleID
was incorrect. Fix that in mac.py, and use the new bundleID com.apple.WebKit.DumpRenderTree too.
Generally failing to clear NSUserDefaults before testing isn't an issue, but defaults like WebCoreLogging
can get saved into NSUserDefaults if you run WebKitTestRunner directly with logging arguments, so clearing
before running tests is useful in that scenario.
* Tools/DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig:
* Tools/DumpRenderTree/mac/Info.plist:
* Tools/Scripts/webkitpy/port/mac.py:
(MacPort.reset_preferences):
Canonical link: https://commits.webkit.org/259687@main
Canonical link: https://commits.webkit.org/259548.52@safari-7615-branch
Commit: 31cb0f30efa1a5189ed1707168c1ca059253aaa7
https://github.com/WebKit/WebKit/commit/31cb0f30efa1a5189ed1707168c1ca059253aaa7
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-02-06 (Mon, 06 Feb 2023)
Changed paths:
M Tools/Scripts/webkitpy/xcode/device_type.py
M Tools/Scripts/webkitpy/xcode/device_type_unittest.py
M Tools/Scripts/webkitpy/xcode/simulated_device.py
Log Message:
-----------
Cherry-pick 259848 at main (1b334608e224). rdar://105021853
[run-webkit-tests] Handle diverse WatchOS device types
https://bugs.webkit.org/show_bug.cgi?id=251723
rdar://105021853
Reviewed by Ryan Haddad.
* Tools/Scripts/webkitpy/xcode/device_type.py:
(DeviceType.standardize_hardware_type): Refactor to allow invocation without a class instance,
add a check for WatchOS variants.
(DeviceType.standardized_hardware_type): Invoke refactored function
* Tools/Scripts/webkitpy/xcode/device_type_unittest.py:
(DeviceTypeTest.test_watch_standardization):
* Tools/Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDeviceManager._get_device_identifier_for_type): Invoke DeviceType.standardize_hardware_type
instead of re-implimenting the function.
Canonical link: https://commits.webkit.org/259848@main
Canonical link: https://commits.webkit.org/259548.53@safari-7615-branch
Commit: 14fd368d745a760882fb8018cc7b6b9bfeefa4e5
https://github.com/WebKit/WebKit/commit/14fd368d745a760882fb8018cc7b6b9bfeefa4e5
Author: Myah Cobbs <mcobbs at apple.com>
Date: 2023-02-07 (Tue, 07 Feb 2023)
Changed paths:
M Configurations/Version.xcconfig
Log Message:
-----------
Versioning.
WebKit-7615.1.23
Canonical link: https://commits.webkit.org/259456.146@safari-7615-branch
Commit: f967244a7ce1b4eaf96b9df5e1bf5fc8f03053d1
https://github.com/WebKit/WebKit/commit/f967244a7ce1b4eaf96b9df5e1bf5fc8f03053d1
Author: Russell Epstein <repstein at apple.com>
Date: 2023-02-07 (Tue, 07 Feb 2023)
Changed paths:
M Configurations/Version.xcconfig
Log Message:
-----------
Revert "Versioning."
This reverts commit 14fd368d745a760882fb8018cc7b6b9bfeefa4e5.
Canonical link: https://commits.webkit.org/259548.55@safari-7615-branch
Commit: b82c6f9328d1f30074b4f211b722248babb7f121
https://github.com/WebKit/WebKit/commit/b82c6f9328d1f30074b4f211b722248babb7f121
Author: Timothy Hatcher <timothy at apple.com>
Date: 2023-02-07 (Tue, 07 Feb 2023)
Changed paths:
M Source/WebKit/NetworkProcess/NetworkProcess.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm
Log Message:
-----------
Cherry-pick d8706351a89a. rdar://problem/103793194
Cross-Origin-Resource-Policy blocks fetch from extensions.
https://webkit.org/b/251858
rdar://103793194
Reviewed by Chris Dumez.
SecurityPolicy was blocking the fetch load due to the Cross-Origin-Resource-Policy check
in the NetworkProcess. In the WebProcess, SecurityPolicy checks were succeeding due to the
existing call to SecurityPolicy::allowAccessTo() when parsing the corsDisablingPatterns.
This step was missing in the NetworkProcess. Now both processes have the same checks.
* Source/WebKit/NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::setCORSDisablingPatterns): Add the pattern to SecurityPolicy to
match WebPage.cpp's parseAndAllowAccessToCORSDisablingPatterns().
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
(TEST(URLSchemeHandler, DisableCORSAndCORP)): Added.
Canonical link: https://commits.webkit.org/259976@main
Canonical link: https://commits.webkit.org/259548.56@safari-7615-branch
Commit: dea00c925126ff818ed076d7b0519dd04788cdd8
https://github.com/WebKit/WebKit/commit/dea00c925126ff818ed076d7b0519dd04788cdd8
Author: Andres Gonzalez <andresg_22 at apple.com>
Date: 2023-02-07 (Tue, 07 Feb 2023)
Changed paths:
M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
Log Message:
-----------
Cherry-pick e0e146fe111c. rdar://problem/104881175
AX: Retain AXTextMarkerRefs and AXTextMarkerRangeRefs passed from the AX thread to the main thread.
https://bugs.webkit.org/show_bug.cgi?id=251451
<rdar://problem/104881175>
Reviewed by Chris Fleizach.
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
(-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
(-[WebAccessibilityObjectWrapper _indexForTextMarker:]):
(-[WebAccessibilityObjectWrapper textMarkerRangeAtTextMarker:forUnit:]):
(-[WebAccessibilityObjectWrapper lineTextMarkerRangeForTextMarker:forUnit:]):
(-[WebAccessibilityObjectWrapper textMarkerForTextMarker:atUnit:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
Canonical link: https://commits.webkit.org/259918@main
Canonical link: https://commits.webkit.org/259548.57@safari-7615-branch
Commit: 7aa88db0d137d23f74bd8ea41444510af298dffd
https://github.com/WebKit/WebKit/commit/7aa88db0d137d23f74bd8ea41444510af298dffd
Author: Andres Gonzalez <andresg_22 at apple.com>
Date: 2023-02-07 (Tue, 07 Feb 2023)
Changed paths:
M Source/WebCore/accessibility/AXObjectCache.cpp
M Source/WebCore/accessibility/AXObjectCache.h
Log Message:
-----------
Cherry-pick c11d33bb0bb2. rdar://problem/104956200
AX: Object IDs should not be generated with AXTreeStore::generateNewID().
https://bugs.webkit.org/show_bug.cgi?id=251577
<rdar://problem/104956200>
Reviewed by Chris Fleizach.
In the patch for
https://bugs.webkit.org/show_bug.cgi?id=249480
<rdar://problem/103449294>
I erroneously switched the generation of object IDS in the AXObjectCache to use AXTreeStore::generateNewID. This is wrong because generateNewID checks the presence of the ID against the IDs of AX trees and not against object IDs. This patch rectifies this by bringing back AXObjectCache::generateNewObjectID (new name).
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::generateNewObjectID const):
(WebCore::AXObjectCache::getAXID):
* Source/WebCore/accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::objectForID const): No need to pass AXID by reference since it just wraps an unsgined.
Canonical link: https://commits.webkit.org/259922@main
Canonical link: https://commits.webkit.org/259548.58@safari-7615-branch
Commit: 502dc324e696f2e239cd77d41cfde36a7ae29b3d
https://github.com/WebKit/WebKit/commit/502dc324e696f2e239cd77d41cfde36a7ae29b3d
Author: Rob Buis <rbuis at igalia.com>
Date: 2023-02-07 (Tue, 07 Feb 2023)
Changed paths:
A LayoutTests/fast/multicol/nested-columns-out-of-flow-crash-expected.txt
A LayoutTests/fast/multicol/nested-columns-out-of-flow-crash.html
M Source/WebCore/rendering/RenderObject.cpp
M Source/WebCore/rendering/RenderObject.h
Log Message:
-----------
Cherry-pick 256843.7 at webkit-2022.12-embargoed (3b92d70ba3ea). rdar://98438399
Do not skip fragmented flow thread descendents
https://bugs.webkit.org/show_bug.cgi?id=245374
rdar://98438399
Reviewed by Alan Baradlay.
Do not skip fragmented flow thread descendents in initializeFragmentedFlowStateOnInsertion
since its children may have a different state based on the inserted fragmented
flow thread. When a fragmented flow thread is removed there is no effect on the inner
fragmented flow threads so that behaviour is unchenged.
* LayoutTests/fast/multicol/nested-columns-out-of-flow-crash-expected.txt: Added.
* LayoutTests/fast/multicol/nested-columns-out-of-flow-crash.html: Added.
* Source/WebCore/rendering/RenderObject.cpp:
(WebCore::RenderObject::setFragmentedFlowStateIncludingDescendants):
(WebCore::RenderObject::initializeFragmentedFlowStateOnInsertion):
* Source/WebCore/rendering/RenderObject.h:
Canonical link: https://commits.webkit.org/256843.7@webkit-2022.12-embargoed
Canonical link: https://commits.webkit.org/259548.59@safari-7615-branch
Commit: f246e1b5513c23aa8a5a94d0dd690fc15952ee12
https://github.com/WebKit/WebKit/commit/f246e1b5513c23aa8a5a94d0dd690fc15952ee12
Author: Rob Buis <rbuis at igalia.com>
Date: 2023-02-07 (Tue, 07 Feb 2023)
Changed paths:
A LayoutTests/fast/layers/normal-flow-dialog-remove-layer-crash-expected.html
A LayoutTests/fast/layers/normal-flow-dialog-remove-layer-crash.html
M Source/WebCore/rendering/RenderLayer.cpp
Log Message:
-----------
Cherry-pick 256843.8 at webkit-2022.12-embargoed (fe2f16c1dabe). rdar://104134023
Recalculate normal flow value in RenderLayer::establishesTopLayerDidChange
https://bugs.webkit.org/show_bug.cgi?id=251013
Reviewed by Tim Nguyen.
In RenderLayer::rebuildZOrderLists the RenderView layer makes sure the layers for dialogs/top-level elements are appended after
everything else in the positive z-order list. When removing the dialog layer, dirtyPaintOrderListsOnChildChange will be called
and since it is not a normal only flow everything will be handled correctly through dirtyStackingContextZOrderLists.
In the test case the behaviour is the same until dirtyPaintOrderListsOnChildChange is called on the dialog layer removal. Now that
layer to be removed *is* a normal only flow (the element is no longer positioned and has non visible overflow, see
RenderLayer::shouldBeNormalFlowOnly). This means the positive z-order list is unchanged and the deleted layer still part of it.
When the test cleanup code does a final repaint, the RenderView positive z-order list is processed as normal and when trying to
access the deleted layer the UAF happens.
To fix this, make sure the normal flow value is correct when adding the layer in RenderLayer::establishesTopLayerDidChange.
* LayoutTests/fast/layers/normal-flow-dialog-remove-layer-crash-expected.html: Added.
* LayoutTests/fast/layers/normal-flow-dialog-remove-layer-crash.html: Added.
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::establishesTopLayerDidChange):
Canonical link: https://commits.webkit.org/256843.8@webkit-2022.12-embargoed
Canonical link: https://commits.webkit.org/259548.60@safari-7615-branch
Commit: 71ee942bab06e035857ef087c3bd04f686b9421d
https://github.com/WebKit/WebKit/commit/71ee942bab06e035857ef087c3bd04f686b9421d
Author: Claudio Saavedra <csaavedra at igalia.com>
Date: 2023-02-07 (Tue, 07 Feb 2023)
Changed paths:
A LayoutTests/fast/css/content/content-on-focus-change-expected.txt
A LayoutTests/fast/css/content/content-on-focus-change.html
Log Message:
-----------
Cherry-pick 256843.9 at webkit-2022.12-embargoed (4c3dcd480f7e). rdar://104256993
Test display contents change on focus change
https://bugs.webkit.org/show_bug.cgi?id=251014
Reviewed by Tim Nguyen.
* LayoutTests/fast/css/content/content-on-focus-change-expected.txt: Added.
* LayoutTests/fast/css/content/content-on-focus-change.html: Added.
Canonical link: https://commits.webkit.org/256843.9@webkit-2022.12-embargoed
Canonical link: https://commits.webkit.org/259548.61@safari-7615-branch
Commit: 4c231dda4da0411138110adc4a05450c108752ff
https://github.com/WebKit/WebKit/commit/4c231dda4da0411138110adc4a05450c108752ff
Author: J Pascoe <j_pascoe at apple.com>
Date: 2023-02-08 (Wed, 08 Feb 2023)
Changed paths:
M Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.cpp
M Source/WebCore/Modules/webauthn/AuthenticatorCoordinatorClient.h
M Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp
M Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.h
M Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.messages.in
M Source/WebKit/WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp
M Source/WebKit/WebProcess/WebAuthentication/WebAuthenticatorCoordinator.h
Log Message:
-----------
Cherry-pick ba76ae810b9d. rdar://problem/99535627
[WebAuthn] Conditional passkey request presents conditional control even after AbortController.abort()
https://bugs.webkit.org/show_bug.cgi?id=250589
rdar://99535627
Reviewed by Brent Fulgham.
Currently conditional mediation requests do not get cancelled whenever the abort controller for its
request is called. This patch changes that by calling cancel on the daemon whenever the abort controller
is called.
* Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.cpp:
(WebCore::AuthenticatorCoordinator::discoverFromExternalSource):
* Source/WebCore/Modules/webauthn/AuthenticatorCoordinatorClient.h:
* Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp:
(WebKit::WebAuthenticatorCoordinatorProxy::cancel):
* Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.h:
* Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.messages.in:
* Source/WebKit/WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp:
(WebKit::WebAuthenticatorCoordinator::cancel):
* Source/WebKit/WebProcess/WebAuthentication/WebAuthenticatorCoordinator.h:
Canonical link: https://commits.webkit.org/259754@main
Canonical link: https://commits.webkit.org/259548.62@safari-7615-branch
Commit: 1b2eb138ef9254764761bf374a9ff717071e61dd
https://github.com/WebKit/WebKit/commit/1b2eb138ef9254764761bf374a9ff717071e61dd
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2023-02-08 (Wed, 08 Feb 2023)
Changed paths:
M Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
Log Message:
-----------
[JSC] ToThis object folding should check if AbstractValue is always an object
https://bugs.webkit.org/show_bug.cgi?id=251944
rdar://105175786
Reviewed by Geoffrey Garen and Mark Lam.
ToThis can become Identity for strict mode if it is just primitive values or its object does not have toThis function overriding.
This is correct, but folding ToThis to Undefined etc. (not Identity) needs to check that an input only contains objects.
This patch adds appropriate checks to prevent from converting ToThis(GlobalObject | Int32) to Undefined for example.
* Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::isToThisAnIdentity):
Canonical link: https://commits.webkit.org/259548.63@safari-7615-branch
Commit: 073b621aaa39b9423c320372a9939fbed8bb3253
https://github.com/WebKit/WebKit/commit/073b621aaa39b9423c320372a9939fbed8bb3253
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-02-08 (Wed, 08 Feb 2023)
Changed paths:
M Tools/Scripts/libraries/webkitscmpy/setup.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py
Log Message:
-----------
Cherry-pick 259959 at main (06835af6148a). rdar://105106632
[webkitscmpy] Speed up files_changed
https://bugs.webkit.org/show_bug.cgi?id=251826
rdar://105106632
Reviewed by Aakash Jain.
Only invoke a repository's 'find' function if the provided
argument is not a hash.
* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.files_changed):
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py:
(BitBucket.files_changed):
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
(GitHub.files_changed):
Canonical link: https://commits.webkit.org/259959@main
Canonical link: https://commits.webkit.org/259548.64@safari-7615-branch
Commit: 01d5044dbe0d289a3a81271a7052fd7a12d88c8f
https://github.com/WebKit/WebKit/commit/01d5044dbe0d289a3a81271a7052fd7a12d88c8f
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-02-09 (Thu, 09 Feb 2023)
Changed paths:
M Tools/Scripts/libraries/webkitcorepy/setup.py
M Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
A Tools/Scripts/libraries/webkitcorepy/webkitcorepy/filtered_call.py
A Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/filtered_call_unittest.py
M Tools/Scripts/libraries/webkitscmpy/setup.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py
Log Message:
-----------
Cherry-pick 259979 at main (3ac8172d4ae6). rdar://105138155
[webkitcorepy] Add filtered_call
https://bugs.webkit.org/show_bug.cgi?id=251872
rdar://105138155
Reviewed by Aakash Jain.
* Tools/Scripts/libraries/webkitcorepy/setup.py: Add inspect2 dependency.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/filtered_call.py: Added.
(filtered_call): Invoke the provided function with the provided arguments, if that function supports
those arguments.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/filtered_call_unittest.py: Added.
(FilteredCallTestCase.function):
(FilteredCallTestCase.test_passthrough):
(FilteredCallTestCase.test_filtered):
* Tools/Scripts/libraries/webkitscmpy/setup.py: Remove inspect2 dependency.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py: Use filtered_call
instead of implementing that functionality ourselves.
Canonical link: https://commits.webkit.org/259979@main
Canonical link: https://commits.webkit.org/259548.65@safari-7615-branch
Commit: 6ae1e0a7658a5dadda89bf9f756fd065bfa18ae1
https://github.com/WebKit/WebKit/commit/6ae1e0a7658a5dadda89bf9f756fd065bfa18ae1
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-02-09 (Thu, 09 Feb 2023)
Changed paths:
M Tools/Scripts/libraries/webkitbugspy/setup.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/radar.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_unittest.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/github_unittest.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/radar_unittest.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tracker.py
M Tools/Scripts/libraries/webkitscmpy/setup.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py
Log Message:
-----------
Cherry-pick 260012 at main (69c4012c1ffe). rdar://105153144
[git-webkit] Allow Trackers to hide bug titles
https://bugs.webkit.org/show_bug.cgi?id=251894
rdar://105153144
Reviewed by Aakash Jain.
* Tools/Scripts/libraries/webkitbugspy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py:
(Tracker.Encoder.default):
(Tracker.__init__): Add hide_title member,.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py:
(Tracker.Encoder.default):
(Tracker.__init__): Add hide_title member.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/radar.py:
(Tracker.Encoder.default):
(Tracker.__init__): Add hide_title member, True by default.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_unittest.py:
(TestBugzilla.test_encoding):
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/github_unittest.py:
(TestGitHub.test_encoding):
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/radar_unittest.py:
(TestRadar.test_encoding):
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tracker.py:
(Tracker.from_json): Decode
(Tracker.__init__): Add hide_title member, False by default.
* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py:
(Branch.main): If a Tracker is hiding it's titles, don't encode the title in the branch name.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py:
(TestBranch.test_prompt_url):
Canonical link: https://commits.webkit.org/260012@main
Canonical link: https://commits.webkit.org/259548.66@safari-7615-branch
Commit: a3b2b56b98e09a382ee62256952c23b0700ea7b3
https://github.com/WebKit/WebKit/commit/a3b2b56b98e09a382ee62256952c23b0700ea7b3
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-02-09 (Thu, 09 Feb 2023)
Changed paths:
M Tools/Scripts/libraries/webkitscmpy/setup.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pickable.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pickable_unittest.py
Log Message:
-----------
Cherry-pick 260014 at main (314c5c8a883d). rdar://104100860
[git-webkit] Allow multiple refs in pickable
https://bugs.webkit.org/show_bug.cgi?id=250428
rdar://104100860
Reviewed by Aakash Jain.
* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pickable.py:
(Pickable.parser): Support multiple arguments.
(Pickable.main): Support multiple refs, de-duplicate any pickable commits in
both refs.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pickable_unittest.py:
(TestPickable.test_double): Added.
Canonical link: https://commits.webkit.org/260014@main
Canonical link: https://commits.webkit.org/259548.67@safari-7615-branch
Commit: 549f7c73115eab8546ec1a8a1239f883fd2d0634
https://github.com/WebKit/WebKit/commit/549f7c73115eab8546ec1a8a1239f883fd2d0634
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-02-09 (Thu, 09 Feb 2023)
Changed paths:
M Tools/Scripts/libraries/webkitbugspy/setup.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/issue.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/radar.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/radar.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_unittest.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/github_unittest.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/radar_unittest.py
M metadata/trackers.json
Log Message:
-----------
Cherry-pick 260029 at main (1e4df5db1f28). rdar://105180880
[git-webkit] Consider bug classification
https://bugs.webkit.org/show_bug.cgi?id=251933
rdar://105180880
Reviewed by Dewei Zhu.
* Tools/Scripts/libraries/webkitbugspy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py:
(Tracker.populate): Set classification to empty.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py:
(Tracker.populate): Set classification to empty.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/issue.py:
(Issue.__init__): Add classification member.
(Issue.classification): Populate and return classification member.
(Issue.redacted): Include classification in redaction check.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/radar.py:
(RadarModel.__init__): Add classification member.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/radar.py:
(Tracker.populate): Populate classification from radar.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_unittest.py:
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/github_unittest.py:
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/radar_unittest.py:
* metadata/trackers.json:
Canonical link: https://commits.webkit.org/260029@main
Canonical link: https://commits.webkit.org/259548.68@safari-7615-branch
Commit: 4306f12b8a715ee6957ab5a8da914728937e8a56
https://github.com/WebKit/WebKit/commit/4306f12b8a715ee6957ab5a8da914728937e8a56
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-02-09 (Thu, 09 Feb 2023)
Changed paths:
M Tools/Scripts/libraries/webkitscmpy/setup.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py
A Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/publish.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py
A Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/publish_unittest.py
M metadata/git_config_extension
Log Message:
-----------
Cherry-pick 260044 at main (88545c7a8742). <rdar://97397960>
[git-webkit] Add Publish Command
https://bugs.webkit.org/show_bug.cgi?id=249586
<rdar://97397960>
Reviewed by Elliott Williams.
* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: Add 'git branch -a --merged'
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/publish.py: Added.
(Publish):
(Publish.parser): User provides command a list of refs to publish.
(Publish.branches_on): List all branches that are on the history of a specified ref.
(Publish.tags_on): List all tags that are on the history of a specified ref.
(Publish.parental_intersection): Find the intersection point of the provided commit and the parent
branch of that commit. Note that the provided commit might be on the parent branch, in which case
this function returns nothing.
(Publish._push_branch_ref): Push a branch ref onto the provided mapping. This function takes into
consideration any existing branch ref of the same name, taking the more up to date of the two.
(Publish.main): Given the refs provided by the user, find all refs on that history and push those refs
to the "next" source remote.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.create_pull_request): Prefer the most secret remote.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/publish_unittest.py: Added.
(TestPublish): Added tests.
* metadata/git_config_extension: Sort source remotes.
Canonical link: https://commits.webkit.org/260044@main
Canonical link: https://commits.webkit.org/259548.69@safari-7615-branch
Commit: 4f0cd71e42b817acf2c4a492719cd5a358a2b478
https://github.com/WebKit/WebKit/commit/4f0cd71e42b817acf2c4a492719cd5a358a2b478
Author: Matt Woodrow <mattwoodrow at apple.com>
Date: 2023-02-09 (Thu, 09 Feb 2023)
Changed paths:
M Source/WebCore/Modules/webxr/WebXRRigidTransform.cpp
M Source/WebCore/animation/KeyframeEffect.cpp
M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
M Source/WebCore/platform/graphics/transforms/RotateTransformOperation.cpp
M Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp
M Source/WebCore/platform/graphics/transforms/TransformationMatrix.h
Log Message:
-----------
Fix use of uninitialized memory in TransformationMatrix decompose()
https://bugs.webkit.org/show_bug.cgi?id=247835
<rdar://102263762>
Reviewed by Dean Jackson.
Fixes decompose4 to check for a failing return value from inverse, and early returns, rather
than continuing with the output matrix uninitialized.
Also adds WARN_UNUSED_RETURN to decompose2/4 to ensure that all callers handle this case.
* Source/WebCore/Modules/webxr/WebXRRigidTransform.cpp:
(WebCore::m_rawTransform):
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::computeTransformedExtentViaTransformList const):
(WebCore::KeyframeEffect::computeTransformedExtentViaMatrix const):
* Source/WebCore/platform/graphics/transforms/RotateTransformOperation.cpp:
(WebCore::RotateTransformOperation::blend):
* Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore::decompose4):
* Source/WebCore/platform/graphics/transforms/TransformationMatrix.h:
Canonical link: https://commits.webkit.org/259548.70@safari-7615-branch
Commit: d0ad85a37b8df44f574b01afa7d83b29b486b7c1
https://github.com/WebKit/WebKit/commit/d0ad85a37b8df44f574b01afa7d83b29b486b7c1
Author: Antoine Quint <graouts at webkit.org>
Date: 2023-02-09 (Thu, 09 Feb 2023)
Changed paths:
A LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-animation-list-type-mismatch-expected.txt
A LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-animation-list-type-mismatch.html
M Source/WebCore/animation/CSSPropertyAnimation.cpp
Log Message:
-----------
Cherry-pick 259557 at main (30df2fedb438). rdar://104814851
[web-animations] animating two custom property list values with mismatching types should use a discrete animation
https://bugs.webkit.org/show_bug.cgi?id=251351
rdar://104814851
Reviewed by Antti Koivisto.
It is possible for a custom property to animate between two lists of mismatching types, for instance if it's
defined as `<number>+ | <transform-list>`. In that case, we must use discrete blending.
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-animation-list-type-mismatch-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-animation-list-type-mismatch.html: Added.
* Source/WebCore/animation/CSSPropertyAnimation.cpp:
(WebCore::blendSyntaxValueLists):
Canonical link: https://commits.webkit.org/259557@main
Canonical link: https://commits.webkit.org/259548.71@safari-7615-branch
Commit: 355b307a1241480c67ad77778831673e1ebe8392
https://github.com/WebKit/WebKit/commit/355b307a1241480c67ad77778831673e1ebe8392
Author: Nikolaos Mouchtaris <nmouchtaris at apple.com>
Date: 2023-02-09 (Thu, 09 Feb 2023)
Changed paths:
A LayoutTests/css3/scroll-snap/scroll-snap-remove-snap-area-expected.txt
A LayoutTests/css3/scroll-snap/scroll-snap-remove-snap-area.html
M Source/WebCore/platform/ScrollSnapAnimatorState.cpp
M Source/WebCore/platform/ScrollSnapAnimatorState.h
Log Message:
-----------
Cherry-pick 259696 at main (279d12080527). rdar://104816359
[css-scroll-snap] Have ScrollSnapAnimatorState calculate the HashSet of currently snapped boxes immediately
https://bugs.webkit.org/show_bug.cgi?id=251449
rdar://104816359
Reviewed by Simon Fraser.
The added test css3/scroll-snap/scroll-snap-remove-snap-area.html exposes a bug where removing a snap
area while we are currently snapped to multiple boxes will cause the state in the offsets stored in
m_currentlySnappedBoxesX and m_currentlySnappedBoxesY to become out of sync with the state
in m_snapOffsetsInfo. To resolve this, run currentlySnappedBoxes immediately and store its
result, rather than running it when we are no no longer snapped to multiple boxes, where the
state in m_currentlySnappedBoxesX and m_currentlySnappedBoxesY could be stale.
* Source/WebCore/platform/ScrollSnapAnimatorState.cpp:
(WebCore::ScrollSnapAnimatorState::currentlySnappedBoxes const):
(WebCore::ScrollSnapAnimatorState::chooseBoxToResnapTo const):
(WebCore::ScrollSnapAnimatorState::resnapAfterLayout):
(WebCore::isSnappedToMultipleBoxes): Deleted.
* Source/WebCore/platform/ScrollSnapAnimatorState.h:
Canonical link: https://commits.webkit.org/259696@main
Canonical link: https://commits.webkit.org/259548.72@safari-7615-branch
Commit: de0018029cb779afa5f239007d90b4ef969a8c35
https://github.com/WebKit/WebKit/commit/de0018029cb779afa5f239007d90b4ef969a8c35
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2023-02-09 (Thu, 09 Feb 2023)
Changed paths:
A JSTests/wasm/stress/init-expr-ref-null-function-index-space-for-validation.js
A JSTests/wasm/stress/resources/init-expr-ref-null-function-index-space-for-validation.wasm
M Source/JavaScriptCore/wasm/WasmSectionParser.cpp
Log Message:
-----------
Cherry-pick 259715 at main (ffba415d759f). rdar://104911237
[JSC] ref.func in init-expr should be validated with function-index-space
https://bugs.webkit.org/show_bug.cgi?id=251542
rdar://104911237
Reviewed by Mark Lam.
Use functionIndexSpaceSize for validation for ref.func in init-expr, since ref.func takes functionIndexSpace.
Note that functionIndexSpaceSize is always larger than functionIndex's size. We were wrongly rejecting valid
ref.func via validation.
* JSTests/wasm/stress/init-expr-ref-null-function-index-space-for-validation.js: Added.
(shouldBe):
(async let):
* JSTests/wasm/stress/resources/init-expr-ref-null-function-index-space-for-validation.wasm: Added.
* Source/JavaScriptCore/wasm/WasmSectionParser.cpp:
(JSC::Wasm::SectionParser::parseInitExpr):
Canonical link: https://commits.webkit.org/259715@main
Canonical link: https://commits.webkit.org/259548.73@safari-7615-branch
Commit: 25cddfa8233595e8b0a670ca7b69d13ce60e4747
https://github.com/WebKit/WebKit/commit/25cddfa8233595e8b0a670ca7b69d13ce60e4747
Author: Chirag M Shah <chirag_m_shah at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
A LayoutTests/mathml/mathml-mover-layout-crash-expected.txt
A LayoutTests/mathml/mathml-mover-layout-crash.html
M LayoutTests/platform/glib/imported/w3c/web-platform-tests/mathml/relations/html5-tree/dynamic-childlist-002-expected.txt
M LayoutTests/platform/mac-wk2/TestExpectations
M Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp
Log Message:
-----------
Fix layout for positioned children for RenderMathMLUnderOver
rdar://105071050
Reviewed by Alan Baradlay.
Before this change, the layout method in RenderMathMLUnderOver (<mover>) never
added positioned elements to the map for their container, which meant if
the positioned children are dirty, their layout will never be triggered.
This change fixes that by looking at direct children of
RenderMathMLUnderOver and adding them to their container's positioned
elements map, so that their layout happens as expected.
* LayoutTests/mathml/mathml-mover-layout-crash-expected.txt: Added.
* LayoutTests/mathml/mathml-mover-layout-crash.html: Added.
* Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp:
(WebCore::RenderMathMLUnderOver::layoutBlock):
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/mathml/relations/html5-tree/dynamic-childlist-002-expected.txt:
* LayoutTests/platform/mac-wk2/TestExpectations:
Canonical link: https://commits.webkit.org/259548.74@safari-7615-branch
Commit: 22b0e73428bb4dbe8f4cb4fbc1b45e1016433178
https://github.com/WebKit/WebKit/commit/22b0e73428bb4dbe8f4cb4fbc1b45e1016433178
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebCore/page/scrolling/ScrollingTree.cpp
M Source/WebCore/page/scrolling/ScrollingTree.h
M Source/WebCore/page/scrolling/ScrollingTreeFixedNode.cpp
M Source/WebCore/page/scrolling/ScrollingTreeFixedNode.h
M Source/WebCore/page/scrolling/ScrollingTreeFrameHostingNode.cpp
M Source/WebCore/page/scrolling/ScrollingTreeFrameHostingNode.h
M Source/WebCore/page/scrolling/ScrollingTreeFrameScrollingNode.cpp
M Source/WebCore/page/scrolling/ScrollingTreeFrameScrollingNode.h
M Source/WebCore/page/scrolling/ScrollingTreeNode.h
M Source/WebCore/page/scrolling/ScrollingTreeOverflowScrollProxyNode.cpp
M Source/WebCore/page/scrolling/ScrollingTreeOverflowScrollProxyNode.h
M Source/WebCore/page/scrolling/ScrollingTreePositionedNode.cpp
M Source/WebCore/page/scrolling/ScrollingTreePositionedNode.h
M Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp
M Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h
M Source/WebCore/page/scrolling/ScrollingTreeStickyNode.cpp
M Source/WebCore/page/scrolling/ScrollingTreeStickyNode.h
M Source/WebCore/page/scrolling/cocoa/ScrollingTreeFixedNodeCocoa.h
M Source/WebCore/page/scrolling/cocoa/ScrollingTreeFixedNodeCocoa.mm
M Source/WebCore/page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNodeCocoa.h
M Source/WebCore/page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNodeCocoa.mm
M Source/WebCore/page/scrolling/cocoa/ScrollingTreePositionedNodeCocoa.h
M Source/WebCore/page/scrolling/cocoa/ScrollingTreePositionedNodeCocoa.mm
M Source/WebCore/page/scrolling/cocoa/ScrollingTreeStickyNodeCocoa.h
M Source/WebCore/page/scrolling/cocoa/ScrollingTreeStickyNodeCocoa.mm
M Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h
M Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm
M Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h
M Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm
M Source/WebCore/page/scrolling/nicosia/ScrollingTreeFixedNodeNicosia.cpp
M Source/WebCore/page/scrolling/nicosia/ScrollingTreeFixedNodeNicosia.h
M Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp
M Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h
M Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNodeNicosia.cpp
M Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNodeNicosia.h
M Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp
M Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h
M Source/WebCore/page/scrolling/nicosia/ScrollingTreePositionedNodeNicosia.cpp
M Source/WebCore/page/scrolling/nicosia/ScrollingTreePositionedNodeNicosia.h
M Source/WebCore/page/scrolling/nicosia/ScrollingTreeStickyNodeNicosia.cpp
M Source/WebCore/page/scrolling/nicosia/ScrollingTreeStickyNodeNicosia.h
M Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp
M Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.h
M Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm
M Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.h
M Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm
M Source/WebKit/UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.cpp
M Source/WebKit/UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.h
M Source/WebKit/UIProcess/RemoteLayerTree/mac/ScrollingTreeOverflowScrollingNodeRemoteMac.cpp
M Source/WebKit/UIProcess/RemoteLayerTree/mac/ScrollingTreeOverflowScrollingNodeRemoteMac.h
Log Message:
-----------
[CoreIPC] Type confusion bug in ScrollingTree::updateTreeFromStateNodeRecursive
https://bugs.webkit.org/show_bug.cgi?id=251969
rdar://102603165
Reviewed by Ryosuke Niwa.
Make sure we type-check before all the downcast<> calls in code under scrolling tree commits.
If a type-check fails, MESSAGE_CHECK in RemoteScrollingCoordinatorProxy::commitScrollingTree().
commitStateBeforeChildren() and commitStateAfterChildren() on all the scrolling tree node classes
now return bool, indicating success or failure.
* Source/WebCore/page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::commitTreeState):
(WebCore::ScrollingTree::updateTreeFromStateNodeRecursive):
* Source/WebCore/page/scrolling/ScrollingTree.h:
* Source/WebCore/page/scrolling/ScrollingTreeFixedNode.cpp:
(WebCore::ScrollingTreeFixedNode::commitStateBeforeChildren):
* Source/WebCore/page/scrolling/ScrollingTreeFixedNode.h:
* Source/WebCore/page/scrolling/ScrollingTreeFrameHostingNode.cpp:
(WebCore::ScrollingTreeFrameHostingNode::commitStateBeforeChildren):
* Source/WebCore/page/scrolling/ScrollingTreeFrameHostingNode.h:
* Source/WebCore/page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
(WebCore::ScrollingTreeFrameScrollingNode::commitStateBeforeChildren):
* Source/WebCore/page/scrolling/ScrollingTreeFrameScrollingNode.h:
* Source/WebCore/page/scrolling/ScrollingTreeNode.h:
(WebCore::ScrollingTreeNode::commitStateAfterChildren):
* Source/WebCore/page/scrolling/ScrollingTreeOverflowScrollProxyNode.cpp:
(WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
* Source/WebCore/page/scrolling/ScrollingTreeOverflowScrollProxyNode.h:
* Source/WebCore/page/scrolling/ScrollingTreePositionedNode.cpp:
(WebCore::ScrollingTreePositionedNode::commitStateBeforeChildren):
* Source/WebCore/page/scrolling/ScrollingTreePositionedNode.h:
* Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeScrollingNode::commitStateAfterChildren):
* Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h:
* Source/WebCore/page/scrolling/ScrollingTreeStickyNode.cpp:
(WebCore::ScrollingTreeStickyNode::commitStateBeforeChildren):
* Source/WebCore/page/scrolling/ScrollingTreeStickyNode.h:
* Source/WebCore/page/scrolling/cocoa/ScrollingTreeFixedNodeCocoa.h:
* Source/WebCore/page/scrolling/cocoa/ScrollingTreeFixedNodeCocoa.mm:
(WebCore::ScrollingTreeFixedNodeCocoa::commitStateBeforeChildren):
* Source/WebCore/page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNodeCocoa.h:
* Source/WebCore/page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNodeCocoa.mm:
(WebCore::ScrollingTreeOverflowScrollProxyNodeCocoa::commitStateBeforeChildren):
* Source/WebCore/page/scrolling/cocoa/ScrollingTreePositionedNodeCocoa.h:
* Source/WebCore/page/scrolling/cocoa/ScrollingTreePositionedNodeCocoa.mm:
(WebCore::ScrollingTreePositionedNodeCocoa::commitStateBeforeChildren):
* Source/WebCore/page/scrolling/cocoa/ScrollingTreeStickyNodeCocoa.h:
* Source/WebCore/page/scrolling/cocoa/ScrollingTreeStickyNodeCocoa.mm:
(WebCore::ScrollingTreeStickyNodeCocoa::commitStateBeforeChildren):
* Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateAfterChildren):
* Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h:
* Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
(WebCore::ScrollingTreeOverflowScrollingNodeMac::commitStateBeforeChildren):
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeFixedNodeNicosia.cpp:
(WebCore::ScrollingTreeFixedNodeNicosia::commitStateBeforeChildren):
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeFixedNodeNicosia.h:
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:
(WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateBeforeChildren):
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h:
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNodeNicosia.cpp:
(WebCore::ScrollingTreeOverflowScrollProxyNodeNicosia::commitStateBeforeChildren):
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNodeNicosia.h:
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:
(WebCore::ScrollingTreeOverflowScrollingNodeNicosia::commitStateBeforeChildren):
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h:
* Source/WebCore/page/scrolling/nicosia/ScrollingTreePositionedNodeNicosia.cpp:
(WebCore::ScrollingTreePositionedNodeNicosia::commitStateBeforeChildren):
* Source/WebCore/page/scrolling/nicosia/ScrollingTreePositionedNodeNicosia.h:
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeStickyNodeNicosia.cpp:
(WebCore::ScrollingTreeStickyNodeNicosia::commitStateBeforeChildren):
* Source/WebCore/page/scrolling/nicosia/ScrollingTreeStickyNodeNicosia.h:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::commitScrollingTreeState):
* Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.h:
* Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateBeforeChildren):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateAfterChildren):
* Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
* Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateBeforeChildren):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateAfterChildren):
* Source/WebKit/UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.cpp:
(WebKit::ScrollingTreeFrameScrollingNodeRemoteMac::commitStateBeforeChildren):
* Source/WebKit/UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.h:
* Source/WebKit/UIProcess/RemoteLayerTree/mac/ScrollingTreeOverflowScrollingNodeRemoteMac.cpp:
(WebKit::ScrollingTreeOverflowScrollingNodeRemoteMac::commitStateBeforeChildren):
* Source/WebKit/UIProcess/RemoteLayerTree/mac/ScrollingTreeOverflowScrollingNodeRemoteMac.h:
Canonical link: https://commits.webkit.org/259548.75@safari-7615-branch
Commit: d89aa236414e79a601e75bcbbfc6bec82dbedb02
https://github.com/WebKit/WebKit/commit/d89aa236414e79a601e75bcbbfc6bec82dbedb02
Author: Justin Michaud <justin at justinmichaud.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
A JSTests/wasm/stress/simd-import-global-2.js
M Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
M Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp
M Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
M Source/JavaScriptCore/wasm/WasmGlobal.h
M Source/JavaScriptCore/wasm/js/JSWebAssemblyArray.h
M Source/JavaScriptCore/wasm/js/JSWebAssemblyGlobal.cpp
M Source/JavaScriptCore/wasm/js/JSWebAssemblyHelpers.h
M Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp
M Source/JavaScriptCore/wasm/js/WebAssemblyGlobalConstructor.cpp
M Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp
Log Message:
-----------
Cherry-pick 259791 at main (18a076e402b4). rdar://104745582
Importing an exported v128 global should be possible
https://bugs.webkit.org/show_bug.cgi?id=251551
rdar://104745582
Reviewed by Mark Lam.
We missed a case here, let's just fix it.
* JSTests/wasm/stress/simd-import-global-2.js: Added.
(from.string_appeared_here.import.as.assert.from.string_appeared_here.async test):
* Source/JavaScriptCore/wasm/WasmGlobal.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::initializeImports):
Canonical link: https://commits.webkit.org/259791@main
Canonical link: https://commits.webkit.org/259548.76@safari-7615-branch
Commit: d832dc8e0b666dba8abca591c9defcbb74448f94
https://github.com/WebKit/WebKit/commit/d832dc8e0b666dba8abca591c9defcbb74448f94
Author: Patrick Angle <pangle at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm
Log Message:
-----------
Cherry-pick 260110 at main (364e72b3d3f5). rdar://105218538
WebDriver: Regression(STP 163) Many keyboard-related WPT tests fail/error
https://bugs.webkit.org/show_bug.cgi?id=251957
rdar://105218538
Reviewed by Ryosuke Niwa and Chris Dumez.
Correct local variables to be initialized to nil since not all paths may do so.
* Source/WebKit/UIProcess/Automation/mac/WebAutomationSessionMac.mm:
(WebKit::WebAutomationSession::platformSimulateKeyboardInteraction):
Canonical link: https://commits.webkit.org/260110@main
Canonical link: https://commits.webkit.org/259548.77@safari-7615-branch
Commit: a4202f6cb63a6b4675a7ae6d54aba422c33625a5
https://github.com/WebKit/WebKit/commit/a4202f6cb63a6b4675a7ae6d54aba422c33625a5
Author: Russell Epstein <repstein at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/registered-properties-inheritance-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/registered-properties-inheritance.html
M Source/WebCore/style/StyleBuilderCustom.h
Log Message:
-----------
Cherry-pick 06e3540a49d. rdar://problem/104998661
[css-properties-values-api] non-inherited custom property fails to inherit from parent when "inherit" is set
https://bugs.webkit.org/show_bug.cgi?id=251590
Reviewed by Antti Koivisto.
We would only look at the map of inherited custom properties when applying the "inherit" value
for a custom property. However, a non-inherited value should also use its parent's value in that
case.
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/registered-properties-inheritance-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/registered-properties-inheritance.html:
* Source/WebCore/style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyInheritCustomProperty):
Canonical link: https://commits.webkit.org/259809@main
Canonical link: https://commits.webkit.org/259548.78@safari-7615-branch
Commit: 3d5c2f229370db717290f2fc8b1b3d5ba35a4cb2
https://github.com/WebKit/WebKit/commit/3d5c2f229370db717290f2fc8b1b3d5ba35a4cb2
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
A JSTests/wasm/stress/only-referenced.js
A JSTests/wasm/stress/resources/only-referenced.wasm
M Source/JavaScriptCore/wasm/WasmBBQPlan.cpp
M Source/JavaScriptCore/wasm/WasmLLIntPlan.cpp
M Source/JavaScriptCore/wasm/WasmModuleInformation.h
M Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp
Log Message:
-----------
Cherry-pick 259702 at main (63e3817996f2). rdar://104912723
[JSC] Referenced function is functionIndexSpace
https://bugs.webkit.org/show_bug.cgi?id=251522
rdar://104912723
Reviewed by Tadeu Zagallo.
Wasm Referenced functions are managed via functionIndexSpace, but we are querying to it via functionIndex, which is wrong.
This patch fixes it.
* JSTests/wasm/stress/only-referenced.js: Added.
(async let):
* JSTests/wasm/stress/resources/only-referenced.wasm: Added.
* Source/JavaScriptCore/wasm/WasmBBQPlan.cpp:
(JSC::Wasm::BBQPlan::compileFunction):
* Source/JavaScriptCore/wasm/WasmLLIntPlan.cpp:
(JSC::Wasm::LLIntPlan::didCompleteCompilation):
* Source/JavaScriptCore/wasm/WasmModuleInformation.h:
(JSC::Wasm::ModuleInformation::hasReferencedFunction const):
(JSC::Wasm::ModuleInformation::addReferencedFunction const):
(JSC::Wasm::ModuleInformation::callCanClobberInstance const):
(JSC::Wasm::ModuleInformation::addClobberingTailCall):
* Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::initializeExports):
Canonical link: https://commits.webkit.org/259702@main
Canonical link: https://commits.webkit.org/259548.79@safari-7615-branch
Commit: fe14d02703d243cbc9ea863ed3cbc7ca18a56fef
https://github.com/WebKit/WebKit/commit/fe14d02703d243cbc9ea863ed3cbc7ca18a56fef
Author: Kimmo Kinnunen <kkinnunen at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebKit/Platform/IPC/cocoa/ConnectionCocoa.mm
M Tools/TestWebKitAPI/Tests/IPC/ConnectionTests.cpp
Log Message:
-----------
Cherry-pick e11ee9df88e6. rdar://problem/104576815
[ iOS Debug ] fast/loader/crash-replacing-location-before-load.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=251047
rdar://104576815
Reviewed by Matt Woodrow.
New connections for, say remote rendering backend, are sent through
WP -> GPUP main connection.
The new connection might be closed before the receiver receives it.
In this case, on Cocoa, the underlying connection Mach send right is
read from the kernel as MACH_PORT_DEAD during Mach message receipt.
Consider sequence:
... Runloop processing
A
Decode a message
B
Create connection from the port inside the message
C
... Runloop processing
For IPC::Connection programming model, there is no difference
whether the sender closes the port at A, B or C. Make A behave
identical to already working B and C, e.g. deliver normal "connection
did close" signal.
Treat PORT_DEAD as a valid IPC::Connection client send right.
Construct the receive port as usual, but do not send the server
send right anywhere, as it cannot be sent to DEAD port. When the server
send right is destroyed, the receive port is notified that the sender
went away. This is obtains the common codepath for connection operation
for dead names.
* Source/WebKit/Platform/IPC/cocoa/ConnectionCocoa.mm:
(IPC::Connection::platformInvalidate):
(IPC::Connection::cancelSendSource):
(IPC::Connection::platformInitialize):
(IPC::Connection::platformOpen):
(IPC::Connection::sendOutgoingMessage):
(IPC::Connection::initializeSendSource):
* Tools/TestWebKitAPI/Tests/IPC/ConnectionTests.cpp:
(TestWebKitAPI::MockTestMessageWithConnection::name):
(TestWebKitAPI::MockTestMessageWithConnection::arguments):
(TestWebKitAPI::MockTestMessageWithConnection::MockTestMessageWithConnection):
(TestWebKitAPI::TEST_P):
Canonical link: https://commits.webkit.org/259582@main
Canonical link: https://commits.webkit.org/259548.80@safari-7615-branch
Commit: 73e157607b8a9fbaec0856bd5db6a4623768b018
https://github.com/WebKit/WebKit/commit/73e157607b8a9fbaec0856bd5db6a4623768b018
Author: Antoine Quint <graouts at webkit.org>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebCore/platform/animation/TimingFunction.h
Log Message:
-----------
Cherry-pick 8f690bd4d728. rdar://problem/104822225
imported/w3c/web-platform-tests/css/css-transitions/parsing/transition-timing-function-computed.html crashes (libc++ assertions)
https://bugs.webkit.org/show_bug.cgi?id=251352
Reviewed by Antti Koivisto and Chris Dumez.
We have a `m_stepPosition == otherSteps.m_stepPosition` check in TimingFunction::operator==(const TimingFunction&) which would
catch the case where both m_stepPosition and otherSteps.m_stepPosition, which are std::optional<>, would not hold a value.
However, we would hit a recently-enabled libc++ assertion (see bug 245692) because of the check
`*m_stepPosition == StepPosition::End && !otherSteps.m_stepPosition`. Indeed, it is possible for otherSteps.m_stepPosition to
hold a value while m_stepPosition does not.
We simply reverse the two clauses such that we test `!otherSteps.m_stepPosition` first since we already know from earlier
that `otherSteps.m_stepPosition` and `m_stepPosition` cannot both not hold a value.
* Source/WebCore/platform/animation/TimingFunction.h:
Canonical link: https://commits.webkit.org/259559@main
Canonical link: https://commits.webkit.org/259548.81@safari-7615-branch
Commit: 01bbe60340bcc77ae3d9abfa812cd3cd2729cce0
https://github.com/WebKit/WebKit/commit/01bbe60340bcc77ae3d9abfa812cd3cd2729cce0
Author: Ben Nham <nham at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebCore/Modules/push-api/PushDatabase.cpp
Log Message:
-----------
Cherry-pick b97e13eff45f. rdar://problem/104806715
Exclude PushDatabase from backup
https://bugs.webkit.org/show_bug.cgi?id=251343
rdar://104806715
Reviewed by Youenn Fablet.
We should avoid backing up the web push database since it contains state like endpoints and keys
that shouldn't be shared across devices.
We do this at migration time to avoid calling setExcludedFromBackup on every DB open operation.
* Source/WebCore/Modules/push-api/PushDatabase.cpp:
(WebCore::openAndMigrateDatabaseImpl):
Canonical link: https://commits.webkit.org/259563@main
Canonical link: https://commits.webkit.org/259548.82@safari-7615-branch
Commit: 25836573b8c16c8dad31fc5bf72bcfb2b9e08f21
https://github.com/WebKit/WebKit/commit/25836573b8c16c8dad31fc5bf72bcfb2b9e08f21
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/JavaScriptCore/wasm/WasmBBQPlan.cpp
M Source/JavaScriptCore/wasm/WasmOMGPlan.cpp
Log Message:
-----------
Cherry-pick 93f3d4272ced. rdar://problem/104795248
[JSC] Fix recursive call's wasm repatch
https://bugs.webkit.org/show_bug.cgi?id=251333
rdar://104795248
Reviewed by Tadeu Zagallo.
We had a long-standing bug that we failed to repatch the recursive self-calls.
This is because,
1. We first repatch our calls of BBQ / OMG callee. This will get entrypoint from CalleeGroup. But for the self call, this will get old one.
So, we repatch with that.
2. Old Plan::.updateCallsitesToCallUs iterated all callees. But at that time, this newly created callee is not registered yet, so this does
not update the (1)'s callsites.
3. Now, registers this new callee. So (1)'s callsites still point to the old callee's code for recursive calls.
But fortunately, we now factor out these iteration code etc. to CallsiteCollection. And we can easily register (1)'s callee to the repatch
target by just calling addCallsites before calling updateCallsitesToCallUs. This patch just does it.
* Source/JavaScriptCore/wasm/WasmBBQPlan.cpp:
(JSC::Wasm::BBQPlan::work):
* Source/JavaScriptCore/wasm/WasmOMGPlan.cpp:
(JSC::Wasm::OMGPlan::work):
Canonical link: https://commits.webkit.org/259568@main
Canonical link: https://commits.webkit.org/259548.83@safari-7615-branch
Commit: a22ed374bc31d41389610030c4ccfbddc6a7eb5c
https://github.com/WebKit/WebKit/commit/a22ed374bc31d41389610030c4ccfbddc6a7eb5c
Author: Przemyslaw Gorszkowski <pgorszkowski at igalia.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebKit/NetworkProcess/storage/SQLiteStorageArea.cpp
Log Message:
-----------
Cherry-pick b69cf1887dfb. rdar://problem/103416260
Remove item from cache of SQLiteStorageArea
https://bugs.webkit.org/show_bug.cgi?id=250559
Reviewed by Sihui Liu.
When Storage.removeItem method from Storage API is called,
the cached value in SQLiteStorageArea should be also removed.
It prevents increase the memory usage by network process.
* Source/WebKit/NetworkProcess/storage/SQLiteStorageArea.cpp:
(WebKit::SQLiteStorageArea::removeItem):
Canonical link: https://commits.webkit.org/259570@main
Canonical link: https://commits.webkit.org/259548.84@safari-7615-branch
Commit: 5c6d3164370bd83fbab7adc904b8e0097bc0b332
https://github.com/WebKit/WebKit/commit/5c6d3164370bd83fbab7adc904b8e0097bc0b332
Author: Darin Adler <darin at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebCore/inspector/InspectorCanvas.cpp
M Source/WebCore/inspector/InspectorCanvas.h
M Source/WebCore/inspector/InspectorShaderProgram.cpp
M Source/WebCore/inspector/InspectorShaderProgram.h
M Source/WebCore/inspector/agents/InspectorCanvasAgent.cpp
M Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm
M Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
M Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
Log Message:
-----------
Cherry-pick 37f282e65d2e. rdar://problem/104809022
Unnecessarily using std::variant and std::monostate when we could just use nullptr instead
https://bugs.webkit.org/show_bug.cgi?id=251346
rdar://problem/104809022
Reviewed by Patrick Angle.
Using std::variant, std::reference_wrapper, and std::monostate is like a pointer, but less
efficient. Using std::optional and std::reference_wrapper is the same. Found places in our
code where we did that and removed them. Also updated one place that used std::reference_wrapper
where a reference would work just as well.
* Source/WebCore/inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::canvasContext const): Moved to the header since it's now trivial.
(WebCore::InspectorCanvas::canvasElement const): Removed the switchOn since m_context is now
a reference rather than a variant.
(WebCore::InspectorCanvas::scriptExecutionContext const): Ditto.
(WebCore::InspectorCanvas::resolveContext const): Ditto.
(WebCore::InspectorCanvas::clientNodes const): Ditto.
(WebCore::InspectorCanvas::canvasChanged): Ditto.
(WebCore::InspectorCanvas::resetRecordingData): Ditto.
(WebCore::InspectorCanvas::recordAction): Ditto.
(WebCore::InspectorCanvas::buildObjectForCanvas): Ditto.
(WebCore::InspectorCanvas::releaseObjectForRecording): Ditto.
(WebCore::InspectorCanvas::buildInitialState): Ditto.
* Source/WebCore/inspector/InspectorCanvas.h: Removed some unneded includes. Use
CanvasRenderingContext& for m_context.
* Source/WebCore/inspector/InspectorShaderProgram.cpp: Removed redundant checks of
(WebCore::InspectorShaderProgram::program const): Moved to the header since it's now
trivial.
(WebCore::InspectorShaderProgram::requestShaderSource): Removed the switchOn since m_program
is now a reference rather than a variant. Also changed to use early return, WebKit style.
(WebCore::InspectorShaderProgram::updateShader): Ditto.
(WebCore::InspectorShaderProgram::buildObjectForShaderProgram): Removed the code that looked
at m_program entirely, since it did't do anything.
* Source/WebCore/inspector/InspectorShaderProgram.h: Removed redundant checks of
m_program.
* Source/WebCore/inspector/agents/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::startRecording): Updated since InspectorCanvas::canvasContext
now returns a reference.
(WebCore::InspectorCanvasAgent::stopRecording): Ditto.
(WebCore::InspectorCanvasAgent::recordAction): Ditto.
(WebCore::InspectorCanvasAgent::reset): Ditto.
(WebCore::InspectorCanvasAgent::unbindCanvas): Ditto.
(WebCore::InspectorCanvasAgent::findInspectorCanvas): Ditto.
(WebCore::InspectorCanvasAgent::findInspectorProgram): Updated since
InspectorShaderProgram::program now returns a reference.
* Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::managedDomainsIfInitialized): Return a pointer.
* Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::forwardManagedDomainsToITPIfInitialized): Updated since
managedDomainsIfInitialized now returns a pointer.
* Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h: Updated.
Canonical link: https://commits.webkit.org/259572@main
Canonical link: https://commits.webkit.org/259548.85@safari-7615-branch
Commit: 8ee3962b5b97ace7b10b77e426b853ae7495eb15
https://github.com/WebKit/WebKit/commit/8ee3962b5b97ace7b10b77e426b853ae7495eb15
Author: Patrick Angle <pangle at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebKit/UIProcess/Automation/ios/WebAutomationSessionIOS.mm
M Source/WebKit/UIProcess/_WKTouchEventGenerator.h
M Source/WebKit/UIProcess/_WKTouchEventGenerator.mm
Log Message:
-----------
Cherry-pick a670e7900b4a. rdar://problem/102439701
WebDriver: [iPadOS] Synthetic tap events are not dispatched to the window
https://bugs.webkit.org/show_bug.cgi?id=251299
rdar://102439701
Reviewed by BJ Burg.
On iPadOS, the UIApplication.sharedApplication.keyWindow does not take Scenes into account, and can therefore result in
unexpected behavior when used to determine the frontmost window, namely that the returned window may not even be visible
on screen, but instead might be the "key" window from another Scene that the application has. This causes us to be
unable to get the `contextId` of the correct window, which means touch events were not being dispatched to the window
under automation. Instead of relying on the window under automation being implicitly the key window, clients should
instead provide the window in which they expect an event to take place so that _WKTouchEventGenerator can use that
window's `contextId` for created events, ensuring they are dispatched to the correct window.
iOS was unaffected because Safari does not spawn multiple scenes on that platform, which means the key window was
already accurate for that platform.
* Source/WebKit/UIProcess/Automation/ios/WebAutomationSessionIOS.mm:
- Provide the window that is the target for the touch events.
(WebKit::WebAutomationSession::platformSimulateTouchInteraction):
* Source/WebKit/UIProcess/_WKTouchEventGenerator.h:
* Source/WebKit/UIProcess/_WKTouchEventGenerator.mm:
(-[_WKTouchEventGenerator _sendHIDEvent:window:]):
(-[_WKTouchEventGenerator _sendMarkerHIDEventInWindow:completionBlock:]):
- Get the `contextId` from the provided window, instead of always using the `keyWindow`.
(-[_WKTouchEventGenerator _updateTouchPoints:count:window:]):
(-[_WKTouchEventGenerator touchDownAtPoints:touchCount:window:]):
(-[_WKTouchEventGenerator touchDown:touchCount:window:]):
(-[_WKTouchEventGenerator liftUpAtPoints:touchCount:window:]):
(-[_WKTouchEventGenerator liftUp:touchCount:window:]):
(-[_WKTouchEventGenerator moveToPoints:touchCount:duration:window:]):
(-[_WKTouchEventGenerator touchDown:window:completionBlock:]):
(-[_WKTouchEventGenerator liftUp:window:completionBlock:]):
(-[_WKTouchEventGenerator moveToPoint:duration:window:completionBlock:]):
- Plumb the window through.
(-[_WKTouchEventGenerator touchDown:]): Deleted.
(-[_WKTouchEventGenerator liftUp:]): Deleted.
- Remove unused methods.
Canonical link: https://commits.webkit.org/259576@main
Canonical link: https://commits.webkit.org/259548.86@safari-7615-branch
Commit: cd8feca07bf24e28da4cc0c673db6794cb5f3b19
https://github.com/WebKit/WebKit/commit/cd8feca07bf24e28da4cc0c673db6794cb5f3b19
Author: Alexey Shvayka <ashvayka at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebCore/html/HTMLFieldSetElement.cpp
Log Message:
-----------
Cherry-pick f4d8caebb352. rdar://problem/104762152
REGRESSION(259372 at main): ASSERTION FAILED: !m_disabledFieldsetElementsCount on fast/forms/fieldset/fieldset-elements.html
https://bugs.webkit.org/show_bug.cgi?id=251296
Reviewed by Ryosuke Niwa.
With this change, addDisabledFieldsetElement() / removeDisabledFieldsetElement() are called
only when "disabled" attribute is added or removed, ignoring cases when its value is changed,
fixing Document::m_disabledFieldsetElementsCount to be always correct.
* Source/WebCore/html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::parseAttribute):
Canonical link: https://commits.webkit.org/259580@main
Canonical link: https://commits.webkit.org/259548.87@safari-7615-branch
Commit: e6b3e520f96cd7237919d015dc6a61d1af844c99
https://github.com/WebKit/WebKit/commit/e6b3e520f96cd7237919d015dc6a61d1af844c99
Author: Aditya Keerthi <akeerthi at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/Icon.h
M Source/WebCore/platform/graphics/cocoa/IconCocoa.mm
M Source/WebCore/platform/graphics/mac/IconMac.mm
M Source/WebCore/rendering/RenderThemeMac.mm
M Source/WebKit/Shared/Cocoa/WebIconUtilities.h
M Source/WebKit/Shared/Cocoa/WebIconUtilities.mm
M Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
M Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm
M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClientCocoa.mm
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKitLegacy/mac/WebCoreSupport/WebOpenPanelResultListener.mm
Log Message:
-----------
Cherry-pick bf1b77633553. rdar://problem/103533427
REGRESSION (255355 at main): HTML Notes: Attachment thumbnails are low resolution
https://bugs.webkit.org/show_bug.cgi?id=251293
rdar://103533427
Reviewed by Wenson Hsieh.
In the process of supporting thumbnails for <input type=file> on macOS,
255355 at main refactored `Icon` logic to share code between Cocoa platforms.
Prior to 255355 at main, `Icon` was backed by `NSImage` on macOS, and `CGImageRef`
on other platforms. Following the change, `Icon` was backed by `CGImageRef` on
all platforms. To make this possible, `NSImage`s were converted to `CGImageRef`s
using `-[NSImage CGImageForProposedRect:context:hints]`, using a `nil` proposed
rect. This approach is problematic, as `NSImage`s are resolution-independent,
whereas `CGImageRef`s are not.
The `NSWorkspace` method used to get attachment thumbnails returns an `NSImage`
with multiple `NSImageRep`s. Before 255355 at main, WebKit would draw the `NSImage`
into a 400x400 bitmap. Now, the `NSImage` is first converted into a `CGImageRef`,
defaulting to the smallest supported representation of 32x32. That image is then
drawn into a 400x400 bitmap, resulting in low resolution.
To fix, store images in `Icon` as `NSImage`/`UIImage` and only resolve them to
`CGImageRef` when it is time to paint them. An alternate solution would be to
pass in the proposed size through multiple layers, so that
`-[NSImage CGImageForProposedRect:context:hints]` could be called with the
correct rect following the retrieval of the image from `NSWorkspace`.
However, the approach in this patch was chosen since it reduces the amount of
plumbing required, avoids conversion to `UIImage` in multiple locations in
existing iOS code, and gives clients of `Icon` more control over how they want
to present the image.
Additionally, this change removes deprecated "flippedness" logic for images.
Attachment thumbnails unnecessarily modify the "flippedness" of the image in
the UIProcess, only to undo the effect in the WebProcess. <input type=file>
thumbnails already do the right thing. It does not make sense to reintroduce the
concept of "flippedness" to `Icon` (as was the case before 255355 at main), since
it would break <input type=file> thumbnails and directory attachment thumbnails
(which have their own flipping logic, separate from files). Instead, the code
is refactored to ignore the concept of "flippedness" entirely, which AppKit
deprecated for images in macOS 10.6.
* Source/WebCore/platform/graphics/Icon.h:
(WebCore::Icon::image const):
* Source/WebCore/platform/graphics/cocoa/IconCocoa.mm:
(WebCore::Icon::Icon):
(WebCore::Icon::create):
(WebCore::Icon::paint):
(WebCore::Icon::createIconForImage): Deleted.
* Source/WebCore/platform/graphics/mac/IconMac.mm:
(WebCore::Icon::createIconForFiles):
(WebCore::Icon::createIconForFileExtension):
(WebCore::Icon::createIconForUTI):
* Source/WebCore/rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::iconForAttachment):
Flipping the icon is no longer necessary, as the icon is drawn to a bitmap
context with a top-left origin in the UIProcess, and using a top-left origin in
the WebProcess.
(WebCore::paintAttachmentIcon):
Use the default origin, as attachment icons are no longer being flipped.
* Source/WebKit/Shared/Cocoa/WebIconUtilities.h:
* Source/WebKit/Shared/Cocoa/WebIconUtilities.mm:
(WebKit::thumbnailSizedImageForImage):
(WebKit::fallbackIconForFile):
(WebKit::iconForImageFile):
(WebKit::iconForVideoFile):
(WebKit::iconForFiles):
* Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::convertPlatformImageToBitmap):
Use a simpler, equivalent AppKit method to share more code between Cocoa ports.
(WebKit::WebPageProxy::updateIconForDirectory):
Flipping the icon is no longer necessary, as the icon is drawn to a bitmap
context with a top-left origin in the UIProcess, and using a top-left origin in
the WebProcess.
* Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[_WKImageFileUploadItem displayImage]):
(-[_WKVideoFileUploadItem displayImage]):
* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClientCocoa.mm:
(WebKit::WebChromeClient::createIconForFiles):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
* Source/WebKitLegacy/mac/WebCoreSupport/WebOpenPanelResultListener.mm:
(-[WebOpenPanelResultListener chooseFilenames:displayString:iconImage:]):
Canonical link: https://commits.webkit.org/259598@main
Canonical link: https://commits.webkit.org/259548.88@safari-7615-branch
Commit: e4710bdf75dc597081724d8fa8f2a07b73f43d16
https://github.com/WebKit/WebKit/commit/e4710bdf75dc597081724d8fa8f2a07b73f43d16
Author: Patrick Angle <pangle at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebInspectorUI/UserInterface/Base/Setting.js
M Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorTokenTrackingController.js
M Source/WebInspectorUI/UserInterface/Views/CodeMirrorEditor.js
M Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js
Log Message:
-----------
Cherry-pick b79f1636634f. rdar://problem/104840214
Web Inspector: Add experimental feature to enable aggressive limits on the length of lines we let CodeMirror process/format
https://bugs.webkit.org/show_bug.cgi?id=251401
rdar://104840214
Reviewed by Devin Rousso and Justin Michaud.
In select cases, we are finding that Web Inspector is effectively unusable on some sites with many source files with
very longs lines of source code. The highlighting of very longs lines of code accounts for upwards of 30 seconds of
delay for very long lines of code. While we investigate further improvements we can make to solve this problem, we
are adding an experimental setting that enforces very low line limits for highlight, as well as for determining the
hovered token. These two changes will unblock developers encountering this issue when they enable the added experimental
setting.
* Source/WebInspectorUI/UserInterface/Base/Setting.js:
* Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
(WI.CodeMirrorTokenTrackingController.prototype._updateHoveredTokenInfo):
* Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
* Source/WebInspectorUI/UserInterface/Views/TextEditor.js:
(WI.TextEditor):
Canonical link: https://commits.webkit.org/259603@main
Canonical link: https://commits.webkit.org/259548.89@safari-7615-branch
Commit: fb6878f6b10d235a8fbe6ade8754de22cde6cd04
https://github.com/WebKit/WebKit/commit/fb6878f6b10d235a8fbe6ade8754de22cde6cd04
Author: Eric Carlson <eric.carlson at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M LayoutTests/http/tests/media/autoplay-if-audio-is-playing-expected.txt
M LayoutTests/http/tests/media/autoplay-if-audio-is-playing.html
M LayoutTests/media/media-fullscreen-inline-expected.txt
M LayoutTests/media/media-fullscreen.js
M LayoutTests/media/playlist-inherits-user-gesture.html
M LayoutTests/media/restricted-audio-playback-with-multiple-settimeouts.html
M LayoutTests/platform/glib/media/media-fullscreen-inline-expected.txt
M LayoutTests/platform/glib/media/media-fullscreen-not-in-document-expected.txt
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/FullscreenManager.cpp
M Source/WebCore/html/HTMLMediaElement.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/autoplaying-multiple-media-elements.html
Log Message:
-----------
Cherry-pick 98a09842676c. rdar://problem/103800206
Use transient activation for media playback
https://bugs.webkit.org/show_bug.cgi?id=251372
rdar://103800206
Reviewed by Jer Noble.
Allow media to play when there is an active transient activation. Require and consume
a transient activation when video fullscreen requires a user gesture.
* LayoutTests/http/tests/media/autoplay-if-audio-is-playing-expected.txt:
* LayoutTests/http/tests/media/autoplay-if-audio-is-playing.html: Update test and
results as the second video is now able to play because the first was started with
a user gesture.
* LayoutTests/media/media-fullscreen-inline-expected.txt:
* LayoutTests/media/media-fullscreen.js:
(canplaythrough): Remove now invalid portion of the test.
* LayoutTests/platform/glib/media/media-fullscreen-inline-expected.txt:
* LayoutTests/platform/glib/media/media-fullscreen-not-in-document-expected.txt:
* LayoutTests/media/playlist-inherits-user-gesture.html:
* LayoutTests/media/restricted-audio-playback-with-multiple-settimeouts.html: Decrease
transient activation time so these old tests work.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: Update test to account for
and test playing because of transient activation.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/autoplaying-multiple-media-elements.html
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::processingUserGestureForMedia const): Return true when there is an
active transient activation.
* Source/WebCore/dom/FullscreenManager.cpp:
(WebCore::FullscreenManager::requestFullscreenForElement): Drive-by logging cleanup. Log
all errors.
* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::enterFullscreen): Require and consume a transient activation
if a user gesture is required to enter fullscreen.
Canonical link: https://commits.webkit.org/259626@main
Canonical link: https://commits.webkit.org/259548.90@safari-7615-branch
Commit: 0423541065ec4aceb90656e5560afb29a921e461
https://github.com/WebKit/WebKit/commit/0423541065ec4aceb90656e5560afb29a921e461
Author: Mark Lam <mark.lam at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/JavaScriptCore/llint/LowLevelInterpreter.asm
M Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
M Source/JavaScriptCore/llint/WebAssembly.asm
Log Message:
-----------
Cherry-pick 95dcffb800f8. rdar://problem/104854843
Remove unnecessary add when loading a JSCConfig field.
https://bugs.webkit.org/show_bug.cgi?id=251421
rdar://104854843
Reviewed by Tadeu Zagallo.
Currently, to load a JSCConfig field, our LLInt asm does something like this:
```
leap JSCConfig + constexpr JSC::offsetOfJSCConfigGateMap + (constexpr Gate::%opcodeName%) * PtrSize, ws1
jmp [ws1], NativeToJITGatePtrTag # JSEntrySlowPathPtrTag
```
... and generates this:
```
#if OS(DARWIN)
".loc 1 1\n" "Ljsc_llint_loh_adrp_1508: \n" // LowLevelInterpreter.asm:1
"adrp x10, " LOCAL_REFERENCE(g_config) "@GOTPAGE \n"
"Ljsc_llint_loh_ldr_1508: \n"
"ldr x10, [x10, " LOCAL_REFERENCE(g_config) "@GOTPAGEOFF] \n"
#elif OS(LINUX)
...
#endif
".loc 1 1\n" "add x10, x10, #3592 \n" // <---- this add can be applied as an offset to the ldr below.
".loc 6 1034\n" "movz x13, #57366 \n" // WebAssembly.asm:1034
"ldr x17, [x10] \n"
"brab x17, x13 \n"
```
This patch re-arranges the LLInt assembly to look like this instead:
```
leap _g_config, ws1
jmp JSCConfigGateMapOffset + (constexpr Gate::%opcodeName%) * PtrSize[ws1], NativeToJITGatePtrTag # JSEntrySlowPathPtrTag
```
... resulting in the removal of the unnecessary add instruction:
```
#if OS(DARWIN)
".loc 1 1\n" "Ljsc_llint_loh_adrp_1508: \n" // LowLevelInterpreter.asm:1
"adrp x10, " LOCAL_REFERENCE(g_config) "@GOTPAGE \n"
"Ljsc_llint_loh_ldr_1508: \n"
"ldr x10, [x10, " LOCAL_REFERENCE(g_config) "@GOTPAGEOFF] \n"
#elif OS(LINUX)
...
#endif
".loc 6 1034\n" "movz x13, #57366 \n" // WebAssembly.asm:1034
"ldr x17, [x10, #3592] \n"
"brab x17, x13 \n"
```
* Source/JavaScriptCore/llint/LowLevelInterpreter.asm:
* Source/JavaScriptCore/llint/LowLevelInterpreter64.asm:
* Source/JavaScriptCore/llint/WebAssembly.asm:
Canonical link: https://commits.webkit.org/259629@main
Canonical link: https://commits.webkit.org/259548.91@safari-7615-branch
Commit: ff27770256c6220a138c39a10b2f11f6a88fc1c7
https://github.com/WebKit/WebKit/commit/ff27770256c6220a138c39a10b2f11f6a88fc1c7
Author: Antoine Quint <graouts at webkit.org>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebCore/animation/KeyframeEffect.cpp
Log Message:
-----------
Cherry-pick 9de2e80cf70b. rdar://problem/104869270
[web-animations] use the keyframe's StyleProperties to determine whether a property is set to "inherit" in a keyframe
https://bugs.webkit.org/show_bug.cgi?id=251432
Reviewed by Antti Koivisto.
Until now we would determine whether a property is set to "inherit" in a keyframe by doing a string
comparison when the Web Animations API is used to set keyframes. However, the StyleRuleKeyframe
created for the keyframe has StyleProperties where the value is parsed, it seems safer to check
the CSSValue rather than do a string comparison here.
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::processKeyframes):
(WebCore::KeyframeEffect::updateBlendingKeyframes):
Canonical link: https://commits.webkit.org/259630@main
Canonical link: https://commits.webkit.org/259548.92@safari-7615-branch
Commit: d3e63a829558048ea7e539b131269410c0152e5a
https://github.com/WebKit/WebKit/commit/d3e63a829558048ea7e539b131269410c0152e5a
Author: Antoine Quint <graouts at webkit.org>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
A LayoutTests/imported/w3c/web-platform-tests/css/css-animations/responsive/line-height-expected.txt
A LayoutTests/imported/w3c/web-platform-tests/css/css-animations/responsive/line-height.html
M Source/WebCore/animation/KeyframeEffect.cpp
M Source/WebCore/style/StyleResolver.cpp
M Source/WebCore/style/StyleResolver.h
Log Message:
-----------
Cherry-pick 9f095ff23eaa. rdar://problem/104869399
[css-animations] a @keyframes rule using an "inherit" value does not update the resolved value when the parent style changes
https://bugs.webkit.org/show_bug.cgi?id=251433
Reviewed by Antti Koivisto.
In the case where a @keyframes rule has one of its properties set to "inherit", we need to update
the computed keyframes in case an ancestor changes in a way that the inherited value changes.
We already have a mechanism to deal with a similar scenario when the keyframes are provided using
the Web Animations API where the m_inheritedProperties instance variable keeps track of all CSS
properties set to "inherit" in keyframes.
We now pass m_inheritedProperties to Style::Resolver::keyframeStylesForAnimation() to populate it
when a CSS Animation's keyframes are computed.
* LayoutTests/imported/w3c/web-platform-tests/css/css-animations/responsive/line-height-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-animations/responsive/line-height.html: Added.
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::computeCSSAnimationBlendingKeyframes):
* Source/WebCore/style/StyleResolver.cpp:
(WebCore::Style::Resolver::keyframeStylesForAnimation):
* Source/WebCore/style/StyleResolver.h:
Canonical link: https://commits.webkit.org/259631@main
Canonical link: https://commits.webkit.org/259548.93@safari-7615-branch
Commit: 722c923d62a50277ba7f7e4729b06905250aaa82
https://github.com/WebKit/WebKit/commit/722c923d62a50277ba7f7e4729b06905250aaa82
Author: Sihui Liu <sihui_liu at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
A LayoutTests/storage/filesystemaccess/resources/sync-access-handle-storage-limit.js
A LayoutTests/storage/filesystemaccess/sync-access-handle-storage-limit-worker-expected.txt
A LayoutTests/storage/filesystemaccess/sync-access-handle-storage-limit-worker.html
M Source/WebCore/Modules/filesystemaccess/FileSystemFileHandle.cpp
M Source/WebCore/Modules/filesystemaccess/FileSystemFileHandle.h
M Source/WebCore/Modules/filesystemaccess/FileSystemStorageConnection.h
M Source/WebCore/Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp
M Source/WebCore/Modules/filesystemaccess/FileSystemSyncAccessHandle.h
M Source/WebCore/Modules/filesystemaccess/WorkerFileSystemStorageConnection.cpp
M Source/WebCore/Modules/filesystemaccess/WorkerFileSystemStorageConnection.h
M Source/WebKit/NetworkProcess/storage/FileSystemStorageHandle.cpp
M Source/WebKit/NetworkProcess/storage/FileSystemStorageHandle.h
M Source/WebKit/NetworkProcess/storage/FileSystemStorageManager.cpp
M Source/WebKit/NetworkProcess/storage/FileSystemStorageManager.h
M Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp
M Source/WebKit/NetworkProcess/storage/NetworkStorageManager.h
M Source/WebKit/NetworkProcess/storage/NetworkStorageManager.messages.in
M Source/WebKit/NetworkProcess/storage/OriginStorageManager.cpp
M Source/WebKit/NetworkProcess/storage/OriginStorageManager.h
M Source/WebKit/Scripts/webkit/messages.py
A Source/WebKit/Shared/FileSystemSyncAccessHandleInfo.h
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Source/WebKit/WebProcess/WebCoreSupport/WebFileSystemStorageConnection.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebFileSystemStorageConnection.h
Log Message:
-----------
Cherry-pick 2706810bb38f. rdar://problem/93588782
FileSystemSyncAccessHandle::write should perform quota check
https://bugs.webkit.org/show_bug.cgi?id=250400
rdar://93588782
Reviewed by Youenn Fablet.
Implement basic quota check for FileSystemSyncAccessHandle. The general ideas are:
1. Each FileSystemSyncAccessHandle has a capacity intialized to current file size.
2. For write operation on FileSystemSyncAccessHandle, if the new size after write exceeds current capacity, it needs to
send a request to increase capacity.
3. The capacity of FileSystemSyncAccessHandle will be viewed as occupied (even if the real file size is smaller) in
origin quota computation.
4. FileSystem data shares origin quota with IndexedDB and CacheStorage.
* LayoutTests/storage/filesystemaccess/resources/sync-access-handle-storage-limit.js: Added.
(async test):
* LayoutTests/storage/filesystemaccess/sync-access-handle-storage-limit-worker-expected.txt: Added.
* LayoutTests/storage/filesystemaccess/sync-access-handle-storage-limit-worker.html: Added.
* Source/WebCore/Modules/filesystemaccess/FileSystemFileHandle.cpp:
(WebCore::FileSystemFileHandle::createSyncAccessHandle):
(WebCore::FileSystemFileHandle::requestNewCapacityForSyncAccessHandle):
* Source/WebCore/Modules/filesystemaccess/FileSystemFileHandle.h:
* Source/WebCore/Modules/filesystemaccess/FileSystemStorageConnection.h:
(WebCore::FileSystemStorageConnection::SyncAccessHandleInfo::isolatedCopy):
* Source/WebCore/Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp:
(WebCore::FileSystemSyncAccessHandle::create):
(WebCore::FileSystemSyncAccessHandle::FileSystemSyncAccessHandle):
(WebCore::FileSystemSyncAccessHandle::write):
(WebCore::FileSystemSyncAccessHandle::requestSpaceForWrite):
* Source/WebCore/Modules/filesystemaccess/FileSystemSyncAccessHandle.h:
* Source/WebCore/Modules/filesystemaccess/WorkerFileSystemStorageConnection.cpp:
(WebCore::WorkerFileSystemStorageConnection::didCreateSyncAccessHandle):
(WebCore::WorkerFileSystemStorageConnection::requestNewCapacityForSyncAccessHandle):
* Source/WebCore/Modules/filesystemaccess/WorkerFileSystemStorageConnection.h:
* Source/WebKit/NetworkProcess/storage/FileSystemStorageHandle.cpp:
(WebKit::FileSystemStorageHandle::close):
(WebKit::FileSystemStorageHandle::createSyncAccessHandle):
(WebKit::FileSystemStorageHandle::closeSyncAccessHandle):
(WebKit::FileSystemStorageHandle::activeSyncAccessHandle):
(WebKit::FileSystemStorageHandle::isActiveSyncAccessHandle):
(WebKit::FileSystemStorageHandle::allocatedUnusedCapacity):
(WebKit::FileSystemStorageHandle::requestNewCapacityForSyncAccessHandle):
* Source/WebKit/NetworkProcess/storage/FileSystemStorageHandle.h:
(WebKit::FileSystemStorageHandle::activeSyncAccessHandle const): Deleted.
* Source/WebKit/NetworkProcess/storage/FileSystemStorageManager.cpp:
(WebKit::FileSystemStorageManager::FileSystemStorageManager):
(WebKit::FileSystemStorageManager::allocatedUnusedCapacity const):
(WebKit::FileSystemStorageManager::requestSpace):
* Source/WebKit/NetworkProcess/storage/FileSystemStorageManager.h:
* Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp:
(WebKit::NetworkStorageManager::createSyncAccessHandle):
(WebKit::NetworkStorageManager::requestNewCapacityForSyncAccessHandle):
* Source/WebKit/NetworkProcess/storage/NetworkStorageManager.h:
* Source/WebKit/NetworkProcess/storage/NetworkStorageManager.messages.in:
* Source/WebKit/NetworkProcess/storage/OriginStorageManager.cpp:
(WebKit::OriginStorageManager::StorageBucket::existingFileSystemStorageManager):
(WebKit::OriginStorageManager::StorageBucket::fileSystemStorageManager):
(WebKit::OriginStorageManager::createQuotaManager):
(WebKit::OriginStorageManager::quotaManager):
(WebKit::OriginStorageManager::fileSystemStorageManager):
(WebKit::OriginStorageManager::existingFileSystemStorageManager):
(WebKit::createQuotaManager): Deleted.
* Source/WebKit/NetworkProcess/storage/OriginStorageManager.h:
* Source/WebKit/Scripts/webkit/messages.py:
(types_that_cannot_be_forward_declared):
* Source/WebKit/Shared/FileSystemSyncAccessHandleInfo.h: Copied from Source/WebCore/Modules/filesystemaccess/FileSystemFileHandle.h.
(WebKit::FileSystemSyncAccessHandleInfo::encode const):
(WebKit::FileSystemSyncAccessHandleInfo::decode):
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/WebCoreSupport/WebFileSystemStorageConnection.cpp:
(WebKit::WebFileSystemStorageConnection::createSyncAccessHandle):
(WebKit::WebFileSystemStorageConnection::requestNewCapacityForSyncAccessHandle):
* Source/WebKit/WebProcess/WebCoreSupport/WebFileSystemStorageConnection.h:
Canonical link: https://commits.webkit.org/259635@main
Canonical link: https://commits.webkit.org/259548.94@safari-7615-branch
Commit: 17ce8712cfc2746f69bd87e6935fd5276b3c47b0
https://github.com/WebKit/WebKit/commit/17ce8712cfc2746f69bd87e6935fd5276b3c47b0
Author: Antoine Quint <graouts at webkit.org>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/css/css-animations/responsive/column-rule-color-001-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-animations/responsive/column-width-001-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/at-property-animation-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/baselineShift-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/clip-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/columnCount-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/columnGap-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/offsetRotate-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/opacity-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/perspective-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/rowGap-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/shapeOutside-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/to-color-change-expected.txt
M Source/WebCore/animation/KeyframeEffect.cpp
M Source/WebCore/animation/KeyframeEffect.h
M Source/WebCore/animation/KeyframeEffectStack.cpp
Log Message:
-----------
Cherry-pick 25ead8e66edd. rdar://problem/102694235
[web-animations] keyframes should be recomputed when a parent element changes value for a non-inherited property set to "inherit"
https://bugs.webkit.org/show_bug.cgi?id=248152
Reviewed by Antti Koivisto.
In the case where a non-inherited property is set to "inherit" on a keyframe, we now update keyframes
each time animations are updated in case the parent style changed value. While this is not optimal, this
is bound to be a pretty rare scenario which we can improve on later if we deem it necessary.
* LayoutTests/imported/w3c/web-platform-tests/css/css-animations/responsive/column-rule-color-001-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-animations/responsive/column-width-001-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/at-property-animation-expected.txt
* LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/baselineShift-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/clip-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/columnCount-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/columnGap-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/offsetRotate-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/opacity-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/perspective-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/rowGap-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/shapeOutside-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/to-color-change-expected.txt:
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::setBlendingKeyframes):
(WebCore::KeyframeEffect::setAnimatedPropertiesInStyle):
(WebCore::KeyframeEffect::computeHasExplicitlyInheritedKeyframeProperty):
* Source/WebCore/animation/KeyframeEffect.h:
(WebCore::KeyframeEffect::hasExplicitlyInheritedKeyframeProperty const):
* Source/WebCore/animation/KeyframeEffectStack.cpp:
(WebCore::KeyframeEffectStack::applyKeyframeEffects):
Canonical link: https://commits.webkit.org/259645@main
Canonical link: https://commits.webkit.org/259548.95@safari-7615-branch
Commit: 8072b747326b51f15399acf9d9074c379ef0bb27
https://github.com/WebKit/WebKit/commit/8072b747326b51f15399acf9d9074c379ef0bb27
Author: Patrick Angle <pangle at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
Log Message:
-----------
Cherry-pick f8d110a5fec4. rdar://problem/104891316
Web Inspector: Add missing localizable strings after 259603 at main
https://bugs.webkit.org/show_bug.cgi?id=251468
rdar://104891316
Unreviewed localization fix.
* Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js:
Canonical link: https://commits.webkit.org/259650@main
Canonical link: https://commits.webkit.org/259548.96@safari-7615-branch
Commit: 050fa076906ffaf9e3cdcd9e0a6ad86c8f7d89cf
https://github.com/WebKit/WebKit/commit/050fa076906ffaf9e3cdcd9e0a6ad86c8f7d89cf
Author: Sihui Liu <sihui_liu at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb.in
Log Message:
-----------
Cherry-pick 9bde2121e40c. rdar://problem/102969507
REGRESSION(249742 at main): [iOS] createSyncAccessHandle throws error 'UnknownError: Invalid platform file handle'
https://bugs.webkit.org/show_bug.cgi?id=251460
rdar://102969507
Reviewed by Brent Fulgham.
* Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb.in:
Canonical link: https://commits.webkit.org/259656@main
Canonical link: https://commits.webkit.org/259548.97@safari-7615-branch
Commit: c120b0de1edce55652323b817a9fc55e34ce85b9
https://github.com/WebKit/WebKit/commit/c120b0de1edce55652323b817a9fc55e34ce85b9
Author: Michael Saboff <msaboff at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M JSTests/stress/regexp-lookbehind.js
M Source/JavaScriptCore/yarr/YarrPattern.cpp
M Source/JavaScriptCore/yarr/YarrPattern.h
Log Message:
-----------
Cherry-pick 561d0e5534c8. rdar://problem/104652578
[JSC] UAF Yarr::YarrPatternConstructor::atomParenthesesEnd; Yarr::Parser::parseTokens; JSC::Yarr::parse
https://bugs.webkit.org/show_bug.cgi?id=251435
rdar://104652578
Reviewed by Mark Lam and Tadeu Zagallo.
When parsing a backreference for a lookbehind, it will likely appear lexically before the capture it references.
In that case, we create a forward reference term and see if we can convert it to a backreference at the end of the
lookbehind if a corresponding capture was found. The prior code did this by saving a pointer to all such forward
references. That pointer is a pointer into the storage for a Vector, which can be reallocated as it grows.
The fix here is to save a pointer to the alternative that contains the term and the index of the term in the alternative.
PatternAlternatives are kept alive during parsing, so it is safe to use them.
* JSTests/stress/regexp-lookbehind.js: Added new test cases.
* Source/JavaScriptCore/yarr/YarrPattern.cpp:
(JSC::Yarr::YarrPatternConstructor::UnresolvedForwardReference::UnresolvedForwardReference):
(JSC::Yarr::YarrPatternConstructor::UnresolvedForwardReference::term):
(JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
(JSC::Yarr::YarrPatternConstructor::atomBackReference):
* Source/JavaScriptCore/yarr/YarrPattern.h:
(JSC::Yarr::PatternAlternative::lastTermIndex):
(JSC::Yarr::PatternAlternative::lastTerm):
Canonical link: https://commits.webkit.org/259657@main
Canonical link: https://commits.webkit.org/259548.98@safari-7615-branch
Commit: 091cd7eff0db7db988cc578b7eb79953234a4033
https://github.com/WebKit/WebKit/commit/091cd7eff0db7db988cc578b7eb79953234a4033
Author: Chris Dumez <cdumez at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebCore/PAL/pal/spi/cocoa/NSFileManagerSPI.h
M Source/WebCore/en.lproj/Localizable.strings
M Source/WebKit/Platform/spi/ios/UIKitSPI.h
M Source/WebKit/SourcesCocoa.txt
M Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h
M Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm
M Source/WebKit/UIProcess/ios/WKGeolocationProviderIOS.mm
R Source/WebKit/UIProcess/ios/WKGeolocationProviderIOSObjCSecurityOrigin.mm
A Source/WebKit/UIProcess/ios/WKWebGeolocationPolicyDecider.h
A Source/WebKit/UIProcess/ios/WKWebGeolocationPolicyDeciderIOS.mm
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/Tests/WebKitCocoa/Geolocation.mm
Log Message:
-----------
Cherry-pick bbb71e0a3531. rdar://problem/102728659
[WK2] Stop relying on WebKitLegacy code to do geolocation permission prompting
https://bugs.webkit.org/show_bug.cgi?id=251368
rdar://102728659
Reviewed by Geoffrey Garen.
Stop relying on WebKitLegacy code to do geolocation permission prompting in
WebKit2. We now have a WKWebGeolocationPolicyDecider class that lives in
the WebKit2 project.
Also enhance the prompting dialog to be closer to the one MobileSafari uses
(see screenshots on radar).
The logic for remembering the geolocation permission is identical to the
one WebKitLegacy is using, except that we only use the host as key instead
of the full security origin. Note that the prompt only shows the host, like
it does in MobileSafari.
* Source/WebCore/en.lproj/Localizable.strings:
* Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js:
* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/UIProcess/ios/WKGeolocationProviderIOS.mm:
(-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):
(-[WKWebAllowDenyPolicyListener deny]):
(-[WKWebAllowDenyPolicyListener denyOnlyThisRequest]): Deleted.
(-[WKWebAllowDenyPolicyListener shouldClearCache]): Deleted.
* Source/WebKit/UIProcess/ios/WKGeolocationProviderIOSObjCSecurityOrigin.mm: Removed.
* Source/WebKit/UIProcess/ios/WKWebGeolocationPolicyDecider.h: Added.
* Source/WebKit/UIProcess/ios/WKWebGeolocationPolicyDeciderIOS.mm: Added.
(clearGeolocationCache):
(appHasPreciseLocationPermission):
(appDisplayName):
(getToken):
(PermissionRequest::create):
(+[WKWebGeolocationPolicyDecider sharedPolicyDecider]):
(-[WKWebGeolocationPolicyDecider init]):
(-[WKWebGeolocationPolicyDecider dealloc]):
(-[WKWebGeolocationPolicyDecider decidePolicyForGeolocationRequestFromOrigin:requestingURL:view:listener:]):
(-[WKWebGeolocationPolicyDecider _executeNextChallenge]):
(-[WKWebGeolocationPolicyDecider _finishActiveChallenge:]):
(-[WKWebGeolocationPolicyDecider clearCache]):
(-[WKWebGeolocationPolicyDecider _siteFileInContainerDirectory:creatingIntermediateDirectoriesIfNecessary:]):
(-[WKWebGeolocationPolicyDecider _siteFile]):
(createChallengeDictionary):
(-[WKWebGeolocationPolicyDecider _loadWithCompletionHandler:]):
(-[WKWebGeolocationPolicyDecider _save]):
(-[WKWebGeolocationPolicyDecider _getChallengeCountFromHistoryForToken:requestingURL:]):
(-[WKWebGeolocationPolicyDecider _addChallengeCount:forToken:requestingURL:]):
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
Canonical link: https://commits.webkit.org/259658@main
Canonical link: https://commits.webkit.org/259548.99@safari-7615-branch
Commit: babec2748c3c49178832ba0ece8a24945ceba0f9
https://github.com/WebKit/WebKit/commit/babec2748c3c49178832ba0ece8a24945ceba0f9
Author: Sihui Liu <sihui_liu at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M LayoutTests/http/wpt/cache-storage/cache-quota-add.any-expected.txt
M LayoutTests/http/wpt/cache-storage/cache-quota-add.any.js
M Source/WebKit/NetworkProcess/storage/CacheStorageCache.cpp
Log Message:
-----------
Cherry-pick 2a9280974163. rdar://problem/104852161
CacheStorageCache should update size file when all records are removed
https://bugs.webkit.org/show_bug.cgi?id=251418
rdar://104852161
Reviewed by Youenn Fablet.
CacheStorageCache currently updates size file when records are added and removed, but not when all records are removed
(cleared).
* LayoutTests/http/wpt/cache-storage/cache-quota-add.any-expected.txt:
* LayoutTests/http/wpt/cache-storage/cache-quota-add.any.js:
(promise_test.async test):
* Source/WebKit/NetworkProcess/storage/CacheStorageCache.cpp:
(WebKit::CacheStorageCache::removeAllRecords):
Canonical link: https://commits.webkit.org/259660@main
Canonical link: https://commits.webkit.org/259548.100@safari-7615-branch
Commit: f8093eadfb38efd4c1aa8744ea0b6e7d8d0904e5
https://github.com/WebKit/WebKit/commit/f8093eadfb38efd4c1aa8744ea0b6e7d8d0904e5
Author: Sammy Gill <sammy.gill at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
A LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/images/abs-pos-transferred-max-width-from-percentage-max-height-in-auto-height-containing-block-expected.html
A LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/images/abs-pos-transferred-max-width-from-percentage-max-height-in-auto-height-containing-block.html
M Source/WebCore/rendering/RenderBox.cpp
Log Message:
-----------
Cherry-pick 93e6542aebf9. rdar://problem/103481329
(REGRESSION(257434 at main): https://readwise.io/read image squished
https://bugs.webkit.org/show_bug.cgi?id=251419
rdar://103481329
Reviewed by Alan Baradlay.
When viewing the website on iOS the image of the phone renders
incorrectly as the width that is computed is too large. The image has
max-height: 100%, so this constraint should also provide the transferred
max-width for the image. We should be able to compute this value since
the image is absolutely positioned.
The previous version (before the regression) of this code computed the
"constrained width" by calling computeReplacedLogicalHeight and then
using the intrinsic ratio to compute the final width. computeReplacedLogicalHeight
eventually called into computeReplacedLogicalHeightUsing to compute the
min/max heights. This ended up computing the correct value for the min/max
heights when the image was absolutely positioned and had a percentage
height in an auto-height containing block.
The new version of the code, which used the logic for the css
aspect-ratio property, did not handle this case correctly and returned
an incorrect value for max-height. To resolve this issue, we can check
to see if the object is a RenderReplaced object by the time we get
to RenderBox::computeLogicalHeightUsing and then call into
computeReplacedLogicalHeightUsing to get the correct value.
* LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/images/abs-pos-transferred-max-width-from-percentage-max-height-in-auto-height-containing-block-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/images/abs-pos-transferred-max-width-from-percentage-max-height-in-auto-height-containing-block.html: Added.
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::computeLogicalHeightUsing const):
Canonical link: https://commits.webkit.org/259663@main
Canonical link: https://commits.webkit.org/259548.101@safari-7615-branch
Commit: 6cdaafc115629def465bf89d38500d1123a0fa62
https://github.com/WebKit/WebKit/commit/6cdaafc115629def465bf89d38500d1123a0fa62
Author: Alan Baradlay <zalan at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.cpp
Log Message:
-----------
Cherry-pick c6d75c202f1a. rdar://problem/104797919
[IFC] InlineFormattingGeometry::staticPositionForOutOfFlowBlockLevelBox should be able to handle empty content
https://bugs.webkit.org/show_bug.cgi?id=251477
<rdar://104797919>
Reviewed by Antti Koivisto.
This is the block level box variant of webkit.org/b/248158 (<- inline level box).
While line-clamp does not produce empty IFCs anymore (changed at webkit.org/b/250270), accessing line[0] unconditionally may not be such a great idea.
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.cpp:
(WebCore::Layout::InlineFormattingGeometry::staticPositionForOutOfFlowBlockLevelBox const):
Canonical link: https://commits.webkit.org/259684@main
Canonical link: https://commits.webkit.org/259548.102@safari-7615-branch
Commit: 56e8cc4a66c3ba0951f103d6745941d6b19705ac
https://github.com/WebKit/WebKit/commit/56e8cc4a66c3ba0951f103d6745941d6b19705ac
Author: Chirag M Shah <chirag_m_shah at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
A LayoutTests/svg/foreignObject/foreign-object-without-svgroot-crash-expected.txt
A LayoutTests/svg/foreignObject/foreign-object-without-svgroot-crash.html
M Source/WebCore/svg/SVGForeignObjectElement.cpp
Log Message:
-----------
Cherry-pick e80607696660. rdar://problem/102916021
Don't create renderer for foreignElement when it has no parent
https://bugs.webkit.org/show_bug.cgi?id=241778
rdar://102916021
Reviewed by Nikolas Zimmermann.
If the body is replaced by foreignElement, it results in a DOM which
doesn't have anything to render or layout, but it crashes WebKit because
we trip over an assert because isPaintOffsetCacheEnabled is not disabled
(which happens only when there is a SVGRoot). This change makes it so
that we don't generate the useless renderer in the first place, which is
what happens with other SVGElements.
* LayoutTests/svg/foreignObject/foreign-object-without-svgroot-crash-expected.txt: Added.
* LayoutTests/svg/foreignObject/foreign-object-without-svgroot-crash.html: Added.
* Source/WebCore/svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::rendererIsNeeded):
Canonical link: https://commits.webkit.org/259685@main
Canonical link: https://commits.webkit.org/259548.103@safari-7615-branch
Commit: 5cc8e153e8fbf4de5b9f801d868995b3096ad1a8
https://github.com/WebKit/WebKit/commit/5cc8e153e8fbf4de5b9f801d868995b3096ad1a8
Author: Sihui Liu <sihui_liu at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebKit/NetworkProcess/storage/CacheStorageDiskStore.cpp
Log Message:
-----------
Cherry-pick 167dfa751c25. rdar://problem/104892197
Ensure CacheStorageDiskStore make isolated copy of arguments when passing them between WorkQueues
https://bugs.webkit.org/show_bug.cgi?id=251471
rdar://104892197
Reviewed by Per Arne Vollan.
* Source/WebKit/NetworkProcess/storage/CacheStorageDiskStore.cpp:
(WebKit::CacheStorageDiskStore::deleteRecords):
(WebKit::CacheStorageDiskStore::writeRecords):
Canonical link: https://commits.webkit.org/259700@main
Canonical link: https://commits.webkit.org/259548.104@safari-7615-branch
Commit: 90f509675c69f7589fb9a2878d314a47fd0dfed4
https://github.com/WebKit/WebKit/commit/90f509675c69f7589fb9a2878d314a47fd0dfed4
Author: Antti Koivisto <antti at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/typedom-expected.txt
M Source/WebCore/css/typedom/ComputedStylePropertyMapReadOnly.cpp
Log Message:
-----------
Cherry-pick 414ff0019118. rdar://problem/104916732
[@property] Ensure style is up to date in ComputedStylePropertyMapReadOnly::entries
https://bugs.webkit.org/show_bug.cgi?id=251517
rdar://104916732
Reviewed by Alan Baradlay.
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/typedom-expected.txt:
* Source/WebCore/css/typedom/ComputedStylePropertyMapReadOnly.cpp:
(WebCore::ComputedStylePropertyMapReadOnly::size const):
(WebCore::ComputedStylePropertyMapReadOnly::entries const):
Ensure style is up to date for custom properties so that we get the correct count.
Canonical link: https://commits.webkit.org/259703@main
Canonical link: https://commits.webkit.org/259548.105@safari-7615-branch
Commit: 6fb2766cfe3ebb93ee00959dda1a4b4e084c57d3
https://github.com/WebKit/WebKit/commit/6fb2766cfe3ebb93ee00959dda1a4b4e084c57d3
Author: Chirag M Shah <chirag_m_shah at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebCore/rendering/RenderObject.cpp
Log Message:
-----------
Cherry-pick 37ea7633b1ef. rdar://problem/104814038
Fix infinite recursion in propagateRepaintToParentWithOutlineAutoIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=251409
rdar://104814038
Reviewed by Alan Baradlay.
Now that we map the removed element to the placeholder, we need to use
the original renderer for comparison otherwise we would cause infinite
recursion.
* Source/WebCore/rendering/RenderObject.cpp:
(WebCore::RenderObject::propagateRepaintToParentWithOutlineAutoIfNeeded const):
Canonical link: https://commits.webkit.org/259725@main
Canonical link: https://commits.webkit.org/259548.106@safari-7615-branch
Commit: 5e598a0ece97b0177d2e70714b6c18604229a585
https://github.com/WebKit/WebKit/commit/5e598a0ece97b0177d2e70714b6c18604229a585
Author: Sammy Gill <sammy.gill at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-block-end-collapsed-margins-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-block-end-collapsed-margins.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-block-end-self-collapsing-item-has-larger-block-end-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-block-end-self-collapsing-item-has-larger-block-end.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-block-end-self-collapsing-item-has-larger-block-start-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-block-end-self-collapsing-item-has-larger-block-start.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-block-start-collapsed-margins-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-block-start-collapsed-margins.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-block-start-self-collapsing-item-has-larger-block-end-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-block-start-self-collapsing-item-has-larger-block-end.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-block-start-self-collapsing-item-larger-block-start-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-block-start-self-collapsing-item-larger-block-start.html
M Source/WebCore/rendering/RenderBlockFlow.cpp
Log Message:
-----------
Cherry-pick 82ef68207e2f. rdar://problem/103640784
Trim collapsed margins at block-start and block-end when specified by margin-trim
https://bugs.webkit.org/show_bug.cgi?id=249781
rdar://103640784
Reviewed by Alan Baradlay.
When collapsed margins at propagated to the block-start or block-end of
a block container and the appropriate margin-trim values are specified,
those margins should also be trimmed.
This can be done by keeping track of whether we are at the block start
or block end of the box as specified by the MarginInfo structure. If
we are currently at the block start of the container, then we should
trim the before margin of the child. If the child is self collapsing,
we should also trim its after margin.
By the time we are in setCollapsedBottomMargin, we are at the block
end of the block container. That means we should be able to trim the
values inside of MarginInfo if margin-trim: block/block-end is
specified.
Here is an example to demonstrate this logic:
container {
display: block;
margin-trim: block;
margin-block-start: 10px;
}
item {
display: block;
margin-block-start: 40px;
width: 50px;
height: 50px;
background-color: green;
}
.collapsed {
margin-block-start: 0px;
height: 0px;
}
<item style="margin-block-start: 0px;"></item>
<container>
<item class="collapsed"></item>
<item></item>
</container>
- The container will begin layout of its block children and will iterate
over them. Each iteration will take in and update a MarginInfo structure
that is used to handle any sort of collapsing. Initially this structure
will just hold the margin information for the container itself.
- RenderBlockFlow::layoutBlockChild will call RenderBlockFlow::collapseMargins
with the child as an argument, and that method will call
RenderBlockFlow::collapseMarginsWithChildInfo to perform the actual
collapsing.
- Since we are at the before side of the block, which is a part of the
MarginInfo state, and block-start trimming is specified, we will then
trim the block-start margin of the child. We will also trim the block-end
margin of the child since it is self-collapsing.
- Once we are done with this item and we are back in RenderBlockFlow::layoutBlockChild
we will check to see if we need to update the MarginInfo state that keeps
track of us being at the before side of the block container. Since
1.) We were at the before side of the block container
2.) The child we just laid out is self collapsing
We will not update our MarginInfo state and we will continue to be at the
before side of the block. This means that this trimming logic will continue
on with the next item in the container. If the first item was not
self collapsing, however, then we would update our MarginInfo state so
that we are no longer at the before side and we would not trim the
block-start margins of the future children.
- After we layout and trim the margins of the second item,
RenderBlockFlow::layoutBlockChildren will call handleAfterSideOfBlock
with the MarginInfo structure that has been modified this whole time.
This should contain any margins that have collapsed through to the
after side of the block.
- Once in RenderBlockFlow::setCollapsedBottomMargin, we will check to
see if block-end margin trimming has been specified. If it has, then
we will use 0 (trimmed) for the margin from MarginInfo that is supposed
to collapse with the container's margin.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-block-end-collapsed-margins-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-block-end-collapsed-margins.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-block-end-self-collapsing-item-has-larger-block-end-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-block-end-self-collapsing-item-has-larger-block-end.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-block-end-self-collapsing-item-has-larger-block-start-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-block-end-self-collapsing-item-has-larger-block-start.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-block-start-collapsed-margins-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-block-start-collapsed-margins.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-block-start-self-collapsing-item-has-larger-block-end-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-block-start-self-collapsing-item-has-larger-block-end.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-block-start-self-collapsing-item-larger-block-start-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-block-start-self-collapsing-item-larger-block-start.html: Added.
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::collapseMarginsWithChildInfo):
(WebCore::RenderBlockFlow::setCollapsedBottomMargin):
Canonical link: https://commits.webkit.org/259734@main
Canonical link: https://commits.webkit.org/259548.107@safari-7615-branch
Commit: 1f8ddc45ca6597c681c55c8967d9d3c8252ee3ea
https://github.com/WebKit/WebKit/commit/1f8ddc45ca6597c681c55c8967d9d3c8252ee3ea
Author: Antoine Quint <graouts at webkit.org>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
A LayoutTests/imported/w3c/web-platform-tests/css/css-animations/CSSAnimation-getKeyframes-crash.html
M Source/WebCore/animation/KeyframeEffect.cpp
Log Message:
-----------
Cherry-pick 0f60938da30b. rdar://problem/104947371
[web-animations] ASSERT(node.isConnected()) reached in Style::Scope::forNode() in css/css-animations/CSSAnimation-getKeyframes-crash.html
https://bugs.webkit.org/show_bug.cgi?id=251516
Reviewed by Antti Koivisto.
We should check that the effect's target is non-null and connected before calling Style::Scope::forOrdinal()
with that target as the first parameter. This caused a crash in a newly-imported WPT test.
* LayoutTests/imported/w3c/web-platform-tests/css/css-animations/CSSAnimation-getKeyframes-crash.html: Added.
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::getKeyframes):
Canonical link: https://commits.webkit.org/259735@main
Canonical link: https://commits.webkit.org/259548.108@safari-7615-branch
Commit: bbd9fed38e84c8e3bbf9ee6f3048f92d6b2a932c
https://github.com/WebKit/WebKit/commit/bbd9fed38e84c8e3bbf9ee6f3048f92d6b2a932c
Author: Antoine Quint <graouts at webkit.org>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/css/css-animations/responsive/column-rule-color-001-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/to-color-change-expected.txt
M Source/WebCore/animation/KeyframeEffect.cpp
M Source/WebCore/animation/KeyframeEffect.h
M Source/WebCore/animation/KeyframeEffectStack.cpp
M Source/WebCore/style/StyleResolver.cpp
M Source/WebCore/style/StyleResolver.h
Log Message:
-----------
Cherry-pick cf865e9c2ded. rdar://problem/104947407
[web-animations] keyframes should be recomputed when the "currentcolor" value is used
https://bugs.webkit.org/show_bug.cgi?id=251491
Reviewed by Antti Koivisto.
Keyframes can set any number of color-related properties to use `currentcolor`. We need
to recompute keyframes if the value to which `currentcolor` would resolve changes during
an animation.
To that end, we keep track of properties set to `currentcolor` on keyframes, and recompute
the keyframes if we find that `RenderStyle::color()` has changed during style resolution.
In the case where one of those properties is the `color` property, the relevant value is
not the style's value, but the parent style's value. In this case, which is bound to be
rather rare, we elect to always recompute keyframes.
* LayoutTests/imported/w3c/web-platform-tests/css/css-animations/responsive/column-rule-color-001-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/to-color-change-expected.txt:
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::updateBlendingKeyframes):
(WebCore::KeyframeEffect::computeCSSAnimationBlendingKeyframes):
(WebCore::KeyframeEffect::hasPropertySetToCurrentColor const):
(WebCore::KeyframeEffect::hasColorSetToCurrentColor const):
* Source/WebCore/animation/KeyframeEffect.h:
* Source/WebCore/animation/KeyframeEffectStack.cpp:
(WebCore::KeyframeEffectStack::applyKeyframeEffects):
* Source/WebCore/style/StyleResolver.cpp:
(WebCore::Style::Resolver::keyframeStylesForAnimation):
* Source/WebCore/style/StyleResolver.h:
Canonical link: https://commits.webkit.org/259736@main
Canonical link: https://commits.webkit.org/259548.109@safari-7615-branch
Commit: 302e12805393b8652eb1978fccb8767c7f40f2bb
https://github.com/WebKit/WebKit/commit/302e12805393b8652eb1978fccb8767c7f40f2bb
Author: Antoine Quint <graouts at webkit.org>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/baselineShift-expected.txt
M Source/WebCore/css/CSSProperties.json
M Source/WebCore/style/StyleBuilderCustom.h
Log Message:
-----------
Cherry-pick a83d5abf9aef. rdar://problem/104947491
imported/w3c/web-platform-tests/web-animations/responsive/baselineShift.html is a failure
https://bugs.webkit.org/show_bug.cgi?id=251490
Reviewed by Antti Koivisto.
The baseline-shift CSS property is represented by two different bits on RenderStyle. In the case of
"inherit" we would only forward one of the bits from the parent style. We now add a custom "inherit"
function to the style builder to correctly forward both bits from the parent style.
This fixes the remaining tests in the web-animations/responsive/baselineShift.html WPT which uses
"baseline-shift: inherit" in a @keyframes rule.
* LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/baselineShift-expected.txt:
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyInheritBaselineShift):
Canonical link: https://commits.webkit.org/259738@main
Canonical link: https://commits.webkit.org/259548.110@safari-7615-branch
Commit: 7c86d699c6c50e3e6d5dab535b0de19cd3860ee1
https://github.com/WebKit/WebKit/commit/7c86d699c6c50e3e6d5dab535b0de19cd3860ee1
Author: Antoine Quint <graouts at webkit.org>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/css/css-animations/KeyframeEffect-getKeyframes.tentative.html
M Source/WebCore/rendering/style/KeyframeList.cpp
Log Message:
-----------
Cherry-pick 52923169468b. rdar://problem/104947614
[css-animations] composite operation of implicit keyframes for CSS Animations should be "replace"
https://bugs.webkit.org/show_bug.cgi?id=251499
Reviewed by Antti Koivisto.
The CSS Animations spec indicates in its "Keyframes" section [0] that the default composite is
"replace". As such, when generating an implicit keyframe for an effect tied to a CSS Animation,
we should set the composite value to "replace".
This issue was caught by a new version of css/css-animations/KeyframeEffect-getKeyframes.tentative.html
which was not yet in our repository, so we update it with the most recent changes.
We make an additional change in the final subtest of this WPT to correctly have "replace" as
the composite value for the implicit keyframes. I suspect this change was not made when Google
last changed that test [1] because Chrome fails to generate the right implicit keyframes in this case.
[0] https://drafts.csswg.org/css-animations-2/#keyframes
[1] https://github.com/web-platform-tests/wpt/commit/1a5c61d2ca9d0f2c2801adf2b433c7931512152f
* LayoutTests/imported/w3c/web-platform-tests/css/css-animations/KeyframeEffect-getKeyframes.tentative.html:
* Source/WebCore/rendering/style/KeyframeList.cpp:
(WebCore::KeyframeList::fillImplicitKeyframes):
Canonical link: https://commits.webkit.org/259739@main
Canonical link: https://commits.webkit.org/259548.111@safari-7615-branch
Commit: ea7479f358d26856ecbffab57c655ed6b249bda2
https://github.com/WebKit/WebKit/commit/ea7479f358d26856ecbffab57c655ed6b249bda2
Author: Antoine Quint <graouts at webkit.org>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/fontWeight-expected.txt
M Source/WebCore/animation/KeyframeEffect.cpp
M Source/WebCore/animation/KeyframeEffect.h
M Source/WebCore/animation/KeyframeEffectStack.cpp
M Source/WebCore/style/StyleResolver.cpp
M Source/WebCore/style/StyleResolver.h
Log Message:
-----------
Cherry-pick 91d257012a74. rdar://problem/104948885
[web-animations] keyframes should be recomputed when "bolder" or "lighter" is used on a "font-weight" property
https://bugs.webkit.org/show_bug.cgi?id=251493
Reviewed by Antti Koivisto.
Keyframes can set the "font-weight" property to "bolder" or "lighter". When such values are used, we
recompute keyframes if the inherited "font-weight" value changes while an animation is active.
* LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/fontWeight-expected.txt:
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::updateBlendingKeyframes):
(WebCore::KeyframeEffect::computeCSSAnimationBlendingKeyframes):
* Source/WebCore/animation/KeyframeEffect.h:
(WebCore::KeyframeEffect::hasRelativeFontWeight const):
* Source/WebCore/animation/KeyframeEffectStack.cpp:
(WebCore::KeyframeEffectStack::applyKeyframeEffects):
* Source/WebCore/style/StyleResolver.cpp:
(WebCore::Style::Resolver::keyframeStylesForAnimation):
* Source/WebCore/style/StyleResolver.h:
Canonical link: https://commits.webkit.org/259740@main
Canonical link: https://commits.webkit.org/259548.112@safari-7615-branch
Commit: dd9e8f6dd6a2a06e294c3bf03a14006e967bf601
https://github.com/WebKit/WebKit/commit/dd9e8f6dd6a2a06e294c3bf03a14006e967bf601
Author: Kimmo Kinnunen <kkinnunen at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
Log Message:
-----------
Cherry-pick 905fdd75fe5d. rdar://problem/104305743
texSubImage2D crashed on iOS16 + WebGL2 + large WASM memory
https://bugs.webkit.org/show_bug.cgi?id=250558
rdar://104305743
Reviewed by Matt Woodrow.
Adjust the input size from the ArrayBufferView byteLength
to the actual image data size texSubImage2D would use.
Fixes crashes where IPC would copy the whole ArrayBufferView into
encoding buffer, causing the WP process size increase.
* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::validateTexFuncData):
Canonical link: https://commits.webkit.org/259742@main
Canonical link: https://commits.webkit.org/259548.113@safari-7615-branch
Commit: 5286a842722831d7bb68a5e615c7928ee29786da
https://github.com/WebKit/WebKit/commit/5286a842722831d7bb68a5e615c7928ee29786da
Author: Youenn Fablet <youennf at gmail.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
A LayoutTests/http/tests/webrtc/muted-video-mediastream-invisible-autoplay-expected.txt
A LayoutTests/http/tests/webrtc/muted-video-mediastream-invisible-autoplay.html
M Source/WebCore/html/HTMLMediaElement.cpp
Log Message:
-----------
Cherry-pick 44f6600b0181. rdar://problem/101682623
InvisibleAutoplay interruption should be lifted when unmuting a video element that was muted then made invisible
https://bugs.webkit.org/show_bug.cgi?id=251488
rdar://101682623
Reviewed by Eric Carlson.
A muted media element will be suspended for InvisibleAutoplay if it ever made hidden.
While playback will resume if the media element is made visible, it should also resum if the media element stays hidden but is unmuted.
To do this, we call scheduleUpdateShouldAutoplay whenever the media element muted state changes.
This also has the effect that a hidden media element that gets muted will also be paused, until it either gets unmuted or made visible again.
Covered by LayoutTests/http/tests/webrtc/muted-video-mediastream-invisible-autoplay.html.
* LayoutTests/http/tests/webrtc/muted-video-mediastream-invisible-autoplay-expected.txt: Added.
* LayoutTests/http/tests/webrtc/muted-video-mediastream-invisible-autoplay.html: Added.
* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setMuted):
Canonical link: https://commits.webkit.org/259744@main
Canonical link: https://commits.webkit.org/259548.114@safari-7615-branch
Commit: b62716368a9b3d6d2bcbcfc34e367c2524bed80d
https://github.com/WebKit/WebKit/commit/b62716368a9b3d6d2bcbcfc34e367c2524bed80d
Author: Brent Fulgham <bfulgham at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WTF/Scripts/GeneratePreferences.rb
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WebCore/Scripts/GenerateSettings.rb
M Source/WebKit/UIProcess/API/APIFeatureStatus.h
M Source/WebKit/UIProcess/API/Cocoa/_WKFeature.mm
M Source/WebKitLegacy/mac/WebView/WebFeature.h
Log Message:
-----------
Cherry-pick c4c0ad0db413. rdar://problem/104929045
Use 'mature' instead of 'shipping' to represent stable features
https://bugs.webkit.org/show_bug.cgi?id=251545
<rdar://problem/104929045>
Reviewed by Chris Dumez and Elliott Williams.
Replace 'shipping' with 'mature' in various feature-flag places.
* Source/WTF/Scripts/GeneratePreferences.rb:
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/Scripts/GenerateSettings.rb:
* Source/WebKit/UIProcess/API/APIFeatureStatus.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKFeature.mm:
(-[_WKFeature status]):
* Source/WebKitLegacy/mac/WebView/WebFeature.h:
Canonical link: https://commits.webkit.org/259755@main
Canonical link: https://commits.webkit.org/259548.115@safari-7615-branch
Commit: 459f5629cb783d8ab8bbde94d28eb04f40835faf
https://github.com/WebKit/WebKit/commit/459f5629cb783d8ab8bbde94d28eb04f40835faf
Author: Antoine Quint <graouts at webkit.org>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-animation-color-comma-list-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-animation-color-space-list-expected.txt
M Source/WebCore/animation/CSSPropertyAnimation.cpp
Log Message:
-----------
Cherry-pick d96394a8f343. rdar://problem/104967426
[web-animations] animation of color list custom properties with iterationComposite is incorrect
https://bugs.webkit.org/show_bug.cgi?id=251574
Reviewed by Antti Koivisto.
Certain types require interpolation for each iteration when `iterationComposite` is used. While we
had logic in place for this in CSSPropertyAnimation::propertyRequiresBlendingForAccumulativeIteration()
for `SyntaxValue` custom properties, we did not for `SyntaxValueList`. We factor the code that determined
whether interpolation was required for the `SyntaxValue` case in a new static method which we now also
call for each value in a `SyntaxValueList`.
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-animation-color-comma-list-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-animation-color-space-list-expected.txt:
* Source/WebCore/animation/CSSPropertyAnimation.cpp:
(WebCore::syntaxValuesRequireBlendingForAccumulativeIteration):
(WebCore::CSSPropertyAnimation::propertyRequiresBlendingForAccumulativeIteration):
Canonical link: https://commits.webkit.org/259761@main
Canonical link: https://commits.webkit.org/259548.116@safari-7615-branch
Commit: 9f72040287e125651b0d927d2718eba6caaad03b
https://github.com/WebKit/WebKit/commit/9f72040287e125651b0d927d2718eba6caaad03b
Author: Ben Nham <nham at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebKit/webpushd/PushService.mm
Log Message:
-----------
Cherry-pick df642c8ddfa4. rdar://problem/104946575
Change sensitivity level of webpushd diagnostic logs
https://bugs.webkit.org/show_bug.cgi?id=251602
rdar://104946575
Reviewed by Brady Eidson.
Make scope and topic logging of Web Push subscriptions sensitive by default, which affects how they
are logged on internal builds. This has no effect on customer builds, since both private and
sensitive log strings are redacted on such builds.
* Source/WebKit/webpushd/PushService.mm:
(WebPushD::PushServiceRequestImpl::fulfill):
(WebPushD::PushServiceRequestImpl::reject):
(WebPushD::SubscribeRequest::startImpl):
(WebPushD::UnsubscribeRequest::startInternal):
(WebPushD::PushService::incrementSilentPushCount):
(WebPushD::PushService::removeRecordsForSubscriptionSetAndOrigin):
(WebPushD::PushService::removeRecordsImpl):
(WebPushD::PushService::didReceivePushMessage):
Canonical link: https://commits.webkit.org/259764@main
Canonical link: https://commits.webkit.org/259548.117@safari-7615-branch
Commit: c7d297dff8058084760106c275914f46d77def99
https://github.com/WebKit/WebKit/commit/c7d297dff8058084760106c275914f46d77def99
Author: Sihui Liu <sihui_liu at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebKit/NetworkProcess/storage/CacheStorageCache.cpp
M Source/WebKit/NetworkProcess/storage/CacheStorageManager.cpp
Log Message:
-----------
Cherry-pick e10384deeabd. rdar://problem/104531316
Fix use-after-move in CacheStorageCache::putRecordsInStore
https://bugs.webkit.org/show_bug.cgi?id=251467
rdar://104531316
Reviewed by Youenn Fablet.
CacheStorageCache::putRecordsInStore should not use WTFMove on members of existingRecord because existingRecord will
be accessed later (existingRecord points to an object in m_records). This patch also ensures CacheStorageCache is
unregistered from CacheStorageRegistry when it is removed, so CacheStorageRegistry could remove the entry from m_caches.
* Source/WebKit/NetworkProcess/storage/CacheStorageCache.cpp:
(WebKit::CacheStorageCache::putRecordsInStore):
* Source/WebKit/NetworkProcess/storage/CacheStorageManager.cpp:
(WebKit::CacheStorageManager::removeUnusedCache):
Canonical link: https://commits.webkit.org/259766@main
Canonical link: https://commits.webkit.org/259548.118@safari-7615-branch
Commit: 4b99d31670871db00baa1d247b6d897c8b1e7ee1
https://github.com/WebKit/WebKit/commit/4b99d31670871db00baa1d247b6d897c8b1e7ee1
Author: Cameron McCormack <heycam at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
Log Message:
-----------
Cherry-pick cb846ec74099. rdar://problem/104619725
iOS-only revert of bug 249561 for causing memory regression
https://bugs.webkit.org/show_bug.cgi?id=251559
rdar://104619725
Reviewed by Brent Fulgham.
Unclear why, but for now let's leave the change on macOS and revert elsewhere.
* Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontCache::platformReleaseNoncriticalMemory):
Canonical link: https://commits.webkit.org/259769@main
Canonical link: https://commits.webkit.org/259548.119@safari-7615-branch
Commit: a8626ec283f027c6f0b5f3c1a04cea2f70304265
https://github.com/WebKit/WebKit/commit/a8626ec283f027c6f0b5f3c1a04cea2f70304265
Author: Cameron McCormack <heycam at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebCore/svg/SVGElement.cpp
M Source/WebCore/svg/SVGElement.h
M Source/WebCore/svg/SVGElementRareData.h
M Source/WebCore/svg/SVGTests.cpp
M Source/WebCore/svg/SVGTests.h
M Source/WebCore/svg/properties/SVGPropertyAccessorImpl.h
M Source/WebCore/svg/properties/SVGPropertyOwnerRegistry.h
Log Message:
-----------
Cherry-pick a0e6d8e81896. rdar://problem/104849618
Move SVG conditional processing attributes to SVGElementRareData
https://bugs.webkit.org/show_bug.cgi?id=251413
rdar://problem/104849618
Reviewed by Sam Weinig and Said Abou-Hallawa.
The SVG conditional processing attributes (requiredFeatures, requiredExtensions,
and systemLanguage) are rarely used. Currently nearly every SVG element creates
SVGStringList objects for these three attributes in WebCore::SVGTests, at a cost
of 48 bytes each SVGStringList plus the three pointers. We can move these to
SVGElementRareData to save 72 bytes per SVG element in this common case, which
for SVG documents with a large number of graphical elements can add up.
The existing SVG property registration mechanism expects members
corresponding to the attribute to exist on the owner element object. We adds a
new SVGConditionalProcessingAttributeAccessor for these three
attributes, which looks them up on the element's SVGElementRareData.
* Source/WebCore/svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::SVGAnimationElement):
* Source/WebCore/svg/SVGCursorElement.cpp:
(WebCore::SVGCursorElement::SVGCursorElement):
* Source/WebCore/svg/SVGElement.cpp:
(WebCore::SVGElement::conditionalProcessingAttributes):
(WebCore::SVGElement::conditionalProcessingAttributesIfExists const):
* Source/WebCore/svg/SVGElement.h:
* Source/WebCore/svg/SVGElementRareData.h:
(WebCore::SVGElementRareData::conditionalProcessingAttributesIfExists const):
(WebCore::SVGElementRareData::conditionalProcessingAttributes):
* Source/WebCore/svg/SVGGraphicsElement.cpp:
(WebCore::SVGGraphicsElement::SVGGraphicsElement):
* Source/WebCore/svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::SVGMaskElement):
* Source/WebCore/svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::SVGPatternElement):
* Source/WebCore/svg/SVGTests.cpp:
(WebCore::SVGConditionalProcessingAttributes::SVGConditionalProcessingAttributes):
(WebCore::SVGTests::SVGTests):
(WebCore::SVGTests::isValid const):
(WebCore::SVGTests::parseAttribute):
(WebCore::SVGTests::conditionalProcessingAttributes):
(WebCore::SVGTests::conditionalProcessingAttributesIfExists const):
* Source/WebCore/svg/SVGTests.h:
(WebCore::SVGConditionalProcessingAttributes::requiredFeatures):
(WebCore::SVGConditionalProcessingAttributes::requiredExtensions):
(WebCore::SVGConditionalProcessingAttributes::systemLanguage):
(WebCore::SVGTests::requiredFeatures):
(WebCore::SVGTests::requiredExtensions):
(WebCore::SVGTests::systemLanguage):
* Source/WebCore/svg/properties/SVGPropertyAccessorImpl.h:
(WebCore::SVGConditionalProcessingAttributeAccessor<OwnerType>::singleton):
* Source/WebCore/svg/properties/SVGPropertyOwnerRegistry.h:
(WebCore::SVGPropertyOwnerRegistry::registerConditionalProcessingAttributeProperty):
Canonical link: https://commits.webkit.org/259772@main
Canonical link: https://commits.webkit.org/259548.120@safari-7615-branch
Commit: 23dfafccde00df898925f8eb383c4048a4778af4
https://github.com/WebKit/WebKit/commit/23dfafccde00df898925f8eb383c4048a4778af4
Author: Jer Noble <jer.noble at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
R LayoutTests/http/tests/security/contentSecurityPolicy/resources/track.vtt.py
M LayoutTests/http/tests/security/contentSecurityPolicy/track-redirect-allowed.html
M LayoutTests/http/tests/security/contentSecurityPolicy/track-redirect-allowed2.html
M LayoutTests/http/tests/security/contentSecurityPolicy/track-redirect-blocked-expected.txt
M LayoutTests/http/tests/security/contentSecurityPolicy/track-redirect-blocked.html
M LayoutTests/http/tests/security/text-track-crossorigin-expected.txt
M LayoutTests/http/tests/security/text-track-crossorigin.html
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/cloneNode-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/track-data-url-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/webvtt-cross-origin.https-expected.txt
M Source/WebCore/loader/TextTrackLoader.cpp
Log Message:
-----------
Cherry-pick cc2a0b3996b2. rdar://problem/104493270
REGRESSION(249934 at main): Captions fail to load on ESPN.com
https://bugs.webkit.org/show_bug.cgi?id=251539
rdar://104493270
Reviewed by Eric Carlson and Youenn Fablet.
Revert 249934 at main
Canonical link: https://commits.webkit.org/259781@main
Canonical link: https://commits.webkit.org/259548.121@safari-7615-branch
Commit: d2a28969b776c07033d0ae17d956d39a41d4f41a
https://github.com/WebKit/WebKit/commit/d2a28969b776c07033d0ae17d956d39a41d4f41a
Author: Brent Fulgham <bfulgham at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
Log Message:
-----------
Cherry-pick fc1e58ebbeac. rdar://problem/104979142
Disable CSS Nesting by default
https://bugs.webkit.org/show_bug.cgi?id=251636
<rdar://problem/104979142>
Reviewed by Tim Nguyen.
Turn Nesting off for customer builds, but retain for prerelease
builds.
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
Canonical link: https://commits.webkit.org/259787@main
Canonical link: https://commits.webkit.org/259548.122@safari-7615-branch
Commit: 6d7488822cc4f8303c21320a6632c067afd12f86
https://github.com/WebKit/WebKit/commit/6d7488822cc4f8303c21320a6632c067afd12f86
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M JSTests/wasm/stress/tail-call-should-not-clobber-caller-origin.js
M JSTests/wasm/v8/indirect-call-non-zero-table.js
M Source/JavaScriptCore/runtime/OptionsList.h
Log Message:
-----------
Cherry-pick 3eb123c1f36f. rdar://problem/104987053
[JSC] Disable wasm tail-call because of several necessary things
https://bugs.webkit.org/show_bug.cgi?id=251656
rdar://104987053
Reviewed by Mark Lam.
This change disables wasm tail-calls since we still need several things to make it work correctly.
1. All wasm function calls need to adjust stack-pointer after the call. This is necessary thing for the support of tail-call,
but currently it is not done yet. Since tail-call can adjust the stack-pointer of the caller, the stack-pointer value can become
different after the tail-call happens from the caller's view. Since B3 etc. are freely accessing to stack slots via stack-pointer,
and since stack-pointer needs to be the same during the procedure, the adjustment is required to make things work.
In JS world, we are doing this adjustment: BaselineJIT's resetSP for example. Previously, since wasm does not have tail-calls,
wasm call is not doing this adjustment. Now, we should do that.
2. We should not change offset of StackSlots. This is not a supported operation by B3 / Air.
For now, we disable wasm tail-call.
* Source/JavaScriptCore/runtime/OptionsList.h:
Canonical link: https://commits.webkit.org/259801@main
Canonical link: https://commits.webkit.org/259548.123@safari-7615-branch
Commit: 36c3b023dd016e4890e542db6181758d874cab47
https://github.com/WebKit/WebKit/commit/36c3b023dd016e4890e542db6181758d874cab47
Author: Antoine Quint <graouts at webkit.org>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/at-property-animation-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/at-property-animation.html
M Source/WebCore/animation/KeyframeEffect.cpp
M Source/WebCore/animation/KeyframeEffect.h
M Source/WebCore/css/CSSCustomPropertyValue.cpp
M Source/WebCore/css/CSSCustomPropertyValue.h
M Source/WebCore/style/StyleResolver.cpp
M Source/WebCore/style/StyleResolver.h
Log Message:
-----------
Cherry-pick b1a5811b3017. rdar://problem/104997994
[web-animations] keyframes should be recomputed when the "currentcolor" value is used on a custom property
https://bugs.webkit.org/show_bug.cgi?id=251591
Reviewed by Antti Koivisto.
We keep a set of CSS properties set to "currentcolor" in a KeyframeEffect but until now only considered
"standard" CSS properties. We now also consider custom properties by changing the set's type from
HashSet<CSSPropertyID> to HashSet<AnimatableProperty>.
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/at-property-animation-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/at-property-animation.html:
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::updateBlendingKeyframes):
* Source/WebCore/animation/KeyframeEffect.h:
* Source/WebCore/css/CSSCustomPropertyValue.cpp:
(WebCore::CSSCustomPropertyValue::isCurrentColor const):
* Source/WebCore/css/CSSCustomPropertyValue.h:
* Source/WebCore/style/StyleResolver.cpp:
(WebCore::Style::Resolver::keyframeStylesForAnimation):
* Source/WebCore/style/StyleResolver.h:
Canonical link: https://commits.webkit.org/259808@main
Canonical link: https://commits.webkit.org/259548.124@safari-7615-branch
Commit: 254a133cd4aa05f18c53ee265dd4bc9c73778fd0
https://github.com/WebKit/WebKit/commit/254a133cd4aa05f18c53ee265dd4bc9c73778fd0
Author: Antoine Quint <graouts at webkit.org>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/at-property-animation-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/at-property-animation.html
M Source/WebCore/animation/KeyframeEffect.cpp
M Source/WebCore/animation/KeyframeEffect.h
M Source/WebCore/css/CSSCustomPropertyValue.h
M Source/WebCore/style/StyleResolver.cpp
M Source/WebCore/style/StyleResolver.h
Log Message:
-----------
Cherry-pick a2b572c83047. rdar://problem/105003138
[web-animations] keyframes should be recomputed when a parent element changes value for a custom property set to "inherit"
https://bugs.webkit.org/show_bug.cgi?id=251596
Reviewed by Antti Koivisto.
We keep a set of CSS properties set to "inherit" in a KeyframeEffect but until now only considered
"standard" CSS properties. We now also consider custom properties by changing the set's type from
HashSet<CSSPropertyID> to HashSet<AnimatableProperty>.
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/at-property-animation-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/at-property-animation.html:
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::updateBlendingKeyframes):
* Source/WebCore/animation/KeyframeEffect.h:
(WebCore::KeyframeEffect::inheritedProperties const):
* Source/WebCore/css/CSSCustomPropertyValue.h:
* Source/WebCore/style/StyleResolver.cpp:
(WebCore::Style::Resolver::keyframeStylesForAnimation):
* Source/WebCore/style/StyleResolver.h:
Canonical link: https://commits.webkit.org/259812@main
Canonical link: https://commits.webkit.org/259548.125@safari-7615-branch
Commit: 74bbefb2944458a8e1588e2bf937aa67d295905d
https://github.com/WebKit/WebKit/commit/74bbefb2944458a8e1588e2bf937aa67d295905d
Author: Nikolaos Mouchtaris <nmouchtaris at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M LayoutTests/platform/ios/TestExpectations
M Source/WTF/wtf/PlatformHave.h
M Source/WebCore/platform/graphics/cg/UTIRegistry.cpp
Log Message:
-----------
Cherry-pick ca9f53c112bc. rdar://problem/102490238
AVIF images do not render in iOS Simulator
https://bugs.webkit.org/show_bug.cgi?id=247831
rdar://102534920
Reviewed by Said Abou-Hallawa.
In iOS simulator we are not decoding AVIF images because in
defaultSupportedImageTypes we are filtering the image types
based on CGImageSourceCopyTypeIdentifiers. Currently this
function is not returning public.avif so we do not decode the
image. To workaround this, we add the avif related types after
filtering the image types. I filed rdar://104940377 to get
CGImageSourceCopyTypeIdentifiers returning public.avif in
the iOS simulator.
* Source/WebCore/platform/graphics/cg/UTIRegistry.cpp:
(WebCore::defaultSupportedImageTypes):
Canonical link: https://commits.webkit.org/259819@main
Canonical link: https://commits.webkit.org/259548.126@safari-7615-branch
Commit: b530c67be3d3d040ef8b8658b6343663de71bc5b
https://github.com/WebKit/WebKit/commit/b530c67be3d3d040ef8b8658b6343663de71bc5b
Author: Ben Nham <nham at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WTF/wtf/Assertions.h
M Source/WebCore/workers/service/server/SWServer.cpp
M Source/WebKit/NetworkProcess/NetworkProcess.cpp
M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
M Source/WebKit/UIProcess/Notifications/WebNotificationManagerProxy.cpp
Log Message:
-----------
Cherry-pick f83957784da9. rdar://problem/104977357
Change sensitivity level of webpushd diagnostic logs (take 2)
https://bugs.webkit.org/show_bug.cgi?id=251631
rdar://104977357
Reviewed by Brady Eidson.
Fix some additional places where we log the scope of a push subscription with a private instead of
sensitive log level. We already did some of this in 259764 at main but missed a few callsites that used
a different log level macro.
* Source/WTF/wtf/Assertions.h:
* Source/WebCore/workers/service/server/SWServer.cpp:
(WebCore::SWServer::processPushMessage):
(WebCore::SWServer::processNotificationEvent):
* Source/WebKit/NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::processPushMessage):
* Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _processPushMessage:completionHandler:]):
(-[WKWebsiteDataStore _processPersistentNotificationClick:completionHandler:]):
(-[WKWebsiteDataStore _processPersistentNotificationClose:completionHandler:]):
* Source/WebKit/UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::providerDidUpdateNotificationPolicy):
Canonical link: https://commits.webkit.org/259827@main
Canonical link: https://commits.webkit.org/259548.127@safari-7615-branch
Commit: 78090ccd1b25763284832db0b854b4440d9e537e
https://github.com/WebKit/WebKit/commit/78090ccd1b25763284832db0b854b4440d9e537e
Author: Antoine Quint <graouts at webkit.org>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/svg/painting/parsing/stroke-dasharray-computed-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/strokeDasharray-expected.txt
M LayoutTests/svg/css/scientific-numbers-expected.txt
M LayoutTests/svg/css/scientific-numbers.html
M Source/WebCore/style/StyleBuilderConverter.h
M Source/WebCore/style/StyleBuilderCustom.h
M Source/WebCore/svg/SVGLengthValue.cpp
M Source/WebCore/svg/SVGLengthValue.h
Log Message:
-----------
Cherry-pick af0cc1eb786a. rdar://problem/105018931
SVGLengthValue::fromCSSPrimitiveValue() doesn't have enough context to resolve font-relative units
https://bugs.webkit.org/show_bug.cgi?id=204826
Reviewed by Antti Koivisto.
Pass a CSSToLengthConversionData argument to SVGLengthValue::fromCSSPrimitiveValue() such that we
may call computeLength() on the provided primitive value to resolve font-relative units.
This also changes the behavior of baseline-shift which now accounts for ex units, so
adjusting the relevant test to include a font to have reliable measurements across platforms
and a new expected value.
* LayoutTests/imported/w3c/web-platform-tests/svg/painting/parsing/stroke-dasharray-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/strokeDasharray-expected.txt:
* LayoutTests/svg/css/scientific-numbers-expected.txt:
* LayoutTests/svg/css/scientific-numbers.html:
* Source/WebCore/style/StyleBuilderConverter.h:
(WebCore::Style::BuilderConverter::convertSVGLengthValue):
* Source/WebCore/style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyValueBaselineShift):
* Source/WebCore/svg/SVGLengthValue.cpp:
(WebCore::SVGLengthValue::fromCSSPrimitiveValue):
* Source/WebCore/svg/SVGLengthValue.h:
Canonical link: https://commits.webkit.org/259836@main
Canonical link: https://commits.webkit.org/259548.128@safari-7615-branch
Commit: 574ce8b32634d6e69290728ec40ee566149b76a2
https://github.com/WebKit/WebKit/commit/574ce8b32634d6e69290728ec40ee566149b76a2
Author: Antoine Quint <graouts at webkit.org>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebCore/animation/KeyframeEffect.cpp
M Source/WebCore/animation/KeyframeEffect.h
Log Message:
-----------
Cherry-pick 78b297d677ce. rdar://problem/105019096
[web-animations] KeyframeEffect::setBlendingKeyframes() should take in an rvalue reference
https://bugs.webkit.org/show_bug.cgi?id=251717
Reviewed by Simon Fraser.
This method's purpose is to provide a KeyframeList that KeyframeEffect will take
ownership of, so it should be an rvalue reference.
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::copyPropertiesFromSource):
(WebCore::KeyframeEffect::updateBlendingKeyframes):
(WebCore::KeyframeEffect::setBlendingKeyframes):
(WebCore::KeyframeEffect::computeCSSAnimationBlendingKeyframes):
(WebCore::KeyframeEffect::computeCSSTransitionBlendingKeyframes):
* Source/WebCore/animation/KeyframeEffect.h:
Canonical link: https://commits.webkit.org/259837@main
Canonical link: https://commits.webkit.org/259548.129@safari-7615-branch
Commit: 7b27ad44f5b3f24ce9301887c6700cf212632d05
https://github.com/WebKit/WebKit/commit/7b27ad44f5b3f24ce9301887c6700cf212632d05
Author: Antoine Quint <graouts at webkit.org>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebCore/animation/CSSPropertyAnimation.cpp
M Source/WebCore/animation/KeyframeEffect.cpp
M Source/WebCore/animation/KeyframeEffect.h
M Source/WebCore/animation/KeyframeEffectStack.cpp
M Source/WebCore/css/CSSKeyframeRule.cpp
M Source/WebCore/css/CSSKeyframeRule.h
M Source/WebCore/rendering/style/KeyframeList.cpp
M Source/WebCore/rendering/style/KeyframeList.h
M Source/WebCore/style/StyleResolver.cpp
M Source/WebCore/style/StyleResolver.h
Log Message:
-----------
Cherry-pick 7a34ce6d9914. rdar://problem/105019146
[web-animations] clean up the keyframe recomputation code on style change
https://bugs.webkit.org/show_bug.cgi?id=251674
Reviewed by Antti Koivisto.
We landed a fair few changes recently to recompute keyframes when style changes while animations are
active. The ever-increasing list of parameters passed to Style::Resolver::keyframeStylesForAnimation()
as well as the ever-growing list of change checks made in KeyframeEffectStack::applyKeyframeEffects()
could do with some cleaning up.
We add a new KeyframeList::updatePropertiesMetadata() method which takes in a StyleProperties
and gathers information on the rule's StyleProperties relevant to keyframe recomputation: whether
"inherit" or "currentcolor" values are set, whether CSS variable values are used, whether a relative
font-weight value is set. This replaces duplicated logic found in Style::Resolver (in the CSS Animations
case) and KeyframeEffect (in the JS-originated case) when computing keyframes.
This method is called in Style::Resolver::keyframeStylesForAnimation() and KeyframeEffect::updateBlendingKeyframes().
This allows us to remove the matching information previously stored on KeyframeEffect.
We move all the logic from KeyframeEffectStack::applyKeyframeEffects() related to checking
whether some properties change to a new KeyframeEffect::recomputeKeyframesIfNecessary() which
will query the KeyframeList.
The code is now clearer and any future change to recompute keyframes will no longer require code
duplication.
Doing this refactor also uncovered a small error in the animation wrapper for text-indent which would
not check for the RenderStyle::textIndentLine() and RenderStyle::textIndentType() bits to determine
whether two text-indent were equal. This was likely due to change in the order of functions we use to check
whether a recomputation is required in the new KeyframeEffect::recomputeKeyframesIfNecessary().
* Source/WebCore/animation/CSSPropertyAnimation.cpp:
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::updateBlendingKeyframes):
(WebCore::KeyframeEffect::computeCSSAnimationBlendingKeyframes):
(WebCore::KeyframeEffect::recomputeKeyframesIfNecessary):
(WebCore::KeyframeEffect::animatesDirectionAwareProperty const): Deleted.
(WebCore::KeyframeEffect::propertyAffectingKeyframeResolutionDidChange): Deleted.
(WebCore::KeyframeEffect::hasPropertySetToCurrentColor const): Deleted.
(WebCore::KeyframeEffect::hasColorSetToCurrentColor const): Deleted.
* Source/WebCore/animation/KeyframeEffect.h:
(WebCore::KeyframeEffect::inheritedProperties const): Deleted.
(WebCore::KeyframeEffect::containsCSSVariableReferences const): Deleted.
(WebCore::KeyframeEffect::hasExplicitlyInheritedKeyframeProperty const): Deleted.
(WebCore::KeyframeEffect::hasRelativeFontWeight const): Deleted.
* Source/WebCore/animation/KeyframeEffectStack.cpp:
(WebCore::KeyframeEffectStack::applyKeyframeEffects):
* Source/WebCore/css/CSSKeyframeRule.cpp:
(WebCore::StyleRuleKeyframe::containsCSSVariableReferences const): Deleted.
* Source/WebCore/css/CSSKeyframeRule.h:
* Source/WebCore/rendering/style/KeyframeList.cpp:
(WebCore::KeyframeList::clear):
(WebCore::KeyframeList::usesRelativeFontWeight const):
(WebCore::KeyframeList::hasCSSVariableReferences const):
(WebCore::KeyframeList::hasColorSetToCurrentColor const):
(WebCore::KeyframeList::hasPropertySetToCurrentColor const):
(WebCore::KeyframeList::propertiesSetToInherit const):
(WebCore::KeyframeList::updatePropertiesMetadata):
* Source/WebCore/rendering/style/KeyframeList.h:
* Source/WebCore/style/StyleResolver.cpp:
(WebCore::Style::Resolver::keyframeStylesForAnimation):
* Source/WebCore/style/StyleResolver.h:
Canonical link: https://commits.webkit.org/259838@main
Canonical link: https://commits.webkit.org/259548.130@safari-7615-branch
Commit: aecd66f21c955e8d9739884a077137b09f7dd65b
https://github.com/WebKit/WebKit/commit/aecd66f21c955e8d9739884a077137b09f7dd65b
Author: Yijia Huang <yijia_huang at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
A JSTests/stress/try-catch-backwards-propagation.js
M Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
M Source/JavaScriptCore/dfg/DFGGraph.cpp
M Source/JavaScriptCore/dfg/DFGGraph.h
M Source/JavaScriptCore/dfg/DFGLiveCatchVariablePreservationPhase.cpp
M Source/JavaScriptCore/dfg/DFGPlan.cpp
Log Message:
-----------
Cherry-pick 5e1033a7cd03. rdar://problem/92654142
Fix variable liveness for try catch in DFG
https://bugs.webkit.org/show_bug.cgi?id=239758
rdar://92654142
Reviewed by Yusuke Suzuki.
There is no successor and predecessor relationship between try and catch
block in DFG, in other words node flags cannot be passed from catch block
to its `predecessors`. If a variable defined outside the try catch block
but only be used in the catch block, then our compiler would mis-analyze
the liveness of the varible w.r.t the catch block. Therefore,
`LiveCatchVariablePreservationPhase` should be to performed before backwards propagation.
* JSTests/stress/try-catch-backwards-propagation.js: Added.
(throwFunction):
(foo1):
(foo2):
(foo3):
(foo4):
(foo5):
(foo6):
(foo7):
(foo8):
(foo9):
(foo10):
(foo11):
(foo12):
(opt):
* Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parse):
* Source/JavaScriptCore/dfg/DFGLiveCatchVariablePreservationPhase.cpp:
(JSC::DFG::LiveCatchVariablePreservationPhase::LiveCatchVariablePreservationPhase):
(JSC::DFG::LiveCatchVariablePreservationPhase::handleBlockForTryCatch):
(JSC::DFG::performLiveCatchVariablePreservationPhase):
* Source/JavaScriptCore/dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
Canonical link: https://commits.webkit.org/259839@main
Canonical link: https://commits.webkit.org/259548.131@safari-7615-branch
Commit: bfe24ab1eab6e557c89d0dddf59bcc7cdbae689e
https://github.com/WebKit/WebKit/commit/bfe24ab1eab6e557c89d0dddf59bcc7cdbae689e
Author: Alan Baradlay <zalan at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
A LayoutTests/fast/inline/text_overflow_ellipsis_simple-expected.html
A LayoutTests/fast/inline/text_overflow_ellipsis_simple.html
M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.h
M Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineLine.h
M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.h
M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayBox.h
M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp
M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.h
M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLine.h
M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp
M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.h
Log Message:
-----------
Cherry-pick ff75ee6b051e. rdar://problem/105029885
[RTL/bidi/vertical] Incorrect content truncation when "text-overflow" is "ellipsis"
https://bugs.webkit.org/show_bug.cgi?id=251608
Reviewed by Antti Koivisto.
In this patch inline content truncation (overflow: hidden + text-overflow: ellipsis) is moved from logical to visual space.
It ensures that the truncation happens _after_ bidi reordering and also _after_ applying writing-mode.
Now instead of running truncation as part of the trailing content handling in LineBuilder::close right after we figured the breaking position for
the inline content, we do it after constructing the display boxes (and the associated display line).
1. Remove truncation code from Line::Run and all the related code all the way to display line construction.
2. Introduce truncateOverflowingDisplayBoxes. It applies truncation on display box in visual order (the truncation logic is actually moved from Line::Run, nothing really new here).
* LayoutTests/fast/inline/text_overflow_ellipsis_simple-expected.html: Added.
* LayoutTests/fast/inline/text_overflow_ellipsis_simple.html: Added.
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::lineEndingEllipsisPolicy):
(WebCore::Layout::InlineFormattingContext::lineLayout):
(WebCore::Layout::InlineFormattingContext::createDisplayContentForLine):
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.h:
* Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp:
(WebCore::Layout::Line::initialize):
(WebCore::Layout::Line::Run::detachTrailingWhitespace):
(WebCore::Layout::Line::truncate): Deleted.
(WebCore::Layout::Line::Run::truncate): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineLine.h:
(WebCore::Layout::Line::isContentTruncated const): Deleted.
(WebCore::Layout::Line::Run::isTruncated const): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::layoutInlineContent):
(WebCore::Layout::LineBuilder::computedIntrinsicWidth):
(WebCore::Layout::LineBuilder::close):
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.h:
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayBox.h:
(WebCore::InlineDisplay::Box::Text::setPartiallyVisibleContentLength):
(WebCore::InlineDisplay::Box::Box):
(WebCore::InlineDisplay::Box::setLeft):
(WebCore::InlineDisplay::Box::setIsFullyTruncated):
(WebCore::InlineDisplay::Box::Text::Text):
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
(WebCore::Layout::InlineDisplayContentBuilder::appendTextDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::appendAtomicInlineLevelDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::appendInlineBoxDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::appendSpanningInlineBoxDisplayBox):
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.h:
(WebCore::Layout::InlineDisplayContentBuilder::rootStyle const):
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLine.h:
(WebCore::InlineDisplay::Line::setEllipsisVisualRect):
(WebCore::InlineDisplay::Line::Line):
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp:
(WebCore::Layout::flipLogicalLineRectToVisualForWritingMode):
(WebCore::Layout::InlineDisplayLineBuilder::build const):
(WebCore::Layout::truncateOverflowingDisplayBoxes):
(WebCore::Layout::InlineDisplayLineBuilder::trailingEllipsisVisualRect):
(WebCore::Layout::InlineDisplayLineBuilder::trailingEllipsisRect const): Deleted.
(WebCore::Layout::InlineDisplayLineBuilder::flipLogicalLineRectToVisualForWritingMode const): Deleted.
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.h:
Canonical link: https://commits.webkit.org/259850@main
Canonical link: https://commits.webkit.org/259548.132@safari-7615-branch
Commit: d1ce86643246c01e93cc8147aa687210d3cdc5b0
https://github.com/WebKit/WebKit/commit/d1ce86643246c01e93cc8147aa687210d3cdc5b0
Author: Cameron McCormack <heycam at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebCore/css/StyleRule.cpp
M Source/WebCore/css/StyleRule.h
Log Message:
-----------
Cherry-pick aea4f3f29a7c. rdar://problem/105046580
Shrink StyleRule by reducing padding and moving CSS Nesting fields to a rare data object
https://bugs.webkit.org/show_bug.cgi?id=251744
rdar://105046580
Reviewed by Simon Fraser.
This reduces StyleRule from 64 to 40 bytes.
* Source/WebCore/css/StyleRule.cpp:
(WebCore::StyleRuleRareData::createIfNeeded):
(WebCore::StyleRule::StyleRule):
(WebCore::StyleRule::rareData const):
(WebCore::StyleRule::setNestedRules):
(WebCore::StyleRule::setResolvedSelectorList const):
(WebCore::emptyRuleVector):
(WebCore::StyleRule::nestedRules const):
* Source/WebCore/css/StyleRule.h:
(WebCore::StyleRuleRareData::createIfNeeded):
Canonical link: https://commits.webkit.org/259875@main
Canonical link: https://commits.webkit.org/259548.133@safari-7615-branch
Commit: 96344ac7fb6f4df3807c0cdcc0c6af16aa20ab72
https://github.com/WebKit/WebKit/commit/96344ac7fb6f4df3807c0cdcc0c6af16aa20ab72
Author: Antti Koivisto <antti at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp
Log Message:
-----------
Cherry-pick 470080c7ba5f. rdar://problem/105025598
LayoutIntegration::BoxTree::m_renderers wastes 16KB of vector capacity
https://bugs.webkit.org/show_bug.cgi?id=251726
rdar://105025598
Reviewed by Simon Fraser.
* Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp:
(WebCore::LayoutIntegration::BoxTree::buildTreeForInlineContent):
(WebCore::LayoutIntegration::BoxTree::buildTreeForFlexContent):
shrinkToFit() the vector
Canonical link: https://commits.webkit.org/259895@main
Canonical link: https://commits.webkit.org/259548.134@safari-7615-branch
Commit: a4b0a9202145a93737024a38094bef4a9e7257d9
https://github.com/WebKit/WebKit/commit/a4b0a9202145a93737024a38094bef4a9e7257d9
Author: Alan Baradlay <zalan at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebCore/layout/floats/FloatingState.cpp
M Source/WebCore/layout/floats/FloatingState.h
M Source/WebCore/layout/formattingContexts/block/BlockFormattingState.cpp
M Source/WebCore/layout/formattingContexts/block/BlockFormattingState.h
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
Log Message:
-----------
Cherry-pick f2ad1fd561f5. rdar://problem/105025457
FloatingState::m_floats wastes 30KB of vector capacity
https://bugs.webkit.org/show_bug.cgi?id=251725
<rdar://problem/105025457>
Reviewed by Antti Koivisto.
Introduce shrinkToFit to BlockFormattingState (which we already have on InlineFormattingState).
* Source/WebCore/layout/floats/FloatingState.cpp:
(WebCore::Layout::FloatingState::shrinkToFit):
* Source/WebCore/layout/floats/FloatingState.h:
* Source/WebCore/layout/formattingContexts/block/BlockFormattingState.cpp:
(WebCore::Layout::BlockFormattingState::shrinkToFit):
* Source/WebCore/layout/formattingContexts/block/BlockFormattingState.h:
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::constructContent):
Canonical link: https://commits.webkit.org/259909@main
Canonical link: https://commits.webkit.org/259548.135@safari-7615-branch
Commit: 15a5c5f4055c8a82b5b0db3f0dfa5041500dd30a
https://github.com/WebKit/WebKit/commit/15a5c5f4055c8a82b5b0db3f0dfa5041500dd30a
Author: Cameron McCormack <heycam at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
A LayoutTests/fast/css/lang-matching-document-invalidation-expected.txt
A LayoutTests/fast/css/lang-matching-document-invalidation.html
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/dom/Element.cpp
M Source/WebCore/dom/Element.h
M Source/WebCore/dom/ElementData.cpp
M Source/WebCore/dom/ElementData.h
M Source/WebCore/dom/EventTarget.h
Log Message:
-----------
Cherry-pick 8858f1de792a. rdar://problem/104987630
Avoid storing effective language on ElementRareData when it matches the effective document element language
https://bugs.webkit.org/show_bug.cgi?id=251657
<rdar://problem/104987630>
Reviewed by Ryosuke Niwa.
When an element's lang attribute is set, we set the effective language on
the ElementRareData of all elements in the subtree. We have an existing
optimization that avoids this if we're setting it on the document
element. There are some pages, like Wikipedia, that set an explicit
lang on some other element in the body of the page, but which matches
the document element's lang.
We can avoid the memory overhead of allocating ElementRareData to store
the effective language in this case by using a flag on the element. On
large Wikipedia pages this can save several MB.
If the document element language changes later, we must update the
effective lang state on subtrees that are using this flag. A WeakHashSet
is added to Document to track elements that have an explicit lang
attribute that matches the effective document element language.
Three flags on EventTarget are introduced:
- HasLangAttr and HasXMLLangAttr: records that the element has the
corresponding lang attribute. This allows us to avoid searching
for an attribute when updating the effective lang state.
- EffectiveLangKnownToMatchDocument: records that the element has an
effective lang that matches the effective document element language,
whether it's due to an explicit lang attribute or inherited from an
ancestor. This flag is used in place of
ElementRareData::m_effectiveLang.
The EffectiveLangKnownToMatchDocument flag is used in place of the "null
effective language means we've inherited the effective document
language" state so that disconnected subtrees can also make use of this
optimization. Otherwise, for a case like this:
let e = document.createElement("div");
e.lang = "en"; // matching document
e.append(document.createElement("div"));
the child element would not know whether to return nullptr or "en" from
Element::effectiveLang() without looking up the tree to see if there is
an ancestor with a langauge attribute.
The EffectiveLangKnownToMatchDocument flag is not
EffectiveLangMatchesDocument, since we don't set it if the document
element language changes and an existing element starts matching it.
Rather than track all elements with lang attributes to handle such
cases, we leave the effective lang stored on the ElementRareData.
* LayoutTests/fast/css/lang-matching-document-invalidation-expected.txt: Added.
* LayoutTests/fast/css/lang-matching-document-invalidation.html: Added.
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::setDocumentElementLanguage):
(WebCore::Document::addElementWithLangAttrMatchingDocument):
(WebCore::Document::removeElementWithLangAttrMatchingDocument):
* Source/WebCore/dom/Document.h:
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::~Element):
(WebCore::Element::attributeChanged):
(WebCore::Element::setEffectiveLangInSubtree):
(WebCore::Element::didMoveToNewDocument):
(WebCore::Element::setEffectiveLangFromParent):
(WebCore::Element::setEffectiveLang):
(WebCore::Element::insertedIntoAncestor):
(WebCore::Element::hasEffectiveLangState const):
(WebCore::Element::removedFromAncestor):
(WebCore::Element::effectiveLang const):
(WebCore::Element::langFromAttribute const):
(WebCore::Element::langAttrMatchesDocument const):
(WebCore::Element::setLangAttrMatchesDocument):
(WebCore::Element::effectiveLangMatchesDocument const):
(WebCore::Element::setEffectiveLangMatchesDocument):
* Source/WebCore/dom/Element.h:
* Source/WebCore/dom/EventTarget.h:
Canonical link: https://commits.webkit.org/259931@main
Canonical link: https://commits.webkit.org/259548.136@safari-7615-branch
Commit: d8def5f012b2e5c5eb61db9e237ecc5b8dbd378e
https://github.com/WebKit/WebKit/commit/d8def5f012b2e5c5eb61db9e237ecc5b8dbd378e
Author: Sihui Liu <sihui_liu at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M LayoutTests/storage/filesystemaccess/resources/sync-access-handle-storage-limit.js
M LayoutTests/storage/filesystemaccess/sync-access-handle-storage-limit-worker-expected.txt
M LayoutTests/storage/filesystemaccess/sync-access-handle-storage-limit-worker.html
M Source/WebKit/NetworkProcess/storage/FileSystemStorageHandle.cpp
M Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
M Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
M Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
M Tools/WebKitTestRunner/TestController.cpp
M Tools/WebKitTestRunner/TestController.h
M Tools/WebKitTestRunner/TestInvocation.cpp
M Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm
M Tools/WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.h
M Tools/WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.mm
Log Message:
-----------
Cherry-pick 459a045d57da. rdar://problem/104980443
Preallocate quota for FileSystemSyncAccessHandle
https://bugs.webkit.org/show_bug.cgi?id=251642
rdar://104980443
Reviewed by Youenn Fablet.
QuotaManager is in network process, and FileSystemSyncAcessHandle performs file operation in web process, so web process
needs to message network process when it needs to use more space. However, FileSystemSyncAccessHandle::write is sync and
supposed to be performant, which means we should unblock them if possible. This patch makes QuotaManager allocate more
capacity to FileSystemSyncAccessHandle than it requests, so that FileSystemSyncAccessHandle would not need to send a
message on each write).
The current allocation policy for requested capacity x is:
1. If x <= 1MB, new capacity is 1MB.
2. If 1MB < x < 256MB, new capacity is 2^(log2(x) + 1).
3. If x >= 256MB, new capacity is (x / 128MB + 1) * 128MB.
With this change, FileSystemSyncAcessHandle tests will start to fail if we disallow quota to increase (e.g. disallow it
to check if quota error can be thrown), because TestRunner sets origin quota to be 40KB by default, and each
FileSystemSyncAcessHandle requests at least 1MB. To fix this, this patch adds a new setQuota() function on TestRunner to
allow configuring quota for each test.
* LayoutTests/storage/filesystemaccess/resources/sync-access-handle-storage-limit.js:
* LayoutTests/storage/filesystemaccess/sync-access-handle-storage-limit-worker-expected.txt:
* LayoutTests/storage/filesystemaccess/sync-access-handle-storage-limit-worker.html:
* Source/WebKit/NetworkProcess/storage/FileSystemStorageHandle.cpp:
(WebKit::FileSystemStorageHandle::requestNewCapacityForSyncAccessHandle):
* Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setQuota):
* Tools/WebKitTestRunner/InjectedBundle/TestRunner.h:
* Tools/WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::setQuota):
* Tools/WebKitTestRunner/TestController.h:
* Tools/WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
* Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::cocoaResetStateToConsistentValues):
(WTR::TestController::setQuota):
* Tools/WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.h:
* Tools/WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.mm:
(-[TestWebsiteDataStoreDelegate init]):
(-[TestWebsiteDataStoreDelegate requestStorageSpace:frameOrigin:quota:currentSize:spaceRequired:decisionHandler:]):
(-[TestWebsiteDataStoreDelegate setQuota:]):
Canonical link: https://commits.webkit.org/259946@main
Canonical link: https://commits.webkit.org/259548.137@safari-7615-branch
Commit: 0d49704e79e408d1352292c1a0813e4c8db02d64
https://github.com/WebKit/WebKit/commit/0d49704e79e408d1352292c1a0813e4c8db02d64
Author: Jean-Yves Avenard <jya at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebKit/Scripts/process-entitlements.sh
Log Message:
-----------
Cherry-pick faa11d115c78. rdar://problem/105100208
REGRESSION (Safari 16.1): mediaSession API not showing artwork: part 2
https://bugs.webkit.org/show_bug.cgi?id=251836
rdar://105100208
Reviewed by Youenn Fablet.
In https://bugs.webkit.org/show_bug.cgi?id=247043 an entitlements was added
in order to satisfy extra security requirements allowing to send compressed
images to MediaRemote.
Unfortunately, the entitlements was only added for macOS. We add it for iOS too.
* Source/WebKit/Scripts/process-entitlements.sh:
Canonical link: https://commits.webkit.org/259952@main
Canonical link: https://commits.webkit.org/259548.138@safari-7615-branch
Commit: 0417b7149c200d0ec3d1c913019cd1250e68f9ba
https://github.com/WebKit/WebKit/commit/0417b7149c200d0ec3d1c913019cd1250e68f9ba
Author: Antti Koivisto <antti at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
A LayoutTests/http/tests/css/link-with-non-matching-media-slow-load-expected.html
A LayoutTests/http/tests/css/link-with-non-matching-media-slow-load.html
M Source/WebCore/page/FrameView.cpp
M Source/WebCore/testing/Internals.cpp
M Source/WebCore/testing/Internals.h
M Source/WebCore/testing/Internals.idl
Log Message:
-----------
Cherry-pick 9e31d4e46121. rdar://problem/102178226
<link> elements with media queries that do not affect the current page can be delayed
https://bugs.webkit.org/show_bug.cgi?id=39455
rdar://102178226
Reviewed by Alan Baradlay.
We correctly deprioritize stylesheets with non-matching media attribute and don't make them
rendering blocking. However they may still delay the visually non-empty milestone. This delay
only comes into play if there is not enough visual content to trigger the milestone otherwise.
This may end up delaying rendering until the non-matching stylesheets are fully loaded on simple
pages.
* LayoutTests/http/tests/css/link-with-non-matching-media-slow-load-expected.html: Added.
* LayoutTests/http/tests/css/link-with-non-matching-media-slow-load.html: Added.
* Source/WebCore/page/FrameView.cpp:
(WebCore::FrameView::checkAndDispatchDidReachVisuallyNonEmptyState):
Ignore "very low" priority resources when determining if everything important is loaded.
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::isVisuallyNonEmpty const):
* Source/WebCore/testing/Internals.h:
* Source/WebCore/testing/Internals.idl:
Testing support.
Canonical link: https://commits.webkit.org/259963@main
Canonical link: https://commits.webkit.org/259548.139@safari-7615-branch
Commit: 1d40b038805bd2af4f89fd3794f511940502fff6
https://github.com/WebKit/WebKit/commit/1d40b038805bd2af4f89fd3794f511940502fff6
Author: Youenn Fablet <youennf at gmail.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
A LayoutTests/http/wpt/resource-timing/crossorigin-servertiming-expected.txt
A LayoutTests/http/wpt/resource-timing/crossorigin-servertiming.html
A LayoutTests/http/wpt/resource-timing/resources/server-timing.py
M Source/WebCore/loader/ResourceTiming.cpp
M Source/WebCore/loader/ResourceTiming.h
M Source/WebCore/loader/ResourceTimingInformation.cpp
Log Message:
-----------
Cherry-pick b67af69609f3. rdar://problem/104427347
Server-Timing data can be read cross-origin
https://bugs.webkit.org/show_bug.cgi?id=250837
rdar://problem/104427347
Reviewed by Alex Christensen.
For document (iframe, object, embed) loads, the origin of the load is the origin of the URL.
This is same origin by nature.
But the origin we will expose the timing info is the origin of the initiator.
Make sure to recompute the same origin request flag in that case.
* LayoutTests/http/wpt/resource-timing/crossorigin-servertiming-expected.txt: Added.
* LayoutTests/http/wpt/resource-timing/crossorigin-servertiming.html: Added.
* LayoutTests/http/wpt/resource-timing/server-timing.py: Added.
(main):
* Source/WebCore/loader/ResourceTiming.cpp:
(WebCore::ResourceTiming::updateExposure):
* Source/WebCore/loader/ResourceTiming.h:
* Source/WebCore/loader/ResourceTimingInformation.cpp:
(WebCore::ResourceTimingInformation::addResourceTiming):
Canonical link: https://commits.webkit.org/260006@main
Canonical link: https://commits.webkit.org/259548.140@safari-7615-branch
Commit: 962093e8357f1c483345fad2b99ae7376bda6f9c
https://github.com/WebKit/WebKit/commit/962093e8357f1c483345fad2b99ae7376bda6f9c
Author: Alan Baradlay <zalan at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M LayoutTests/fast/block/height-percentage-descendants-with-absolute-pos-containingblock-expected.txt
M LayoutTests/fast/repaint/box-shadow-top-left-repaint-expected.txt
M LayoutTests/fast/repaint/focus-ring-repaint-expected.txt
M LayoutTests/fast/repaint/leftover-after-shrinking-content-expected.txt
M LayoutTests/fast/repaint/overlapping-lines-with-ink-overflow-expected.txt
M LayoutTests/fast/repaint/simple-line-layout-shrinking-content-expected.txt
A LayoutTests/fast/repaint/text-content-shrinks-repaint-expected.txt
A LayoutTests/fast/repaint/text-content-shrinks-repaint.html
M LayoutTests/fast/repaint/vertical-text-repaint-expected.txt
M LayoutTests/platform/ios-wk2/fast/block/height-percentage-descendants-with-absolute-pos-containingblock-expected.txt
M LayoutTests/platform/mac-wk1/fast/repaint/leftover-after-shrinking-content-expected.txt
M Source/WebCore/rendering/RenderBlockFlow.cpp
Log Message:
-----------
Cherry-pick f5f87a80a556. rdar://problem/104966985
REGRESSION (258819 at main): Wolfram Alpha dropdown box has repaint artifacts
https://bugs.webkit.org/show_bug.cgi?id=251816
<rdar://104966985>
Reviewed by Antti Koivisto.
Due to eager display content invalidation, repaints issued after calling RenderBlockFlow::invalidateLineLayoutPath produce empty rects.
Normally this invalidation call is followed by a layout which will eventually issue another repaint. This second repaint, with no partial layout support in IFC (and most content are now covered by IFC)
we will most likely be a full, though redundant repaint.
(note that this newly introduced repaint may be overly inflated when tall container has constantly changing short inline content)
* LayoutTests/fast/repaint/text-content-shrinks-repaint-expected.txt: Added.
* LayoutTests/fast/repaint/text-content-shrinks-repaint.html: Added.
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::invalidateLineLayoutPath):
Canonical link: https://commits.webkit.org/260008@main
Canonical link: https://commits.webkit.org/259548.141@safari-7615-branch
Commit: 9c1db48a6f8fddee51a170b80b8fecc1ad98de13
https://github.com/WebKit/WebKit/commit/9c1db48a6f8fddee51a170b80b8fecc1ad98de13
Author: Commit Queue <commit-queue at webkit.org>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
R LayoutTests/fast/css/lang-matching-document-invalidation-expected.txt
R LayoutTests/fast/css/lang-matching-document-invalidation.html
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/dom/Element.cpp
M Source/WebCore/dom/Element.h
M Source/WebCore/dom/ElementData.cpp
M Source/WebCore/dom/ElementData.h
M Source/WebCore/dom/EventTarget.h
Log Message:
-----------
Cherry-pick 5b3f738b710a. rdar://problem/105177446
Unreviewed, reverting r259931 at main.
https://bugs.webkit.org/show_bug.cgi?id=251932
Caused tests to assert in language attribute handling code
Reverted changeset:
"Avoid storing effective language on ElementRareData when it matches the effective document element language"
https://bugs.webkit.org/show_bug.cgi?id=251657
https://commits.webkit.org/259931@main
Canonical link: https://commits.webkit.org/260019@main
Canonical link: https://commits.webkit.org/259548.142@safari-7615-branch
Commit: 4d8071645a67f94a4ff2c6f3050f6fbfed5c3b96
https://github.com/WebKit/WebKit/commit/4d8071645a67f94a4ff2c6f3050f6fbfed5c3b96
Author: Antti Koivisto <antti at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebCore/style/StyleScopeRuleSets.cpp
Log Message:
-----------
Cherry-pick 381f8ae629b0. rdar://problem/105011534
Style::RuleFeatureSet wastes vector capacity
https://bugs.webkit.org/show_bug.cgi?id=251701
rdar://105011534
Reviewed by Simon Fraser.
* Source/WebCore/style/StyleScopeRuleSets.cpp:
(WebCore::Style::ensureInvalidationRuleSets):
Shrink-to-fit the RuleSets (which also handles the RuleFeatureSets).
Canonical link: https://commits.webkit.org/260021@main
Canonical link: https://commits.webkit.org/259548.143@safari-7615-branch
Commit: 0a81af59b25b8d60873ff2d5cdb79ecfc33ebd9f
https://github.com/WebKit/WebKit/commit/0a81af59b25b8d60873ff2d5cdb79ecfc33ebd9f
Author: Tim Nguyen <ntim at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
A LayoutTests/fullscreen/fullscreen-iframe-navigation-expected.html
A LayoutTests/fullscreen/fullscreen-iframe-navigation.html
A LayoutTests/fullscreen/resources/fullscreen-iframe-navigation-target.html
M LayoutTests/platform/mac-wk1/TestExpectations
M Source/WebCore/dom/FullscreenManager.cpp
M Source/WebCore/dom/FullscreenManager.h
Log Message:
-----------
Cherry-pick 9215d7d582cb. rdar://problem/104393093
Navigation within iframe doesn't exit fullscreen for parent iframe element
https://bugs.webkit.org/show_bug.cgi?id=251896
rdar://104393093
Reviewed by Chris Dumez.
This was because the exiting document was already detached from the Frame object, causing it to fail to find the top document.
To fix this, we store the top document when initializing FullscreenManager.
* LayoutTests/fullscreen/fullscreen-iframe-navigation-expected.html: Added.
* LayoutTests/fullscreen/fullscreen-iframe-navigation.html: Added.
* LayoutTests/fullscreen/resources/fullscreen-iframe-navigation-target.html: Added.
* LayoutTests/platform/mac-wk1/TestExpectations:
* Source/WebCore/dom/FullscreenManager.cpp:
(WebCore::FullscreenManager::cancelFullscreen):
(WebCore::documentsToUnfullscreen):
(WebCore::FullscreenManager::exitFullscreen):
(WebCore::FullscreenManager::finishExitFullscreen):
(WebCore::FullscreenManager::didExitFullscreen):
* Source/WebCore/dom/FullscreenManager.h:
Canonical link: https://commits.webkit.org/260024@main
Canonical link: https://commits.webkit.org/259548.144@safari-7615-branch
Commit: db195a0fa3f7504f46bc0cfd296c2e6a100f977d
https://github.com/WebKit/WebKit/commit/db195a0fa3f7504f46bc0cfd296c2e6a100f977d
Author: Antoine Quint <graouts at webkit.org>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/property-list.js
M LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/property-types.js
M LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt
M LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt
M LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt
M Source/WebCore/animation/CSSPropertyAnimation.cpp
Log Message:
-----------
Cherry-pick 221eb1d58b67. rdar://problem/104346766
[web-animations] line-height should not transition from default value to a number
https://bugs.webkit.org/show_bug.cgi?id=251911
rdar://104346766
Reviewed by Antti Koivisto.
By default, properties represented by a Length in RenderStyle use discrete interpolation when
their LengthType differs. In the case of line-height, BuilderConverter::convertLineHeight() yields:
- LengthType::Percent for the "normal" CSS value (with -100 as the float value),
- LengthType::Percent for <number> CSS values,
- LengthType::Fixed for <length-percentage> values.
This means that animating between "normal" and <number> would use an interpolation because we would
see two LengthType::Percent values.
To deal with this, we now have a dedicated animation wrapper for "line-height" which detects "normal"
values and returns false if either the from or to value can be mapped back to "normal".
* LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/property-list.js:
* LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/property-types.js:
(const.discreteType.testInterpolation):
(const.discreteType.testAdditionOrAccumulation):
* LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt:
* LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt:
* LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:
* Source/WebCore/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
Canonical link: https://commits.webkit.org/260028@main
Canonical link: https://commits.webkit.org/259548.145@safari-7615-branch
Commit: 79797a9fbf8d2fa7347003818bd0c6e35694da63
https://github.com/WebKit/WebKit/commit/79797a9fbf8d2fa7347003818bd0c6e35694da63
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
A JSTests/stress/string-to-well-formed-number.js
M Source/JavaScriptCore/runtime/StringPrototype.cpp
Log Message:
-----------
Cherry-pick aa30fafbe181. rdar://problem/105104668
[JSC] String#toWellFormed should return stringified value
https://bugs.webkit.org/show_bug.cgi?id=251757
rdar://problem/105104668
Reviewed by Justin Michaud and Mark Lam.
We should return stringified value instead of original thisValue for the fast path.
* JSTests/stress/string-to-well-formed-number.js: Added.
(shouldBe):
* Source/JavaScriptCore/runtime/StringPrototype.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
Canonical link: https://commits.webkit.org/260043@main
Canonical link: https://commits.webkit.org/259548.146@safari-7615-branch
Commit: 9ff606033b841541f8c22d8f12fb7b34b53d2a01
https://github.com/WebKit/WebKit/commit/9ff606033b841541f8c22d8f12fb7b34b53d2a01
Author: Cameron McCormack <heycam at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
A LayoutTests/fast/css/lang-matching-document-invalidation-expected.txt
A LayoutTests/fast/css/lang-matching-document-invalidation.html
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/dom/Element.cpp
M Source/WebCore/dom/Element.h
M Source/WebCore/dom/ElementData.cpp
M Source/WebCore/dom/ElementData.h
M Source/WebCore/dom/EventTarget.h
Log Message:
-----------
Cherry-pick f31c6cd34376. rdar://problem/104987630
Avoid storing effective language on ElementRareData when it matches the effective document element language
https://bugs.webkit.org/show_bug.cgi?id=251657
<rdar://problem/104987630>
Reviewed by Ryosuke Niwa.
When an element's lang attribute is set, we set the effective language on
the ElementRareData of all elements in the subtree. We have an existing
optimization that avoids this if we're setting it on the document
element. There are some pages, like Wikipedia, that set an explicit
lang on some other element in the body of the page, but which matches
the document element's lang.
We can avoid the memory overhead of allocating ElementRareData to store
the effective language in this case by using a flag on the element. On
large Wikipedia pages this can save several MB.
If the document element language changes later, we must update the
effective lang state on subtrees that are using this flag. A WeakHashSet
is added to Document to track elements that have an explicit lang
attribute that matches the effective document element language.
Three flags on EventTarget are introduced:
- HasLangAttr and HasXMLLangAttr: records that the element has the
corresponding lang attribute. This allows us to avoid searching
for an attribute when updating the effective lang state.
- EffectiveLangKnownToMatchDocument: records that the element has an
effective lang that matches the effective document element language,
whether it's due to an explicit lang attribute or inherited from an
ancestor. This flag is used in place of
ElementRareData::m_effectiveLang.
The EffectiveLangKnownToMatchDocument flag is used in place of the "null
effective language means we've inherited the effective document
language" state so that disconnected subtrees can also make use of this
optimization. Otherwise, for a case like this:
let e = document.createElement("div");
e.lang = "en"; // matching document
e.append(document.createElement("div"));
the child element would not know whether to return nullptr or "en" from
Element::effectiveLang() without looking up the tree to see if there is
an ancestor with a langauge attribute.
The EffectiveLangKnownToMatchDocument flag is not
EffectiveLangMatchesDocument, since we don't set it if the document
element language changes and an existing element starts matching it.
Rather than track all elements with lang attributes to handle such
cases, we leave the effective lang stored on the ElementRareData.
* LayoutTests/fast/css/lang-matching-document-invalidation-expected.txt: Added.
* LayoutTests/fast/css/lang-matching-document-invalidation.html: Added.
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::setDocumentElementLanguage):
(WebCore::Document::addElementWithLangAttrMatchingDocument):
(WebCore::Document::removeElementWithLangAttrMatchingDocument):
* Source/WebCore/dom/Document.h:
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::~Element):
(WebCore::Element::attributeChanged):
(WebCore::Element::setEffectiveLangInSubtree):
(WebCore::Element::didMoveToNewDocument):
(WebCore::Element::setEffectiveLangFromParent):
(WebCore::Element::setEffectiveLang):
(WebCore::Element::insertedIntoAncestor):
(WebCore::Element::hasEffectiveLangState const):
(WebCore::Element::removedFromAncestor):
(WebCore::Element::effectiveLang const):
(WebCore::Element::langFromAttribute const):
(WebCore::Element::langAttrMatchesDocument const):
(WebCore::Element::setLangAttrMatchesDocument):
(WebCore::Element::effectiveLangMatchesDocument const):
(WebCore::Element::setEffectiveLangMatchesDocument):
* Source/WebCore/dom/Element.h:
* Source/WebCore/dom/EventTarget.h:
Canonical link: https://commits.webkit.org/260047@main
Canonical link: https://commits.webkit.org/259548.147@safari-7615-branch
Commit: 9049b2cd9e89d5e78499c943cd1892524c89ac7f
https://github.com/WebKit/WebKit/commit/9049b2cd9e89d5e78499c943cd1892524c89ac7f
Author: Timothy Hatcher <timothy at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
M Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm
Log Message:
-----------
Cherry-pick 1adec3c9e021. rdar://problem/105181176
REGRESSION (259976 at main): [iOS / macOS] TestWebKitAPI.URLSchemeHandler.DisableCORS is consistently failing
https://webkit.org/b/251935
rdar://105181176
Reviewed by Sihui Liu.
Remove the dynamic version of _corsDisablingPatterns on WKWebView, since it was was never adopted in Safari
and is not working correctly since SecurityPolicy never removes UserContentURLPatterns from the allowlist.
We are tracking updating this mechanism for extensions in rdar://102912898.
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _corsDisablingPatterns]): Deleted.
(-[WKWebView _setCORSDisablingPatterns:]): Deleted.
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
Remove test for setting _corsDisablingPatterns on WKWebView.
Canonical link: https://commits.webkit.org/260048@main
Canonical link: https://commits.webkit.org/259548.148@safari-7615-branch
Commit: fab603242a7d5e7eb11756fb22b802a22a593198
https://github.com/WebKit/WebKit/commit/fab603242a7d5e7eb11756fb22b802a22a593198
Author: Antoine Quint <graouts at webkit.org>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animatable/animate-no-browsing-context-expected.txt
M Source/WebCore/animation/AnimationEffect.h
M Source/WebCore/animation/KeyframeEffect.cpp
M Source/WebCore/animation/KeyframeEffect.h
M Source/WebCore/animation/WebAnimation.cpp
Log Message:
-----------
Cherry-pick 87f47a6461e3. rdar://problem/41000163
[web-animations] web-animations/interfaces/Animatable/animate-no-browsing-context.html is a unique failure
https://bugs.webkit.org/show_bug.cgi?id=186494
rdar://problem/41000163
Reviewed by Dean Jackson.
The Web Animations spec defines several factors for an animation to be considered "ready" [0], one being
that the "user agent has completed any setup required to begin the playback of the animation's associated
effect including rendering the first frame of any keyframe effect".
While it does not specifically calls out the lack of a browsing context for the associated effect's target's
document, there certainly won't be any frames rendered in that specific case. So we do not run pending tasks,
the condition for the "ready" promise to resolve, if the associated effect is associated with a document
lacking a browsing context.
I filed a spec issue [1] to clarify this in the spec, but I believe the spirit of the spec already goes in
the direction of this test.
[0] https://drafts.csswg.org/web-animations-1/#ready
[1] https://github.com/w3c/csswg-drafts/issues/8439
* LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animatable/animate-no-browsing-context-expected.txt:
* Source/WebCore/animation/AnimationEffect.h:
(WebCore::AnimationEffect::preventsAnimationReadiness const):
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::preventsAnimationReadiness const):
* Source/WebCore/animation/KeyframeEffect.h:
* Source/WebCore/animation/WebAnimation.cpp:
(WebCore::WebAnimation::tick):
Canonical link: https://commits.webkit.org/260101@main
Canonical link: https://commits.webkit.org/259548.149@safari-7615-branch
Commit: c18f572b7fdd6c98f11e74733a0d6e7cf2921d8d
https://github.com/WebKit/WebKit/commit/c18f572b7fdd6c98f11e74733a0d6e7cf2921d8d
Author: David Kilzer <ddkilzer at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/DecomposedGlyphs.h
M Source/WebCore/platform/graphics/ImageSource.cpp
M Source/WebCore/platform/graphics/ImageSource.h
M Source/WebCore/platform/graphics/NativeImage.h
M Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.h
M Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm
M Source/WebCore/platform/network/cocoa/RangeResponseGenerator.h
M Source/WebCore/platform/network/cocoa/RangeResponseGenerator.mm
M Source/WebCore/storage/StorageQuotaManager.h
M Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp
M Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.h
Log Message:
-----------
Cherry-pick 8f33f11f2a7f. rdar://problem/104436726
Use WTF::ThreadSafeRefCountedAndCanMakeThreadSafeWeakPtr<> more in WebCore
https://bugs.webkit.org/show_bug.cgi?id=250929
<rdar://problem/104436726>
Reviewed by Chris Dumez.
Classes that inherit from both WTF::ThreadSafeRefCounted<> and
WTF::CanMakeWeakPtr<> should use
WTF::ThreadSafeRefCountedAndCanMakeThreadSafeWeakPtr<> instead.
Most of the changes below are:
- to replace WeakPtr<> with ThreadSafeWeakPtr<> in instance
variables and data structures,
- to change raw pointers returned from WeakPtr<>.get() to
RefPtr<> types, and
- to use a local RefPtr<> to an object instead of checking the
pointer value in the ThreadSafeWeakPtr<> object directly.
Since a lock is taken each time the value stored in the
ThreadSafeWeakPtr<> is returned, there is an effort to minimize
the number of times that happens within a given method by
creating a local RefPtr<> variable on the stack.
* Source/WebCore/platform/graphics/DecomposedGlyphs.h:
* Source/WebCore/platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::ensureDecoderAvailable):
* Source/WebCore/platform/graphics/ImageSource.h:
* Source/WebCore/platform/graphics/NativeImage.h:
* Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.h:
* Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerViewControllerDelegate fullscreenInterface]):
(-[WebAVPlayerViewControllerDelegate setFullscreenInterface:]):
(-[WebAVPlayerViewControllerDelegate playerViewControllerWillStartPictureInPicture:]):
(-[WebAVPlayerViewControllerDelegate playerViewControllerDidStartPictureInPicture:]):
(-[WebAVPlayerViewControllerDelegate playerViewController:failedToStartPictureInPictureWithError:]):
(-[WebAVPlayerViewControllerDelegate playerViewControllerWillStopPictureInPicture:]):
(-[WebAVPlayerViewControllerDelegate playerViewControllerDidStopPictureInPicture:]):
(-[WebAVPlayerViewControllerDelegate playerViewController:shouldExitFullScreenWithReason:]):
(-[WebAVPlayerViewControllerDelegate playerViewController:restoreUserInterfaceForPictureInPictureStopWithCompletionHandler:]):
(-[WebAVPlayerViewControllerDelegate pictureInPictureControllerWillStartPictureInPicture:]):
(-[WebAVPlayerViewControllerDelegate pictureInPictureControllerDidStartPictureInPicture:]):
(-[WebAVPlayerViewControllerDelegate pictureInPictureController:failedToStartPictureInPictureWithError:]):
(-[WebAVPlayerViewControllerDelegate pictureInPictureControllerWillStopPictureInPicture:]):
(-[WebAVPlayerViewControllerDelegate pictureInPictureControllerDidStopPictureInPicture:]):
(-[WebAVPlayerViewControllerDelegate pictureInPictureController:restoreUserInterfaceForPictureInPictureStopWithCompletionHandler:]):
(-[WebAVPlayerViewController initWithFullscreenInterface:]):
(-[WebAVPlayerViewController enterFullScreenAnimated:completionHandler:]):
- On watchOS, if _fullscreenInterface is nullptr, attempt to
call completionHandler if set. Previously this would crash.
(-[WebAVPlayerViewController MY_NO_RETURN]):
* Source/WebCore/platform/network/cocoa/RangeResponseGenerator.h:
* Source/WebCore/platform/network/cocoa/RangeResponseGenerator.mm:
(WebCore::RangeResponseGenerator::giveResponseToTaskIfBytesInRangeReceived):
* Source/WebCore/storage/StorageQuotaManager.h:
* Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp:
(WebKit::RemoteResourceCacheProxy::clearNativeImageMap):
(WebKit::RemoteResourceCacheProxy::clearDecomposedGlyphsMap):
* Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.h:
Canonical link: https://commits.webkit.org/260107@main
Canonical link: https://commits.webkit.org/259548.150@safari-7615-branch
Commit: 53a37723620d9f391085a2c657f55a052e72d8ec
https://github.com/WebKit/WebKit/commit/53a37723620d9f391085a2c657f55a052e72d8ec
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2023-02-10 (Fri, 10 Feb 2023)
Changed paths:
M LayoutTests/TestExpectations
M Source/JavaScriptCore/runtime/OptionsList.h
Log Message:
-----------
Cherry-pick 5eb788706c89. rdar://problem/104964116
[JSC] Disable import-assertion since TC39 decides bringing it back to stage-2
https://bugs.webkit.org/show_bug.cgi?id=251600
rdar://104964116
Reviewed by Michael Saboff.
We found that the current syntax & semantics do not work with CSS / JSON module integration in HTML side,
and it requires drastic changes in import-assertion in both syntax and semantics levels, which means that
the current proposal becomes obsolete / not-shippable state. TC39 discussed about this and decided to
bring import-assertion down to stage-2 from stage-3 to announce that this is not shippable state right now.
This patch disables import-assertion by flipping a runtime flag.
* Source/JavaScriptCore/runtime/OptionsList.h:
Canonical link: https://commits.webkit.org/259795@main
Canonical link: https://commits.webkit.org/259548.151@safari-7615-branch
Commit: 3188daa6f9d083aa88760c7e721bba654f898593
https://github.com/WebKit/WebKit/commit/3188daa6f9d083aa88760c7e721bba654f898593
Author: Myles C. Maxfield <mmaxfield at apple.com>
Date: 2023-02-11 (Sat, 11 Feb 2023)
Changed paths:
A LayoutTests/fast/frames/nested-iframes-expected.html
A LayoutTests/fast/frames/nested-iframes.html
A LayoutTests/fast/frames/resources/nesting0.html
A LayoutTests/fast/frames/resources/nesting1.html
A LayoutTests/fast/frames/resources/nesting2.html
R LayoutTests/http/tests/security/embedded-self-reference-after-url-modified-expected.txt
R LayoutTests/http/tests/security/embedded-self-reference-after-url-modified.html
M Source/WebCore/html/HTMLFrameOwnerElement.cpp
Log Message:
-----------
REGRESSION(252432.937 at safari-7614-branch) Some nested iframes aren't getting rendered
https://bugs.webkit.org/show_bug.cgi?id=252087
rdar://104961943
Reviewed by Alan Baradlay.
This is a revert of 252432.937 at safari-7614-branch.
* LayoutTests/http/tests/security/embedded-self-reference-after-url-modified-expected.txt: Removed.
* LayoutTests/http/tests/security/embedded-self-reference-after-url-modified.html: Removed.
* Source/WebCore/html/HTMLFrameOwnerElement.cpp:
(WebCore::HTMLFrameOwnerElement::isProhibitedSelfReference const):
Canonical link: https://commits.webkit.org/259548.152@safari-7615-branch
Commit: c49d1e6e50a48dde8a1af3e527f406a7869f9714
https://github.com/WebKit/WebKit/commit/c49d1e6e50a48dde8a1af3e527f406a7869f9714
Author: Chirag M Shah <chirag_m_shah at apple.com>
Date: 2023-02-13 (Mon, 13 Feb 2023)
Changed paths:
A LayoutTests/fast/css/style-update-timer-crash-expected.txt
A LayoutTests/fast/css/style-update-timer-crash.html
M Source/WebCore/style/StyleScope.cpp
Log Message:
-----------
Hold reference to shadowRoot and document when timer is triggered
https://bugs.webkit.org/show_bug.cgi?id=252091
rdar://105115603
Reviewed by Ryosuke Niwa.
This change fixes the issue where a Style::Scope can get deallocated
when the timer is fired, leading to a use-after-free. The fix holds onto
the shadowRoot and document in question, both of which own the
Style::Scope object.
* LayoutTests/fast/css/style-update-timer-crash-expected.txt: Added.
* LayoutTests/fast/css/style-update-timer-crash.html: Added.
* Source/WebCore/style/StyleScope.cpp:
(WebCore::Style::Scope::pendingUpdateTimerFired):
Canonical link: https://commits.webkit.org/259548.153@safari-7615-branch
Commit: 7628b9317aff3f3f4754628154e17de7ea424a56
https://github.com/WebKit/WebKit/commit/7628b9317aff3f3f4754628154e17de7ea424a56
Author: Alan Baradlay <zalan at apple.com>
Date: 2023-02-13 (Mon, 13 Feb 2023)
Changed paths:
M LayoutTests/platform/ios/fast/css/text-overflow-input-expected.txt
M LayoutTests/platform/ios/fast/forms/input-text-scroll-left-on-blur-expected.txt
M LayoutTests/platform/mac/fast/css/text-overflow-input-expected.txt
M LayoutTests/platform/mac/fast/forms/input-text-scroll-left-on-blur-expected.txt
M LayoutTests/platform/mac/fast/forms/search-rtl-expected.txt
M Source/WebCore/layout/formattingContexts/inline/InlineRect.h
M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp
M Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentBuilder.cpp
Log Message:
-----------
Cherry-pick 1e816c148346. rdar://problem/104927367
[IFC] InlineDisplayLineBuilder::collectEnclosingLineGeometry should include root inline box in scrollable overflow
https://bugs.webkit.org/show_bug.cgi?id=251414
Reviewed by Antti Koivisto.
Display::Line should include all scrollable overflow that we can compute excluding the "padding end" hack in LegacyLineLayout::addOverflowFromInlineChildren.
* Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentBuilder.cpp:
(WebCore::LayoutIntegration::lineOverflowLogicalWidth): LegacyLineLayout::addOverflowFromInlineChildren ignores RTL content, so should IFC.
(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):
Canonical link: https://commits.webkit.org/259708@main
Canonical link: https://commits.webkit.org/259456.246@safari-7615-branch
Commit: fdef8c9b7af70b19c847b134aa19fbe8df65a78d
https://github.com/WebKit/WebKit/commit/fdef8c9b7af70b19c847b134aa19fbe8df65a78d
Author: Alan Baradlay <zalan at apple.com>
Date: 2023-02-13 (Mon, 13 Feb 2023)
Changed paths:
A LayoutTests/fast/inline/scrollable-overflow-pre-wrap-hanging-whitespace-expected.html
A LayoutTests/fast/inline/scrollable-overflow-pre-wrap-hanging-whitespace.html
M Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp
M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp
M Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentBuilder.cpp
Log Message:
-----------
Cherry-pick f500d3412d93. rdar://problem/104781435
Incorrect text caret placement when RTL text starts with whitespace
https://bugs.webkit.org/show_bug.cgi?id=251313
<rdar://problem/104781435>
Reviewed by Antti Koivisto.
See the comment in LineBoxBuilder::build.
* LayoutTests/fast/inline/scrollable-overflow-pre-wrap-hanging-whitespace-expected.html: Added.
* LayoutTests/fast/inline/scrollable-overflow-pre-wrap-hanging-whitespace.html: Added.
* Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:
(WebCore::Layout::LineBoxBuilder::build):
Canonical link: https://commits.webkit.org/259868@main
Canonical link: https://commits.webkit.org/259456.247@safari-7615-branch
Commit: bde4f7b90117fffbfdda5150fd2d529455be693d
https://github.com/WebKit/WebKit/commit/bde4f7b90117fffbfdda5150fd2d529455be693d
Author: Antoine Quint <graouts at webkit.org>
Date: 2023-02-13 (Mon, 13 Feb 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/at-property-animation-expected.txt
M Source/WebCore/animation/KeyframeEffect.cpp
M Source/WebCore/animation/KeyframeEffect.h
M Source/WebCore/style/CustomPropertyRegistry.cpp
M Source/WebCore/style/CustomPropertyRegistry.h
Log Message:
-----------
Cherry-pick 70fad0325901. rdar://problem/104947453
[web-animations] keyframes should be recomputed if a custom property registration changes
https://bugs.webkit.org/show_bug.cgi?id=251509
Reviewed by Antti Koivisto.
If the registration of a custom property is changed, we must recompute keyframes of any effects
with keyframes targeting that custom property. To that end, we add a new method on KeyframeEffect
that the CustomPropertyRegistry can call into to notify the change of a custom property's
registration.
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/at-property-animation-expected.txt:
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::customPropertyRegistrationDidChange):
* Source/WebCore/animation/KeyframeEffect.h:
* Source/WebCore/style/CustomPropertyRegistry.cpp:
(WebCore::Style::CustomPropertyRegistry::registerFromAPI):
(WebCore::Style::CustomPropertyRegistry::registerFromStylesheet):
(WebCore::Style::CustomPropertyRegistry::notifyAnimationsOfCustomPropertyRegistration):
* Source/WebCore/style/CustomPropertyRegistry.h:
Canonical link: https://commits.webkit.org/259737@main
Canonical link: https://commits.webkit.org/259456.248@safari-7615-branch
Commit: 4b621e3e1109f68249aa6ec7bfdcb14719e937c0
https://github.com/WebKit/WebKit/commit/4b621e3e1109f68249aa6ec7bfdcb14719e937c0
Author: Russell Epstein <repstein at apple.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/registered-properties-inheritance-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/registered-properties-inheritance.html
M Source/WebCore/style/StyleBuilderCustom.h
Log Message:
-----------
Revert "Cherry-pick 06e3540a49d. rdar://problem/104998661"
This reverts commit a4202f6cb63a6b4675a7ae6d54aba422c33625a5.
Canonical link: https://commits.webkit.org/259548.158@safari-7615-branch
Commit: ceb664523cb16e9e6e163aea17144058e1e406be
https://github.com/WebKit/WebKit/commit/ceb664523cb16e9e6e163aea17144058e1e406be
Author: Antti Koivisto <antti at apple.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/at-property-animation-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/typedom-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-registered-custom-properties-expected.txt
M Source/WebCore/animation/CSSPropertyAnimation.cpp
M Source/WebCore/css/CSSVariableReferenceValue.cpp
M Source/WebCore/css/ComputedStyleExtractor.cpp
M Source/WebCore/css/typedom/ComputedStylePropertyMapReadOnly.cpp
M Source/WebCore/rendering/style/RenderStyle.cpp
M Source/WebCore/rendering/style/RenderStyle.h
M Source/WebCore/rendering/style/StyleCustomPropertyData.h
M Source/WebCore/style/CustomPropertyRegistry.cpp
M Source/WebCore/style/CustomPropertyRegistry.h
M Source/WebCore/style/StyleBuilderCustom.h
M Source/WebCore/style/StyleResolver.cpp
M Source/WebCore/style/StyleTreeResolver.cpp
Log Message:
-----------
Cherry-pick ffe6d89e6fa5. rdar://problem/104953759
[@property] Set registered initial values to RenderStyle
https://bugs.webkit.org/show_bug.cgi?id=251575
rdar://104953759
Reviewed by Antoine Quint.
Remove the need to provide the registry to RenderStyle::customPropertyValue().
This is done by maintaining a prototype style in CustomPropertyRegistry that is cloned
to make the initial styles in the style resolver.
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/at-property-animation-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/typedom-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-registered-custom-properties-expected.txt:
This also fixes some bugs.
* Source/WebCore/animation/CSSPropertyAnimation.cpp:
(WebCore::blendCustomProperty):
(WebCore::CSSPropertyAnimation::propertyRequiresBlendingForAccumulativeIteration):
(WebCore::CSSPropertyAnimation::propertiesEqual):
(WebCore::CSSPropertyAnimation::canPropertyBeInterpolated):
* Source/WebCore/css/CSSVariableReferenceValue.cpp:
(WebCore::CSSVariableReferenceValue::resolveVariableReference const):
* Source/WebCore/css/ComputedStyleExtractor.cpp:
(WebCore::ComputedStyleExtractor::customPropertyValue):
* Source/WebCore/css/typedom/ComputedStylePropertyMapReadOnly.cpp:
(WebCore::ComputedStylePropertyMapReadOnly::entries const):
* Source/WebCore/rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::createPtrWithRegisteredInitialValues):
(WebCore::RenderStyle::inheritIgnoringCustomPropertiesFrom):
(WebCore::changedCustomPaintWatchedProperty):
(WebCore::RenderStyle::deduplicateCustomProperties):
Also dedupe non-inherited properties.
(WebCore::RenderStyle::setCustomPropertyValue):
Make this a single function.
(WebCore::RenderStyle::customPropertyValue const):
(WebCore::RenderStyle::deduplicateInheritedCustomProperties): Deleted.
(WebCore::RenderStyle::setInheritedCustomPropertyValue): Deleted.
(WebCore::RenderStyle::setNonInheritedCustomPropertyValue): Deleted.
(WebCore::RenderStyle::customPropertyValueWithoutResolvingInitial const): Deleted.
* Source/WebCore/rendering/style/RenderStyle.h:
* Source/WebCore/rendering/style/StyleCustomPropertyData.h:
(WebCore::StyleCustomPropertyData::setCustomPropertyValue):
* Source/WebCore/style/CustomPropertyRegistry.cpp:
(WebCore::Style::CustomPropertyRegistry::CustomPropertyRegistry):
(WebCore::Style::CustomPropertyRegistry::registerFromAPI):
(WebCore::Style::CustomPropertyRegistry::registerFromStylesheet):
(WebCore::Style::CustomPropertyRegistry::clearRegisteredFromStylesheets):
(WebCore::Style::CustomPropertyRegistry::initialValuePrototypeStyle const):
Maintain the initial value prototype style.
(WebCore::Style::CustomPropertyRegistry::invalidate):
* Source/WebCore/style/CustomPropertyRegistry.h:
* Source/WebCore/style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyInitialCustomProperty):
(WebCore::Style::BuilderCustom::applyInheritCustomProperty):
(WebCore::Style::BuilderCustom::applyValueCustomProperty):
* Source/WebCore/style/StyleResolver.cpp:
(WebCore::Style::Resolver::styleForElement):
Clone the initial style from the prototype.
(WebCore::Style::Resolver::styleForPseudoElement):
(WebCore::Style::Resolver::defaultStyleForElement):
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::createAnimatedElementUpdate):
Canonical link: https://commits.webkit.org/259807@main
Canonical link: https://commits.webkit.org/259548.159@safari-7615-branch
Commit: b9c4842ff24e6f522bbdae1d61f52d5a253c3189
https://github.com/WebKit/WebKit/commit/b9c4842ff24e6f522bbdae1d61f52d5a253c3189
Author: Antoine Quint <graouts at webkit.org>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/registered-properties-inheritance-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/registered-properties-inheritance.html
M Source/WebCore/style/StyleBuilderCustom.h
Log Message:
-----------
Cherry-pick 06e3540a49d0. rdar://problem/104998661
[css-properties-values-api] non-inherited custom property fails to inherit from parent when "inherit" is set
https://bugs.webkit.org/show_bug.cgi?id=251590
Reviewed by Antti Koivisto.
We would only look at the map of inherited custom properties when applying the "inherit" value
for a custom property. However, a non-inherited value should also use its parent's value in that
case.
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/registered-properties-inheritance-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/registered-properties-inheritance.html:
* Source/WebCore/style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyInheritCustomProperty):
Canonical link: https://commits.webkit.org/259809@main
Canonical link: https://commits.webkit.org/259548.160@safari-7615-branch
Commit: 0e6d03d7a3eb7f07f392ab3cb3c018dc7b3614ed
https://github.com/WebKit/WebKit/commit/0e6d03d7a3eb7f07f392ab3cb3c018dc7b3614ed
Author: Antti Koivisto <antti at apple.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M Source/WebCore/animation/CSSPropertyAnimation.cpp
M Source/WebCore/css/CSSCustomPropertyValue.cpp
M Source/WebCore/css/CSSCustomPropertyValue.h
Log Message:
-----------
Cherry-pick b63783f81878. rdar://problem/104997649
[@property] Cache tokens in CSSCustomPropertyValue
https://bugs.webkit.org/show_bug.cgi?id=251672
rdar://104997649
Reviewed by Antoine Quint.
We currently generate tokens on every access by tokenizing a (cached) string.
* Source/WebCore/animation/CSSPropertyAnimation.cpp:
(WebCore::blendedCSSCustomPropertyValue):
* Source/WebCore/css/CSSCustomPropertyValue.cpp:
(WebCore::CSSCustomPropertyValue::customCSSText const):
(WebCore::CSSCustomPropertyValue::tokens const):
Add a token cache for registered custom properties.
Also avoid copying by returning a reference.
* Source/WebCore/css/CSSCustomPropertyValue.h:
Also remove an unneeded copy constructor.
Canonical link: https://commits.webkit.org/259813@main
Canonical link: https://commits.webkit.org/259548.161@safari-7615-branch
Commit: 31be8653cfd15372a0e5acdd7d137f067ec74a08
https://github.com/WebKit/WebKit/commit/31be8653cfd15372a0e5acdd7d137f067ec74a08
Author: Wenson Hsieh <wenson_hsieh at apple.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M Source/WebCore/platform/cocoa/ParentalControlsContentFilter.mm
Log Message:
-----------
Cherry-pick b5a5e0bd3bb7. rdar://problem/105184733
Optionally soft-link WebContentAnalysis.framework and WebFilterEvaluator
https://bugs.webkit.org/show_bug.cgi?id=251947
Reviewed by Aditya Keerthi.
Don't `RELEASE_ASSERT` in the case where `WebContentAnalysis.framework` is missing.
* Source/WebCore/platform/cocoa/ParentalControlsContentFilter.mm:
Canonical link: https://commits.webkit.org/260045@main
Canonical link: https://commits.webkit.org/259548.162@safari-7615-branch
Commit: 884ef80e537ae34d200e5188080ae61a61847805
https://github.com/WebKit/WebKit/commit/884ef80e537ae34d200e5188080ae61a61847805
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
A JSTests/wasm/stress/js-to-wasm-i64-register.js
A JSTests/wasm/stress/js-to-wasm-i64-stack.js
A JSTests/wasm/stress/js-to-wasm-many-double-from-js.js
A JSTests/wasm/stress/js-to-wasm-many-i64.js
M Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
M Source/JavaScriptCore/dfg/DFGOperations.cpp
M Source/JavaScriptCore/dfg/DFGOperations.h
M Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp
M Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
M Source/JavaScriptCore/jit/AssemblyHelpers.h
M Source/JavaScriptCore/runtime/JSBigInt.h
M Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp
Log Message:
-----------
Cherry-pick da3929b44d5a. rdar://problem/104794806
[JSC] Add I64 support for Wasm IC and FTL Wasm fast call
https://bugs.webkit.org/show_bug.cgi?id=251332
rdar://104794806
Reviewed by Tadeu Zagallo.
This patch adds I64 support for Wasm IC and FTL Wasm fast call. This makes it possible to accept all major wasm types in IC and Wasm fast calls,
so we can reasonably assume that we will always go to this IC or fast call when the callsite is performance enough.
What we need is extracting I64 from HeapBigInt. This patch adds AssemblyHelpers::toBigInt64, which takes JSBigInt and extract I64 for wasm.
Microbenchmark showed 10x improvement (following script's iteration count is modified to make the core part running longer for measurement).
DYLD_FRAMEWORK_PATH=$VM $VM/jsc -m js-to-wasm-many-i64.js 0.62s user 0.05s system 102% cpu 0.653 total
DYLD_FRAMEWORK_PATH=$VM $VM/jsc -m js-to-wasm-many-i64.js 5.11s user 0.09s system 83% cpu 6.184 total
* JSTests/wasm/stress/js-to-wasm-many-double-from-js.js: Added.
(async test):
* JSTests/wasm/stress/js-to-wasm-many-i64.js: Added.
(async test):
* Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* Source/JavaScriptCore/dfg/DFGOperations.cpp:
(JSC::DFG::JSC_DEFINE_JIT_OPERATION):
* Source/JavaScriptCore/dfg/DFGOperations.h:
* Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):
* Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
* Source/JavaScriptCore/jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::toBigInt64):
* Source/JavaScriptCore/runtime/JSBigInt.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp:
(JSC::WebAssemblyFunction::jsCallEntrypointSlow):
Canonical link: https://commits.webkit.org/259584@main
Canonical link: https://commits.webkit.org/259548.163@safari-7615-branch
Commit: dd0672a5fb6b678cd4d62599e5bfb9ca9c931a75
https://github.com/WebKit/WebKit/commit/dd0672a5fb6b678cd4d62599e5bfb9ca9c931a75
Author: Myles C. Maxfield <mmaxfield at apple.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M LayoutTests/platform/ios/TestExpectations
Log Message:
-----------
Cherry-pick 259600 at main (2556c14bd4fe). rdar://104844002
[WebGPU] Lots of iOS debug asserts in http/tests/webgpu
https://bugs.webkit.org/show_bug.cgi?id=251405
rdar://104844002
Unreviewed.
I thought iOS fell back to platform/mac/TestExpectations, but apparently it doesn't.
* LayoutTests/platform/ios/TestExpectations:
Canonical link: https://commits.webkit.org/259600@main
Canonical link: https://commits.webkit.org/259548.163@safari-7615-branch
Commit: 3cc30ef58a324c612fd88aa665d5446d43e1c25c
https://github.com/WebKit/WebKit/commit/3cc30ef58a324c612fd88aa665d5446d43e1c25c
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M Tools/Scripts/libraries/webkitscmpy/setup.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py
Log Message:
-----------
Cherry-pick 260117 at main (d1b770d8e28b). rdar://105197556
[git-webkit] Consider redaction of all issues in PR
https://bugs.webkit.org/show_bug.cgi?id=251960
rdar://105197556
Reviewed by Elliott Williams.
* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.create_pull_request): Check the redaction status of every commit on
the pull-request branch.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
(TestDoPullRequest.test_github_branch_secondary_redacted):
Canonical link: https://commits.webkit.org/260117@main
Canonical link: https://commits.webkit.org/259548.164@safari-7615-branch
Commit: 3eb4ecdc5918a16544570b796288d08cad4f72bd
https://github.com/WebKit/WebKit/commit/3eb4ecdc5918a16544570b796288d08cad4f72bd
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M Tools/Scripts/libraries/webkitcorepy/webkitcorepy/cacert.pem
M Tools/Scripts/libraries/webkitscmpy/setup.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
Log Message:
-----------
Cherry-pick 260271 at main (1ba0b182925a). rdar://105459368
[webkitscmpy] Include certificate root for Apple infrastructure
https://bugs.webkit.org/show_bug.cgi?id=252257
rdar://105459368
Reviewed by Ryan Haddad.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/cacert.pem: Add 'AAA Certificate Services O'.
* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
Canonical link: https://commits.webkit.org/260271@main
Canonical link: https://commits.webkit.org/259548.165@safari-7615-branch
Commit: 6fc0a52315fa4fa7809e3bf71eccbfa2a5ead3e7
https://github.com/WebKit/WebKit/commit/6fc0a52315fa4fa7809e3bf71eccbfa2a5ead3e7
Author: Ryan Haddad <ryanhaddad at apple.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M LayoutTests/platform/ios/TestExpectations
M LayoutTests/platform/ios/fast/css-generated-content/initial-letter-basic-expected.txt
M LayoutTests/platform/ios/fast/css-generated-content/initial-letter-border-padding-expected.txt
M LayoutTests/platform/ios/fast/css-generated-content/initial-letter-clearance-expected.txt
M LayoutTests/platform/ios/fast/css-generated-content/initial-letter-descender-expected.txt
M LayoutTests/platform/ios/fast/css-generated-content/initial-letter-raised-expected.txt
M LayoutTests/platform/ios/fast/css-generated-content/initial-letter-sunken-expected.txt
Log Message:
-----------
Cherry-pick 259640 at main (28c0165eebae). rdar://104836521
REGRESSION (259540 at main): [ iOS ] 6 x fast/css-generated-content/ tests are constant text failures.
https://bugs.webkit.org/show_bug.cgi?id=251394
rdar://104836521
Unreviewed test gardening.
Rebaseline for test failures.
* LayoutTests/platform/ios/fast/css-generated-content/initial-letter-basic-expected.txt:
* LayoutTests/platform/ios/fast/css-generated-content/initial-letter-border-padding-expected.txt:
* LayoutTests/platform/ios/fast/css-generated-content/initial-letter-clearance-expected.txt:
* LayoutTests/platform/ios/fast/css-generated-content/initial-letter-descender-expected.txt:
* LayoutTests/platform/ios/fast/css-generated-content/initial-letter-raised-expected.txt:
* LayoutTests/platform/ios/fast/css-generated-content/initial-letter-sunken-actual.txt: Added.
Canonical link: https://commits.webkit.org/259640@main
Canonical link: https://commits.webkit.org/259548.166@safari-7615-branch
Commit: 3fde2f202963ba97ebac67e1d8cbf2ea8d661bfa
https://github.com/WebKit/WebKit/commit/3fde2f202963ba97ebac67e1d8cbf2ea8d661bfa
Author: Richard Robinson <richard_robinson2 at apple.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M Source/WebKit/Platform/spi/ios/UIKitSPI.h
M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm
Log Message:
-----------
Cherry-pick dd929cd085dc. rdar://problem/100155151
Find on page intermittently fails to show results in PDFs in Safari
https://bugs.webkit.org/show_bug.cgi?id=251311
rdar://100155151
Reviewed by Aditya Keerthi.
When viewing a PDF in Safari, Find in Page fails after the following sequence
of events:
1. Open a PDF in Safari
2. Activate Find in Page and search for a string
3. Refresh the page
4. Activate Find in Page again
After the last step, Find In Page will continue to return zero results regardless
of the search string.
This is because the `WKPDFView` instance is used as the `UIFindSession`'s "searchable object"
to process the search. When the page is refreshed, a new `WKPDFView` instance is created, but
not a new `UIFindSession`, and so the session has lost its searchable object.
This PR fixes this by setting the session's searchable object to the new `WKPDFView` in the
`_didCommitLoadForMainFrame` method, which is called after the new `WKPDFView` has been created.
This ensures that the session's searchable object is up to date.
* Source/WebKit/Platform/spi/ios/UIKitSPI.h:
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _didCommitLoadForMainFrame]):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm:
(swizzledPerformTextSearchWithQueryString):
(TEST):
Canonical link: https://commits.webkit.org/259655@main
Canonical link: https://commits.webkit.org/259548.168@safari-7615-branch
Commit: 9e4a0471766a3e411e32cbaa2f61fd5d20e4349b
https://github.com/WebKit/WebKit/commit/9e4a0471766a3e411e32cbaa2f61fd5d20e4349b
Author: Matt Woodrow <mattwoodrow at apple.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M LayoutTests/platform/ios-wk2/TestExpectations
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WTF/wtf/PlatformEnableCocoa.h
Log Message:
-----------
Cherry-pick b8652a99205d. rdar://problem/103571674
Disable WebGL in worker threads.
https://bugs.webkit.org/show_bug.cgi?id=251341
<rdar://103571674>
Reviewed by Brent Fulgham.
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* LayoutTests/platform/ios-wk2/TestExpectations:
Canonical link: https://commits.webkit.org/259711@main
Canonical link: https://commits.webkit.org/259548.169@safari-7615-branch
Commit: 5d957e3234378ec1df22bdb4e7b34f32d837755f
https://github.com/WebKit/WebKit/commit/5d957e3234378ec1df22bdb4e7b34f32d837755f
Author: Alan Baradlay <zalan at apple.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M Source/WebCore/layout/integration/inline/InlineIteratorTextBox.cpp
Log Message:
-----------
Cherry-pick 7289c5d771f2. rdar://problem/101874893
REGRESSION(241899 at main): Find on Page fails to highlight SVG text content
https://bugs.webkit.org/show_bug.cgi?id=251438
Reviewed by Antti Koivisto.
Let's restore before-241899 at main state, where we called SVGInlineTextBox::localSelectionRect on SVG text content.
* Source/WebCore/layout/integration/inline/InlineIteratorTextBox.cpp:
(WebCore::InlineIterator::TextBox::selectionRect const):
Canonical link: https://commits.webkit.org/259753@main
Canonical link: https://commits.webkit.org/259548.170@safari-7615-branch
Commit: 7d8e265b41d872d5ffdbbf7eccd00e251e214129
https://github.com/WebKit/WebKit/commit/7d8e265b41d872d5ffdbbf7eccd00e251e214129
Author: Said Abou-Hallawa <said at apple.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M LayoutTests/fast/canvas/canvas-scale-strokePath-shadow-expected.txt
M LayoutTests/fast/canvas/canvas-scale-strokePath-shadow.html
R LayoutTests/platform/ios/fast/canvas/canvas-scale-strokePath-shadow-expected.txt
R LayoutTests/platform/mac/fast/canvas/canvas-scale-strokePath-shadow-expected.txt
R LayoutTests/platform/win/fast/canvas/canvas-scale-strokePath-shadow-expected.txt
Log Message:
-----------
Cherry-pick d538ed723a99. rdar://problem/104761905
Relax the checks of the alpha channel of the blurred stroke in fast/canvas/canvas-scale-strokePath-shadow.html
https://bugs.webkit.org/show_bug.cgi?id=251558
rdar://104761905
Reviewed by Dean Jackson.
Relax the check for the alpha channel of the blurred stroke in this test to avoid
rebase-line the expectation in the future. And git rid of the platform expectation.
Ensure the alpha channel of the blurred stroke is between 75 and 225 instead of
175 and 225.
* LayoutTests/fast/canvas/canvas-scale-strokePath-shadow-expected.txt:
* LayoutTests/fast/canvas/canvas-scale-strokePath-shadow.html:
* LayoutTests/platform/ios/fast/canvas/canvas-scale-strokePath-shadow-expected.txt: Removed.
* LayoutTests/platform/mac/fast/canvas/canvas-scale-strokePath-shadow-expected.txt: Removed.
* LayoutTests/platform/win/fast/canvas/canvas-scale-strokePath-shadow-expected.txt: Removed.
Canonical link: https://commits.webkit.org/259765@main
Canonical link: https://commits.webkit.org/259548.171@safari-7615-branch
Commit: 8a47c27ffb5e0bd7e6088e8e765494ab2e87b6e5
https://github.com/WebKit/WebKit/commit/8a47c27ffb5e0bd7e6088e8e765494ab2e87b6e5
Author: Aditya Keerthi <akeerthi at apple.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp
Log Message:
-----------
Cherry-pick ed56087035ea. rdar://problem/102302792
REGRESSION (iOS 16): sina.cn: Find on Page highlights obscure the text behind them
https://bugs.webkit.org/show_bug.cgi?id=251707
rdar://102302792
Reviewed by Wenson Hsieh.
sina.cn contains elements with "-webkit-user-select: none". Prior to iOS 16,
any text found within these elements would count towards the number of results,
but would not be highlighted.
Find-in-page logic was refactored in iOS 16 to support UIKit's new Find & Replace
API. As part of these changes, find-in-page began storing/restoring ranges, rather
than simply updating selection. Consequently, the `TextIndicator` used to draw
highlights is created from a `SimpleRange`, rather than the current selection.
The previously used constructor would early return if the selection was empty
(as is the case when attempting to select a "-webkit-user-select: none" element),
resulting the the pre-iOS 16 behavior described above.
`TextIndicator` does not know how to take snapshots of "-webkit-user-select: none"
content. Consequently, the highlight is painted without any text, leading to
found text getting obscured.
For now, restore the pre-iOS 16 behavior, and do not draw highlights if the
selection is empty. In the longer term, `TextIndicator` should be taught to
draw this content (tracked in webkit.org/b/251709). Note that following this
change, there is still a net progression over pre-iOS 16 behavior, where
WebKit will indicate found results with "-webkit-user-select: none" by drawing
"holes".
* Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp:
(WebKit::WebFoundTextRangeController::drawRect):
Additionally, move the use of `GraphicsContext` closer to the painting logic to
avoid running unnecessary code.
Canonical link: https://commits.webkit.org/259857@main
Canonical link: https://commits.webkit.org/259548.172@safari-7615-branch
Commit: f44e26acd224261b5239ac634249c53de937b707
https://github.com/WebKit/WebKit/commit/f44e26acd224261b5239ac634249c53de937b707
Author: Chirag M Shah <chirag_m_shah at apple.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M Source/WebKit/NetworkProcess/SharedWorker/WebSharedWorkerServerConnection.cpp
Log Message:
-----------
Cherry-pick c7229df52bd1. rdar://problem/105018668
Add allowsFirstPartyForCookies in WebSharedWorkerServerConnection::requestSharedWorker
https://bugs.webkit.org/show_bug.cgi?id=251720
rdar://105018668
Reviewed by Alex Christensen.
We need to add allowsFirstPartyForCookies when requesting shared worker
so that a compromised web process doesn't access cookies its not
supposed to.
* Source/WebKit/NetworkProcess/SharedWorker/WebSharedWorkerServerConnection.cpp:
(WebKit::WebSharedWorkerServerConnection::requestSharedWorker):
Canonical link: https://commits.webkit.org/259859@main
Canonical link: https://commits.webkit.org/259548.173@safari-7615-branch
Commit: 87bdc17fcbf8e010b901f6e1365c71d5619b0d3d
https://github.com/WebKit/WebKit/commit/87bdc17fcbf8e010b901f6e1365c71d5619b0d3d
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/displaylists/DisplayListItemBuffer.h
Log Message:
-----------
Cherry-pick b7a8c3d2ff89. rdar://problem/105011333
DisplayList::ItemBuffer wastes a lot of vector capacity
https://bugs.webkit.org/show_bug.cgi?id=251700
<rdar://problem/105011333>
Reviewed by Wenson Hsieh.
The Vector<ItemBufferHandle, 2> ItemBuffer::m_readOnlyBuffers gets allocated for every GlyphDisplayListCache
entry, but is never used there. It's also very rarely used with GPU process rendering (I never saw use of
m_readOnlyBuffers running MotionMark), so give it default capacity 0, and capacity 2 when it does get allocated.
* Source/WebCore/platform/graphics/displaylists/DisplayListItemBuffer.h:
Canonical link: https://commits.webkit.org/259861@main
Canonical link: https://commits.webkit.org/259548.174@safari-7615-branch
Commit: c83439da5138b14037a754636aabe01341d8deba
https://github.com/WebKit/WebKit/commit/c83439da5138b14037a754636aabe01341d8deba
Author: Alan Baradlay <zalan at apple.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M Source/WebCore/layout/formattingContexts/inline/InlineRect.h
M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp
Log Message:
-----------
Cherry-pick cc1ff21b89a3. rdar://problem/105047621
[IFC] Use computed LineBox geometry in InlineDisplayLineBuilder::build
https://bugs.webkit.org/show_bug.cgi?id=251342
Reviewed by Antti Koivisto.
We already compute these (logical top/left/width) values for LineBox. Let's not compute them again.
This is also in preparation for fixing webkit.org/b/251313.
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp:
(WebCore::Layout::InlineDisplayLineBuilder::build const):
Canonical link: https://commits.webkit.org/259863@main
Canonical link: https://commits.webkit.org/259548.175@safari-7615-branch
Commit: 79752b904edd0b49912b347fb2e4661f156e8783
https://github.com/WebKit/WebKit/commit/79752b904edd0b49912b347fb2e4661f156e8783
Author: Kimmo Kinnunen <kkinnunen at apple.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
A LayoutTests/platform/glib/webgl/webgl-ext-norm16-texture-texsubimage-nocrash-expected.txt
A LayoutTests/platform/mac-bigsur-wk2/webgl/webgl-ext-norm16-texture-texsubimage-nocrash-expected.txt
A LayoutTests/webgl/webgl-ext-norm16-texture-texsubimage-nocrash-expected.txt
A LayoutTests/webgl/webgl-ext-norm16-texture-texsubimage-nocrash.html
M Source/ThirdParty/ANGLE/src/libANGLE/ErrorStrings.h
M Source/ThirdParty/ANGLE/src/libANGLE/formatutils.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/validationES.cpp
Log Message:
-----------
Cherry-pick b34b56522035. rdar://problem/104340031
EXT_norm16_texture fails with texSubImage and signed types
https://bugs.webkit.org/show_bug.cgi?id=252039
rdar://104340031
Reviewed by Dean Jackson.
The supported texture format tables would have entries for
a signed or unsigned internal format and matching type.
The texSubImage variants do not communicate the sized internal format,
rather unsized format type. Data parameters are validated based on
format, not internal format. For these, the signed variants were
missing.
Add texture format table entries for signed types that match the format
parameters.
Add a precautionary validation case so that future such bugs would not
pass the control flow forward, into the copying phase.
* LayoutTests/webgl/webgl-ext-norm16-texture-texsubimage3d-nocrash.html: Added.
* Source/ThirdParty/ANGLE/src/libANGLE/ErrorStrings.h:
* Source/ThirdParty/ANGLE/src/libANGLE/formatutils.cpp:
(gl::BuildInternalFormatInfoMap):
* Source/ThirdParty/ANGLE/src/libANGLE/validationES.cpp:
(gl::ValidImageDataSize):
Canonical link: https://commits.webkit.org/260114@main
Canonical link: https://commits.webkit.org/259548.176@safari-7615-branch
Commit: a91d61e8bfa1f2b46c01332f8e1769267b1da7ba
https://github.com/WebKit/WebKit/commit/a91d61e8bfa1f2b46c01332f8e1769267b1da7ba
Author: Brent Fulgham <bfulgham at apple.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
Log Message:
-----------
Cherry-pick 24427685c584. rdar://problem/104759290
Numerous "Stable" feature flags appear miscategorized, should be "Mature"
https://bugs.webkit.org/show_bug.cgi?id=252071
<rdar://104759290>
Reviewed by Patrick Angle.
Numerous "Stable" feature flags appear miscategorized, and should instead
be "Mature".
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
Canonical link: https://commits.webkit.org/260129@main
Canonical link: https://commits.webkit.org/259548.177@safari-7615-branch
Commit: df089965a1d414507007b78f6af4ebc4cda4e188
https://github.com/WebKit/WebKit/commit/df089965a1d414507007b78f6af4ebc4cda4e188
Author: David Kilzer <ddkilzer at apple.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M Configurations/WebKitTargetConditionals.xcconfig
Log Message:
-----------
Cherry-pick adf544afeb9f. rdar://problem/105284669
Fix mistakes in WebKitTargetConditionals.xcconfig
https://bugs.webkit.org/show_bug.cgi?id=252064
<rdar://105284669>
Reviewed by Elliott Williams.
This change correctly defines these macros to "_SINCE_" strings
as the prior, buggy definitions were circular and resulted in
no value being set.
* Configurations/WebKitTargetConditionals.xcconfig:
(WK_IOS_17_):
(WK_TVOS_16_):
(WK_TVOS_17_):
Canonical link: https://commits.webkit.org/260134@main
Canonical link: https://commits.webkit.org/259548.178@safari-7615-branch
Commit: 6e25bbc66ae06e85161274e9de875de44d64fdea
https://github.com/WebKit/WebKit/commit/6e25bbc66ae06e85161274e9de875de44d64fdea
Author: Alexey Shvayka <ashvayka at apple.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
A JSTests/stress/spread-arguments-null-proto-no-crash.js
M Source/JavaScriptCore/runtime/ClonedArguments.cpp
Log Message:
-----------
Cherry-pick 146475121307. rdar://problem/105295643
ClonedArguments::isIteratorProtocolFastAndNonObservable() should check didTransition() earlier
https://bugs.webkit.org/show_bug.cgi?id=252083
<rdar://105295643>
Reviewed by Yusuke Suzuki.
This change hoists didTransition() check to prevent nullptr deref crash when calling needsSlowPutIndexing().
* JSTests/stress/spread-arguments-null-proto-no-crash.js: Added.
* Source/JavaScriptCore/runtime/ClonedArguments.cpp:
(JSC::ClonedArguments::isIteratorProtocolFastAndNonObservable):
Canonical link: https://commits.webkit.org/260145@main
Canonical link: https://commits.webkit.org/259548.179@safari-7615-branch
Commit: 96a67d4a37e9445925a272e0db3cb383500ea631
https://github.com/WebKit/WebKit/commit/96a67d4a37e9445925a272e0db3cb383500ea631
Author: Karl Rackler <rackler at apple.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
Log Message:
-----------
Cherry-pick beb0550b9dde. rdar://problem/104759290
Revert [260129 at main] Numerous "Stable" feature flags appear miscategorized, should be "Mature"
https://bugs.webkit.org/show_bug.cgi?id=252071
<rdar://104759290>
Unreviewed revert
This reverts because it broke 67+ tests.
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
Canonical link: https://commits.webkit.org/260164@main
Canonical link: https://commits.webkit.org/259548.180@safari-7615-branch
Commit: b36aff9a8ddac0ed70c82f65acdab4fb7a6b56ba
https://github.com/WebKit/WebKit/commit/b36aff9a8ddac0ed70c82f65acdab4fb7a6b56ba
Author: Kimmo Kinnunen <kkinnunen at apple.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm
Log Message:
-----------
Cherry-pick ab998e353f10. rdar://problem/105174119
ANGLE Metal program memory cache is unbounded
https://bugs.webkit.org/show_bug.cgi?id=251915
rdar://105174119
Reviewed by Matt Woodrow.
Disable the memory cache for now, it may consume too much memory
on pages that compile many programs. It does not benefit normal
WebGL apps, as those should not recompile the same program over and
over again.
* Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm:
(WebCore::initializeEGLDisplay):
Canonical link: https://commits.webkit.org/260235@main
Canonical link: https://commits.webkit.org/259548.181@safari-7615-branch
Commit: cd2c5ede52cedb703ffbf9b681d22b2b4204c040
https://github.com/WebKit/WebKit/commit/cd2c5ede52cedb703ffbf9b681d22b2b4204c040
Author: Gavin Phillips <gavin.p at apple.com>
Date: 2023-02-15 (Wed, 15 Feb 2023)
Changed paths:
A Source/WebKit/NetworkProcess/mac/SecItemShim.cpp
A Source/WebKit/NetworkProcess/mac/SecItemShim.h
R Source/WebKit/Shared/mac/SecItemShim.cpp
R Source/WebKit/Shared/mac/SecItemShim.h
M Source/WebKit/SourcesCocoa.txt
M Source/WebKit/UIProcess/WebProcessProxy.cpp
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
Log Message:
-----------
Cherry-pick 259835 at main (71cadaca836c). rdar://105002389
Move SecItemShim to the Network Process subdirectory
https://bugs.webkit.org/show_bug.cgi?id=251678
rdar://105002389
Reviewed by Alex Christensen.
The SecItemShim is only required in the Network Process, so move the
code out of shared and into the Network Process specific directory.
* Source/WebKit/Shared/mac/SecItemShim.cpp: Removed.
* Source/WebKit/Shared/mac/SecItemShim.h: Removed.
* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::connectionWillOpen):
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
Canonical link: https://commits.webkit.org/259835@main
Canonical link: https://commits.webkit.org/259548.181@safari-7615-branch
Commit: 0a169be47de4cb8c77827aa75276e29a710fe408
https://github.com/WebKit/WebKit/commit/0a169be47de4cb8c77827aa75276e29a710fe408
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2023-02-15 (Wed, 15 Feb 2023)
Changed paths:
M Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm
Log Message:
-----------
REGRESSION (259548.23 at safari-7615-branch): Invalid MESSAGE_CHECK when sending Yahoo email
https://bugs.webkit.org/show_bug.cgi?id=252293
<rdar://105471203>
Reviewed by Alex Christensen.
When sending an email from mail.yahoo.com on iPhone, if sending while the keyboard is visible, the UI process
receives a ScrollingTree where overflow scrolling proxy nodes have a reference to an overflow scrolling node
that no longer exists. Guard against this by null-checking the result of calls to scrollingTree()->nodeForID()
in a couple of places, before checking their types.
rdar://105481381 tracks a better long-term fix.
* Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxyIOS::establishLayerTreeScrollingRelations):
Canonical link: https://commits.webkit.org/259548.182@safari-7615-branch
Commit: 71834ce0e87bdd6fa9bfcd923a5ec4f7d1989781
https://github.com/WebKit/WebKit/commit/71834ce0e87bdd6fa9bfcd923a5ec4f7d1989781
Author: Claudio Saavedra <csaavedra at igalia.com>
Date: 2023-02-15 (Wed, 15 Feb 2023)
Changed paths:
A LayoutTests/fast/dom/element-clearing-display-contents-on-node-removal-expected.txt
A LayoutTests/fast/dom/element-clearing-display-contents-on-node-removal.html
Log Message:
-----------
Cherry-pick 256843.10 at webkit-2022.12-embargoed (b7f9b7f4679b). rdar://102808942
Add test for element's display contents change on sibling removal
https://bugs.webkit.org/show_bug.cgi?id=248772
Reviewed by Tim Nguyen.
This was already fixed with #248776, but add the test for completeness.
* LayoutTests/fast/dom/element-clearing-display-contents-on-node-removal-expected.txt: Added.
* LayoutTests/fast/dom/element-clearing-display-contents-on-node-removal.html: Added.
Canonical link: https://commits.webkit.org/256843.10@webkit-2022.12-embargoed
Canonical link: https://commits.webkit.org/259548.183@safari-7615-branch
Commit: 01ceccf02b5f3011b49c5f08d10ca3851ccde4fd
https://github.com/WebKit/WebKit/commit/01ceccf02b5f3011b49c5f08d10ca3851ccde4fd
Author: Rob Buis <rbuis at igalia.com>
Date: 2023-02-15 (Wed, 15 Feb 2023)
Changed paths:
A LayoutTests/fast/frames/disconnected-frame-set-to-eager-crash-expected.txt
A LayoutTests/fast/frames/disconnected-frame-set-to-eager-crash.html
Log Message:
-----------
Cherry-pick 256843.11 at webkit-2022.12-embargoed (7d616c4d06eb). rdar://98898374
Add crash test for disconnected frame switching to eager
https://bugs.webkit.org/show_bug.cgi?id=245377
Reviewed by Ryosuke Niwa.
Add crash test for disconnected frame switching to eager.
* LayoutTests/fast/frames/disconnected-frame-set-to-eager-crash-expected.txt: Added.
* LayoutTests/fast/frames/disconnected-frame-set-to-eager-crash.html: Added.
Canonical link: https://commits.webkit.org/256843.11@webkit-2022.12-embargoed
Canonical link: https://commits.webkit.org/259548.184@safari-7615-branch
Commit: 41af95f8b4e79530811897ff9acbe06756ebc159
https://github.com/WebKit/WebKit/commit/41af95f8b4e79530811897ff9acbe06756ebc159
Author: Chirag M Shah <chirag_m_shah at apple.com>
Date: 2023-02-15 (Wed, 15 Feb 2023)
Changed paths:
M Source/WebCore/loader/SubresourceLoader.cpp
Log Message:
-----------
Clear the resource counter when releasingResources
https://bugs.webkit.org/show_bug.cgi?id=252200
rdar://104908871
Reviewed by Chris Dumez.
SubResourceLoader will clear the m_resource after releasing it, but the
resource counter still holds a raw pointer to it. This causes a UAF
issue. This fix clears the resource counter so that we don't end up
using it after releasing the resource.
* Source/WebCore/loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::releaseResources):
Canonical link: https://commits.webkit.org/259548.185@safari-7615-branch
Commit: 1aa5ac3e3745f20045d7c831c138b0a6a8d9933a
https://github.com/WebKit/WebKit/commit/1aa5ac3e3745f20045d7c831c138b0a6a8d9933a
Author: Chirag M Shah <chirag_m_shah at apple.com>
Date: 2023-02-15 (Wed, 15 Feb 2023)
Changed paths:
M Source/WebCore/loader/SubresourceLoader.cpp
M Source/WebCore/loader/SubresourceLoader.h
M Source/WebCore/loader/cache/CachedResource.h
M Source/WebCore/loader/cache/CachedResourceLoader.h
Log Message:
-----------
Use WeakPtr to track resources in SubresourceLoader
https://bugs.webkit.org/show_bug.cgi?id=252200
rdar://104908871
Reviewed by Chris Dumez.
CachedResource can get deallocated when the SubresourceLoader releases
its resources, in which case we'd be accessing a dangling pointer. This
change adopts WeakPtr for CachedResource so that we don't have a UAF.
* Source/WebCore/loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didFinishLoading):
(WebCore::SubresourceLoader::didFail):
* Source/WebCore/loader/SubresourceLoader.h:
* Source/WebCore/loader/cache/CachedResource.h:
* Source/WebCore/loader/cache/CachedResourceLoader.h:
Canonical link: https://commits.webkit.org/259548.186@safari-7615-branch
Commit: 8d5dc41fa4c2fda84fb22166ad63e9cdf98a163c
https://github.com/WebKit/WebKit/commit/8d5dc41fa4c2fda84fb22166ad63e9cdf98a163c
Author: Russell Epstein <repstein at apple.com>
Date: 2023-02-15 (Wed, 15 Feb 2023)
Changed paths:
M LayoutTests/http/tests/media/autoplay-if-audio-is-playing-expected.txt
M LayoutTests/http/tests/media/autoplay-if-audio-is-playing.html
M LayoutTests/media/media-fullscreen-inline-expected.txt
M LayoutTests/media/media-fullscreen.js
M LayoutTests/media/playlist-inherits-user-gesture.html
M LayoutTests/media/restricted-audio-playback-with-multiple-settimeouts.html
M LayoutTests/platform/glib/media/media-fullscreen-inline-expected.txt
M LayoutTests/platform/glib/media/media-fullscreen-not-in-document-expected.txt
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/FullscreenManager.cpp
M Source/WebCore/html/HTMLMediaElement.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/autoplaying-multiple-media-elements.html
Log Message:
-----------
Revert "Cherry-pick 98a09842676c. rdar://problem/103800206"
This reverts commit fb6878f6b10d235a8fbe6ade8754de22cde6cd04.
Canonical link: https://commits.webkit.org/259548.188@safari-7615-branch
Commit: 6556bdb5e6e18f8500cbf9300be2284c74750698
https://github.com/WebKit/WebKit/commit/6556bdb5e6e18f8500cbf9300be2284c74750698
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2023-02-15 (Wed, 15 Feb 2023)
Changed paths:
M Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
Log Message:
-----------
Cherry-pick 781fc3abea74. rdar://problem/105021476
Unreviewed, Fix ASSERTION FAILED: mode == ManualOperandSpeculation || edge.useKind() == HeapBigIntUse
https://bugs.webkit.org/show_bug.cgi?id=251722
rdar://105021476
Since it is now KnownCellUse, use lowCell.
* Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
Canonical link: https://commits.webkit.org/259846@main
Canonical link: https://commits.webkit.org/259548.189@safari-7615-branch
Commit: d5dbe478aa023c6709f13d5920bf1cd8655e9022
https://github.com/WebKit/WebKit/commit/d5dbe478aa023c6709f13d5920bf1cd8655e9022
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2023-02-15 (Wed, 15 Feb 2023)
Changed paths:
M Source/WebCore/rendering/style/OffsetRotation.cpp
M Source/WebCore/rendering/style/OffsetRotation.h
M Source/WebCore/rendering/style/StyleContentAlignmentData.h
M Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
M Source/WebCore/rendering/style/StyleRareNonInheritedData.h
M Source/WebCore/rendering/style/StyleSelfAlignmentData.h
Log Message:
-----------
Cherry-pick 526be3b317c9. rdar://problem/105060445
Optimize layout of StyleRareNonInheritedData to reduce padding
https://bugs.webkit.org/show_bug.cgi?id=251761
<rdar://problem/105060445>
Reviewed by Cameron McCormack.
Re-order the data members and functions of StyleRareNonInheritedData to make future data member layout optimizations easier.
I ensured that StyleRareNonInheritedData::operator== and the copy constructor used all the data members in the
declared order.
Shrink StyleContentAlignmentData and StyleSelfAlignmentData by declaring their bitfields with the smallest
possible type.
* Source/WebCore/rendering/style/StyleContentAlignmentData.h:
(WebCore::StyleContentAlignmentData::StyleContentAlignmentData):
(WebCore::StyleContentAlignmentData::setPosition):
(WebCore::StyleContentAlignmentData::setDistribution):
(WebCore::StyleContentAlignmentData::setOverflow):
* Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator== const):
* Source/WebCore/rendering/style/StyleRareNonInheritedData.h:
* Source/WebCore/rendering/style/StyleSelfAlignmentData.h:
(WebCore::StyleSelfAlignmentData::StyleSelfAlignmentData):
(WebCore::StyleSelfAlignmentData::setPosition):
(WebCore::StyleSelfAlignmentData::setPositionType):
(WebCore::StyleSelfAlignmentData::setOverflow):
Canonical link: https://commits.webkit.org/259911@main
Canonical link: https://commits.webkit.org/259548.190@safari-7615-branch
Commit: d29b1ed58de9453d95a4117c046e7b8ffe378e16
https://github.com/WebKit/WebKit/commit/d29b1ed58de9453d95a4117c046e7b8ffe378e16
Author: Cameron McCormack <heycam at apple.com>
Date: 2023-02-15 (Wed, 15 Feb 2023)
Changed paths:
M Source/WebCore/rendering/style/RenderStyle.cpp
M Source/WebCore/rendering/style/RenderStyle.h
M Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp
M Source/WebCore/rendering/style/SVGRenderStyleDefs.h
M Source/WebCore/rendering/style/StyleBackgroundData.cpp
M Source/WebCore/rendering/style/StyleBackgroundData.h
M Source/WebCore/rendering/style/StyleDeprecatedFlexibleBoxData.cpp
M Source/WebCore/rendering/style/StyleDeprecatedFlexibleBoxData.h
M Source/WebCore/rendering/style/StyleFlexibleBoxData.cpp
M Source/WebCore/rendering/style/StyleFlexibleBoxData.h
M Source/WebCore/rendering/style/StyleGridData.cpp
M Source/WebCore/rendering/style/StyleGridData.h
M Source/WebCore/rendering/style/StyleGridItemData.cpp
M Source/WebCore/rendering/style/StyleGridItemData.h
M Source/WebCore/rendering/style/StyleMultiColData.cpp
M Source/WebCore/rendering/style/StyleMultiColData.h
M Source/WebCore/rendering/style/StyleVisualData.cpp
M Source/WebCore/rendering/style/StyleVisualData.h
M Source/WebCore/rendering/updating/RenderTreeUpdater.cpp
Log Message:
-----------
Cherry-pick b1677b518da0. rdar://problem/105112049
Add more heap identifiers for style data
https://bugs.webkit.org/show_bug.cgi?id=251833
<rdar://problem/105112049>
Reviewed by Simon Fraser.
* Source/WebCore/rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::copyPseudoElementsFrom):
(WebCore::RenderStyle::hasUniquePseudoStyle const):
(WebCore::RenderStyle::getCachedPseudoStyle const):
(WebCore::RenderStyle::addCachedPseudoStyle):
* Source/WebCore/rendering/style/RenderStyle.h:
* Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp:
* Source/WebCore/rendering/style/SVGRenderStyleDefs.h:
* Source/WebCore/rendering/style/StyleBackgroundData.cpp:
* Source/WebCore/rendering/style/StyleBackgroundData.h:
* Source/WebCore/rendering/style/StyleDeprecatedFlexibleBoxData.cpp:
* Source/WebCore/rendering/style/StyleDeprecatedFlexibleBoxData.h:
* Source/WebCore/rendering/style/StyleFlexibleBoxData.cpp:
* Source/WebCore/rendering/style/StyleFlexibleBoxData.h:
* Source/WebCore/rendering/style/StyleGridData.cpp:
* Source/WebCore/rendering/style/StyleGridData.h:
* Source/WebCore/rendering/style/StyleGridItemData.cpp:
* Source/WebCore/rendering/style/StyleGridItemData.h:
* Source/WebCore/rendering/style/StyleMultiColData.cpp:
* Source/WebCore/rendering/style/StyleMultiColData.h:
* Source/WebCore/rendering/style/StyleVisualData.cpp:
* Source/WebCore/rendering/style/StyleVisualData.h:
* Source/WebCore/rendering/updating/RenderTreeUpdater.cpp:
(WebCore::pseudoStyleCacheIsInvalid):
Canonical link: https://commits.webkit.org/260030@main
Canonical link: https://commits.webkit.org/259548.191@safari-7615-branch
Commit: af2619ba38b1d54f2f2a66fdf99de96584bdf1bb
https://github.com/WebKit/WebKit/commit/af2619ba38b1d54f2f2a66fdf99de96584bdf1bb
Author: Cameron McCormack <heycam at apple.com>
Date: 2023-02-15 (Wed, 15 Feb 2023)
Changed paths:
M Source/WebCore/Headers.cmake
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/rendering/style/RenderStyle.cpp
M Source/WebCore/rendering/style/RenderStyle.h
A Source/WebCore/rendering/style/StyleMiscNonInheritedData.cpp
A Source/WebCore/rendering/style/StyleMiscNonInheritedData.h
A Source/WebCore/rendering/style/StyleNonInheritedData.cpp
A Source/WebCore/rendering/style/StyleNonInheritedData.h
M Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
M Source/WebCore/rendering/style/StyleRareNonInheritedData.h
M Source/WebCore/rendering/style/StyleSurroundData.cpp
M Source/WebCore/rendering/style/StyleSurroundData.h
A Source/WebCore/rendering/style/StyleVisitedLinkColorData.cpp
A Source/WebCore/rendering/style/StyleVisitedLinkColorData.h
R Source/WebCore/rendering/style/StyleVisualData.cpp
R Source/WebCore/rendering/style/StyleVisualData.h
Log Message:
-----------
Cherry-pick e6817c199573. rdar://problem/105205500
Rearrange non-inherited style data to reduce memory
https://bugs.webkit.org/show_bug.cgi?id=251972
<rdar://problem/105205500>
Reviewed by Antti Koivisto.
This patch rearranges the storage of non-inherited style data on a
RenderStyle to reduce memory. To summarize the changes:
1. The RenderStyle::NonInheritedFlags::hasExplicitlySetBorderBottomLeftRadius
etc. fields are moved to StyleSurroundData to live near border-radius
2. StyleVisualData is removed, saving one word on RenderStyle:
- clip/hasClip and zoom are moved to StyleRareNonInheritedData,
since they are rarely used
- textDecorationLine is moved to RenderStyle::NonInheritedFlags,
taking the space freed up by moving the border-radius flags
3. The DataRefs for non-inherited style data that currently live on
RenderStyle (StyleBoxData, StyleSurroundData, StyleBackgroundData,
and StyleNonInheritedData) are moved to a new StyleNonInheritedData
object that now hangs off RenderStyle. The working assumption here
is that most elements do not have changes to their non-inherited
style data, so this will save three words on RenderStyle (at the
cost of an extra word for the DataRef<StyleNonInheritedData> and one
for the StyleNonInheritedData refcount, on elements that do have
non-inherited properties applying to them).
4. A new StyleVisitedLinkColorData object is introduced to hold the
non-inherited visited link StyleColors, since they are large.
5. A new StyleMiscNonInheritedData object is introduced to hold style data
that is less common than Box/Surround/Background, but not that rare.
These fields are moved from StyleRareNonInheritedData to
StyleMiscNonInheritedData:
- the DataRefs for StyleDeprecatedFlexibleBoxData,
StyleFlexibleBoxData, StyleMultiColData, StyleFilterData,
StyleTransformData, and the FillLayer for 'mask'
- the non-inherited visited link StyleColors
- transitions and animations
- the {align,justify}-{content,items,self} properties
- box-shadow
- content, altText, and hasAttrContent
- aspectRatioWidth, aspectRatioHeight, and aspectRatioType
- objectPosition and obejctFit
- appearance and effectiveAppearance
- opacity
- order
- textOverflow
- userDrag
- resize
- the isNotFinal flag
On 64 bit, object sizes change as follows:
RenderStyle: 88 -> 56
StyleSurroundData: 272 -> 272
StyleRareNonInheritedData: 672 -> 456
with new object sizes:
StyleNonInheritedData: 48
StyleMiscNonInheritedData: 152
StyleVisitedLinkColorData: 120
The set of properties to move to StyleMiscNonInheritedData was
determined using the PLT5 sites both in their recorded state and a
contemporary load of those sites.
This should save 3.7 MB on Membuster.
* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::RenderStyle):
(WebCore::RenderStyle::copyNonInheritedFrom):
(WebCore::RenderStyle::copyContentFrom):
(WebCore::RenderStyle::operator== const):
(WebCore::RenderStyle::descendantAffectingNonInheritedPropertiesEqual const):
(WebCore::RenderStyle::hashForTextAutosizing const):
(WebCore::RenderStyle::equalForTextAutosizing const):
(WebCore::RenderStyle::changeAffectsVisualOverflow const):
(WebCore::miscDataChangeRequiresLayout):
(WebCore::rareDataChangeRequiresLayout):
(WebCore::RenderStyle::changeRequiresLayout const):
(WebCore::RenderStyle::changeRequiresPositionedLayoutOnly const):
(WebCore::miscDataChangeRequiresLayerRepaint):
(WebCore::rareDataChangeRequiresLayerRepaint):
(WebCore::RenderStyle::changeRequiresLayerRepaint const):
(WebCore::miscDataChangeRequiresRepaint):
(WebCore::rareDataChangeRequiresRepaint):
(WebCore::RenderStyle::addCustomPaintWatchProperty):
(WebCore::RenderStyle::changeRequiresRepaint const):
(WebCore::RenderStyle::changeRequiresRepaintIfText const):
(WebCore::RenderStyle::changeRequiresRecompositeLayer const):
(WebCore::RenderStyle::setClip):
(WebCore::RenderStyle::setWillChange):
(WebCore::RenderStyle::setScale):
(WebCore::RenderStyle::setRotate):
(WebCore::RenderStyle::setTranslate):
(WebCore::RenderStyle::clearContent):
(WebCore::RenderStyle::setContent):
(WebCore::RenderStyle::setContentAltText):
(WebCore::RenderStyle::contentAltText const):
(WebCore::RenderStyle::setHasAttrContent):
(WebCore::RenderStyle::affectedByTransformOrigin const):
(WebCore::RenderStyle::applyCSSTransform const):
(WebCore::RenderStyle::setBoxShadow):
(WebCore::RenderStyle::getRoundedBorderFor const):
(WebCore::RenderStyle::getRoundedInnerBorderFor const):
(WebCore::RenderStyle::counterDirectives const):
(WebCore::RenderStyle::accessCounterDirectives):
(WebCore::RenderStyle::adjustAnimations):
(WebCore::RenderStyle::adjustTransitions):
(WebCore::RenderStyle::ensureAnimations):
(WebCore::RenderStyle::ensureTransitions):
(WebCore::RenderStyle::setBorderImageSource):
(WebCore::RenderStyle::setBorderImageSliceFill):
(WebCore::RenderStyle::setBorderImageSlices):
(WebCore::RenderStyle::setBorderImageWidth):
(WebCore::RenderStyle::setBorderImageWidthOverridesBorderWidths):
(WebCore::RenderStyle::setBorderImageOutset):
(WebCore::RenderStyle::setBorderImageHorizontalRule):
(WebCore::RenderStyle::setBorderImageVerticalRule):
(WebCore::RenderStyle::deduplicateCustomProperties):
(WebCore::RenderStyle::setCustomPropertyValue):
(WebCore::RenderStyle::customPropertiesEqual const):
(WebCore::RenderStyle::scrollMargin const):
(WebCore::RenderStyle::setScrollMarginTop):
(WebCore::RenderStyle::setScrollMarginBottom):
(WebCore::RenderStyle::setScrollMarginLeft):
(WebCore::RenderStyle::setScrollMarginRight):
(WebCore::RenderStyle::scrollPadding const):
(WebCore::RenderStyle::setScrollPaddingTop):
(WebCore::RenderStyle::setScrollPaddingBottom):
(WebCore::RenderStyle::setScrollPaddingLeft):
(WebCore::RenderStyle::setScrollPaddingRight):
(WebCore::RenderStyle::scrollSnapType const):
(WebCore::RenderStyle::scrollSnapAlign const):
(WebCore::RenderStyle::scrollSnapStop const):
(WebCore::RenderStyle::setScrollSnapType):
(WebCore::RenderStyle::setScrollSnapAlign):
(WebCore::RenderStyle::setScrollSnapStop):
(WebCore::RenderStyle::hasReferenceFilterOnly const):
(WebCore::RenderStyle::outlineWidth const):
(WebCore::RenderStyle::outlineOffset const):
(WebCore::rareNonInheritedDataChangeRequiresLayout): Deleted.
(WebCore::rareNonInheritedDataChangeRequiresLayerRepaint): Deleted.
(WebCore::rareNonInheritedDataChangeRequiresRepaint): Deleted.
* Source/WebCore/rendering/style/RenderStyle.h:
(WebCore::RenderStyle::nonInheritedCustomProperties const):
(WebCore::RenderStyle::hasMargin const):
(WebCore::RenderStyle::hasBorder const):
(WebCore::RenderStyle::hasBorderImage const):
(WebCore::RenderStyle::hasVisibleBorder const):
(WebCore::RenderStyle::hasPadding const):
(WebCore::RenderStyle::hasOffset const):
(WebCore::RenderStyle::left const):
(WebCore::RenderStyle::right const):
(WebCore::RenderStyle::top const):
(WebCore::RenderStyle::bottom const):
(WebCore::RenderStyle::logicalLeft const):
(WebCore::RenderStyle::logicalRight const):
(WebCore::RenderStyle::logicalTop const):
(WebCore::RenderStyle::logicalBottom const):
(WebCore::RenderStyle::width const):
(WebCore::RenderStyle::height const):
(WebCore::RenderStyle::minWidth const):
(WebCore::RenderStyle::maxWidth const):
(WebCore::RenderStyle::minHeight const):
(WebCore::RenderStyle::maxHeight const):
(WebCore::RenderStyle::border const):
(WebCore::RenderStyle::borderLeft const):
(WebCore::RenderStyle::borderRight const):
(WebCore::RenderStyle::borderTop const):
(WebCore::RenderStyle::borderBottom const):
(WebCore::RenderStyle::borderImage const):
(WebCore::RenderStyle::borderImageSource const):
(WebCore::RenderStyle::borderImageSlices const):
(WebCore::RenderStyle::borderImageWidth const):
(WebCore::RenderStyle::borderImageOutset const):
(WebCore::RenderStyle::borderImageHorizontalRule const):
(WebCore::RenderStyle::borderImageVerticalRule const):
(WebCore::RenderStyle::borderTopLeftRadius const):
(WebCore::RenderStyle::borderTopRightRadius const):
(WebCore::RenderStyle::borderBottomLeftRadius const):
(WebCore::RenderStyle::borderBottomRightRadius const):
(WebCore::RenderStyle::borderRadii const):
(WebCore::RenderStyle::hasBorderRadius const):
(WebCore::RenderStyle::hasExplicitlySetBorderBottomLeftRadius const):
(WebCore::RenderStyle::hasExplicitlySetBorderBottomRightRadius const):
(WebCore::RenderStyle::hasExplicitlySetBorderTopLeftRadius const):
(WebCore::RenderStyle::hasExplicitlySetBorderTopRightRadius const):
(WebCore::RenderStyle::borderLeftWidth const):
(WebCore::RenderStyle::borderLeftStyle const):
(WebCore::RenderStyle::borderLeftIsTransparent const):
(WebCore::RenderStyle::borderRightWidth const):
(WebCore::RenderStyle::borderRightStyle const):
(WebCore::RenderStyle::borderRightIsTransparent const):
(WebCore::RenderStyle::borderTopWidth const):
(WebCore::RenderStyle::borderTopStyle const):
(WebCore::RenderStyle::borderTopIsTransparent const):
(WebCore::RenderStyle::borderBottomWidth const):
(WebCore::RenderStyle::borderBottomStyle const):
(WebCore::RenderStyle::borderBottomIsTransparent const):
(WebCore::RenderStyle::borderWidth const):
(WebCore::RenderStyle::outlineStyle const):
(WebCore::RenderStyle::outlineStyleIsAuto const):
(WebCore::RenderStyle::overscrollBehaviorX const):
(WebCore::RenderStyle::overscrollBehaviorY const):
(WebCore::RenderStyle::verticalAlignLength const):
(WebCore::RenderStyle::clipLeft const):
(WebCore::RenderStyle::clipRight const):
(WebCore::RenderStyle::clipTop const):
(WebCore::RenderStyle::clipBottom const):
(WebCore::RenderStyle::clip const):
(WebCore::RenderStyle::hasClip const):
(WebCore::RenderStyle::textGroupAlign const):
(WebCore::RenderStyle::textDecorationLine const):
(WebCore::RenderStyle::textDecorationStyle const):
(WebCore::RenderStyle::textDecorationThickness const):
(WebCore::RenderStyle::leadingTrim const):
(WebCore::RenderStyle::marginTrim const):
(WebCore::RenderStyle::zoom const):
(WebCore::RenderStyle::backgroundRepeat const):
(WebCore::RenderStyle::backgroundAttachment const):
(WebCore::RenderStyle::backgroundClip const):
(WebCore::RenderStyle::backgroundOrigin const):
(WebCore::RenderStyle::backgroundXPosition const):
(WebCore::RenderStyle::backgroundYPosition const):
(WebCore::RenderStyle::backgroundSizeType const):
(WebCore::RenderStyle::backgroundSizeLength const):
(WebCore::RenderStyle::ensureBackgroundLayers):
(WebCore::RenderStyle::backgroundLayers const):
(WebCore::RenderStyle::backgroundBlendMode const):
(WebCore::RenderStyle::maskImage const):
(WebCore::RenderStyle::maskRepeat const):
(WebCore::RenderStyle::maskComposite const):
(WebCore::RenderStyle::maskClip const):
(WebCore::RenderStyle::maskOrigin const):
(WebCore::RenderStyle::maskXPosition const):
(WebCore::RenderStyle::maskYPosition const):
(WebCore::RenderStyle::maskSizeType const):
(WebCore::RenderStyle::maskSizeLength const):
(WebCore::RenderStyle::ensureMaskLayers):
(WebCore::RenderStyle::maskLayers const):
(WebCore::RenderStyle::maskBoxImage const):
(WebCore::RenderStyle::maskBoxImageSource const):
(WebCore::RenderStyle::marginTop const):
(WebCore::RenderStyle::marginBottom const):
(WebCore::RenderStyle::marginLeft const):
(WebCore::RenderStyle::marginRight const):
(WebCore::RenderStyle::marginBefore const):
(WebCore::RenderStyle::marginAfter const):
(WebCore::RenderStyle::marginStart const):
(WebCore::RenderStyle::marginEnd const):
(WebCore::RenderStyle::marginStartUsing const):
(WebCore::RenderStyle::marginEndUsing const):
(WebCore::RenderStyle::marginBeforeUsing const):
(WebCore::RenderStyle::marginAfterUsing const):
(WebCore::RenderStyle::paddingBox const):
(WebCore::RenderStyle::paddingTop const):
(WebCore::RenderStyle::paddingBottom const):
(WebCore::RenderStyle::paddingLeft const):
(WebCore::RenderStyle::paddingRight const):
(WebCore::RenderStyle::paddingBefore const):
(WebCore::RenderStyle::paddingAfter const):
(WebCore::RenderStyle::paddingStart const):
(WebCore::RenderStyle::paddingEnd const):
(WebCore::RenderStyle::breakInside const):
(WebCore::RenderStyle::breakBefore const):
(WebCore::RenderStyle::breakAfter const):
(WebCore::RenderStyle::opacity const):
(WebCore::RenderStyle::hasOpacity const):
(WebCore::RenderStyle::appearance const):
(WebCore::RenderStyle::effectiveAppearance const):
(WebCore::RenderStyle::aspectRatioType const):
(WebCore::RenderStyle::aspectRatioWidth const):
(WebCore::RenderStyle::aspectRatioHeight const):
(WebCore::RenderStyle::contain const):
(WebCore::RenderStyle::effectiveContainment const):
(WebCore::RenderStyle::containerType const):
(WebCore::RenderStyle::containerNames const):
(WebCore::RenderStyle::contentVisibility const):
(WebCore::RenderStyle::containIntrinsicWidthType const):
(WebCore::RenderStyle::containIntrinsicHeightType const):
(WebCore::RenderStyle::containIntrinsicWidth const):
(WebCore::RenderStyle::containIntrinsicHeight const):
(WebCore::RenderStyle::boxAlign const):
(WebCore::RenderStyle::boxFlex const):
(WebCore::RenderStyle::boxFlexGroup const):
(WebCore::RenderStyle::boxLines const):
(WebCore::RenderStyle::boxOrdinalGroup const):
(WebCore::RenderStyle::boxOrient const):
(WebCore::RenderStyle::boxPack const):
(WebCore::RenderStyle::order const):
(WebCore::RenderStyle::flexGrow const):
(WebCore::RenderStyle::flexShrink const):
(WebCore::RenderStyle::flexBasis const):
(WebCore::RenderStyle::alignContent const):
(WebCore::RenderStyle::alignItems const):
(WebCore::RenderStyle::alignSelf const):
(WebCore::RenderStyle::flexDirection const):
(WebCore::RenderStyle::flexWrap const):
(WebCore::RenderStyle::justifyContent const):
(WebCore::RenderStyle::justifyItems const):
(WebCore::RenderStyle::justifySelf const):
(WebCore::RenderStyle::gridColumnTrackSizes const):
(WebCore::RenderStyle::gridRowTrackSizes const):
(WebCore::RenderStyle::gridColumnList const):
(WebCore::RenderStyle::gridRowList const):
(WebCore::RenderStyle::gridAutoRepeatColumns const):
(WebCore::RenderStyle::gridAutoRepeatRows const):
(WebCore::RenderStyle::gridAutoRepeatColumnsInsertionPoint const):
(WebCore::RenderStyle::gridAutoRepeatRowsInsertionPoint const):
(WebCore::RenderStyle::gridAutoRepeatColumnsType const):
(WebCore::RenderStyle::gridAutoRepeatRowsType const):
(WebCore::RenderStyle::namedGridColumnLines const):
(WebCore::RenderStyle::namedGridRowLines const):
(WebCore::RenderStyle::orderedNamedGridColumnLines const):
(WebCore::RenderStyle::orderedNamedGridRowLines const):
(WebCore::RenderStyle::autoRepeatNamedGridColumnLines const):
(WebCore::RenderStyle::autoRepeatNamedGridRowLines const):
(WebCore::RenderStyle::autoRepeatOrderedNamedGridColumnLines const):
(WebCore::RenderStyle::autoRepeatOrderedNamedGridRowLines const):
(WebCore::RenderStyle::implicitNamedGridColumnLines const):
(WebCore::RenderStyle::implicitNamedGridRowLines const):
(WebCore::RenderStyle::namedGridArea const):
(WebCore::RenderStyle::namedGridAreaRowCount const):
(WebCore::RenderStyle::namedGridAreaColumnCount const):
(WebCore::RenderStyle::gridAutoFlow const):
(WebCore::RenderStyle::alignTracks const):
(WebCore::RenderStyle::justifyTracks const):
(WebCore::RenderStyle::masonryAutoFlow const):
(WebCore::RenderStyle::gridSubgridRows const):
(WebCore::RenderStyle::gridSubgridColumns const):
(WebCore::RenderStyle::gridMasonryRows const):
(WebCore::RenderStyle::gridMasonryColumns const):
(WebCore::RenderStyle::isGridAutoFlowDirectionRow const):
(WebCore::RenderStyle::isGridAutoFlowDirectionColumn const):
(WebCore::RenderStyle::isGridAutoFlowAlgorithmSparse const):
(WebCore::RenderStyle::isGridAutoFlowAlgorithmDense const):
(WebCore::RenderStyle::gridAutoColumns const):
(WebCore::RenderStyle::gridAutoRows const):
(WebCore::RenderStyle::gridItemColumnStart const):
(WebCore::RenderStyle::gridItemColumnEnd const):
(WebCore::RenderStyle::gridItemRowStart const):
(WebCore::RenderStyle::gridItemRowEnd const):
(WebCore::RenderStyle::boxShadow const):
(WebCore::RenderStyle::boxDecorationBreak const):
(WebCore::RenderStyle::boxReflect const):
(WebCore::RenderStyle::boxSizing const):
(WebCore::RenderStyle::marqueeIncrement const):
(WebCore::RenderStyle::marqueeSpeed const):
(WebCore::RenderStyle::marqueeLoopCount const):
(WebCore::RenderStyle::marqueeBehavior const):
(WebCore::RenderStyle::marqueeDirection const):
(WebCore::RenderStyle::userDrag const):
(WebCore::RenderStyle::textOverflow const):
(WebCore::RenderStyle::resize const):
(WebCore::RenderStyle::columnAxis const):
(WebCore::RenderStyle::columnProgression const):
(WebCore::RenderStyle::columnWidth const):
(WebCore::RenderStyle::hasAutoColumnWidth const):
(WebCore::RenderStyle::columnCount const):
(WebCore::RenderStyle::hasAutoColumnCount const):
(WebCore::RenderStyle::columnFill const):
(WebCore::RenderStyle::columnGap const):
(WebCore::RenderStyle::rowGap const):
(WebCore::RenderStyle::columnRuleStyle const):
(WebCore::RenderStyle::columnRuleWidth const):
(WebCore::RenderStyle::columnRuleIsTransparent const):
(WebCore::RenderStyle::columnSpan const):
(WebCore::RenderStyle::transform const):
(WebCore::RenderStyle::hasTransform const):
(WebCore::RenderStyle::transformOriginX const):
(WebCore::RenderStyle::transformOriginY const):
(WebCore::RenderStyle::transformOriginZ const):
(WebCore::RenderStyle::transformOriginXY const):
(WebCore::RenderStyle::transformBox const):
(WebCore::RenderStyle::rotate const):
(WebCore::RenderStyle::scale const):
(WebCore::RenderStyle::translate const):
(WebCore::RenderStyle::objectFit const):
(WebCore::RenderStyle::objectPosition const):
(WebCore::RenderStyle::hasPositionedMask const):
(WebCore::RenderStyle::hasMask const):
(WebCore::RenderStyle::animations const):
(WebCore::RenderStyle::transitions const):
(WebCore::RenderStyle::animations):
(WebCore::RenderStyle::transitions):
(WebCore::RenderStyle::hasAnimations const):
(WebCore::RenderStyle::hasTransitions const):
(WebCore::RenderStyle::transformStyle3D const):
(WebCore::RenderStyle::usedTransformStyle3D const):
(WebCore::RenderStyle::backfaceVisibility const):
(WebCore::RenderStyle::perspective const):
(WebCore::RenderStyle::hasPerspective const):
(WebCore::RenderStyle::perspectiveOriginX const):
(WebCore::RenderStyle::perspectiveOriginY const):
(WebCore::RenderStyle::perspectiveOrigin const):
(WebCore::RenderStyle::pageSize const):
(WebCore::RenderStyle::pageSizeType const):
(WebCore::RenderStyle::lineClamp const):
(WebCore::RenderStyle::initialLetter const):
(WebCore::RenderStyle::touchActions const):
(WebCore::RenderStyle::useSmoothScrolling const):
(WebCore::RenderStyle::inputSecurity const):
(WebCore::RenderStyle::mutableFilter):
(WebCore::RenderStyle::filter const):
(WebCore::RenderStyle::hasFilter const):
(WebCore::RenderStyle::mutableBackdropFilter):
(WebCore::RenderStyle::backdropFilter const):
(WebCore::RenderStyle::hasBackdropFilter const):
(WebCore::RenderStyle::blendMode const):
(WebCore::RenderStyle::hasBlendMode const):
(WebCore::RenderStyle::isolation const):
(WebCore::RenderStyle::setIsolation):
(WebCore::RenderStyle::applePayButtonStyle const):
(WebCore::RenderStyle::applePayButtonType const):
(WebCore::RenderStyle::setLeft):
(WebCore::RenderStyle::setRight):
(WebCore::RenderStyle::setTop):
(WebCore::RenderStyle::setBottom):
(WebCore::RenderStyle::setWidth):
(WebCore::RenderStyle::setHeight):
(WebCore::RenderStyle::setMinWidth):
(WebCore::RenderStyle::setMaxWidth):
(WebCore::RenderStyle::setMinHeight):
(WebCore::RenderStyle::setMaxHeight):
(WebCore::RenderStyle::resetBorderTop):
(WebCore::RenderStyle::resetBorderRight):
(WebCore::RenderStyle::resetBorderBottom):
(WebCore::RenderStyle::resetBorderLeft):
(WebCore::RenderStyle::resetBorderImage):
(WebCore::RenderStyle::resetBorderTopLeftRadius):
(WebCore::RenderStyle::resetBorderTopRightRadius):
(WebCore::RenderStyle::resetBorderBottomLeftRadius):
(WebCore::RenderStyle::resetBorderBottomRightRadius):
(WebCore::RenderStyle::setBackgroundColor):
(WebCore::RenderStyle::setBackgroundXPosition):
(WebCore::RenderStyle::setBackgroundYPosition):
(WebCore::RenderStyle::setBackgroundSize):
(WebCore::RenderStyle::setBackgroundSizeLength):
(WebCore::RenderStyle::setBackgroundAttachment):
(WebCore::RenderStyle::setBackgroundClip):
(WebCore::RenderStyle::setBackgroundOrigin):
(WebCore::RenderStyle::setBackgroundRepeat):
(WebCore::RenderStyle::setBackgroundBlendMode):
(WebCore::RenderStyle::setBorderImage):
(WebCore::RenderStyle::setBorderTopLeftRadius):
(WebCore::RenderStyle::setBorderTopRightRadius):
(WebCore::RenderStyle::setBorderBottomLeftRadius):
(WebCore::RenderStyle::setBorderBottomRightRadius):
(WebCore::RenderStyle::setHasExplicitlySetBorderBottomLeftRadius):
(WebCore::RenderStyle::setHasExplicitlySetBorderBottomRightRadius):
(WebCore::RenderStyle::setHasExplicitlySetBorderTopLeftRadius):
(WebCore::RenderStyle::setHasExplicitlySetBorderTopRightRadius):
(WebCore::RenderStyle::setBorderLeftWidth):
(WebCore::RenderStyle::setBorderLeftStyle):
(WebCore::RenderStyle::setBorderLeftColor):
(WebCore::RenderStyle::setBorderRightWidth):
(WebCore::RenderStyle::setBorderRightStyle):
(WebCore::RenderStyle::setBorderRightColor):
(WebCore::RenderStyle::setBorderTopWidth):
(WebCore::RenderStyle::setBorderTopStyle):
(WebCore::RenderStyle::setBorderTopColor):
(WebCore::RenderStyle::setBorderBottomWidth):
(WebCore::RenderStyle::setBorderBottomStyle):
(WebCore::RenderStyle::setBorderBottomColor):
(WebCore::RenderStyle::setOutlineWidth):
(WebCore::RenderStyle::setOutlineStyleIsAuto):
(WebCore::RenderStyle::setOutlineStyle):
(WebCore::RenderStyle::setOutlineColor):
(WebCore::RenderStyle::setOverscrollBehaviorX):
(WebCore::RenderStyle::setOverscrollBehaviorY):
(WebCore::RenderStyle::setVerticalAlignLength):
(WebCore::RenderStyle::setHasClip):
(WebCore::RenderStyle::setClipLeft):
(WebCore::RenderStyle::setClipRight):
(WebCore::RenderStyle::setClipTop):
(WebCore::RenderStyle::setClipBottom):
(WebCore::RenderStyle::setClip):
(WebCore::RenderStyle::setTextGroupAlign):
(WebCore::RenderStyle::setTextDecorationLine):
(WebCore::RenderStyle::setTextDecorationStyle):
(WebCore::RenderStyle::setTextDecorationThickness):
(WebCore::RenderStyle::setLeadingTrim):
(WebCore::RenderStyle::setMarginTrim):
(WebCore::RenderStyle::clearBackgroundLayers):
(WebCore::RenderStyle::inheritBackgroundLayers):
(WebCore::RenderStyle::clearMaskLayers):
(WebCore::RenderStyle::inheritMaskLayers):
(WebCore::RenderStyle::setMaskImage):
(WebCore::RenderStyle::setMaskBoxImage):
(WebCore::RenderStyle::setMaskBoxImageSource):
(WebCore::RenderStyle::setMaskXPosition):
(WebCore::RenderStyle::setMaskYPosition):
(WebCore::RenderStyle::setMaskRepeat):
(WebCore::RenderStyle::setMaskSize):
(WebCore::RenderStyle::setAspectRatioType):
(WebCore::RenderStyle::setAspectRatio):
(WebCore::RenderStyle::setContain):
(WebCore::RenderStyle::setContainerType):
(WebCore::RenderStyle::setContainerNames):
(WebCore::RenderStyle::setContainIntrinsicWidthType):
(WebCore::RenderStyle::setContainIntrinsicHeightType):
(WebCore::RenderStyle::setContainIntrinsicWidth):
(WebCore::RenderStyle::setContainIntrinsicHeight):
(WebCore::RenderStyle::setContentVisibility):
(WebCore::RenderStyle::resetMargin):
(WebCore::RenderStyle::setMarginTop):
(WebCore::RenderStyle::setMarginBottom):
(WebCore::RenderStyle::setMarginLeft):
(WebCore::RenderStyle::setMarginRight):
(WebCore::RenderStyle::resetPadding):
(WebCore::RenderStyle::setPaddingBox):
(WebCore::RenderStyle::setPaddingTop):
(WebCore::RenderStyle::setPaddingBottom):
(WebCore::RenderStyle::setPaddingLeft):
(WebCore::RenderStyle::setPaddingRight):
(WebCore::RenderStyle::specifiedZIndex const):
(WebCore::RenderStyle::hasAutoSpecifiedZIndex const):
(WebCore::RenderStyle::setSpecifiedZIndex):
(WebCore::RenderStyle::setHasAutoSpecifiedZIndex):
(WebCore::RenderStyle::usedZIndex const):
(WebCore::RenderStyle::hasAutoUsedZIndex const):
(WebCore::RenderStyle::setUsedZIndex):
(WebCore::RenderStyle::setHasAutoUsedZIndex):
(WebCore::RenderStyle::setOutlineOffset):
(WebCore::RenderStyle::setOpacity):
(WebCore::RenderStyle::setAppearance):
(WebCore::RenderStyle::setEffectiveAppearance):
(WebCore::RenderStyle::setBoxAlign):
(WebCore::RenderStyle::setBoxFlex):
(WebCore::RenderStyle::setBoxFlexGroup):
(WebCore::RenderStyle::setBoxLines):
(WebCore::RenderStyle::setBoxOrdinalGroup):
(WebCore::RenderStyle::setBoxOrient):
(WebCore::RenderStyle::setBoxPack):
(WebCore::RenderStyle::setBoxSizing):
(WebCore::RenderStyle::setFlexGrow):
(WebCore::RenderStyle::setFlexShrink):
(WebCore::RenderStyle::setFlexBasis):
(WebCore::RenderStyle::setOrder):
(WebCore::RenderStyle::setAlignContent):
(WebCore::RenderStyle::setAlignItems):
(WebCore::RenderStyle::setAlignItemsPosition):
(WebCore::RenderStyle::setAlignSelf):
(WebCore::RenderStyle::setAlignSelfPosition):
(WebCore::RenderStyle::setFlexDirection):
(WebCore::RenderStyle::setFlexWrap):
(WebCore::RenderStyle::setJustifyContent):
(WebCore::RenderStyle::setJustifyContentPosition):
(WebCore::RenderStyle::setJustifyItems):
(WebCore::RenderStyle::setJustifySelf):
(WebCore::RenderStyle::setJustifySelfPosition):
(WebCore::RenderStyle::setBoxDecorationBreak):
(WebCore::RenderStyle::setGridColumnList):
(WebCore::RenderStyle::setGridRowList):
(WebCore::RenderStyle::setGridAutoColumns):
(WebCore::RenderStyle::setGridAutoRows):
(WebCore::RenderStyle::setImplicitNamedGridColumnLines):
(WebCore::RenderStyle::setImplicitNamedGridRowLines):
(WebCore::RenderStyle::setNamedGridArea):
(WebCore::RenderStyle::setNamedGridAreaRowCount):
(WebCore::RenderStyle::setNamedGridAreaColumnCount):
(WebCore::RenderStyle::setGridAutoFlow):
(WebCore::RenderStyle::setGridItemColumnStart):
(WebCore::RenderStyle::setGridItemColumnEnd):
(WebCore::RenderStyle::setGridItemRowStart):
(WebCore::RenderStyle::setGridItemRowEnd):
(WebCore::RenderStyle::setAlignTracks):
(WebCore::RenderStyle::setJustifyTracks):
(WebCore::RenderStyle::setMasonryAutoFlow):
(WebCore::RenderStyle::setMarqueeIncrement):
(WebCore::RenderStyle::setMarqueeSpeed):
(WebCore::RenderStyle::setMarqueeDirection):
(WebCore::RenderStyle::setMarqueeBehavior):
(WebCore::RenderStyle::setMarqueeLoopCount):
(WebCore::RenderStyle::setUserDrag):
(WebCore::RenderStyle::setTextOverflow):
(WebCore::RenderStyle::setResize):
(WebCore::RenderStyle::setColumnAxis):
(WebCore::RenderStyle::setColumnProgression):
(WebCore::RenderStyle::setColumnWidth):
(WebCore::RenderStyle::setHasAutoColumnWidth):
(WebCore::RenderStyle::setColumnCount):
(WebCore::RenderStyle::setHasAutoColumnCount):
(WebCore::RenderStyle::setColumnFill):
(WebCore::RenderStyle::setColumnGap):
(WebCore::RenderStyle::setRowGap):
(WebCore::RenderStyle::setColumnRuleColor):
(WebCore::RenderStyle::setColumnRuleStyle):
(WebCore::RenderStyle::setColumnRuleWidth):
(WebCore::RenderStyle::resetColumnRule):
(WebCore::RenderStyle::setColumnSpan):
(WebCore::RenderStyle::inheritColumnPropertiesFrom):
(WebCore::RenderStyle::setTransform):
(WebCore::RenderStyle::setTransformOriginX):
(WebCore::RenderStyle::setTransformOriginY):
(WebCore::RenderStyle::setTransformOriginZ):
(WebCore::RenderStyle::setTransformBox):
(WebCore::RenderStyle::setTextDecorationColor):
(WebCore::RenderStyle::setObjectFit):
(WebCore::RenderStyle::setObjectPosition):
(WebCore::RenderStyle::setFilter):
(WebCore::RenderStyle::setBackdropFilter):
(WebCore::RenderStyle::setBreakBefore):
(WebCore::RenderStyle::setBreakAfter):
(WebCore::RenderStyle::setBreakInside):
(WebCore::RenderStyle::setTransformStyle3D):
(WebCore::RenderStyle::setTransformStyleForcedToFlat):
(WebCore::RenderStyle::setBackfaceVisibility):
(WebCore::RenderStyle::setPerspective):
(WebCore::RenderStyle::setPerspectiveOriginX):
(WebCore::RenderStyle::setPerspectiveOriginY):
(WebCore::RenderStyle::setPageSize):
(WebCore::RenderStyle::setPageSizeType):
(WebCore::RenderStyle::resetPageSizeType):
(WebCore::RenderStyle::setLineClamp):
(WebCore::RenderStyle::setInitialLetter):
(WebCore::RenderStyle::setTouchActions):
(WebCore::RenderStyle::setUseSmoothScrolling):
(WebCore::RenderStyle::setInputSecurity):
(WebCore::RenderStyle::setApplePayButtonStyle):
(WebCore::RenderStyle::setApplePayButtonType):
(WebCore::RenderStyle::shapeOutside const):
(WebCore::RenderStyle::shapeMargin const):
(WebCore::RenderStyle::setShapeMargin):
(WebCore::RenderStyle::shapeImageThreshold const):
(WebCore::RenderStyle::clipPath const):
(WebCore::RenderStyle::contentData const):
(WebCore::RenderStyle::contentDataEquivalent const):
(WebCore::RenderStyle::hasAttrContent const):
(WebCore::RenderStyle::willChange const):
(WebCore::RenderStyle::isNotFinal const):
(WebCore::RenderStyle::setIsNotFinal):
(WebCore::RenderStyle::setVisitedLinkBackgroundColor):
(WebCore::RenderStyle::setVisitedLinkBorderLeftColor):
(WebCore::RenderStyle::setVisitedLinkBorderRightColor):
(WebCore::RenderStyle::setVisitedLinkBorderBottomColor):
(WebCore::RenderStyle::setVisitedLinkBorderTopColor):
(WebCore::RenderStyle::setVisitedLinkOutlineColor):
(WebCore::RenderStyle::setVisitedLinkColumnRuleColor):
(WebCore::RenderStyle::setVisitedLinkTextDecorationColor):
(WebCore::RenderStyle::borderLeftColor const):
(WebCore::RenderStyle::borderRightColor const):
(WebCore::RenderStyle::borderTopColor const):
(WebCore::RenderStyle::borderBottomColor const):
(WebCore::RenderStyle::backgroundColor const):
(WebCore::RenderStyle::columnRuleColor const):
(WebCore::RenderStyle::outlineColor const):
(WebCore::RenderStyle::initialTextFillColor):
(WebCore::RenderStyle::visitedLinkBackgroundColor const):
(WebCore::RenderStyle::visitedLinkBorderLeftColor const):
(WebCore::RenderStyle::visitedLinkBorderRightColor const):
(WebCore::RenderStyle::visitedLinkBorderBottomColor const):
(WebCore::RenderStyle::visitedLinkBorderTopColor const):
(WebCore::RenderStyle::visitedLinkOutlineColor const):
(WebCore::RenderStyle::visitedLinkColumnRuleColor const):
(WebCore::RenderStyle::textDecorationColor const):
(WebCore::RenderStyle::visitedLinkTextDecorationColor const):
(WebCore::RenderStyle::offsetPath const):
(WebCore::RenderStyle::setOffsetPath):
(WebCore::RenderStyle::offsetDistance const):
(WebCore::RenderStyle::setOffsetDistance):
(WebCore::RenderStyle::offsetPosition const):
(WebCore::RenderStyle::setOffsetPosition):
(WebCore::RenderStyle::offsetAnchor const):
(WebCore::RenderStyle::setOffsetAnchor):
(WebCore::RenderStyle::offsetRotate const):
(WebCore::RenderStyle::setOffsetRotate):
(WebCore::RenderStyle::overflowAnchor const):
(WebCore::RenderStyle::setOverflowAnchor):
(WebCore::RenderStyle::NonInheritedFlags::operator== const):
(WebCore::RenderStyle::NonInheritedFlags::copyNonInheritedFrom):
(WebCore::RenderStyle::setBlendMode):
(WebCore::RenderStyle::setZoom):
(WebCore::RenderStyle::clearAnimations):
(WebCore::RenderStyle::clearTransitions):
(WebCore::RenderStyle::setShapeOutside):
(WebCore::RenderStyle::setShapeImageThreshold):
(WebCore::RenderStyle::setClipPath):
(WebCore::RenderStyle::setBoxReflect):
* Source/WebCore/rendering/style/StyleMiscNonInheritedData.cpp: Added.
(WebCore::StyleMiscNonInheritedData::StyleMiscNonInheritedData):
(WebCore::StyleMiscNonInheritedData::copy const):
(WebCore::StyleMiscNonInheritedData::operator== const):
(WebCore::StyleMiscNonInheritedData::contentDataEquivalent const):
(WebCore::StyleMiscNonInheritedData::hasFilters const):
* Source/WebCore/rendering/style/StyleMiscNonInheritedData.h: Added.
(WebCore::StyleMiscNonInheritedData::create):
(WebCore::StyleMiscNonInheritedData::operator!= const):
(WebCore::StyleMiscNonInheritedData::hasOpacity const):
* Source/WebCore/rendering/style/StyleNonInheritedData.cpp: Added.
(WebCore::StyleNonInheritedData::StyleNonInheritedData):
(WebCore::StyleNonInheritedData::copy const):
(WebCore::StyleNonInheritedData::operator== const):
* Source/WebCore/rendering/style/StyleNonInheritedData.h: Added.
(WebCore::StyleNonInheritedData::create):
(WebCore::StyleNonInheritedData::operator!= const):
* Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator== const):
(WebCore::StyleRareNonInheritedData::contentDataEquivalent const): Deleted.
(WebCore::StyleRareNonInheritedData::hasFilters const): Deleted.
* Source/WebCore/rendering/style/StyleRareNonInheritedData.h:
(WebCore::StyleRareNonInheritedData::hasOpacity const): Deleted.
* Source/WebCore/rendering/style/StyleSurroundData.cpp:
(WebCore::StyleSurroundData::StyleSurroundData):
(WebCore::StyleSurroundData::operator== const):
* Source/WebCore/rendering/style/StyleSurroundData.h:
* Source/WebCore/rendering/style/StyleVisitedLinkColorData.cpp: Added.
(WebCore::StyleVisitedLinkColorData::StyleVisitedLinkColorData):
(WebCore::StyleVisitedLinkColorData::copy const):
(WebCore::StyleVisitedLinkColorData::operator== const):
* Source/WebCore/rendering/style/StyleVisitedLinkColorData.h: Added.
(WebCore::StyleVisitedLinkColorData::create):
(WebCore::StyleVisitedLinkColorData::operator!= const):
* Source/WebCore/rendering/style/StyleVisualData.cpp: Removed.
* Source/WebCore/rendering/style/StyleVisualData.h: Removed.
Canonical link: https://commits.webkit.org/260272@main
Canonical link: https://commits.webkit.org/259548.192@safari-7615-branch
Commit: da35f298761e37050ae61fe06a5711184db71724
https://github.com/WebKit/WebKit/commit/da35f298761e37050ae61fe06a5711184db71724
Author: Chris Dumez <cdumez at apple.com>
Date: 2023-02-15 (Wed, 15 Feb 2023)
Changed paths:
M Source/WebKit/Platform/Logging.h
M Source/WebKit/UIProcess/mac/SecItemShimProxy.cpp
M Source/WebKit/UIProcess/mac/SecItemShimProxy.h
Log Message:
-----------
Do IPC hardening in SecItemShimProxy::secItemRequest()
https://bugs.webkit.org/show_bug.cgi?id=252276
rdar://104253249
Reviewed by Alex Christensen and Geoffrey Garen.
Make sure the dictionaries that SecItemShimProxy::secItemRequest() receives
over IPC do not contain the kSecValueRef & kSecUseItemList keys. Those are
used to pass "in-memory" objects, which wouldn't work over IPC. We don't use
those keys but a compromised sending process could craft a dictionary with
these that could cause trouble when passed to the Keychain API.
* Source/WebKit/Platform/Logging.h:
* Source/WebKit/UIProcess/mac/SecItemShimProxy.cpp:
(WebKit::dictionaryContainsInMemoryObject):
(WebKit::SecItemShimProxy::secItemRequest):
Canonical link: https://commits.webkit.org/259548.192@safari-7615-branch
Commit: 25a46438dc1d91597a609dcc2c4b6d5b41c70aa5
https://github.com/WebKit/WebKit/commit/25a46438dc1d91597a609dcc2c4b6d5b41c70aa5
Author: Myah Cobbs <mcobbs at apple.com>
Date: 2023-02-16 (Thu, 16 Feb 2023)
Changed paths:
M Configurations/Version.xcconfig
Log Message:
-----------
Versioning.
WebKit-7615.1.23
Canonical link: https://commits.webkit.org/259548.194@safari-7615-branch
Commit: 931ae534723ad632abbbae69cbe9e7b199a5136c
https://github.com/WebKit/WebKit/commit/931ae534723ad632abbbae69cbe9e7b199a5136c
Author: Justin Michaud <justin_michaud at apple.com>
Date: 2023-02-16 (Thu, 16 Feb 2023)
Changed paths:
A JSTests/wasm/stress/big-try-simd.js
A JSTests/wasm/stress/big-try.js
A JSTests/wasm/stress/big-tuple-args.js
A JSTests/wasm/stress/big-tuple.js
A JSTests/wasm/stress/simd-big-tuple.js
A JSTests/wasm/stress/tag-return.js
M Source/JavaScriptCore/wasm/WasmAirIRGenerator64.cpp
M Source/JavaScriptCore/wasm/WasmAirIRGeneratorBase.h
M Source/JavaScriptCore/wasm/WasmSectionParser.cpp
Log Message:
-----------
Cherry-pick 50c7aaec2f53. rdar://problem/105079565
Fixup air pointer args if they are not valid in BBQ
https://bugs.webkit.org/show_bug.cgi?id=251890
rdar://105079565
Reviewed by Mark Lam and Yusuke Suzuki.
We are not fixing up air args if their offsets don't fit into the instruction
in a few cases.
Here are some examples:
MoveDouble 28480(%sp), %q16 ; too big
MoveVector 248(%sp), %q16 ; not 16-byte aligned
Let's fix up these arguments. We also fix a missing validation check
when parsing exception tags exposed by this test.
* Source/JavaScriptCore/wasm/WasmAirIRGenerator64.cpp:
(JSC::Wasm::AirIRGenerator64::addReturn):
* Source/JavaScriptCore/wasm/WasmAirIRGeneratorBase.h:
(JSC::Wasm::AirIRGeneratorBase::emitPatchpoint):
oops
Canonical link: https://commits.webkit.org/260038@main
Canonical link: https://commits.webkit.org/259548.195@safari-7615-branch
Commit: e6fd1c501e1a39a26ef74648dc741487d7da7a3b
https://github.com/WebKit/WebKit/commit/e6fd1c501e1a39a26ef74648dc741487d7da7a3b
Author: Eric Carlson <eric.carlson at apple.com>
Date: 2023-02-16 (Thu, 16 Feb 2023)
Changed paths:
M Source/WebCore/PAL/pal/system/ios/SleepDisablerIOS.mm
Log Message:
-----------
Cherry-pick 1c8de44efc1a. rdar://problem/104266428
[iOS] Idle timer should be enabled/disabled on the main thread
https://bugs.webkit.org/show_bug.cgi?id=252015
rdar://104266428
Reviewed by Chris Dumez.
Use `ensureOnMainRunLoop` so we always change `UIApplication.sharedApplication.idleTimerDisabled`
on the main thread. This is necessary in WebKit where WebKit's "main thread" is not the
UI thread.
* Source/WebCore/PAL/pal/system/ios/SleepDisablerIOS.mm:
(PAL::ScreenSleepDisabler::updateState):
Canonical link: https://commits.webkit.org/260098@main
Canonical link: https://commits.webkit.org/259548.196@safari-7615-branch
Commit: f327935a525d4bd7975287f00b2cdf9df118add5
https://github.com/WebKit/WebKit/commit/f327935a525d4bd7975287f00b2cdf9df118add5
Author: Per Arne Vollan <pvollan at apple.com>
Date: 2023-02-16 (Thu, 16 Feb 2023)
Changed paths:
M Source/WebKit/Shared/LoadParameters.cpp
M Source/WebKit/Shared/LoadParameters.h
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
Log Message:
-----------
Cherry-pick cf3cb8bb45fd. rdar://problem/104079541
Fix container manager sandbox violations
https://bugs.webkit.org/show_bug.cgi?id=250389
rdar://104079541
Reviewed by Geoffrey Garen.
Send top private controlled domain and host in load parameters and cache the result
in the WebContent process, since computing the top privately controlled domain is
causing the sandbox violation in the WebContent process.
* Source/WebKit/Shared/LoadParameters.cpp:
(WebKit::LoadParameters::encode const):
(WebKit::LoadParameters::decode):
* Source/WebKit/Shared/LoadParameters.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadRequestWithNavigationShared):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::loadRequest):
Canonical link: https://commits.webkit.org/260263@main
Canonical link: https://commits.webkit.org/259548.197@safari-7615-branch
Commit: 2b5e2483958c5d3c2c44b24eac54bed1faf64134
https://github.com/WebKit/WebKit/commit/2b5e2483958c5d3c2c44b24eac54bed1faf64134
Author: Brady Eidson <beidson at apple.com>
Date: 2023-02-17 (Fri, 17 Feb 2023)
Changed paths:
M Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.h
M Source/WebCore/platform/RuntimeApplicationChecks.h
M Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm
M Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.mm
Log Message:
-----------
Cherry-pick c8d1a934654d. rdar://problem/103093747
Workaround "Backbone controller not recognized by app"
https://bugs.webkit.org/show_bug.cgi?id=252017
rdar://103093747
Reviewed by Geoffrey Garen and Tim Horton.
* Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.h:
* Source/WebCore/platform/RuntimeApplicationChecks.h:
* Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm:
(WebCore::IOSApplication::isBackboneApp):
* Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.mm:
(WebCore::GameControllerGamepad::setupElements):
Canonical link: https://commits.webkit.org/260096@main
Canonical link: https://commits.webkit.org/259548.198@safari-7615-branch
Commit: e92a019859570b86fc870c5220cfe1d10048f5a6
https://github.com/WebKit/WebKit/commit/e92a019859570b86fc870c5220cfe1d10048f5a6
Author: Sammy Gill <sammy.gill at apple.com>
Date: 2023-02-17 (Fri, 17 Feb 2023)
Changed paths:
M LayoutTests/TestExpectations
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-end-deeply-nested-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-end-deeply-nested.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-end-up-to-content-block-layout-different-containers-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-end-up-to-content-block-layout-different-containers-vert-lr-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-end-up-to-content-block-layout-different-containers-vert-lr.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-end-up-to-content-block-layout-different-containers.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-end-up-to-content-block-layout-same-container-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-end-up-to-content-block-layout-same-container.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-start-block-layout-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-start-block-layout.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-start-relative-positioned-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-start-relative-positioned.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-start-with-transforms-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-start-with-transforms.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-fit-content-block-layout-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-fit-content-block-layout.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-end-block-layout-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-end-block-layout.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-start-block-layout-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-start-block-layout.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-left-trimmed-margin-allows-float-to-fit-block-layout-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-left-trimmed-margin-allows-float-to-fit-block-layout-vert-lr-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-left-trimmed-margin-allows-float-to-fit-block-layout-vert-lr.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-left-trimmed-margin-allows-float-to-fit-block-layout.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-min-content-with-block-content-block-layout-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-min-content-with-block-content-block-layout.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-right-trimmed-margin-allows-float-to-fit-block-layout-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-right-trimmed-margin-allows-float-to-fit-block-layout.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-overflowing-float-margins-tirmmed-at-final-position-block-layout-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-overflowing-float-margins-tirmmed-at-final-position-block-layout.html
M Source/WebCore/rendering/FloatingObjects.cpp
M Source/WebCore/rendering/FloatingObjects.h
M Source/WebCore/rendering/RenderBlock.cpp
M Source/WebCore/rendering/RenderBlock.h
M Source/WebCore/rendering/RenderBlockFlow.cpp
M Source/WebCore/rendering/RenderBlockFlow.h
M Source/WebCore/rendering/RenderBox.cpp
M Source/WebCore/rendering/RenderBox.h
Log Message:
-----------
Cherry-pick f679766e27a1. rdar://problem/103285803
Implement margin-trim for floats in block containers that contain only block boxes.
https://bugs.webkit.org/show_bug.cgi?id=249207
rdar://103285803
Reviewed by Alan Baradlay.
Another patch will be added to provide support for block containers that
contain only inline level boxes.
There are 3 different pieces that we need to implement:
1.) Trimming the block start, inline start, and inline end margins
2.) Trimming the block-end margin, which is slightly different from
the others
3.) Making sure the trimmed margins do not contribute to the inrinsic
sizing of the container
When a candidate position for a float is determined in the float
positioning code, we can determine whether it is possible to trim its
margins. For each candidate position, we can determine whether any edges
of the margin box would touch the container and then trim that edge if
it is specified in margin-trim. This can be done for the inline-start,
inline-end, and block-start edges of the container.
Trimming the block-end margin is slightly different because it is not
in the context of the containing block like the other margins but of the
block formatting context. This means that we can only trim these margins
after its block formatting context is done with layout. In
RnderBlockFlow we can check to see if it establishes a block formatting
context and then proceed to trim the block-end margins of its floats
where needed. As we iterate over each float, we check to see if its block
end location is lower than the lowest piece of content in the BFC. If
so, we trim it up to the necesssary amount where it will not extend the
height of the BFC.
Finally, to make sure that the trimmed inline margins do not contribute
to the intrinsic sizing of its containing block, all we need to do
is check to see if the item is a float and if any of the inline margins
are specified to be trimmed. If so, we do not include those in its
contribution.
* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-end-deeply-nested-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-end-deeply-nested.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-end-up-to-content-block-layout-different-containers-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-end-up-to-content-block-layout-different-containers-vert-lr-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-end-up-to-content-block-layout-different-containers-vert-lr.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-end-up-to-content-block-layout-different-containers.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-end-up-to-content-block-layout-same-container-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-end-up-to-content-block-layout-same-container.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-start-block-layout-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-start-block-layout.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-start-relative-positioned-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-start-relative-positioned.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-start-with-transforms-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-block-start-with-transforms.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-fit-content-block-layout-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-fit-content-block-layout.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-end-block-layout-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-end-block-layout.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-start-block-layout-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-start-block-layout.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-left-trimmed-margin-allows-float-to-fit-block-layout-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-left-trimmed-margin-allows-float-to-fit-block-layout-vert-lr-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-left-trimmed-margin-allows-float-to-fit-block-layout-vert-lr.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-left-trimmed-margin-allows-float-to-fit-block-layout.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-min-content-with-block-content-block-layout-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-min-content-with-block-content-block-layout.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-right-trimmed-margin-allows-float-to-fit-block-layout-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-right-trimmed-margin-allows-float-to-fit-block-layout.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-overflowing-float-margins-tirmmed-at-final-position-block-layout-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-overflowing-float-margins-tirmmed-at-final-position-block-layout.html: Added.
* Source/WebCore/rendering/FloatingObjects.cpp:
(WebCore::FloatingObject::isLowestPlacedFloatBottomInBlockFormattingContext const):
* Source/WebCore/rendering/FloatingObjects.h:
(WebCore::FloatingObject::setHeight):
* Source/WebCore/rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeBlockPreferredLogicalWidths const):
* Source/WebCore/rendering/RenderBlock.h:
(WebCore::RenderBlock::logicalMarginBoxHeightForChild const):
(WebCore::RenderBlock::logicalMarginBoxTopForChild const):
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::trimFloatBlockEndMargins):
(WebCore::RenderBlockFlow::shouldChildInlineMarginContributeToContainerIntrinsicSize const):
(WebCore::RenderBlockFlow::insertFloatingObject):
(WebCore::RenderBlockFlow::trimMarginForFloat):
(WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
(WebCore::RenderBlockFlow::blockFormattingContextInFlowBlockLevelContentHeight const):
* Source/WebCore/rendering/RenderBlockFlow.h:
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::establishesBlockFormattingContext const):
(WebCore::RenderBox::blockFormattingContextRoot const):
* Source/WebCore/rendering/RenderBox.h:
Canonical link: https://commits.webkit.org/260318@main
Canonical link: https://commits.webkit.org/259548.199@safari-7615-branch
Commit: 58819e047cad71297314f95349bdac874f4ecf1d
https://github.com/WebKit/WebKit/commit/58819e047cad71297314f95349bdac874f4ecf1d
Author: Patrick Angle <pangle at apple.com>
Date: 2023-02-17 (Fri, 17 Feb 2023)
Changed paths:
M Source/WebInspectorUI/UserInterface/Base/Main.js
M Source/WebInspectorUI/UserInterface/Base/WebInspector.js
Log Message:
-----------
Cherry-pick d25915a5a0c5. rdar://problem/96018617
Web Inspector: Add support for getting user agents from WebKitAdditions if present
https://bugs.webkit.org/show_bug.cgi?id=252030
rdar://96018617
Reviewed by Devin Rousso and Tim Horton.
Ports may desire to provide their own set of User Agents for Web Inspector to display for remote inspection via
WebKitAdditions.
* Source/WebInspectorUI/UserInterface/Base/Main.js:
(WI.loaded):
- Place an empty WebKitAdditions in the global scope if one doesn't already exist, since optional chaining can't be used
to check for a non-declared root object.
- Also some drive-by indentation fixes for the UAs.
Canonical link: https://commits.webkit.org/260335@main
Canonical link: https://commits.webkit.org/259548.200@safari-7615-branch
Commit: 2d8e5085cec62860cbfac179e19ec79cb3022c51
https://github.com/WebKit/WebKit/commit/2d8e5085cec62860cbfac179e19ec79cb3022c51
Author: Antoine Quint <graouts at webkit.org>
Date: 2023-02-17 (Fri, 17 Feb 2023)
Changed paths:
A LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-transition-property-all-expected.txt
A LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-transition-property-all.html
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/resources/utils.js
M Source/WebCore/style/Styleable.cpp
Log Message:
-----------
Cherry-pick fcdce8ff40bb. rdar://problem/105556538
[css-transitions] `transition-property: all` does not apply to custom properties
https://bugs.webkit.org/show_bug.cgi?id=252312
Reviewed by Antti Koivisto.
When setting `transition-property: all`, which also happens to be that property's initial value,
we would correctly consider all properties known within WebCore as a CSSPropertyID, but we would
fail to consider registered custom properties that could otherwise be interpolated.
We now iterate through all custom properties in both the before-change and after-change styles
to gather custom properties that can be interpolated (ie. either a SyntaxValue or SyntaxValueList)
and run the transition update logic on those.
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-transition-property-all-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-transition-property-all.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/resources/utils.js:
* Source/WebCore/style/Styleable.cpp:
(WebCore::Styleable::updateCSSTransitions const):
Canonical link: https://commits.webkit.org/260384@main
Canonical link: https://commits.webkit.org/259548.201@safari-7615-branch
Commit: 87bfcd1ee704408d266da9b4018b74a6f9b613fc
https://github.com/WebKit/WebKit/commit/87bfcd1ee704408d266da9b4018b74a6f9b613fc
Author: Eric Carlson <eric.carlson at apple.com>
Date: 2023-02-17 (Fri, 17 Feb 2023)
Changed paths:
M LayoutTests/http/tests/media/autoplay-if-audio-is-playing-expected.txt
M LayoutTests/http/tests/media/autoplay-if-audio-is-playing.html
M LayoutTests/media/media-fullscreen-inline-expected.txt
M LayoutTests/media/media-fullscreen.js
M LayoutTests/media/playlist-inherits-user-gesture.html
M LayoutTests/media/restricted-audio-playback-with-multiple-settimeouts.html
M LayoutTests/platform/glib/media/media-fullscreen-inline-expected.txt
M LayoutTests/platform/glib/media/media-fullscreen-not-in-document-expected.txt
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/FullscreenManager.cpp
M Source/WebCore/html/HTMLMediaElement.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/autoplaying-multiple-media-elements.html
Log Message:
-----------
Cherry-pick 98a09842676c. rdar://problem/103800206
Use transient activation for media playback
https://bugs.webkit.org/show_bug.cgi?id=251372
rdar://103800206
Reviewed by Jer Noble.
Allow media to play when there is an active transient activation. Require and consume
a transient activation when video fullscreen requires a user gesture.
* LayoutTests/http/tests/media/autoplay-if-audio-is-playing-expected.txt:
* LayoutTests/http/tests/media/autoplay-if-audio-is-playing.html: Update test and
results as the second video is now able to play because the first was started with
a user gesture.
* LayoutTests/media/media-fullscreen-inline-expected.txt:
* LayoutTests/media/media-fullscreen.js:
(canplaythrough): Remove now invalid portion of the test.
* LayoutTests/platform/glib/media/media-fullscreen-inline-expected.txt:
* LayoutTests/platform/glib/media/media-fullscreen-not-in-document-expected.txt:
* LayoutTests/media/playlist-inherits-user-gesture.html:
* LayoutTests/media/restricted-audio-playback-with-multiple-settimeouts.html: Decrease
transient activation time so these old tests work.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: Update test to account for
and test playing because of transient activation.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/autoplaying-multiple-media-elements.html
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::processingUserGestureForMedia const): Return true when there is an
active transient activation.
* Source/WebCore/dom/FullscreenManager.cpp:
(WebCore::FullscreenManager::requestFullscreenForElement): Drive-by logging cleanup. Log
all errors.
* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::enterFullscreen): Require and consume a transient activation
if a user gesture is required to enter fullscreen.
Canonical link: https://commits.webkit.org/259626@main
Canonical link: https://commits.webkit.org/259548.202@safari-7615-branch
Commit: 80706457f5d988bdac34f989fd49b11d1255037a
https://github.com/WebKit/WebKit/commit/80706457f5d988bdac34f989fd49b11d1255037a
Author: Eric Carlson <eric.carlson at apple.com>
Date: 2023-02-17 (Fri, 17 Feb 2023)
Changed paths:
M Source/WebCore/html/HTMLMediaElement.cpp
Log Message:
-----------
Cherry-pick 6db3bff657b6. rdar://problem/105469592
REGRESSION(259626 at main): Fullscreen and PiP buttons don't work in a media document
https://bugs.webkit.org/show_bug.cgi?id=252417
rdar://105469592
Reviewed by Jer Noble.
* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::enterFullscreen): Consume a transient activation if fullscreen
is required, but don't reject is there is no activation because this method can not be
called unless the element is allowed to enter fullscreen.
Canonical link: https://commits.webkit.org/260401@main
Canonical link: https://commits.webkit.org/259548.203@safari-7615-branch
Commit: 56de77344b01e5d599e3e320f3d1da9d2e6ff89e
https://github.com/WebKit/WebKit/commit/56de77344b01e5d599e3e320f3d1da9d2e6ff89e
Author: Russell Epstein <repstein at apple.com>
Date: 2023-02-17 (Fri, 17 Feb 2023)
Changed paths:
R LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-transition-property-all-expected.txt
R LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-transition-property-all.html
M LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/resources/utils.js
M Source/WebCore/style/Styleable.cpp
Log Message:
-----------
Revert "Cherry-pick fcdce8ff40bb. rdar://problem/105556538"
This reverts commit 2d8e5085cec62860cbfac179e19ec79cb3022c51.
Canonical link: https://commits.webkit.org/259548.204@safari-7615-branch
Commit: e110042815debe0c38e52973d610f09eb5d742d9
https://github.com/WebKit/WebKit/commit/e110042815debe0c38e52973d610f09eb5d742d9
Author: Ryosuke Niwa <rniwa at webkit.org>
Date: 2023-02-17 (Fri, 17 Feb 2023)
Changed paths:
A LayoutTests/fast/dom/focus-dialog-blur-input-type-change-crash-expected.txt
A LayoutTests/fast/dom/focus-dialog-blur-input-type-change-crash.html
M Source/WebCore/dom/Document.cpp
Log Message:
-----------
Nullptr crash in DateTimeFieldElement::isFocusable()
https://bugs.webkit.org/show_bug.cgi?id=252426
rdar://105383909
Reviewed by Aditya Keerthi and Wenson Hsieh.
The bug was caused by FocusController calling isFocusable() on a disconnected element of
the shadow tree of input element after blur event handler had changed the input type.
Fixed the crash by checking the connected-ness early and bailing out if it's disconnected.
* LayoutTests/fast/dom/focus-dialog-blur-input-type-change-crash-expected.txt: Added.
* LayoutTests/fast/dom/focus-dialog-blur-input-type-change-crash.html: Added.
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::setFocusedElement):
Canonical link: https://commits.webkit.org/259548.204@safari-7615-branch
Commit: a6efdb1bdd0ed84483e3711d1cc09cb4d8416006
https://github.com/WebKit/WebKit/commit/a6efdb1bdd0ed84483e3711d1cc09cb4d8416006
Author: Myah Cobbs <mcobbs at apple.com>
Date: 2023-02-17 (Fri, 17 Feb 2023)
Changed paths:
M Configurations/Version.xcconfig
Log Message:
-----------
Versioning.
WebKit-7615.1.24
Canonical link: https://commits.webkit.org/259548.205@safari-7615-branch
Commit: 1f25cef3f5aa70be4cf9cd421f98679434d17726
https://github.com/WebKit/WebKit/commit/1f25cef3f5aa70be4cf9cd421f98679434d17726
Author: Dawn Flores <dawn_flores at apple.com>
Date: 2023-02-18 (Sat, 18 Feb 2023)
Changed paths:
M LayoutTests/platform/mac/TestExpectations
Log Message:
-----------
([ EWS Mac ] media/video-playback-quality.html is a flaky failure)
rdar://105516334
Unreviewed test gardening.
*LayoutTests/platform/mac/TestExpectations:
Canonical link: https://commits.webkit.org/259548.206@safari-7615-branch
Commit: 20f9575632f15d7bfaeffd08542f46e8ce7d1302
https://github.com/WebKit/WebKit/commit/20f9575632f15d7bfaeffd08542f46e8ce7d1302
Author: Russell Epstein <repstein at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
M Configurations/Version.xcconfig
Log Message:
-----------
Versioning.
WebKit-7615.1.25
Canonical link: https://commits.webkit.org/259548.208@safari-7615-branch
Commit: 5d156699c1c8bf7a684ca8af865831ea5336fc25
https://github.com/WebKit/WebKit/commit/5d156699c1c8bf7a684ca8af865831ea5336fc25
Author: Chris Dumez <cdumez at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
M Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm
M Source/WebKit/WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp
M Source/WebKit/WebProcess/GPU/media/RemoteAudioDestinationProxy.h
Log Message:
-----------
Cherry-pick 87395a602807. rdar://problem/104870451
Distorted audio after getUserMedia when playing with AudioWorkletNode
https://bugs.webkit.org/show_bug.cgi?id=251091
rdar://104870451
Reviewed by Youenn Fablet and Jer Noble.
Our WebAudio rendering logic was trying to deal with buffer sizes greater than
128 by signaling the IPC semaphore multiple times so that the producer on the
WebProcess side would produce enough 128 frames-sized chunks to satisfy the
reader on the GPUProcess side.
This logic isn't exercised a lot though since
MediaSessionManagerCocoa::updateSessionState() requests a buffer size of 128
whenever WebAudio is in use. However, 246166 at main added logic in
RemoteAudioSessionProxyManager::updatePreferredBufferSizeForProcess() that
delays setting the preferred buffer size if we're currently capturing media.
In the demo case, we're capturing media so we would end up using WebAudio with
a buffer size of 960. There were multiple issues here:
1. 960 wasn't a multiple of 128 so the GPUProcess would signal the semaphore
an inconsistent number of times for each render quantum (sometimes
requesting 1024 frames, sometimes 896).
2. Because the demo is using an Audio Worklet, we were doing 7 to 8 dispatches
to the Audio Worklet thread (from the Audio Thread) in order to do the
rendering on the WebProcess size. This was unnecessarily expensive.
To address the issue, I made 2 changes:
1. MediaSessionManagerCocoa::updateSessionState() now rounds the preferred
buffer size to the upper power of 2.
2. RemoteAudioDestinationProxy now relies on IPCSemaphore::waitFor(0_s) to
see if the consumer is requesting more than 128 samples at once. Once it has
determined the actual number of frames the consumer wants, it calls
renderQuantum() once with this number. As a result, when an AudioWorklet is
used, we greatly reduce the number of dispatches to the AudioWorklet thread.
In the case of the demo, we end up with a buffer size of 1024 and we
dispatch once per 1024 quantum instead of 7-8 times. We do the splitting
into 128-frames chunks on the AudioWorklet threads.
* Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm:
(WebCore::MediaSessionManagerCocoa::updateSessionState):
* Source/WebKit/WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp:
(WebKit::RemoteAudioDestinationProxy::startRenderingThread):
(WebKit::RemoteAudioDestinationProxy::connection):
(WebKit::RemoteAudioDestinationProxy::renderQuantum):
* Source/WebKit/WebProcess/GPU/media/RemoteAudioDestinationProxy.h:
Canonical link: https://commits.webkit.org/259964@main
Canonical link: https://commits.webkit.org/259548.209@safari-7615-branch
Commit: 928388d30f3b40dbf86472521f59e0979d7ce0e4
https://github.com/WebKit/WebKit/commit/928388d30f3b40dbf86472521f59e0979d7ce0e4
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
A JSTests/wasm/stress/call-returns-v128.js
A JSTests/wasm/stress/resources/call-returns-v128.wasm
M Source/JavaScriptCore/wasm/WasmFunctionParser.h
Log Message:
-----------
Cherry-pick d42da3113f11. rdar://problem/105124299
[JSC] Check SIMD existence for call's return value / catch's value
https://bugs.webkit.org/show_bug.cgi?id=251878
rdar://105124299
Reviewed by Mark Lam.
Function calls / catch can generate new SIMD values. So we need to check types of them, and let generator know SIMD existence when we see it.
* JSTests/wasm/stress/call-returns-v128.js: Added.
(let.fn0):
(async let):
* JSTests/wasm/stress/resources/call-returns-v128.wasm: Added.
* Source/JavaScriptCore/wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser<Context>::parseExpression):
(JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression):
Canonical link: https://commits.webkit.org/259980@main
Canonical link: https://commits.webkit.org/259548.210@safari-7615-branch
Commit: 75aa015d53fb0dd9234a5da51751fab70097bb8b
https://github.com/WebKit/WebKit/commit/75aa015d53fb0dd9234a5da51751fab70097bb8b
Author: Yijia Huang <yijia_huang at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
A JSTests/stress/class-static-block-function-variable-declaration.js
M Source/JavaScriptCore/parser/Parser.cpp
Log Message:
-----------
Cherry-pick b9e63fd65e32. rdar://problem/105104494
Fix statement depth for parsing static block
https://bugs.webkit.org/show_bug.cgi?id=251760
rdar://105104494
Reviewed by Mark Lam.
Static block is treated as a function in spec, that is it should be
parsed as a function and executed as a function invocation. However,
the implementation of parsing class static block is based on
parseBlockStatement. To be consistent with the function environment
during parsing, we should initialize the statement depth to 0.
* JSTests/stress/function-lexical-declaration.js: Added.
(A.C):
(A):
* Source/JavaScriptCore/parser/Parser.h:
(JSC::Scope::declareFunction):
Canonical link: https://commits.webkit.org/259981@main
Canonical link: https://commits.webkit.org/259548.211@safari-7615-branch
Commit: a007bb7a56aa9ea5c9e0728f5a1e783c2bcd229a
https://github.com/WebKit/WebKit/commit/a007bb7a56aa9ea5c9e0728f5a1e783c2bcd229a
Author: Alex Christensen <achristensen at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
M Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp
M Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h
M Tools/TestWebKitAPI/Tests/WebKitCocoa/DidResignInputElementStrongPasswordAppearance.mm
Log Message:
-----------
Cherry-pick 72357c53b5ff. rdar://problem/105143592
Use dynamicDowncast instead of downcast in InjectedBundleNodeHandle::htmlIFrameElementContentFrame
https://bugs.webkit.org/show_bug.cgi?id=251882
rdar://105143592
Reviewed by Chris Dumez.
There was some unused code. Removed.
We were downcasting to the wrong type. Removed and replaced with dynamicDowncast.
I added the first use of htmlIFrameElementContentFrame in automated tests to prevent this in the future.
* Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
(WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame): Deleted.
* Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/DidResignInputElementStrongPasswordAppearance.mm:
(-[DidResignInputElementStrongPasswordAppearance webProcessPlugIn:didCreateBrowserContextController:]):
Canonical link: https://commits.webkit.org/259985@main
Canonical link: https://commits.webkit.org/259548.212@safari-7615-branch
Commit: bbce8fbf3c371058c3c3983774c55821c694b2f6
https://github.com/WebKit/WebKit/commit/bbce8fbf3c371058c3c3983774c55821c694b2f6
Author: Matt Woodrow <mattwoodrow at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
M LayoutTests/fast/canvas/offscreen-giant-transfer-to-imagebitmap-expected.txt
A LayoutTests/platform/ios/fast/canvas/offscreen-giant-transfer-to-imagebitmap-expected.txt
R LayoutTests/platform/mac-wk1/fast/canvas/offscreen-giant-transfer-to-imagebitmap-expected.txt
M Source/WebCore/html/CanvasBase.cpp
M Source/WebCore/html/CanvasBase.h
M Source/WebCore/html/HTMLCanvasElement.cpp
M Source/WebCore/html/OffscreenCanvas.cpp
Log Message:
-----------
Cherry-pick e4c57c810933. rdar://problem/104298886
OffscreenCanvas::transferToImageBitmap doesn't enforce size restrictions
https://bugs.webkit.org/show_bug.cgi?id=251130
Reviewed by Chris Lord.
We share code with HTMLCanvasElement via CanvasBase for allocating the backing store, with max size restrictions.
transferToImageBitmap can sometimes allocate a new buffer (if there isn't one already), and it currently isn't using the same code, so doesn't have the same restrictions.
This makes CanvasBase::createImageBuffer return the allocated buffer so that we can use it for transferToImageBitmap and get identical behaviour between code paths.
* LayoutTests/platform/ios/fast/canvas/offscreen-giant-transfer-to-imagebitmap-expected.txt: Added.
* Source/WebCore/html/CanvasBase.cpp:
(WebCore::CanvasBase::buffer const):
(WebCore::CanvasBase::allocateImageBuffer const):
(WebCore::CanvasBase::createImageBuffer const): Deleted.
* Source/WebCore/html/CanvasBase.h:
(WebCore::CanvasBase::createImageBuffer const):
* Source/WebCore/html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createImageBuffer const):
* Source/WebCore/html/HTMLCanvasElement.h:
* Source/WebCore/html/OffscreenCanvas.cpp:
(WebCore::OffscreenCanvas::transferToImageBitmap):
(WebCore::OffscreenCanvas::createImageBuffer const):
* Source/WebCore/html/OffscreenCanvas.h:
Canonical link: https://commits.webkit.org/260035@main
Canonical link: https://commits.webkit.org/259548.213@safari-7615-branch
Commit: c858ed5661be3ca5addcdb5e267b2de521c556fc
https://github.com/WebKit/WebKit/commit/c858ed5661be3ca5addcdb5e267b2de521c556fc
Author: Matthieu Dubet <m_dubet at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
M Source/WebCore/bindings/js/JSCSSRuleCustom.cpp
M Source/WebCore/css/CSSSelectorList.cpp
M Source/WebCore/css/CSSSelectorList.h
M Source/WebCore/css/CSSStyleRule.cpp
M Source/WebCore/css/CSSStyleRule.h
M Source/WebCore/css/StyleRule.cpp
M Source/WebCore/css/StyleRule.h
M Source/WebCore/css/StyleRuleType.h
M Source/WebCore/css/StyleSheetContents.cpp
M Source/WebCore/css/parser/CSSParserImpl.cpp
M Source/WebCore/css/parser/CSSParserImpl.h
M Source/WebCore/inspector/InspectorStyleSheet.cpp
M Source/WebCore/style/RuleSetBuilder.cpp
M Source/WebCore/style/RuleSetBuilder.h
Log Message:
-----------
Cherry-pick 9db1de406e2b. rdar://problem/105399781
Save memory when StyleRule doesn't need nesting support
https://bugs.webkit.org/show_bug.cgi?id=252176
rdar://105399781
Reviewed by Antti Koivisto.
Support for CSS Nesting has added 2 members to the StyleRule class
(the resolved selector list, and the list of children rules),
which created a memory regression of Membuster.
This patch creates a separate StyleWithNestingRule to be used when we actually
need the CSS Nesting feature (which is determined at parsing time).
When we don't need the CSS Nesting feature, it has exactly zero memory cost.
* Source/WebCore/bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJSNewlyCreated):
* Source/WebCore/css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::hasExplicitNestingParent const):
* Source/WebCore/css/CSSSelectorList.h:
* Source/WebCore/css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::CSSStyleRule):
(WebCore::CSSStyleRule::nestedRules const):
(WebCore::CSSStyleRule::cssText const):
(WebCore::CSSStyleRule::length const):
(WebCore::CSSStyleRule::item const):
* Source/WebCore/css/CSSStyleRule.h:
* Source/WebCore/css/StyleRule.cpp:
(WebCore::StyleRuleBase::visitDerived):
(WebCore::StyleRuleBase::createCSSOMWrapper const):
(WebCore::StyleRule::StyleRule):
(WebCore::StyleRule::create):
(WebCore::StyleRule::createForSplitting):
(WebCore::StyleRule::resolvedSelectorList const):
(WebCore::StyleRuleWithNesting::create):
(WebCore::StyleRuleWithNesting::StyleRuleWithNesting):
(WebCore::StyleRuleWithNesting::setResolvedSelectorList const):
(WebCore::StyleRuleGroup::StyleRuleGroup):
(WebCore::StyleRuleRareData::createIfNeeded): Deleted.
(WebCore::StyleRule::rareData const): Deleted.
(WebCore::StyleRule::setNestedRules): Deleted.
(WebCore::StyleRule::setResolvedSelectorList const): Deleted.
(WebCore::emptyRuleVector): Deleted.
(WebCore::StyleRule::nestedRules const): Deleted.
* Source/WebCore/css/StyleRule.h:
(WebCore::StyleRuleBase::isStyleRule const):
(WebCore::StyleRuleBase::isStyleRuleWithNesting const):
(WebCore::StyleRuleBase::setType):
(isType):
(WebCore::StyleRuleRareData::createIfNeeded): Deleted.
* Source/WebCore/css/StyleRuleType.h:
* Source/WebCore/css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::traverseSubresources const):
* Source/WebCore/css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::createNestingParentRule):
(WebCore::CSSParserImpl::consumeStyleRule):
* Source/WebCore/css/parser/CSSParserImpl.h:
* Source/WebCore/inspector/InspectorStyleSheet.cpp:
(WebCore::flatteningStrategyForStyleRuleType):
* Source/WebCore/style/RuleSetBuilder.cpp:
(WebCore::Style::RuleSetBuilder::addChildRule):
(WebCore::Style::RuleSetBuilder::populateStyleRuleResolvedSelectorList):
(WebCore::Style::RuleSetBuilder::addStyleRuleWithSelectorList):
(WebCore::Style::RuleSetBuilder::addStyleRule):
* Source/WebCore/style/RuleSetBuilder.h:
Canonical link: https://commits.webkit.org/260281@main
Canonical link: https://commits.webkit.org/259548.214@safari-7615-branch
Commit: 2e2d47e1b863af387675f773cfb83f06e8d11c56
https://github.com/WebKit/WebKit/commit/2e2d47e1b863af387675f773cfb83f06e8d11c56
Author: Alan Baradlay <zalan at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineFormattingState.h
Log Message:
-----------
Cherry-pick 9b178ba3eda0. rdar://problem/105496082
[IFC] LineBoxes do not need to outlive line layout.
https://bugs.webkit.org/show_bug.cgi?id=252280
Reviewed by Antti Koivisto.
They are input to InlineDisplayLineBuilder/InlineDisplayContentBuilder, but we never reuse them in subsequent layouts.
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::createDisplayContentForLine):
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingState.h:
(WebCore::Layout::InlineFormattingState::clearLineAndBoxes):
(WebCore::Layout::InlineFormattingState::shrinkToFit):
(WebCore::Layout::InlineFormattingState::lineBoxes const): Deleted.
(WebCore::Layout::InlineFormattingState::addLineBox): Deleted.
Canonical link: https://commits.webkit.org/260309@main
Canonical link: https://commits.webkit.org/259548.215@safari-7615-branch
Commit: 4069c91c15aa006925c3458b6db1ffe5067f227e
https://github.com/WebKit/WebKit/commit/4069c91c15aa006925c3458b6db1ffe5067f227e
Author: Cameron McCormack <heycam at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/css/CSSComputedStyleDeclaration.cpp
M Source/WebCore/css/typedom/ComputedStylePropertyMapReadOnly.cpp
M Source/WebCore/rendering/style/RenderStyle.cpp
M Source/WebCore/rendering/style/RenderStyle.h
A Source/WebCore/rendering/style/StyleCustomPropertyData.cpp
M Source/WebCore/rendering/style/StyleCustomPropertyData.h
M Source/WebCore/rendering/style/StyleMiscNonInheritedData.cpp
M Source/WebCore/rendering/style/StyleMiscNonInheritedData.h
Log Message:
-----------
Cherry-pick 147e3eca970c. rdar://problem/105372920
Reduce custom property storage for sites with large numbers of custom properties on the root
https://bugs.webkit.org/show_bug.cgi?id=252142
<rdar://problem/105372920>
Reviewed by Antti Koivisto and Darin Adler.
Some sites have a large number of custom properties set on the root element,
inheriting into the entire document. When different custom properties or values
are set on descendant elements, we clone all of the inherited properties.
This patch changes the storage in StyleCustomPropertyData so that the
first time we copy() one that has some custom properties in it, we point
the cloned object to the original StyleCustomPropertyData as the source
of inherited custom properties, and leave m_values (now renamed to
m_ownValues) empty. Any subsequent copy() of a StyleCustomPropertyData that
already has a pointer to the inherited custom properties will copy that
pointer, and clone m_ownValues like before.
We don't generate an unlimited linked list of inherited custom
properties to look up, to avoid custom property lookup time having
worst case linear time in the depth of the tree.
This saves around 800 KB on the youtube.com in Membuster.
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::item const):
* Source/WebCore/css/typedom/ComputedStylePropertyMapReadOnly.cpp:
(WebCore::ComputedStylePropertyMapReadOnly::entries const):
* Source/WebCore/rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setCustomPropertyValue):
* Source/WebCore/rendering/style/RenderStyle.h:
(WebCore::RenderStyle::inheritedCustomProperties const):
(WebCore::RenderStyle::nonInheritedCustomProperties const):
* Source/WebCore/rendering/style/StyleCustomPropertyData.cpp: Added.
(WebCore::StyleCustomPropertyData::StyleCustomPropertyData):
(WebCore::StyleCustomPropertyData::get const):
(WebCore::StyleCustomPropertyData::set):
(WebCore::StyleCustomPropertyData::operator== const):
(WebCore::StyleCustomPropertyData::forEach const):
(WebCore::StyleCustomPropertyData::findKeyAtIndex const):
(WebCore::StyleCustomPropertyData::size const):
* Source/WebCore/rendering/style/StyleCustomPropertyData.h:
(WebCore::StyleCustomPropertyData::copy const):
(WebCore::StyleCustomPropertyData::operator!= const):
(WebCore::StyleCustomPropertyData::operator== const): Deleted.
(WebCore::StyleCustomPropertyData::setCustomPropertyValue): Deleted.
(WebCore::StyleCustomPropertyData::StyleCustomPropertyData): Deleted.
Canonical link: https://commits.webkit.org/260319@main
Canonical link: https://commits.webkit.org/259548.216@safari-7615-branch
Commit: a4ba701b47648de73d0cdd82162158bbb6622d76
https://github.com/WebKit/WebKit/commit/a4ba701b47648de73d0cdd82162158bbb6622d76
Author: Eric Carlson <eric.carlson at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
M Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.mm
Log Message:
-----------
Cherry-pick c3b03a9bd5f5. rdar://problem/105248790
[iOS] Don't assume the type of objects returned by `[NSBundle objectForInfoDictionaryKey:`
https://bugs.webkit.org/show_bug.cgi?id=252342
rdar://105248790
Reviewed by Jer Noble.
The "UIBackgroundModes" in an application's info.plist is _supposed_ to be a dictionary,
but it can be any valid plist type so don't assume `[NSBundle objectForInfoDictionaryKey:@"UIBackgroundModes"`
will return an NSDictionary.
* Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.mm:
(WebCore::RealtimeMediaSourceCenter::shouldInterruptAudioOnPageVisibilityChange):
Canonical link: https://commits.webkit.org/260331@main
Canonical link: https://commits.webkit.org/259548.217@safari-7615-branch
Commit: fe72690c91632ad7278a0eac5c4804da9c6d087e
https://github.com/WebKit/WebKit/commit/fe72690c91632ad7278a0eac5c4804da9c6d087e
Author: Cameron McCormack <heycam at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/displaylists/DisplayListItemBuffer.cpp
Log Message:
-----------
Cherry-pick a05f1b5d1351. rdar://problem/105482300
Shrink in-memory display list buffers when shrinkToFit() is called
https://bugs.webkit.org/show_bug.cgi?id=252295
<rdar://problem/105482300>
Reviewed by Simon Fraser.
It's only the current writable buffer that's likely to have a lot of
wasted space.
* Source/WebCore/platform/graphics/displaylists/DisplayListItemBuffer.cpp:
(WebCore::DisplayList::ItemBuffer::shrinkToFit):
Canonical link: https://commits.webkit.org/260347@main
Canonical link: https://commits.webkit.org/259548.218@safari-7615-branch
Commit: ad10b18aed969163f0ab24ededb018968d8fe0e5
https://github.com/WebKit/WebKit/commit/ad10b18aed969163f0ab24ededb018968d8fe0e5
Author: Justin Michaud <justin_michaud at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
A JSTests/wasm/stress/simd-regalloc-stress.js
M Source/JavaScriptCore/b3/B3LowerToAir.cpp
M Source/JavaScriptCore/b3/air/AirAllocateRegistersByGraphColoring.cpp
M Source/JavaScriptCore/b3/air/AirInst.cpp
Log Message:
-----------
Cherry-pick 6f477c95e474. rdar://problem/105390761
VectorBitwiseSelect should not create tricky IR to colour
https://bugs.webkit.org/show_bug.cgi?id=252424
rdar://105390761
Reviewed by Yusuke Suzuki.
This test stresses the UD register on Arm64 for bitselect.
Air MoveVector (%tmp0), %ftmp12
Air MoveVector 16(%tmp0), %ftmp13
Air MoveVector 32(%tmp0), %ftmp11
Air MoveVector %ftmp11, %ftmp10
Air VectorBitwiseSelect %ftmp12, %ftmp13, %ftmp10
Air MoveVector %ftmp10, %*ftmp8*
(ftmp11, ftmp10 are unspillable here because it is Use'd right after
being Def'd, and the range is size 1)
...
Air Patch &CCall1, %tmp1, %x0, %x1, %q0, %x0, %x1
Air MoveDoubleConditionallyTest32 NonZero, %tmp4, %tmp4, %*ftmp8*, %ftmp9, %ftmp6
Then, after this iteration, we coalesce ftmp11 -> ftmp10 -> ftmp8:
Air MoveVector 32(%x23), %ftmp11
Air VectorBitwiseSelect %ftmp12, %ftmp13, %ftmp11
But ftmp11 is still unspillable, and now the graph is uncolourable.
Instead, we should emit this:
Air MoveVector %ftmp8, %ftmp6
Air VectorBitwiseSelect %ftmp9, %ftmp10, %ftmp6
...
Air MoveDoubleConditionallyTest32 NonZero, %x21, %x21, %ftmp6, %ftmp7, %ftmp4
Here, the register allocator can see the lifetime of ftmp6 right away, so
we always consider spilling it.
In general, should the register allocator handle this case gracefully?
Probably. We should either:
1) Not coalesce unspillable registers until we know the graph is colourable
2) Remove registers from unspillableTmps when we increase their live range
There is a decent chance that these changes could break things, or be
subtly wrong in a different case. Let's just emit code that is easy to
colour.
* Source/JavaScriptCore/b3/B3LowerToAir.cpp:
* Source/JavaScriptCore/b3/air/AirAllocateRegistersByGraphColoring.cpp:
* Source/JavaScriptCore/b3/air/AirInst.cpp:
(JSC::B3::Air::Inst::dump const):
Canonical link: https://commits.webkit.org/260449@main
Canonical link: https://commits.webkit.org/259548.219@safari-7615-branch
Commit: 11e8d6ed2fbdb462094d96ac8fdfb7a22e7b6ba4
https://github.com/WebKit/WebKit/commit/11e8d6ed2fbdb462094d96ac8fdfb7a22e7b6ba4
Author: David Kilzer <ddkilzer at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
M Source/WebKit/Scripts/webkit/messages.py
M Source/WebKit/Scripts/webkit/tests/MessageArgumentDescriptions.cpp
Log Message:
-----------
Cherry-pick 58784ce9f87d. rdar://problem/105597825
WebKit_iosmac builds fail with ASan enabled
https://bugs.webkit.org/show_bug.cgi?id=252494
<rdar://105597825>
Reviewed by Alexey Proskuryakov.
This adds #if/#endif macros to guard code that uses identifiers
that are not available on the iosmac platform.
* Source/WebKit/Scripts/webkit/messages.py:
(conditions_for_header):
- Add conditions for identifier headers. Because these
identifiers have a one-to-one relationship with the headers
where they are defined, this was the simplest way to add
support for conditionalizing the identifiers (in addition to
their headers).
(generate_message_argument_description_implementation):
- Check for conditions when emitting code that references an
identifier, and output #if/#endif macros to guard it when
needed.
* Source/WebKit/Scripts/webkit/tests/MessageArgumentDescriptions.cpp:
(IPC::serializedIdentifiers):
- Regenerate test file which now includes additional #if/#endif
guards for these identifiers and their headers.
Canonical link: https://commits.webkit.org/260461@main
Canonical link: https://commits.webkit.org/259548.220@safari-7615-branch
Commit: 0022de364e90683dc5ac1a990f6a4dd072096eed
https://github.com/WebKit/WebKit/commit/0022de364e90683dc5ac1a990f6a4dd072096eed
Author: Alan Baradlay <zalan at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
M Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp
Log Message:
-----------
Cherry-pick e98b02a2d2ab. rdar://problem/104585752
[IFC][Integration] Disable paginated mode when inline level element is present
https://bugs.webkit.org/show_bug.cgi?id=252519
<rdar://104585752>
Reviewed by Antti Koivisto.
This type of content has been behind line-box-contain and used legacy line layout (now this property is supported by IFC).
While line pagination works fine, renderers' final positions are not adjusted with the pagination gap.
(Upcoming column integration work will fix/re-enable them all)
* Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp:
(WebCore::LayoutIntegration::canUseForChild): Bail out right after checking for RenderText but let inline boxes pass.
Canonical link: https://commits.webkit.org/260517@main
Canonical link: https://commits.webkit.org/259548.221@safari-7615-branch
Commit: 31f1a2d977a501c959a139404f146ea7272fb2cc
https://github.com/WebKit/WebKit/commit/31f1a2d977a501c959a139404f146ea7272fb2cc
Author: Eric Carlson <eric.carlson at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
A LayoutTests/ipc/wait-for-video-output-will-change-expected.txt
A LayoutTests/ipc/wait-for-video-output-will-change.html
M Source/WebCore/html/HTMLVideoElement.cpp
M Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp
M Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.h
M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp
M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h
M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in
Log Message:
-----------
Crash in MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange
https://bugs.webkit.org/show_bug.cgi?id=252502
rdar://105448724
Reviewed by Chris Dumez.
If MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange doesn’t have
a video frame, it spins the runloop for up to one second waiting for AVFoundation to
generate one. If the page is reloaded while the runloop is spinning, the player may
have been deleted by the time waitForVideoOutputMediaDataWillChange resumes. Make
RemoteMediaPlayerManagerProxy refcounted and have it hold a self reference when calling
player methods that can call waitForVideoOutputMediaDataWillChange.
* LayoutTests/ipc/wait-for-video-output-will-change-expected.txt: Added.
* LayoutTests/ipc/wait-for-video-output-will-change.html: Added.
* Source/WebCore/html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::colorSpace const): Cleanup syntax.
(WebCore::HTMLVideoElement::nativeImageForCurrentTime): Hold a player ref while calling
nativeImageForCurrentTime.
* Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp:
(WebKit::RemoteMediaPlayerManagerProxy::createMediaPlayer): Store a proxy Ref instead of a
UniquePtr in the map.
* Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.h:
* Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp:
(WebKit::RemoteMediaPlayerProxy::create): New.
* Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h:
* Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in: Now ref counted.
Canonical link: https://commits.webkit.org/259548.221@safari-7615-branch
Commit: 495110bf0ce0adb246bfb5390443ee8c02635ae8
https://github.com/WebKit/WebKit/commit/495110bf0ce0adb246bfb5390443ee8c02635ae8
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
M Source/WebCore/loader/CrossOriginEmbedderPolicy.cpp
M Source/WebCore/loader/CrossOriginEmbedderPolicy.h
M Source/WebCore/loader/FetchOptions.h
M Source/WebCore/loader/ResourceLoaderOptions.h
M Source/WebCore/loader/cache/CachedRawResource.cpp
M Source/WebCore/loader/cache/CachedRawResource.h
M Source/WebCore/loader/cache/CachedResource.h
M Source/WebCore/platform/network/ResourceRequestBase.h
M Source/WebCore/platform/network/ResourceResponseBase.cpp
M Source/WebCore/platform/network/ResourceResponseBase.h
M Source/WebCore/platform/network/cf/ResourceError.h
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
Log Message:
-----------
Cherry-pick a82aafd43736. rdar://problem/104901267
Optimize padding in CachedRawResource
https://bugs.webkit.org/show_bug.cgi?id=251481
rdar://104901267
Reviewed by Alex Christensen.
CachedRawResource was 1104 bytes big, with 171 bytes of padding. Fix by
reordering data members in classes stored by value in CachedRawResource.
End result is a size of 1056 bytes, with 132 bytes of padding, so there
is more that can be done.
* Source/WebCore/loader/CrossOriginEmbedderPolicy.cpp:
(WebCore::CrossOriginEmbedderPolicy::isolatedCopy const):
(WebCore::CrossOriginEmbedderPolicy::isolatedCopy):
(WebCore::CrossOriginEmbedderPolicy::decode):
* Source/WebCore/loader/CrossOriginEmbedderPolicy.h:
* Source/WebCore/loader/FetchOptions.h:
(WebCore::FetchOptions::isolatedCopy const):
(WebCore::FetchOptions::isolatedCopy):
(WebCore::FetchOptions::FetchOptions):
* Source/WebCore/loader/ResourceLoaderOptions.h:
* Source/WebCore/loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::CachedRawResource):
* Source/WebCore/loader/cache/CachedRawResource.h:
* Source/WebCore/loader/cache/CachedResource.h:
* Source/WebCore/platform/network/ResourceRequestBase.h:
(WebCore::ResourceRequestBase::RequestData::RequestData):
* Source/WebCore/platform/network/ResourceResponseBase.cpp:
(WebCore::m_type):
(WebCore::m_httpStatusCode): Deleted.
* Source/WebCore/platform/network/ResourceResponseBase.h:
* Source/WebCore/platform/network/cf/ResourceError.h:
(WebCore::ResourceError::ResourceError):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
Canonical link: https://commits.webkit.org/259731@main
Canonical link: https://commits.webkit.org/259548.223@safari-7615-branch
Commit: f2e88e9e50ed7e99be18c21ffa36ffefc953e426
https://github.com/WebKit/WebKit/commit/f2e88e9e50ed7e99be18c21ffa36ffefc953e426
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/Font.h
Log Message:
-----------
Cherry-pick c62b38e4e53b. rdar://problem/105068653
Optimize layout of Font to reduce padding
https://bugs.webkit.org/show_bug.cgi?id=251774
<rdar://problem/105068653>
Reviewed by Darin Adler.
Make SupportsFeature 8-bit. Reorder members to optimize padding. More could be achieved by avoiding std::optional<>.
Reduces size from 1272 to 1256 bytes.
* Source/WebCore/platform/graphics/Font.h:
Canonical link: https://commits.webkit.org/259896@main
Canonical link: https://commits.webkit.org/259548.224@safari-7615-branch
Commit: a84aa490acb626b5cb77d97016fc4b193fe42137
https://github.com/WebKit/WebKit/commit/a84aa490acb626b5cb77d97016fc4b193fe42137
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
M Source/WebCore/dom/AbortSignal.cpp
M Source/WebCore/dom/AbortSignal.h
Log Message:
-----------
Cherry-pick e60034e6433d. rdar://problem/105048992
Optimize layout of AbortSignal to reduce padding
https://bugs.webkit.org/show_bug.cgi?id=251749
<rdar://problem/105048992>
Reviewed by Darin Adler.
Reorder data members to shrink the size from 112 to 96 bytes.
* Source/WebCore/dom/AbortSignal.cpp:
(WebCore::AbortSignal::AbortSignal):
* Source/WebCore/dom/AbortSignal.h:
Canonical link: https://commits.webkit.org/259897@main
Canonical link: https://commits.webkit.org/259548.225@safari-7615-branch
Commit: 120a0067acec561d31690fb3636d9be707ca8143
https://github.com/WebKit/WebKit/commit/120a0067acec561d31690fb3636d9be707ca8143
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
M Source/WebCore/dom/EventListenerMap.h
Log Message:
-----------
Cherry-pick ad21476ae97e. rdar://problem/105010273
EventListenerMap's m_entries vector wastes a lot of vector capacity
https://bugs.webkit.org/show_bug.cgi?id=251697
<rdar://problem/105010273>
Reviewed by Mark Lam.
EventListenerMap's vector wastes capacity, since it allocates 16 slots but uses on average 1.63 of them; most contain only 1.
So set the initial capacity to 4. This saves about 54K on nytimes.com. It measures as perf neutral on Speedometer.
* Source/WebCore/dom/EventListenerMap.h:
Canonical link: https://commits.webkit.org/259920@main
Canonical link: https://commits.webkit.org/259548.226@safari-7615-branch
Commit: 8ca0ed0a7af91c3b05ae311c39d0f09c8583bce8
https://github.com/WebKit/WebKit/commit/8ca0ed0a7af91c3b05ae311c39d0f09c8583bce8
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/Font.cpp
M Source/WebCore/platform/graphics/Font.h
Log Message:
-----------
Cherry-pick aad136781826. rdar://problem/105098022
Heap-allocate Font::m_glyphPathMap
https://bugs.webkit.org/show_bug.cgi?id=251814
rdar://105098022
Reviewed by Myles C. Maxfield.
GlyphMetricsMap<std::optional<Path>>> is 896 bytes and rarely used so heap-allocate it, reducing Font from 1256
to 352 bytes.
Also change the return value of Font::pathForGlyph to a Path reference, since this eliminates the need for
the scary comments, and the only caller copies anyway.
* Source/WebCore/platform/graphics/Font.cpp:
(WebCore::Font::pathForGlyph const):
* Source/WebCore/platform/graphics/Font.h:
Canonical link: https://commits.webkit.org/259934@main
Canonical link: https://commits.webkit.org/259548.227@safari-7615-branch
Commit: f51c43fa52bc55f77926eaa3d9b969030f1aee69
https://github.com/WebKit/WebKit/commit/f51c43fa52bc55f77926eaa3d9b969030f1aee69
Author: Dan Glastonbury <djg at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
A Source/ThirdParty/ANGLE/src/angle_code_affecting_program_serialize.xcfilelist
M Tools/Scripts/update-angle
Log Message:
-----------
Cherry-pick a5f1b1e694fb. rdar://problem/104847362
[ANGLE] src/angle_code_affecting_program_serialize.xcfilelist is missing
https://bugs.webkit.org/show_bug.cgi?id=251412
rdar://problem/104847362
Unreviewed, to be reviewed by kkinnunen at apple.com.
In the last ANGLE update, this new file was missed.
Also correct the location of the temporary ANGLEShaderProgramVersion.h
* Source/ThirdParty/ANGLE/src/angle_code_affecting_program_serialize.xcfilelist: Added.
* Tools/Scripts/update-angle:
Canonical link: https://commits.webkit.org/259602@main
Canonical link: https://commits.webkit.org/259548.228@safari-7615-branch
Commit: 6e8f349e4cce9ba32334a088d93a617c5aeebc3b
https://github.com/WebKit/WebKit/commit/6e8f349e4cce9ba32334a088d93a617c5aeebc3b
Author: Dan Glastonbury <djg at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
M Source/ThirdParty/ANGLE/ANGLE.plist
M Source/ThirdParty/ANGLE/ANGLE.xcodeproj/project.pbxproj
M Source/ThirdParty/ANGLE/BUILD.gn
M Source/ThirdParty/ANGLE/Compiler.cmake
M Source/ThirdParty/ANGLE/DEPS
M Source/ThirdParty/ANGLE/GLESv2.cmake
M Source/ThirdParty/ANGLE/changes.diff
M Source/ThirdParty/ANGLE/doc/ExtensionSupport.md
A Source/ThirdParty/ANGLE/extensions/ANGLE_shader_binary.txt
M Source/ThirdParty/ANGLE/include/GLES2/gl2ext_angle.h
M Source/ThirdParty/ANGLE/include/GLSLANG/ShaderLang.h
M Source/ThirdParty/ANGLE/include/platform/FrontendFeatures_autogen.h
M Source/ThirdParty/ANGLE/include/platform/frontend_features.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/ANGLE_features.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/Extension_files.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/GL_EGL_WGL_loader.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/GL_EGL_entry_points.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/GL_format_map.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/GLenum_value_to_string_map.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/Metal_format_table.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/OpenGL_dispatch_table.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/Static_builtins.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/Test_spec_JSON.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/Vulkan_mandatory_format_support_table.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/interpreter_utils.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/proc_table.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/restricted_traces.json
M Source/ThirdParty/ANGLE/scripts/extension_data/pixel_6_android_13.json
M Source/ThirdParty/ANGLE/scripts/extension_data/swiftshader_linux.json
M Source/ThirdParty/ANGLE/scripts/extension_data/swiftshader_win10.json
M Source/ThirdParty/ANGLE/scripts/extension_data/swiftshader_win10_gles1.json
M Source/ThirdParty/ANGLE/scripts/registry_xml.py
M Source/ThirdParty/ANGLE/src/angle_code_affecting_program_serialize.xcfilelist
M Source/ThirdParty/ANGLE/src/angle_commit.h
M Source/ThirdParty/ANGLE/src/commit_id.py
M Source/ThirdParty/ANGLE/src/common/ANGLEShaderProgramVersion.h
M Source/ThirdParty/ANGLE/src/common/Optional.h
M Source/ThirdParty/ANGLE/src/common/PoolAlloc_unittest.cpp
M Source/ThirdParty/ANGLE/src/common/apple_platform_utils.mm
M Source/ThirdParty/ANGLE/src/common/gl_enum_utils_autogen.cpp
M Source/ThirdParty/ANGLE/src/common/platform.h
M Source/ThirdParty/ANGLE/src/common/utilities.cpp
M Source/ThirdParty/ANGLE/src/common/utilities.h
M Source/ThirdParty/ANGLE/src/compiler.gni
M Source/ThirdParty/ANGLE/src/compiler/fuzz/translator_fuzzer.cpp
M Source/ThirdParty/ANGLE/src/compiler/translator/CollectVariables.cpp
M Source/ThirdParty/ANGLE/src/compiler/translator/Compiler.cpp
M Source/ThirdParty/ANGLE/src/compiler/translator/Compiler.h
M Source/ThirdParty/ANGLE/src/compiler/translator/OutputSPIRV.cpp
M Source/ThirdParty/ANGLE/src/compiler/translator/ParseContext.cpp
M Source/ThirdParty/ANGLE/src/compiler/translator/ShaderLang.cpp
M Source/ThirdParty/ANGLE/src/compiler/translator/SymbolTable.cpp
M Source/ThirdParty/ANGLE/src/compiler/translator/SymbolTable_ESSL_autogen.cpp
M Source/ThirdParty/ANGLE/src/compiler/translator/SymbolTable_autogen.cpp
M Source/ThirdParty/ANGLE/src/compiler/translator/TranslatorMetalDirect.cpp
M Source/ThirdParty/ANGLE/src/compiler/translator/TranslatorMetalDirect/EmitMetal.cpp
M Source/ThirdParty/ANGLE/src/compiler/translator/TranslatorMetalDirect/ModifyStruct.cpp
M Source/ThirdParty/ANGLE/src/compiler/translator/TranslatorMetalDirect/Pipeline.cpp
M Source/ThirdParty/ANGLE/src/compiler/translator/TranslatorMetalDirect/ProgramPrelude.cpp
M Source/ThirdParty/ANGLE/src/compiler/translator/TranslatorMetalDirect/RewritePipelines.cpp
M Source/ThirdParty/ANGLE/src/compiler/translator/TranslatorVulkan.cpp
M Source/ThirdParty/ANGLE/src/compiler/translator/ValidateAST.cpp
M Source/ThirdParty/ANGLE/src/compiler/translator/blocklayout.cpp
M Source/ThirdParty/ANGLE/src/compiler/translator/blocklayout.h
M Source/ThirdParty/ANGLE/src/compiler/translator/builtin_variables.json
R Source/ThirdParty/ANGLE/src/compiler/translator/tree_ops/NameNamelessUniformBuffers.cpp
R Source/ThirdParty/ANGLE/src/compiler/translator/tree_ops/NameNamelessUniformBuffers.h
M Source/ThirdParty/ANGLE/src/compiler/translator/tree_ops/vulkan/ReplaceForShaderFramebufferFetch.cpp
M Source/ThirdParty/ANGLE/src/compiler/translator/tree_ops/vulkan/ReplaceForShaderFramebufferFetch.h
M Source/ThirdParty/ANGLE/src/compiler/translator/util.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/Caps.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/Compiler.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/Constants.h
M Source/ThirdParty/ANGLE/src/libANGLE/Context.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/Context_gl.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/Context_gles_1_0.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/Context_gles_ext_autogen.h
M Source/ThirdParty/ANGLE/src/libANGLE/ErrorStrings.h
M Source/ThirdParty/ANGLE/src/libANGLE/GLES1Renderer.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/Program.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/Shader.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/Shader.h
M Source/ThirdParty/ANGLE/src/libANGLE/State.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/State.h
M Source/ThirdParty/ANGLE/src/libANGLE/angletypes.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/angletypes.h
M Source/ThirdParty/ANGLE/src/libANGLE/capture/FrameCapture.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/capture/capture_gles_ext_autogen.h
M Source/ThirdParty/ANGLE/src/libANGLE/capture/serialize.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/format_map_autogen.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/format_map_data.json
M Source/ThirdParty/ANGLE/src/libANGLE/formatutils.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/gles_extensions_autogen.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/gles_extensions_autogen.h
M Source/ThirdParty/ANGLE/src/libANGLE/queryutils.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/d3d/d3d11/RenderStateCache.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/d3d/d3d11/ResourceManager11.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/d3d/d3d11/StateManager11.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/d3d/d3d11/renderer11_utils.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/DispatchTableGL_autogen.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/DispatchTableGL_autogen.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/StateManagerGL.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/StateManagerGL.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/formatutilsgl.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/functionsgl_typedefs.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/gl_bindings_data.json
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/null_functions.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/null_functions.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/renderergl_utils.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/BufferMtl.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/BufferMtl.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ContextMtl.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/DisplayMtl.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ProgramMtl.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ProgramMtl.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ProvokingVertexHelper.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ProvokingVertexHelper.mm
A Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/blocklayoutMetal.cpp
A Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/blocklayoutMetal.h
A Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/doc/ValidationLayers.md
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/gen_mtl_format_table.py
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/metal_backend.gni
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_format_map.json
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_format_table_autogen.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_msl_utils.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_msl_utils.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_utils.mm
A Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/renderermtl_utils.cpp
A Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/renderermtl_utils.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/CommandProcessor.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/CommandProcessor.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/ContextVk.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/ContextVk.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/QueryVk.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/RendererVk.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/RendererVk.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/SemaphoreVk.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/SyncVk.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/vk_cache_utils.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/vk_cache_utils.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/vk_caps_utils.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/vk_utils.h
M Source/ThirdParty/ANGLE/src/libANGLE/validationES2.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/validationESEXT_autogen.h
M Source/ThirdParty/ANGLE/src/libGLESv2.gni
M Source/ThirdParty/ANGLE/src/libGLESv2/entry_points_gles_ext_autogen.cpp
M Source/ThirdParty/ANGLE/src/libGLESv2/entry_points_gles_ext_autogen.h
M Source/ThirdParty/ANGLE/src/libGLESv2/libGLESv2_autogen.cpp
M Source/ThirdParty/ANGLE/src/libGLESv2/libGLESv2_autogen.def
M Source/ThirdParty/ANGLE/src/libGLESv2/libGLESv2_no_capture_autogen.def
M Source/ThirdParty/ANGLE/src/libGLESv2/libGLESv2_vulkan_secondaries_autogen.def
M Source/ThirdParty/ANGLE/src/libGLESv2/libGLESv2_with_capture_autogen.def
M Source/ThirdParty/ANGLE/src/libGLESv2/opengl32_autogen.def
M Source/ThirdParty/ANGLE/src/libGLESv2/opengl32_with_wgl_autogen.def
M Source/ThirdParty/ANGLE/src/tests/BUILD.gn
M Source/ThirdParty/ANGLE/src/tests/angle_end2end_tests.gni
M Source/ThirdParty/ANGLE/src/tests/angle_end2end_tests_expectations.txt
M Source/ThirdParty/ANGLE/src/tests/angle_white_box_tests.gni
M Source/ThirdParty/ANGLE/src/tests/capture_replay_tests/capture_replay_expectations.txt
M Source/ThirdParty/ANGLE/src/tests/deqp_support/deqp_gles31_test_expectations.txt
M Source/ThirdParty/ANGLE/src/tests/deqp_support/deqp_khr_gles31_test_expectations.txt
M Source/ThirdParty/ANGLE/src/tests/egl_tests/EGLMultiContextTest.cpp
M Source/ThirdParty/ANGLE/src/tests/gl_tests/FramebufferFetchTest.cpp
A Source/ThirdParty/ANGLE/src/tests/gl_tests/PolygonOffsetClampTest.cpp
A Source/ThirdParty/ANGLE/src/tests/gl_tests/ShaderBinaryTest.cpp
M Source/ThirdParty/ANGLE/src/tests/gl_tests/StateChangeTest.cpp
A Source/ThirdParty/ANGLE/src/tests/gl_tests/VulkanSharedFenceTest.cpp
M Source/ThirdParty/ANGLE/src/tests/perf_tests/TracePerfTest.cpp
A Source/ThirdParty/ANGLE/src/tests/restricted_traces/check_trace_diffs.py
M Source/ThirdParty/ANGLE/src/tests/restricted_traces/restricted_traces.json
A Source/ThirdParty/ANGLE/src/tests/restricted_traces/tests.csv
M Source/ThirdParty/ANGLE/util/angle_features_autogen.cpp
M Source/ThirdParty/ANGLE/util/angle_features_autogen.h
Log Message:
-----------
Cherry-pick a30b362a2251. rdar://problem/104850019
[ANGLE] Update ANGLE to 2023-01-30 (786d237f39f1ea0d85781c039d4218fcd2679156)
https://bugs.webkit.org/show_bug.cgi?id=251415
rdar://problem/104850019
Reviewed by Kimmo Kinnunen.
Update ANGLE to 2023-01-30 (786d237f39f1ea0d85781c039d4218fcd2679156)
Contains upstream commits:
git log --oneline e5671e16b83ff26b25c2a831ff9cdc3930f8c06d..786d237f39f1ea0d85781c039d4218fcd2679156 --pretty=%h %s
786d237f3 Vulkan: Fixed bug in rx::vk::SharedFence with repeated init().
dbd47e378 Revert "Metal: Avoid leaking buffers for GPU access for non-discrete"
dd8021d98 Added "git worktree" support into "commit_id.py".
73cc578b4 Disable mutable texture upload due to render issue
b8bfe6f6c Metal: rewrite default uniforms and uniform blocks
53b659501 Vulkan: Fold ThreadSafeCommandProcessor back to CommandProcessor
6fb2da906 Do not use std::locale in Vulkan memory allocation tracker
0cdecfad0 Vulkan: Merge ThreadSafeCommandQueue back into CommandQueue
7101b3747 Vulkan: Enable AndroidNativeFence_ClientWait test
2e685d6cd Roll VK-GL-CTS from 821e153ac85a to bbf05746bf87 (8 revisions)
e8afed5b9 Roll Chromium from fb367de4643f to 97cd4b79248f (792 revisions)
69eab34b0 Vulkan: Fixed UB creating VkPipeline in warmUpPipelineCache().
4b72bd1b8 Roll vulkan-deps from d723200bd4b5 to be674ea25e15 (14 revisions)
0cde45b7c Metal: Lazily grab the shader lib for provoking vertex helper
e1d5d8c08 Include stdint.h instead of cstdint in platform.h
369b320f9 Metal: Avoid leaking buffers for GPU access for non-discrete
4716d85e1 Tests: Add LIMBO trace
b96d19559 Implement GL_ARM_shader_framebuffer_fetch
60ad92e43 Tests: Add Goddess Of Victory: Nikke trace
54f446394 Vulkan: Make RendererVk only have one CommandQueue object
06720c9bc Add binding to DescriptorInfoDesc.
0931b6799 FrameCapture: Update shader capture for CRLF
a8146c5d0 Roll vulkan-deps from 8a9f79f08d79 to d723200bd4b5 (1 revision)
3d182016f Roll Chromium from 5c03f547ddf9 to fb367de4643f (549 revisions)
83150e249 Roll vulkan-deps from a2f348c2039f to 8a9f79f08d79 (22 revisions)
1d9b8d802 Reland "Add support for glShaderBinary"
17ac69431 Move d3d11 BCX textures to the "UNREACHABLE" section for clears
6938b883f Tests: Add Dragon Ball Z Dokkan Battle trace
081764c84 Remove checks for A8 devices
6eb6cb2ed Declare size_t in Constants.h by including stddef.h
128eb01dd Vulkan: Only call checkCompletedCommands if needed.
bed19c471 Tests: Add Bubble Shooter and Friends trace
226fd6667 Vulkan: Make CommandProcessor::checkCompletedCommands immediate check
63d9675f0 Add documentation for enabling Metal validation layers.
ef0fe6388 Implement EXT_polygon_offset_clamp
9edc4686a Vulkan: Fix SharedFence::mRefCountedFence leak
0133b6f18 Add GL_ARM_shader_framebuffer_fetch builtins
18657894b Add features to dump and replace shader source.
862e3e95c Skip failing capture/replay multithreaded test
dfcdae3bf FrameCapture: Add blend state updates to resetCalls.
0c9cbf39f Revert "Add support for glShaderBinary"
5e43562b5 Roll Chromium from 701fadbce737 to 5c03f547ddf9 (614 revisions)
b64b573ba Capture/Replay: disable more multi-threaded tests.
00b94fdae Vulkan: CommandProcessor::WaitForWorkComplete only if needed
1e3197f47 Metal: Remove the UNIMPLEMENTED from setBinaryRetrievableHint
228973e73 Add support for glShaderBinary
1d9984bd4 Vulkan: Make CommandProcessor use ThreadSafeCommandQueue
6a5e61cd2 Vulkan: Make ThreadSafeCommandQueue's wait without lock
c9094ca6b Skip flaky tests dEQP-GLES31.functional.image_load_store.buffer*
11608a8b7 Adjust STENCIL_INDEX8 caps
f26cfec91 Roll Chromium from 7d74066a9406 to 701fadbce737 (593 revisions)
660e4a7c0 Don't override D16_UNORM to D32_FLOAT on Apple GPUs.
Canonical link: https://commits.webkit.org/259617@main
Canonical link: https://commits.webkit.org/259548.229@safari-7615-branch
Commit: 2c419d00fe15ceb7a0824f0c4c56096a8a62f2bc
https://github.com/WebKit/WebKit/commit/2c419d00fe15ceb7a0824f0c4c56096a8a62f2bc
Author: Kimmo Kinnunen <kkinnunen at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
M Source/ThirdParty/ANGLE/changes.diff
M Source/ThirdParty/ANGLE/src/compiler/translator/CodeGen.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_buffer_pool.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_resources.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_resources.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/ShaderInterfaceVariableInfoMap.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/ShaderInterfaceVariableInfoMap.h
Log Message:
-----------
Cherry-pick ad63d1d91c4a. rdar://problem/104859863
WebKit ANGLE has redundant diffs related to SPIRV, shared_ptr
https://bugs.webkit.org/show_bug.cgi?id=251429
rdar://104859863
Reviewed by Antti Koivisto.
Remove the redundant changes, align to upstream.
changes.diff was not exactly up-to-date, it was missing Constants.h
induced changes.
* Source/ThirdParty/ANGLE/changes.diff:
* Source/ThirdParty/ANGLE/src/compiler/translator/CodeGen.cpp:
* Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_resources.h:
* Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_resources.mm:
(rx::mtl::Texture::syncContent):
(rx::mtl::Texture::syncContentIfNeeded):
(rx::mtl::Buffer::syncContent):
(rx::mtl::Buffer::mapWithOpt):
Canonical link: https://commits.webkit.org/259636@main
Canonical link: https://commits.webkit.org/259548.230@safari-7615-branch
Commit: a73511494b9a4bc30229fb2f3ce58c9b996d91a8
https://github.com/WebKit/WebKit/commit/a73511494b9a4bc30229fb2f3ce58c9b996d91a8
Author: Kimmo Kinnunen <kkinnunen at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
M Source/ThirdParty/ANGLE/ANGLE.plist
M Source/ThirdParty/ANGLE/ANGLE.xcodeproj/project.pbxproj
M Source/ThirdParty/ANGLE/DEPS
M Source/ThirdParty/ANGLE/GLESv2.cmake
M Source/ThirdParty/ANGLE/Metal.cmake
M Source/ThirdParty/ANGLE/PRESUBMIT.py
M Source/ThirdParty/ANGLE/changes.diff
M Source/ThirdParty/ANGLE/doc/ContributingCode.md
M Source/ThirdParty/ANGLE/gni/angle.gni
M Source/ThirdParty/ANGLE/include/platform/FeaturesMtl_autogen.h
M Source/ThirdParty/ANGLE/include/platform/FeaturesVk_autogen.h
M Source/ThirdParty/ANGLE/include/platform/mtl_features.json
M Source/ThirdParty/ANGLE/include/platform/vk_features.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/ANGLE_features.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/ANGLE_load_functions_table.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/GL_CTS_(dEQP)_build_files.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/Test_spec_JSON.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/Vulkan_format.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/Vulkan_mandatory_format_support_table.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/restricted_traces.json
M Source/ThirdParty/ANGLE/scripts/generate_android_bp.py
M Source/ThirdParty/ANGLE/src/angle_commit.h
M Source/ThirdParty/ANGLE/src/common/ANGLEShaderProgramVersion.h
A Source/ThirdParty/ANGLE/src/common/FixedQueue.h
A Source/ThirdParty/ANGLE/src/common/FixedQueue_unittest.cpp
M Source/ThirdParty/ANGLE/src/common/RingBufferAllocator.cpp
M Source/ThirdParty/ANGLE/src/common/RingBufferAllocator.h
M Source/ThirdParty/ANGLE/src/compiler/translator/tree_ops/apple/AddAndTrueToLoopCondition.h
M Source/ThirdParty/ANGLE/src/compiler/translator/tree_ops/apple/RewriteDoWhile.h
M Source/ThirdParty/ANGLE/src/compiler/translator/tree_ops/apple/RewriteRowMajorMatrices.h
M Source/ThirdParty/ANGLE/src/compiler/translator/tree_ops/apple/RewriteUnaryMinusOperatorFloat.h
M Source/ThirdParty/ANGLE/src/compiler/translator/tree_ops/gl/ClampFragDepth.h
M Source/ThirdParty/ANGLE/src/compiler/translator/tree_ops/gl/RegenerateStructNames.h
M Source/ThirdParty/ANGLE/src/compiler/translator/tree_ops/gl/RewriteRepeatedAssignToSwizzled.h
M Source/ThirdParty/ANGLE/src/compiler/translator/tree_ops/gl/UseInterfaceBlockFields.h
M Source/ThirdParty/ANGLE/src/image_util/loadimage.cpp
M Source/ThirdParty/ANGLE/src/image_util/loadimage.h
M Source/ThirdParty/ANGLE/src/libANGLE/Context.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/Context.inl.h
M Source/ThirdParty/ANGLE/src/libANGLE/FramebufferAttachment.h
M Source/ThirdParty/ANGLE/src/libANGLE/Image.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/Image.h
M Source/ThirdParty/ANGLE/src/libANGLE/Surface.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/Surface.h
M Source/ThirdParty/ANGLE/src/libANGLE/Texture.h
M Source/ThirdParty/ANGLE/src/libANGLE/capture/FrameCapture.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/capture/FrameCapture.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/d3d/d3d11/Buffer11.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/load_functions_data.json
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/load_functions_table_autogen.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/BufferMtl.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ContextMtl.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/DisplayMtl.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/DisplayMtl.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ProgramMtl.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ProgramMtl.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/QueryMtl.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/QueryMtl.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/metal_backend.gni
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_buffer_manager.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_buffer_manager.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_buffer_pool.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_buffer_pool.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_command_buffer.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_command_buffer.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_context_device.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_context_device.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_format_utils.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_format_utils.mm
A Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_library_cache.h
A Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_library_cache.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_occlusion_query_pool.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_resources.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_resources.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_utils.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_utils.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/renderermtl_utils.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/serial_utils.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/AllocatorHelperPool.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/AllocatorHelperRing.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/AllocatorHelperRing.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/CommandProcessor.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/CommandProcessor.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/ContextVk.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/ContextVk.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/DisplayVk.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/FramebufferVk.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/OverlayVk.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/RenderbufferVk.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/RendererVk.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/RendererVk.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/SecondaryCommandBuffer.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/SemaphoreVk.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/SurfaceVk.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/SurfaceVk.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/TextureVk.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/vk_caps_utils.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/vk_format_map.json
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/vk_format_table_autogen.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/vk_helpers.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/vk_helpers.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/vk_utils.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/vk_utils.h
M Source/ThirdParty/ANGLE/src/libGLESv2.gni
M Source/ThirdParty/ANGLE/src/tests/angle_end2end_tests_expectations.txt
M Source/ThirdParty/ANGLE/src/tests/angle_unittests.gni
M Source/ThirdParty/ANGLE/src/tests/deqp_support/deqp_khr_gles31_test_expectations.txt
M Source/ThirdParty/ANGLE/src/tests/egl_tests/EGLSurfaceTest.cpp
M Source/ThirdParty/ANGLE/src/tests/egl_tests/EGLSyncTest.cpp
M Source/ThirdParty/ANGLE/src/tests/gl_tests/FragDepthTest.cpp
M Source/ThirdParty/ANGLE/src/tests/gl_tests/MultithreadingTest.cpp
M Source/ThirdParty/ANGLE/src/tests/gl_tests/TextureTest.cpp
M Source/ThirdParty/ANGLE/src/tests/gl_tests/UniformTest.cpp
M Source/ThirdParty/ANGLE/src/tests/restricted_traces/restricted_trace_gold_tests.py
M Source/ThirdParty/ANGLE/src/tests/restricted_traces/restricted_traces.json
M Source/ThirdParty/ANGLE/util/android/AndroidWindow.cpp
M Source/ThirdParty/ANGLE/util/angle_features_autogen.cpp
M Source/ThirdParty/ANGLE/util/angle_features_autogen.h
Log Message:
-----------
Cherry-pick 4041735e0952. rdar://problem/105167931
Update ANGLE to 2023-02-08 (a4c7abcbc1eb5b811e7a35af19d826ef02487540)
https://bugs.webkit.org/show_bug.cgi?id=251908
rdar://problem/105167931
Unreviewed, to be reviewed by Dean Jackson.
Contains upstream commits:
git log --oneline 786d237f39f1ea0d85781c039d4218fcd2679156..a4c7abcbc1eb5b811e7a35af19d826ef02487540 --pretty=%h %s
a4c7abcbc Advertise GL_OES_geometry_shader and GL_EXT_tessellation_shader
9a6c90c8f Reland "Metal: Avoid leaking buffers for GPU access for non-discrete"
ac0a4a7d3 Add finer memory allocation type
9b2f52d2f Use WARN to log the allocation info on allocation failure
b38467147 Vulkan: Feature to make async queue slow for testing
28da0a3e9 Vulkan: Avoid swapchain recreation on present mode change
ad81cc955 Vulkan: Switch CommandQueue::mInflightCommands to FixedQueue
11951f2f4 Vulkan: Add FixedQueue class for CommandProcessor::mTask
046db15c0 Vulkan: Remove redundant ImageState::sourceType
a77e8e3ab Limit logging when invalid calls are not captured.
0ee671456 Vulkan: Fix bug with ContextVk::mWaitSemaphores processing.
b930cdbf9 Vulkan: Make CommandProcessor only wait for required work
a88d9f03a Vulkan: Refactoring in RenderPassCommandBufferHelper.
001b004d4 Vulkan: Fixed assert in DedicatedCommandBlockPool onNewCommand()
36a4b33c4 Remove valid_param_values.h exception from export_targets
c799074c7 Metal: Implement EXT_disjoint_timer_query.
95c60d900 Fix broken links
2510afd2c Enable Skia Gold inexact matching
1857345f9 Improve logging when crashing due to locked screen.
3886af6e4 Vulkan: Generalize AHB optimization prohibitions
ef056a068 Vulkan: Use SubmitPolicy::AllowDeferred whenever possible.
a54f91d01 Roll SwiftShader from bcb8f46b86b7 to 938d3a1fac4d (2 revisions)
cc4834d2b Roll vulkan-deps from 57f61361acfb to 223515618c53 (5 revisions)
a12dd26c9 Roll Chromium from 20c3dc51aba5 to 22b1fa2b9cc1 (546 revisions)
fa0681d17 Vulkan: Per Context Serial cleanup.
db86154e0 Adjust TextureState::isStencilMode
3e5b36e4e Vulkan: ContextVk::finishImpl only wait for context's serial
cae00d9bb Vulkan: Cleanup shared ring buffer cmd alloc feature.
b96f3abd8 Vulkan: Make Context::mLastSubmittedSerial to QueueSerial
3159a4dac Add temp gn_response_file to $(genDir) directory in Android build
11366cbb4 Vulkan: Bug fix in flushDescriptorSetUpdates(...)
ba7bae168 Roll vulkan-deps from 525984c7fd54 to 57f61361acfb (2 revisions)
db8396fad Roll Chromium from c2710ae68385 to 20c3dc51aba5 (334 revisions)
c58d70796 Manual roll vulkan-deps from 7ab598f59574 to 525984c7fd54 (14 revisions)
6bdd90a7c Manual roll vulkan-deps from c7184adab227 to 7ab598f59574 (12 revisions)
586f695ac Manual roll Chromium from 821732c56366 to c2710ae68385 (252 revisions)
0b3cca880 Bypass commit message presubmit checks on manual rolls
b925c43e9 Revert "Vulkan: Remove platform restriction of EGL_ANDROID_native_fence_sync"
30a5b24c1 Roll VK-GL-CTS from 435efeefbc72 to a13cbc855993 (6 revisions)
99063e20a Skip flaky crashing test on TSAN
173003af1 Tests: Add Lilys Garden trace
f852187df Vulkan: Remove platform restriction of EGL_ANDROID_native_fence_sync
0210b46d3 Vulkan: Minor CommandQueue implementation refactoring.
4391d8074 Metal: Fix gl_FragDepth shader specialization
874d9f477 Roll Chromium from 7a3786ad50af to 821732c56366 (585 revisions)
fee24cfbe Vulkan: Optimize BindingPointer move-constructor
2f3ce7b69 Roll vulkan-deps from 30323acb3089 to c7184adab227 (11 revisions)
1703c7309 Fix glMapBufferRange() failure with D3D11 backend
9b00af526 Metal: Add an in-memory MTLLibrary cache.
36199fa91 Roll VK-GL-CTS from bbf05746bf87 to 435efeefbc72 (1 revision)
b23bf47c9 Reland "Metal: rewrite default uniforms and uniform blocks"
587a19690 Enable X11 and OpenGL backends for CastOS.
17931e23d Fix stencil and depth/stencil data uploads
8fbd85b9b Roll SwiftShader from d25c7a174ad7 to bcb8f46b86b7 (1 revision)
baeec4db1 Roll Chromium from f19a46134fe2 to 7a3786ad50af (602 revisions)
2e9909f5e Metal: Enable Metal on iOS in gni build.
91fdf3e66 Include atomic in RingBufferAllocator.h w/ ANGLE_ENABLE_ASSERTS
0bbb50338 Check if multidraw calls are no-ops
5a2d1ce98 Vulkan: Disable Imageless Framebuffer in some conditions.
3e65d0b6f Test: Fixed EGLContext leak in the EGLSurfaceTest tests.
360cd0d17 Include debug.h in various treeops headers
9399c508e Tests: Add Piano Kids - Music & Songs trace
6486b25ad Tests: Add 2 3 4 Player Mini Games trace
fea282e5f Roll Chromium from b51474366e49 to f19a46134fe2 (381 revisions)
754c923bf Tests: Add Callbreak trace
9cc2a0b8c Remove EXT_polygon_offset_clamp suppressions
e4dfdde9b Tests: Add Age of Origins Z trace
ad4773040 Roll Chromium from 7a868f186276 to b51474366e49 (62 revisions)
fb9483194 Revert "Metal: rewrite default uniforms and uniform blocks"
6712c48e1 Skip flaky timeout test on Win SwANGLE
c278f0389 Roll chromium_revision 12d1cf2574..7a868f1862 (1099244:1099248)
ce8ce6f81 Remove ASSERT from AtomicSerial, use static_assert
155a94d79 Vulkan: prefer D24_UNORM_X8_UINT as D32_UNORM fallback
ef1ab2076 Roll vulkan-deps from be674ea25e15 to 30323acb3089 (14 revisions)
2b7c06e31 Roll SwiftShader from aae98adc2222 to d25c7a174ad7 (3 revisions)
Canonical link: https://commits.webkit.org/260005@main
Canonical link: https://commits.webkit.org/259548.231@safari-7615-branch
Commit: 26c9638f6e4a855a6e187b4b03f47de56be9807c
https://github.com/WebKit/WebKit/commit/26c9638f6e4a855a6e187b4b03f47de56be9807c
Author: Kimmo Kinnunen <kkinnunen at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
R LayoutTests/platform/glib/webgl/webgl-ext-norm16-texture-texsubimage-nocrash-expected.txt
R LayoutTests/platform/mac-bigsur-wk2/webgl/webgl-ext-norm16-texture-texsubimage-nocrash-expected.txt
M LayoutTests/webgl/webgl-ext-norm16-texture-texsubimage-nocrash-expected.txt
M Source/ThirdParty/ANGLE/.gitignore
M Source/ThirdParty/ANGLE/ANGLE.plist
M Source/ThirdParty/ANGLE/ANGLE.xcodeproj/project.pbxproj
M Source/ThirdParty/ANGLE/DEPS
M Source/ThirdParty/ANGLE/Metal.cmake
M Source/ThirdParty/ANGLE/changes.diff
M Source/ThirdParty/ANGLE/include/platform/FeaturesMtl_autogen.h
M Source/ThirdParty/ANGLE/include/platform/FeaturesVk_autogen.h
M Source/ThirdParty/ANGLE/include/platform/mtl_features.json
M Source/ThirdParty/ANGLE/include/platform/vk_features.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/ANGLE_features.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/ANGLE_format.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/ANGLE_load_functions_table.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/D3D11_format.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/DXGI_format.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/GL_copy_conversion_table.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/GL_format_map.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/Metal_default_shaders.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/Metal_format_table.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/OpenGL_dispatch_table.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/Test_spec_JSON.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/Vulkan_format.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/Vulkan_mandatory_format_support_table.json
M Source/ThirdParty/ANGLE/scripts/code_generation_hashes/restricted_traces.json
M Source/ThirdParty/ANGLE/scripts/roll_chromium_deps.py
M Source/ThirdParty/ANGLE/src/angle_code_affecting_program_serialize.xcfilelist
M Source/ThirdParty/ANGLE/src/angle_commit.h
M Source/ThirdParty/ANGLE/src/commit_id.py
M Source/ThirdParty/ANGLE/src/common/ANGLEShaderProgramVersion.h
M Source/ThirdParty/ANGLE/src/common/angle_version_info.cpp
M Source/ThirdParty/ANGLE/src/common/angle_version_info.h
M Source/ThirdParty/ANGLE/src/common/angleutils.h
M Source/ThirdParty/ANGLE/src/gpu_info_util/SystemInfo.h
M Source/ThirdParty/ANGLE/src/gpu_info_util/SystemInfo_vulkan.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/ErrorStrings.h
M Source/ThirdParty/ANGLE/src/libANGLE/Program.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/Program.h
M Source/ThirdParty/ANGLE/src/libANGLE/Shader.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/Shader.h
M Source/ThirdParty/ANGLE/src/libANGLE/capture/FrameCapture.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/formatutils.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/Format_table_autogen.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/angle_format.py
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/TextureGL.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/egl/DisplayEGL.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/egl/DisplayEGL.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/egl/FunctionsEGL.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/egl/FunctionsEGL.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/renderergl_utils.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/BufferMtl.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/BufferMtl.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ContextMtl.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ContextMtl.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/DisplayMtl.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/FrameBufferMtl.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ProgramMtl.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/TextureMtl.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/VertexArrayMtl.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/metal_backend.gni
R Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_buffer_manager.h
R Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_buffer_manager.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_buffer_pool.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_buffer_pool.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_command_buffer.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_command_buffer.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_common.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_context_device.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_context_device.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_library_cache.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_library_cache.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_occlusion_query_pool.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_render_utils.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_resources.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_resources.mm
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/shaders/mtl_default_shaders_src_autogen.inc
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/shaders/mtl_default_shaders_src_autogen.metal
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/CommandProcessor.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/CommandProcessor.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/ContextVk.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/ContextVk.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/DeviceVk.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/PersistentCommandPool.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/PersistentCommandPool.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/RendererVk.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/RendererVk.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/SecondaryCommandBuffer.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/SurfaceVk.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/SurfaceVk.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/SyncVk.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/VulkanSecondaryCommandBuffer.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/VulkanSecondaryCommandBuffer.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/vk_cache_utils.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/vk_caps_utils.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/vk_command_buffer_utils.h
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/vk_helpers.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/vk_utils.cpp
M Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/vk_utils.h
M Source/ThirdParty/ANGLE/src/libANGLE/validationES.cpp
M Source/ThirdParty/ANGLE/src/tests/angle_end2end_tests_expectations.txt
M Source/ThirdParty/ANGLE/src/tests/egl_tests/EGLProtectedContentTest.cpp
M Source/ThirdParty/ANGLE/src/tests/egl_tests/EGLRobustnessTest.cpp
M Source/ThirdParty/ANGLE/src/tests/egl_tests/EGLSurfaceTest.cpp
M Source/ThirdParty/ANGLE/src/tests/gl_tests/BufferDataTest.cpp
M Source/ThirdParty/ANGLE/src/tests/gl_tests/TextureTest.cpp
M Source/ThirdParty/ANGLE/src/tests/restricted_traces/restricted_traces.json
M Source/ThirdParty/ANGLE/util/angle_features_autogen.cpp
M Source/ThirdParty/ANGLE/util/angle_features_autogen.h
M Tools/Scripts/update-angle
Log Message:
-----------
Cherry-pick b37b92a67793. rdar://problem/105447176
Update ANGLE to 2023-02-14 (2bcf94cc0b577225f7b925dd0cd1ed03541e30db)
https://bugs.webkit.org/show_bug.cgi?id=252237
rdar://problem/105447176
Unreviewed, to be reviewed by Dean Jackson.
Contains upstream commits:
git log --oneline a4c7abcbc1eb5b811e7a35af19d826ef02487540..2bcf94cc0b577225f7b925dd0cd1ed03541e30db --pretty=%h %s
2bcf94cc0 Roll vulkan-deps from 428c60617e42 to bb14a2634243 (4 revisions)
4058c2b3c Roll Chromium from 155bf9f7bac6 to 618575b40534 (558 revisions)
ee64836f7 Revert "Metal: Optimized BufferSubData per device"
5c2a60102 Vulkan: Fix loading instance extension entry points
be5e767ee dump_shader_source: Also dump program links.
48b6ebad2 Test: Move code of EGLSurfaceTest::runWaitSemaphoreTest().
689e523cd Vulkan: Remove vkResetQueryPoolEXT null-check hack
cad19f01c Vulkan: Wait forever when waiting on fences
54951da22 Vulkan: Refactor extension vs core version checks
6374ac64b Roll vulkan-deps from 00e3edd6b635 to 428c60617e42 (4 revisions)
91bd7e6e0 Capture/Replay: VertexArrayState: also track binding index too
e60b0e4ed Roll Chromium from 5221896b4233 to 155bf9f7bac6 (660 revisions)
62d35a602 Metal Fix norm16 subimage uploads w/ signed types
90ddd7c76 Tests: Add Mini Block Craft trace
2ca14a9f6 EGL: No-op dma_buf import modifiers on some Mali devices.
a57e36dc2 Tests: Add Durak Online trace
2eb5d29ac Vulkan: Linked pipelines always need the layout
6e819b32a Roll vulkan-deps from 40badb6018c5 to 00e3edd6b635 (3 revisions)
e6e7976c5 Roll Chromium from 111e2c20b468 to 5221896b4233 (520 revisions)
9d7292a8c Vulkan: Unsupress fixed VUs
0d0e8c375 Vulkan: Fix mutable render buffer with protected content.
70dd44332 Roll Chromium from 22b1fa2b9cc1 to 111e2c20b468 (1179 revisions)
aa1f7e192 Vulkan: Fix CommandQueue Wait Semaphores asyncCommandQueue race.
b2cfe726d Vulkan: Make queueSubmit without holding CommandQueue::mMutex
5d97cbd12 Vulkan: Move post submit code into a separate function
995db1f66 [ios] Fix build failure on iOS.
4d0b754b3 Manual roll vulkan-deps from 223515618c53 to 40badb6018c5 (22 revisions)
ad582b263 GL: Expose EXT_texture_border_clamp
e1bd04158 Revert "Re-land fixing of commit ID for Android builds."
7da34485c Vulkan: Changed "asyncCommandQueue" Pending Present info logic.
93515ccf2 Vulkan: Add OneOffCommandPool for unprotected/protected commands
8b9bd182d Vulkan: Refactoring to use ProtectionType enum instead of bool
1f9759aa3 Tests: Add Samsung support in our test harness
2618a9bc5 Vulkan: Fix fragment shading rate entry point init
4c9785238 Tests: Add Add Words Crush: Word Puzzle Game trace
1936ac003 Fix InstancingTestES3.LargeDivisor suppression
46f68dba5 Metal: Support LibraryCache below c++20.
93e311f77 Add channel info to compressed formats in angle::Format
92f26ce30 Metal: fix UBO argument buffers didn't work with managed storage.
b6cc57547 Vulkan: Fixed Wait Semaphores problems.
Canonical link: https://commits.webkit.org/260256@main
Canonical link: https://commits.webkit.org/259548.232@safari-7615-branch
Commit: 2009557bee013c419bfec2d1ad547b24344a9abb
https://github.com/WebKit/WebKit/commit/2009557bee013c419bfec2d1ad547b24344a9abb
Author: Chirag M Shah <chirag_m_shah at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
A LayoutTests/fast/rendering/render-tree-as-text-uaf-expected.txt
A LayoutTests/fast/rendering/render-tree-as-text-uaf.html
M Source/WebCore/rendering/RenderTreeAsText.cpp
Log Message:
-----------
Fix UAF in RenderTreeAsText for RenderWidget
https://bugs.webkit.org/show_bug.cgi?id=252580
rdar://105545826
Reviewed by Ryan Haddad and Darin Adler.
In write(), a call to view.layoutContext().layout() can result in the
deletion of the RenderWidget object, which results in a UAF. This change
fixes that by removing the call to layout, as that is already done for
the full frame tree from externalRepresentation.
* LayoutTests/fast/rendering/render-tree-as-text-uaf-expected.txt: Added.
* LayoutTests/fast/rendering/render-tree-as-text-uaf.html: Added.
* Source/WebCore/rendering/RenderTreeAsText.cpp:
(WebCore::write):
(WebCore::externalRepresentation):
Canonical link: https://commits.webkit.org/259548.232@safari-7615-branch
Commit: 91c943b8e014fcb1906c8ebbc88c47f37e849bf1
https://github.com/WebKit/WebKit/commit/91c943b8e014fcb1906c8ebbc88c47f37e849bf1
Author: Tyler Wilcock <tyler_w at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
A LayoutTests/accessibility/mac/scrolling-in-pdf-crash-expected.txt
A LayoutTests/accessibility/mac/scrolling-in-pdf-crash.html
A LayoutTests/accessibility/resources/simple-webkit-pdf-2-pages.pdf
M LayoutTests/platform/mac-wk1/TestExpectations
M Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm
Log Message:
-----------
Cherry-pick 83013c6d19eb. rdar://problem/105470972
AX: Scrolling a PDF with VoiceOver enabled causes a crash
https://bugs.webkit.org/show_bug.cgi?id=252335
rdar://105470972
Reviewed by Chris Fleizach.
This crash happens as a result of this sequence:
1. A request comes in on the secondary accessibility thread to scroll
the PDF (`-[PDFAccessibilityNodePage scrollToVisible]`).
2. This request makes it way through WebKit and WebCore, ending up at
`ScrollbarsControllerMac::notifyContentAreaScrolled`
3. `if (scrollableArea().isHandlingWheelEvent())` evaluates to true,
so we `sendContentAreaScrolledSoon` (which attempts to start a timer)
4. This timer was created on the main-thread, and all of this is
happening on the accessibility thread, so we crash (because timers
cannot be accessed outside their originating thread)
This patch fixes this bug by dispatching `-[WKPDFLayerControllerDelegate updateScrollPosition]`
to the main runloop.
* LayoutTests/accessibility/mac/scrolling-in-pdf-crash-expected.txt: Added.
* LayoutTests/accessibility/mac/scrolling-in-pdf-crash.html: Added.
* LayoutTests/accessibility/resources/simple-webkit-pdf-2-pages.pdf: Added.
* LayoutTests/platform/mac-wk1/TestExpectations:
Skip new test. PDF embeds don't reliably load in WK1.
* Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:
(-[WKPDFLayerControllerDelegate updateScrollPosition:]):
Dispatch to the main runloop.
Canonical link: https://commits.webkit.org/260451@main
Canonical link: https://commits.webkit.org/259548.234@safari-7615-branch
Commit: 6571b41905ebbe4da68b5e09b90502c8aba24ec1
https://github.com/WebKit/WebKit/commit/6571b41905ebbe4da68b5e09b90502c8aba24ec1
Author: Tyler Wilcock <tyler_w at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
M LayoutTests/accessibility/ios-simulator/accessibility-make-first-responder-expected.txt
M LayoutTests/accessibility/ios-simulator/accessibility-make-first-responder.html
M Source/WebCore/accessibility/AccessibilityObject.cpp
Log Message:
-----------
Cherry-pick 6c019d315e83. rdar://problem/103794378
WKWebView steals first responder when focused via VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=249976
rdar://problem/103794378
Reviewed by Chris Fleizach.
This behavior was introduced in:
https://bugs.webkit.org/show_bug.cgi?id=234885 (AX: AccessibilityObject::setFocused(true) should make the webpage focused, and make web content the first responder)
To address an issue with Full Keyboard Access where focus rings weren't drawn in embedded WKWebViews.
However, after some manual testing, it seems that taking first-respondership is not necessary for drawing the focus rings, and it
seems like this behavior causes various adverse effects, such as:
- VoiceOver Speak Screen focus erroneously jumping to the top of the page when encountering an embedded WKWebView
- Third-party apps relying on WebKit to not steal first-respondership (see the comments in the bug associated with this patch)
This patch fixes the issue by removing the call to assistiveTechnologyMakeFirstResponser on iOS, effectively partially reverting the behavior introduced in 234885.
* LayoutTests/accessibility/ios-simulator/accessibility-make-first-responder.html:
Update the test to ensure focusing an AX object does not steal first-respondership.
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::setFocused):
Canonical link: https://commits.webkit.org/260491@main
Canonical link: https://commits.webkit.org/259548.235@safari-7615-branch
Commit: 05edc97940462a9903d9236875c7dbfe6344fd71
https://github.com/WebKit/WebKit/commit/05edc97940462a9903d9236875c7dbfe6344fd71
Author: Tyler Wilcock <tyler_w at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
A LayoutTests/accessibility/empty-text-under-element-cached-expected.txt
A LayoutTests/accessibility/empty-text-under-element-cached.html
M LayoutTests/platform/glib/TestExpectations
M LayoutTests/platform/ios/TestExpectations
A LayoutTests/platform/ios/accessibility/empty-text-under-element-cached-expected.txt
A LayoutTests/platform/mac-wk1/accessibility/empty-text-under-element-cached-expected.txt
M Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Log Message:
-----------
Cherry-pick 87adaeb6e078. rdar://problem/102025959
AX: In rare scenarios, WebKit fails to expose the text associated with various types of elements / nodes (text, headings)
https://bugs.webkit.org/show_bug.cgi?id=252321
rdar://102025959
Reviewed by Chris Fleizach and Andres Gonzalez.
This bug happened because of this sequence:
1. We go to build a node change for an AXIsolatedObject.
2. In attempting to cache some property (i.e. AXPropertyName::StringValue), we call into AccessibilityRenderObject::textUnderElement.
3. The document needs style recalc, so this function intentionally returns an empty string to avoid
triggering layout which may potentially destroy renderers and AX objects in use in this stackframe
4. We cache an empty string for the property.
This patch fixes this by removing the behavior and ASSERT listed in step
3. For a long time (~8 years), this was only a debug assert. It was "upgraded"
to actually return an empty string 2 years ago in:
https://github.com/WebKit/WebKit/commit/977f75a79bc71147cd9a434241072b720096320d
There are other ways layout can be triggered from accessibility code that we already
have to protect against, so it doesn't make sense to workaround the issue this way.
* LayoutTests/platform/glib/TestExpectations:
Skip new test.
* LayoutTests/accessibility/empty-text-under-element-cached-expected.txt: Added.
* LayoutTests/accessibility/empty-text-under-element-cached.html: Added.
* LayoutTests/platform/ios/TestExpectations:
Enable new test.
* LayoutTests/platform/ios/accessibility/empty-text-under-element-cached-expected.txt: Added.
* LayoutTests/platform/mac-wk1/accessibility/empty-text-under-element-cached-expected.txt: Added.
* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement const):
Canonical link: https://commits.webkit.org/260521@main
Canonical link: https://commits.webkit.org/259548.236@safari-7615-branch
Commit: 0085127bbca630a1260d25956adfc431e8406354
https://github.com/WebKit/WebKit/commit/0085127bbca630a1260d25956adfc431e8406354
Author: Tyler Wilcock <tyler_w at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
M LayoutTests/accessibility/custom-elements/describedby-shadow.html
M LayoutTests/accessibility/custom-elements/describedby.html
M LayoutTests/accessibility/element-reflection-ariaerrormessage.html
M LayoutTests/accessibility/ios-simulator/aria-errormessage-expected.txt
M LayoutTests/accessibility/ios-simulator/aria-errormessage.html
M LayoutTests/accessibility/mac/aria-errormessage-expected.txt
M LayoutTests/accessibility/mac/aria-errormessage.html
M Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
Log Message:
-----------
Cherry-pick 19ae041e1fa8. rdar://problem/83393652
AX: aria-errormessage should not be exposed when aria-invalid is false
https://bugs.webkit.org/show_bug.cgi?id=230611
rdar://problem/83393652
Reviewed by Chris Fleizach.
Quoting https://www.w3.org/TR/wai-aria-1.2/#aria-errormessage:
> User agents MUST NOT expose aria-errormessage for an object with an aria-invalid value of false.
This patch implements this behavior.
* LayoutTests/accessibility/custom-elements/describedby-shadow.html:
* LayoutTests/accessibility/custom-elements/describedby.html:
* LayoutTests/accessibility/element-reflection-ariaerrormessage.html:
This test relied on aria-errormessages being exposed despite
aria-invalid computing to false. This patch fixes this by adding
aria-invalid="true" to these tests where necessary.
* LayoutTests/accessibility/ios-simulator/aria-errormessage-expected.txt:
* LayoutTests/accessibility/ios-simulator/aria-errormessage.html:
* LayoutTests/accessibility/mac/aria-errormessage-expected.txt:
* LayoutTests/accessibility/mac/aria-errormessage.html:
* Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityErrorMessageElements]):
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
Canonical link: https://commits.webkit.org/260545@main
Canonical link: https://commits.webkit.org/259548.237@safari-7615-branch
Commit: a26afae7176322f70f5c3d788def7454b56dc363
https://github.com/WebKit/WebKit/commit/a26afae7176322f70f5c3d788def7454b56dc363
Author: Tyler Wilcock <tyler_w at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
A LayoutTests/accessibility/mac/invalid-summary-element-expected.txt
A LayoutTests/accessibility/mac/invalid-summary-element.html
M Source/WebCore/accessibility/AccessibilityNodeObject.cpp
Log Message:
-----------
Cherry-pick 96801f719dfc. rdar://problem/99743056
AX: Invalid summary elements should not be exposed as interactive
https://bugs.webkit.org/show_bug.cgi?id=244973
rdar://problem/99743056
Reviewed by Chris Fleizach.
Prior to this patch, we unconditionally expose summary elements as
AccessibilityRole::Summary. This is not correct in these scenarios:
1. The summary has no details ancestor
2. The summary is not the first summary descendant of the details element
We can get both of these pieces of information from HTMLSummaryElement::isActiveSummary().
With this patch, we only consider something to be AccessibilityRole::Summary if it's the active summary.
* LayoutTests/accessibility/mac/invalid-summary-element-expected.txt: Added.
* LayoutTests/accessibility/mac/invalid-summary-element.html: Added.
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRoleFromNode const):
Canonical link: https://commits.webkit.org/260546@main
Canonical link: https://commits.webkit.org/259548.238@safari-7615-branch
Commit: 458df25bb63a6ec62fbf07cebb350aae22491f2c
https://github.com/WebKit/WebKit/commit/458df25bb63a6ec62fbf07cebb350aae22491f2c
Author: Tim Nguyen <ntim at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
A LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-backdrop-opacity-expected.html
A LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-backdrop-opacity-ref.html
A LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-backdrop-opacity.html
M Source/WebCore/rendering/RenderLayerBacking.cpp
Log Message:
-----------
Cherry-pick 903fc90f8a6a. rdar://problem/105636947
REGRESSION(257538 at main): CSS opacity doesn't work on dialog::backdrop
https://bugs.webkit.org/show_bug.cgi?id=252536
rdar://105636947
Reviewed by Simon Fraser.
The background layer functionality is to avoid flashes of white when rotating the screen on mobile device.
However, it breaks the opacity property, so only restrict it to the fullscreen element's backdrop, which is the only main
case that needs this polish (e.g. rotating while watching a fullscreen video).
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-backdrop-opacity-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-backdrop-opacity-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-backdrop-opacity.html: Added.
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking):
Canonical link: https://commits.webkit.org/260556@main
Canonical link: https://commits.webkit.org/259548.239@safari-7615-branch
Commit: 18169658e629fc48ec98c702482bf22bfe658714
https://github.com/WebKit/WebKit/commit/18169658e629fc48ec98c702482bf22bfe658714
Author: Brian Weinstein <bweinstein at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
M LayoutTests/http/tests/contentextensions/css-display-none.html
M LayoutTests/http/tests/contentextensions/css-display-none.html.json
M Source/WebCore/contentextensions/ContentExtensionParser.cpp
Log Message:
-----------
Cherry-pick 6f913a33098b. rdar://problem/105648971
Content Blocker API ignores some CSS Selectors with uppercase letters.
https://bugs.webkit.org/show_bug.cgi?id=252677
rdar://105648971
Reviewed by Antti Koivisto.
The fix for https://bugs.webkit.org/show_bug.cgi?id=250609 caused us to use Quirks mode when both
parsing content blocker rules and applying them.
That caused this regression, since rules like .SomeCLass stopped working in Quirks mode.
To fix this, make us use Quirks mode when actually parsing the rules, but standard mode when
applying them, to match how the behavior was before https://bugs.webkit.org/show_bug.cgi?id=250609.
* LayoutTests/http/tests/contentextensions/css-display-none.html:
* LayoutTests/http/tests/contentextensions/css-display-none.html.json:
* Source/WebCore/contentextensions/ContentExtensionParser.cpp:
(WebCore::ContentExtensions::isValidCSSSelector):
(WebCore::ContentExtensions::contentExtensionCSSParserContext):
Canonical link: https://commits.webkit.org/260638@main
Canonical link: https://commits.webkit.org/259548.240@safari-7615-branch
Commit: 6205c03f1e132c4d647ecd2ff6d8e19436d431c9
https://github.com/WebKit/WebKit/commit/6205c03f1e132c4d647ecd2ff6d8e19436d431c9
Author: Tim Nguyen <ntim at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
A LayoutTests/fullscreen/event-listener-prefixed-unprefixed-expected.html
A LayoutTests/fullscreen/event-listener-prefixed-unprefixed.html
M Source/WebCore/dom/FullscreenManager.cpp
Log Message:
-----------
Cherry-pick 3a3294dbf52d. rdar://problem/105144719
REGRESSION (257658 at main): Maximize full screen button fails to minimize once in full screen on trailers.apple.com
https://bugs.webkit.org/show_bug.cgi?id=252414
rdar://105144719
Reviewed by Chris Dumez.
The website was broken because it listens for both unprefixed & prefixed APIs to toggle between states, which ends up toggling the
wrong number of times.
To fix this, only emit unprefixed API when there is no listener for the prefixed API.
* LayoutTests/fullscreen/event-listener-prefixed-unprefixed-expected.html: Added.
* LayoutTests/fullscreen/event-listener-prefixed-unprefixed.html: Added.
* Source/WebCore/dom/FullscreenManager.cpp:
(WebCore::FullscreenManager::dispatchEventForNode):
Canonical link: https://commits.webkit.org/260651@main
Canonical link: https://commits.webkit.org/259548.241@safari-7615-branch
Commit: d6e8aac9b186ea91b9116ec023f1af4d89a1e2ff
https://github.com/WebKit/WebKit/commit/d6e8aac9b186ea91b9116ec023f1af4d89a1e2ff
Author: David Kilzer <ddkilzer at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
M Source/ThirdParty/libwebrtc/Source/third_party/yasm/frontends/yasm/yasm-options.c
M Source/ThirdParty/libwebrtc/Source/third_party/yasm/modules/arch/x86/x86arch.c
Log Message:
-----------
Cherry-pick d8e149964798. rdar://problem/105763698
yasm: fix deprecation warnings for sprint()
https://bugs.webkit.org/show_bug.cgi?id=252725
<rdar://105763698>
Unreviewed build fix for deprecation warnings as errors.
Replace sprintf() with snprintf(). Replace strcat() with
strlcat() while we're here.
* Source/ThirdParty/libwebrtc/Source/third_party/yasm/frontends/yasm/yasm-options.c:
(help_msg):
- Switch to snprintf() and strlcat().
* Source/ThirdParty/libwebrtc/Source/third_party/yasm/modules/arch/x86/x86arch.c:
(x86_dir_cpu):
- Switch to snprintf().
Canonical link: https://commits.webkit.org/260657@main
Canonical link: https://commits.webkit.org/259548.242@safari-7615-branch
Commit: 9ec1f869a67deb5accf7b21e271b1b78a64a3c63
https://github.com/WebKit/WebKit/commit/9ec1f869a67deb5accf7b21e271b1b78a64a3c63
Author: David Kilzer <ddkilzer at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
M Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h
Log Message:
-----------
Cherry-pick 64e9b86994e7. rdar://problem/105765090
Fix build due to availability macros in WKWebpagePreferencesPrivate.h
https://bugs.webkit.org/show_bug.cgi?id=252727
<rdar://105765090>
Unreviewed build fix that was reviewed by Wenson Hsieh anyway.
* Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h:
- Move availability macros to the proper location.
Canonical link: https://commits.webkit.org/260660@main
Canonical link: https://commits.webkit.org/259548.243@safari-7615-branch
Commit: 6486e6dc50830d1a5cc84478fa21b768747d835b
https://github.com/WebKit/WebKit/commit/6486e6dc50830d1a5cc84478fa21b768747d835b
Author: Alex Christensen <achristensen at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
M Source/WebCore/loader/ContentFilter.cpp
M Source/WebCore/loader/ContentFilter.h
M Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFilteringPlugIn.mm
Log Message:
-----------
Cherry-pick 9efb18ab3957. rdar://problem/104928565
Don't terminate web process when showing content-filter-provided data that loads subresources
https://bugs.webkit.org/show_bug.cgi?id=251649
rdar://104928565
Reviewed by Geoffrey Garen and Andy Estes.
When a content filter blocks a load, it provides HTML to load instead.
It loads this HTML as substitute data with a base URL of blockedPageURL().
If this HTML tries to load anything, we would terminate the web content
process because it was claiming a firstPartyForCookies the network process
was unaware of. This makes the network process aware in this case.
Covered by an API test.
* Source/WebCore/loader/ContentFilter.cpp:
(WebCore::ContentFilter::blockedPageURL):
(WebCore::blockedPageURL): Deleted.
* Source/WebCore/loader/ContentFilter.h:
* Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::handleProvisionalLoadFailureFromContentFilter):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:
(-[LoadAlternateNavigationDelegate webViewWebContentProcessDidTerminate:]):
(TEST):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFilteringPlugIn.mm:
(-[MockContentFilterEnabler initWithCoder:]):
Canonical link: https://commits.webkit.org/259802@main
Canonical link: https://commits.webkit.org/259548.244@safari-7615-branch
Commit: ade3167911d2c4ecca3b7ceb57d5b7985cf02e73
https://github.com/WebKit/WebKit/commit/ade3167911d2c4ecca3b7ceb57d5b7985cf02e73
Author: David Kilzer <ddkilzer at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
M Source/ThirdParty/libwebrtc/Configurations/yasm.xcconfig
M Source/ThirdParty/libwebrtc/Source/third_party/yasm/gas-token.c
M Source/ThirdParty/libwebrtc/Source/third_party/yasm/libyasm/errwarn.c
M Source/ThirdParty/libwebrtc/Source/third_party/yasm/libyasm/intnum.c
M Source/ThirdParty/libwebrtc/Source/third_party/yasm/modules/dbgfmts/codeview/cv-symline.c
M Source/ThirdParty/libwebrtc/Source/third_party/yasm/modules/objfmts/macho/macho-objfmt.c
M Source/ThirdParty/libwebrtc/Source/third_party/yasm/modules/parsers/gas/gas-token.re
M Source/ThirdParty/libwebrtc/Source/third_party/yasm/modules/preprocs/gas/gas-preproc.c
M Source/ThirdParty/libwebrtc/Source/third_party/yasm/modules/preprocs/nasm/nasm-pp.c
M Source/ThirdParty/libwebrtc/Source/third_party/yasm/modules/preprocs/nasm/nasm-preproc.c
Log Message:
-----------
Cherry-pick 32bda1530bca. rdar://problem/105781735
yasm: fix remaining deprecation warnings for sprintf()
https://bugs.webkit.org/show_bug.cgi?id=252752
<rdar://105781735>
Reviewed by Alex Christensen.
Fix the remaining uses of sprintf() in compiled sources. There
are a few more uses in test files that are not compiled that are
not fixed.
Note that assert() statements are added where snprintf() is used
in a loop and the pointer and line length are repeatedly
adjusted in order to catch bugs at build time.
* Source/ThirdParty/libwebrtc/Configurations/yasm.xcconfig:
- Define HAVE_VSNPRINTF=1 when building to use vsnprintf()
instead of vsprintf().
* Source/ThirdParty/libwebrtc/Source/third_party/yasm/gas-token.c:
(gas_parser_lex):
* Source/ThirdParty/libwebrtc/Source/third_party/yasm/libyasm/errwarn.c:
(yasm_error_set_va):
(yasm_error_set_xref_va):
(yasm_warn_set_va):
* Source/ThirdParty/libwebrtc/Source/third_party/yasm/libyasm/intnum.c:
(yasm_intnum_get_str):
* Source/ThirdParty/libwebrtc/Source/third_party/yasm/modules/dbgfmts/codeview/cv-symline.c:
(cv_generate_line_bc):
* Source/ThirdParty/libwebrtc/Source/third_party/yasm/modules/objfmts/macho/macho-objfmt.c:
(macho_objfmt_section_switch):
* Source/ThirdParty/libwebrtc/Source/third_party/yasm/modules/parsers/gas/gas-token.re:
* Source/ThirdParty/libwebrtc/Source/third_party/yasm/modules/preprocs/gas/gas-preproc.c:
(substitute_values):
* Source/ThirdParty/libwebrtc/Source/third_party/yasm/modules/preprocs/nasm/nasm-pp.c:
(check_tasm_directive):
(prepreproc):
(detoken):
(do_directive):
(expand_mmac_params):
* Source/ThirdParty/libwebrtc/Source/third_party/yasm/modules/preprocs/nasm/nasm-preproc.c:
(nasm_preproc_get_line):
Canonical link: https://commits.webkit.org/260697@main
Canonical link: https://commits.webkit.org/259548.245@safari-7615-branch
Commit: f2b751d36a26ec4b713fd8bbb35baf69f9754bc2
https://github.com/WebKit/WebKit/commit/f2b751d36a26ec4b713fd8bbb35baf69f9754bc2
Author: Youenn Fablet <youennf at gmail.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
M Source/WebCore/loader/DocumentLoader.cpp
M Source/WebCore/loader/DocumentLoader.h
M Source/WebCore/workers/service/ServiceWorkerRegistrationData.h
Log Message:
-----------
Cherry-pick f0228a3f07df. rdar://problem/105074302
DocumentLoader should use std::unique_ptr<ServiceWorkerRegistrationData> rather than std::optional<>
https://bugs.webkit.org/show_bug.cgi?id=251772
rdar://problem/105074302
Reviewed by Chris Dumez.
Reduce memory consumption by storing service worker data in DocumentLoader as a separate pointer.
Covered by existing tests.
* Source/WebCore/loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::setControllingServiceWorkerRegistration):
(WebCore::DocumentLoader::responseReceived):
(WebCore::DocumentLoader::startLoadingMainResource):
* Source/WebCore/loader/DocumentLoader.h:
* Source/WebCore/workers/service/ServiceWorkerRegistrationData.h:
Canonical link: https://commits.webkit.org/259977@main
Canonical link: https://commits.webkit.org/259548.246@safari-7615-branch
Commit: 8c568b0ba4b498d5f24794d457e84ef7b30ff283
https://github.com/WebKit/WebKit/commit/8c568b0ba4b498d5f24794d457e84ef7b30ff283
Author: Dawn Flores <dawn_flores at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
M LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale2-expected.txt
M LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale2.worker-expected.txt
Log Message:
-----------
Cherry-pick(REBASLINE: ([ Mac WK1 ] 2x imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale2*(layout-tests) are constant failures))
rdar://105783098
Unreviewed test gardening.
*LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale2.worker-expected.txt:
*LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale2-expected.txt:
Canonical link: https://commits.webkit.org/259548.246@safari-7615-branch
Commit: d6618bfaa5487844f609bb0cf6af730695c13d7d
https://github.com/WebKit/WebKit/commit/d6618bfaa5487844f609bb0cf6af730695c13d7d
Author: Myah Cobbs <mcobbs at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
M Source/WebCore/loader/DocumentLoader.cpp
M Source/WebCore/loader/DocumentLoader.h
M Source/WebCore/workers/service/ServiceWorkerRegistrationData.h
Log Message:
-----------
Revert "Cherry-pick f0228a3f07df. rdar://problem/105074302"
This reverts commit f2b751d36a26ec4b713fd8bbb35baf69f9754bc2.
Canonical link: https://commits.webkit.org/259548.248@safari-7615-branch
Commit: 02e1480fdddd23984d4b0a9e7d1ccfc35cc14cce
https://github.com/WebKit/WebKit/commit/02e1480fdddd23984d4b0a9e7d1ccfc35cc14cce
Author: Antti Koivisto <antti at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
M Source/WebCore/display/DisplayTreeBuilder.cpp
M Source/WebCore/display/css/DisplayBoxFactory.cpp
M Source/WebCore/display/css/DisplayTextBox.cpp
M Source/WebCore/layout/Verification.cpp
M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayBox.h
M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp
M Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp
M Source/WebCore/layout/integration/inline/InlineIteratorBoxModernPath.h
M Source/WebCore/layout/integration/inline/InlineIteratorTextBox.cpp
M Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentPainter.cpp
M Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp
Log Message:
-----------
Cherry-pick de86b9514094. rdar://problem/105799006
[IFC] Save memory by rearranging InlineDisplay::Box fields
https://bugs.webkit.org/show_bug.cgi?id=252173
rdar://105396411
Reviewed by Simon Fraser.
Mechanical savings:
- rearrange fields to minimize space
- add more fields to the bitfields
- replace std::optionals with plain values and a bitfield bits
- replace size_t index fields with unsigned
- use #pragma pack(push, 4) to avoid the Text struct being padded to 8 bytes
InlineDisplay::Box goes from
Total byte size: 136
Total pad bytes: 19
Padding percentage: 14.61 %
Total byte size: 80
Total pad bytes: 1
Padding percentage: 1.25 %
* Source/WebCore/display/DisplayTreeBuilder.cpp:
(WebCore::Display::TreeBuilder::buildInlineDisplayTree):
* Source/WebCore/display/css/DisplayBoxFactory.cpp:
(WebCore::Display::BoxFactory::displayBoxForTextRun const):
* Source/WebCore/display/css/DisplayTextBox.cpp:
(WebCore::Display::m_text):
* Source/WebCore/layout/Verification.cpp:
(WebCore::Layout::checkForMatchingTextRuns):
(WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayBox.h:
(WebCore::InlineDisplay::Box::Text::length const):
(WebCore::InlineDisplay::Box::Text::partiallyVisibleContentLength const):
(WebCore::InlineDisplay::Box::Text::setPartiallyVisibleContentLength):
(WebCore::InlineDisplay::Box::text):
(WebCore::InlineDisplay::Box::text const):
(WebCore::InlineDisplay::Box::expansion const):
(WebCore::InlineDisplay::Box::Box):
(WebCore::InlineDisplay::m_isFullyTruncated):
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp:
(WebCore::Layout::truncateOverflowingDisplayBoxes):
* Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp:
(WebCore::LayoutIntegration::showInlineContent):
* Source/WebCore/layout/integration/inline/InlineIteratorBoxModernPath.h:
(WebCore::InlineIterator::BoxModernPath::hasHyphen const):
(WebCore::InlineIterator::BoxModernPath::originalText const):
(WebCore::InlineIterator::BoxModernPath::start const):
(WebCore::InlineIterator::BoxModernPath::end const):
(WebCore::InlineIterator::BoxModernPath::length const):
(WebCore::InlineIterator::BoxModernPath::selectableRange const):
(WebCore::InlineIterator::BoxModernPath::textRun const):
* Source/WebCore/layout/integration/inline/InlineIteratorTextBox.cpp:
(WebCore::InlineIterator::textBoxFor):
* Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentPainter.cpp:
(WebCore::LayoutIntegration::InlineContentPainter::paintDisplayBox):
* Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::showInlineTreeAndRuns):
Canonical link: https://commits.webkit.org/260211@main
Canonical link: https://commits.webkit.org/259548.249@safari-7615-branch
Commit: 25e16b533e7a078ea54f13d35b717115b4071468
https://github.com/WebKit/WebKit/commit/25e16b533e7a078ea54f13d35b717115b4071468
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
M Source/WebCore/layout/formattingContexts/inline/InlineItem.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineItem.h
Log Message:
-----------
Cherry-pick c00bcc0d5aed. rdar://problem/105544210
[WebCore] Shrink Layout::InlineItem
https://bugs.webkit.org/show_bug.cgi?id=252390
rdar://105544210
Reviewed by Antti Koivisto.
Reduce the size of the class from 32 to 24 bytes by reordering and converting
a couple members to bit fields.
* Source/WebCore/layout/formattingContexts/inline/InlineItem.cpp:
* Source/WebCore/layout/formattingContexts/inline/InlineItem.h:
(WebCore::Layout::InlineItem::InlineItem):
Canonical link: https://commits.webkit.org/260446@main
Canonical link: https://commits.webkit.org/259548.250@safari-7615-branch
Commit: 4b8b6922ea3157e8db08a23e356b70d8ec3d88b4
https://github.com/WebKit/WebKit/commit/4b8b6922ea3157e8db08a23e356b70d8ec3d88b4
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
M Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp
M Source/WebCore/platform/text/TextFlags.cpp
M Source/WebCore/platform/text/TextFlags.h
Log Message:
-----------
Cherry-pick 6418aea7fc71. rdar://problem/105594318
[WebCore] Shrink FontVariantAlternates
https://bugs.webkit.org/show_bug.cgi?id=252479
rdar://105594318
Reviewed by Tim Nguyen.
Reduce the size of `FontVariantAlternates` from 120 to 80 bytes by replacing all
the instance of `std::optional<String>` in `FontVariantAlternatesValues` with
`String`. `String` can already distinguish between an empty string and a null
string, so it seems redundant to wrap it in an optinal. Combined with #10722,
this further reduces the size of `StyleInheritedData` to 264 bytes.
* Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeFontVariantAlternates):
* Source/WebCore/platform/text/TextFlags.cpp:
(WebCore::operator<<):
* Source/WebCore/platform/text/TextFlags.h:
Canonical link: https://commits.webkit.org/260465@main
Canonical link: https://commits.webkit.org/259548.251@safari-7615-branch
Commit: 87e08105866f4ff6beba19fc020427ba0a5befe8
https://github.com/WebKit/WebKit/commit/87e08105866f4ff6beba19fc020427ba0a5befe8
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
M Source/WebCore/dom/EventListener.h
Log Message:
-----------
Cherry-pick c9e0b19e65ac. rdar://problem/105679210
[WebCore] Shrink EventListener
https://bugs.webkit.org/show_bug.cgi?id=252567
rdar://105679210
Reviewed by Chris Dumez.
Reduce the size of `WebCore::EventListener` from 32 to 24 bytes by reordering
the super classes and reducing the size of the `Type` enum. This in turn reduces
the size of `JSEventListener` to 48 bytes, bringing it to next size class down.
* Source/WebCore/dom/EventListener.h:
Canonical link: https://commits.webkit.org/260550@main
Canonical link: https://commits.webkit.org/259548.252@safari-7615-branch
Commit: 071c2c613a250a9bb20a0c29227b3d125df8e4a9
https://github.com/WebKit/WebKit/commit/071c2c613a250a9bb20a0c29227b3d125df8e4a9
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/FontCascadeDescription.cpp
M Source/WebCore/platform/graphics/FontDescription.h
Log Message:
-----------
Cherry-pick 26968a0b0a52. rdar://problem/105594136
[WebCore] Shrink FontDescription
https://bugs.webkit.org/show_bug.cgi?id=252478
rdar://105594136
Reviewed by Simon Fraser.
Use `WTF::Marked` instead of `std::optional` in `FontDescription::sizeAdjust` to
reduce its size from 216 to 208 bytes. Consequently, this shrinks `StyleRareData`
from 320 to 304 bytes, which takes it from the 352b to the 304b size class.
* Source/WebCore/platform/graphics/FontCascadeDescription.cpp:
* Source/WebCore/platform/graphics/FontDescription.h:
(WebCore::FloatMarkableTraits::isEmptyValue):
(WebCore::FloatMarkableTraits::emptyValue):
Canonical link: https://commits.webkit.org/260564@main
Canonical link: https://commits.webkit.org/259548.253@safari-7615-branch
Commit: 4ae09d71137fd2cb4c505e3fa7ef22e87bf46b29
https://github.com/WebKit/WebKit/commit/4ae09d71137fd2cb4c505e3fa7ef22e87bf46b29
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
M Source/WebCore/platform/text/TextFlags.cpp
M Source/WebCore/platform/text/TextFlags.h
Log Message:
-----------
Cherry-pick 9b974f716f86. rdar://problem/105596793
[WebCore] Use Markable instead of std::variant in FontVariantAlternates
https://bugs.webkit.org/show_bug.cgi?id=252485
rdar://105596793
Reviewed by Simon Fraser.
`FontVariantAlternates` used an `std::variant` to store either `FontVariantAlternatesValues`
or a no-op class, so it was effectively using it as an optional. By using Markable, we
reduce the size of `FontVariantAlternates` from 80 to 72 bytes, consequently reducing
`StyleInheritedData` to fit the next size class down (256 bytes).
* Source/WebCore/platform/text/TextFlags.cpp:
(WebCore::add):
* Source/WebCore/platform/text/TextFlags.h:
(WebCore::FontVariantAlternatesValues::MarkableTraits::isEmptyValue):
(WebCore::FontVariantAlternatesValues::MarkableTraits::emptyValue):
(WebCore::FontVariantAlternates::operator== const):
(WebCore::FontVariantAlternates::isNormal const):
(WebCore::FontVariantAlternates::values const):
(WebCore::FontVariantAlternates::valuesRef):
(WebCore::FontVariantAlternates::setValues):
(WebCore::FontVariantAlternates::Normal):
(WebCore::FontVariantAlternatesNormal::operator== const): Deleted.
(WebCore::FontVariantAlternatesNormal::operator!= const): Deleted.
Canonical link: https://commits.webkit.org/260565@main
Canonical link: https://commits.webkit.org/259548.254@safari-7615-branch
Commit: 4a641fe3ca7e69c661c66a4094c223cb9ce31ae4
https://github.com/WebKit/WebKit/commit/4a641fe3ca7e69c661c66a4094c223cb9ce31ae4
Author: Sihui Liu <sihui_liu at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
M Source/WebKit/NetworkProcess/storage/CacheStorageCache.cpp
M Source/WebKit/NetworkProcess/storage/CacheStorageDiskStore.cpp
Log Message:
-----------
Cherry-pick 7510aa30f017. rdar://problem/105731921
Fix use-after-move in CacheStorageDiskStore::writeRecords
https://bugs.webkit.org/show_bug.cgi?id=252673
rdar://105731921
Reviewed by Youenn Fablet.
Also add WTFMove() at places that are possible to do move assignment.
* Source/WebKit/NetworkProcess/storage/CacheStorageCache.cpp:
(WebKit::CacheStorageCache::open):
(WebKit::CacheStorageCache::putRecordsInStore):
* Source/WebKit/NetworkProcess/storage/CacheStorageDiskStore.cpp:
(WebKit::decodeRecordHeader):
(WebKit::CacheStorageDiskStore::writeRecords):
Canonical link: https://commits.webkit.org/260643@main
Canonical link: https://commits.webkit.org/259548.255@safari-7615-branch
Commit: acf6815821cc5dcba7742b7e195a2997ab55e756
https://github.com/WebKit/WebKit/commit/acf6815821cc5dcba7742b7e195a2997ab55e756
Author: Ben Nham <nham at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
M Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h
M Tools/TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm
Log Message:
-----------
Cherry-pick b8064a7a1a7b. rdar://problem/105697554
NotificationEvent interface exists but Notification interface does not on iOS 16.4
https://bugs.webkit.org/show_bug.cgi?id=252625
rdar://105697554
Reviewed by Chris Dumez.
On iOS, NotificationEvent is enabled by default but Notification is disabled by default. This
doesn't make any sense, since a NotificationEvent contains a Notification. Furthermore, you can't
actually even get a NotificationEvent on iOS with a default browser since the supporting machinery
to generate and fire the notification event only exists in Web.app. So it should definitely not
default to true.
To fix this, we only enable NotificationEvent where we used to (i.e. on macOS >= 13). Web.app will
enable this preference at runtime so that Web Push and NotificationEvent work as expected in that
app.
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _setNotificationEventEnabled:]):
(-[WKPreferences _notificationEventEnabled]):
* Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm:
Canonical link: https://commits.webkit.org/260685@main
Canonical link: https://commits.webkit.org/259548.256@safari-7615-branch
Commit: 3b54dac08924b45678ac342990d73417c7bedea1
https://github.com/WebKit/WebKit/commit/3b54dac08924b45678ac342990d73417c7bedea1
Author: Kimmo Kinnunen <kkinnunen at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
A LayoutTests/webgl/webgl-visible-after-context-restore-expected.html
A LayoutTests/webgl/webgl-visible-after-context-restore.html
M Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
Log Message:
-----------
Cherry-pick 3a7c3a3c6ad3. rdar://problem/104084385
Restored WebGL context is not visible until layout
https://bugs.webkit.org/show_bug.cgi?id=252737
rdar://104084385
Reviewed by Antti Koivisto.
Force reconfiguration of the layer backing store for WebGL element after
successful restore. The layerContentsDisplayDelegate is per
GraphicsContextGL context, and losing and restoring the context means
the delegate needs to be changed too.
* LayoutTests/webgl/webgl-visible-after-context-restore-expected.html: Added.
* LayoutTests/webgl/webgl-visible-after-context-restore.html: Added.
* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::maybeRestoreContext):
Canonical link: https://commits.webkit.org/260693@main
Canonical link: https://commits.webkit.org/259548.257@safari-7615-branch
Commit: 359a1d69ceddb777154703b46a5c703457334580
https://github.com/WebKit/WebKit/commit/359a1d69ceddb777154703b46a5c703457334580
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
M Source/JavaScriptCore/bytecode/ArrayAllocationProfile.cpp
M Source/JavaScriptCore/bytecode/ArrayAllocationProfile.h
Log Message:
-----------
Cherry-pick 15ea71cc4b7d. rdar://problem/105277033
[JSC] Shrink ArrayAllocationProfile from 16 to 8 bytes
https://bugs.webkit.org/show_bug.cgi?id=252056
rdar://105277033
Reviewed by Yusuke Suzuki.
Currently, `ArrayAllocationProfile`s use 16 bytes: `IndexingMode` (1 byte), the
largest vector length seen (4 bytes), and a pointer to the last seen `JSArray`.
However, the vector length is limited to `BASE_CONTIGUOUS_VECTOR_LEN_MAX`, which
is `25`, so we can easily fit it in a byte, and combined with `CompactPointerTuple`,
we can fit the whole thing in 8 bytes.
* Source/JavaScriptCore/bytecode/ArrayAllocationProfile.cpp:
(JSC::ArrayAllocationProfile::updateProfile):
* Source/JavaScriptCore/bytecode/ArrayAllocationProfile.h:
(JSC::ArrayAllocationProfile::selectIndexingType):
(JSC::ArrayAllocationProfile::vectorLengthHint):
(JSC::ArrayAllocationProfile::updateLastAllocation):
(JSC::ArrayAllocationProfile::updateLastAllocationFor):
(JSC::ArrayAllocationProfile::IndexingTypeAndVectorLength::IndexingTypeAndVectorLength):
(JSC::ArrayAllocationProfile::IndexingTypeAndVectorLength::indexingType const):
(JSC::ArrayAllocationProfile::IndexingTypeAndVectorLength::vectorLength const):
(JSC::ArrayAllocationProfile::IndexingTypeAndVectorLength::operator bool const):
Canonical link: https://commits.webkit.org/260192@main
Canonical link: https://commits.webkit.org/259548.258@safari-7615-branch
Commit: 07ad5d296e0edb230cb039d934ee5500c5c5c4e9
https://github.com/WebKit/WebKit/commit/07ad5d296e0edb230cb039d934ee5500c5c5c4e9
Author: Said Abou-Hallawa <said at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp
M Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h
M Source/WebCore/platform/graphics/FontCascade.cpp
M Source/WebCore/platform/graphics/GraphicsContext.h
M Source/WebCore/platform/graphics/ImageBuffer.cpp
M Source/WebCore/platform/graphics/ImageBuffer.h
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.h
M Source/WebCore/platform/graphics/cg/ImageBufferCGBackend.cpp
M Source/WebCore/platform/graphics/cg/ImageBufferCGBackend.h
M Source/WebCore/platform/graphics/cg/ImageBufferCGBitmapBackend.cpp
M Source/WebCore/platform/graphics/cg/ImageBufferCGBitmapBackend.h
M Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp
M Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.h
M Source/WebCore/platform/graphics/displaylists/DisplayListDrawingContext.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListDrawingContext.h
M Source/WebCore/platform/graphics/displaylists/DisplayListImageBuffer.h
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h
M Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp
Log Message:
-----------
Cherry-pick 5170cf0d951e. rdar://problem/105525603
Add the method GraphicsContext::colorSpace()
https://bugs.webkit.org/show_bug.cgi?id=252382
rdar://105525603
Reviewed by Simon Fraser.
colorSpace() will return the DestinationColorSpace of the underlying context for
the following cases:
1. Accelerated IOSurface based GraphicsContext
2. Unaccelerated GraphicsContext
3. CGBitmapContext based context
4. DisplayRecorder based GraphicsContext
Other types such as kCGContextTypePDF will be handled in a future patch.
* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp:
(WebCore::BifurcatedGraphicsContext::colorSpace const):
* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h:
* Source/WebCore/platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::displayListForTextRun const):
* Source/WebCore/platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::colorSpace const):
* Source/WebCore/platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::create):
* Source/WebCore/platform/graphics/ImageBuffer.h:
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContextCG::colorSpace const):
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.h:
* Source/WebCore/platform/graphics/cg/ImageBufferCGBackend.cpp:
(WebCore::ImageBufferCGBackend::contextColorSpace): Deleted.
* Source/WebCore/platform/graphics/cg/ImageBufferCGBackend.h:
* Source/WebCore/platform/graphics/cg/ImageBufferCGBitmapBackend.cpp:
* Source/WebCore/platform/graphics/cg/ImageBufferCGBitmapBackend.h:
* Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp:
(WebCore::ImageBufferIOSurfaceBackend::contextColorSpace): Deleted.
* Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListDrawingContext.cpp:
(WebCore::DisplayList::DrawingContext::DrawingContext):
* Source/WebCore/platform/graphics/displaylists/DisplayListDrawingContext.h:
(WebCore::DisplayList::DrawingContext::DrawingContext):
* Source/WebCore/platform/graphics/displaylists/DisplayListImageBuffer.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::Recorder):
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp:
(WebCore::DisplayList::RecorderImpl::RecorderImpl):
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h:
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
(WebKit::RemoteDisplayListRecorderProxy::RemoteDisplayListRecorderProxy):
Canonical link: https://commits.webkit.org/260471@main
Canonical link: https://commits.webkit.org/259548.259@safari-7615-branch
Commit: 07facd77e2510812c7b4e2448ad0ef1850929e6f
https://github.com/WebKit/WebKit/commit/07facd77e2510812c7b4e2448ad0ef1850929e6f
Author: Said Abou-Hallawa <said at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
A LayoutTests/platform/ios/fast/canvas/canvas-drawImage-hdr-video-expected.txt
M Source/WebCore/platform/graphics/cairo/NativeImageCairo.cpp
M Source/WebCore/platform/graphics/cg/NativeImageCG.cpp
Log Message:
-----------
Cherry-pick 2ba4ecb0408c. rdar://problem/100879401
HDR data is clipped in AVIF images
https://bugs.webkit.org/show_bug.cgi?id=245858
rdar://100879401
Reviewed by Simon Fraser.
This implements a temporary fix for rendering images with HDR data on macOS. The
system libraries on macOS BigSur and Ventura do a smooth conversion for the HDR
to SDR if the destination is a CGBitmapContext. This workaround will be used to
fix this problem by drawing the HDR image to a temporary local CGBitmapContext
before drawing it to the destination context.
* LayoutTests/platform/ios/fast/canvas/canvas-drawImage-hdr-video-expected.txt: Added.
* Source/WebCore/platform/graphics/NativeImage.cpp:
(WebCore::NativeImage::draw): Deleted.
* Source/WebCore/platform/graphics/cairo/NativeImageCairo.cpp:
(WebCore::NativeImage::draw):
* Source/WebCore/platform/graphics/cg/NativeImageCG.cpp:
(WebCore::NativeImage::draw):
Canonical link: https://commits.webkit.org/260512@main
Canonical link: https://commits.webkit.org/259548.260@safari-7615-branch
Commit: 2601bbbb9e55d905df0934fec891e05cf1c0cef7
https://github.com/WebKit/WebKit/commit/2601bbbb9e55d905df0934fec891e05cf1c0cef7
Author: Said Abou-Hallawa <said at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
Log Message:
-----------
Cherry-pick fab6d531c24f. rdar://problem/105637444
REGRESSION(260471 at main): The platform graphics context colorspace should not be adopted
https://bugs.webkit.org/show_bug.cgi?id=252629
rdar://105637444
Reviewed by Darin Adler.
When storing the return raw pointer of CGIOSurfaceContextGetColorSpace() or
CGBitmapContextGetColorSpace() in a RetainPtr, we should not be using adoptCF().
The refcount of the colorspace should be incremented when WebKit references it.
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContextCG::colorSpace const):
Canonical link: https://commits.webkit.org/260609@main
Canonical link: https://commits.webkit.org/259548.261@safari-7615-branch
Commit: 89f337538ec60254620c7646d706a1c4a3ae27f3
https://github.com/WebKit/WebKit/commit/89f337538ec60254620c7646d706a1c4a3ae27f3
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
A JSTests/stress/loaded-argument-conflict-with-new-argument.js
M Source/JavaScriptCore/dfg/DFGArgumentsEliminationPhase.cpp
Log Message:
-----------
[JSC] Loaded argument can be conflict with newly defined argument in arguments elimination phase
https://bugs.webkit.org/show_bug.cgi?id=252787
rdar://105671461
Reviewed by Mark Lam and Ryan Haddad.
We now correctly analyze interference between eliminated arguments and newly created arguments.
But this interference is analyzed based on the state *just before executing Node's effect".
For example, LoadVarargs elimination can get stackslots and put stackslots. And these stackslots
can interfere if stackslots are alive and not-interfered when LoadVarargs starts.
@a: CreateDirectArguments (loc0, loc1, loc2)
...
LoadVarargs @a, (loc2, loc3, loc4)
Load @a content, and define loc2, loc3, loc4 stackslots.
We check whether LoadVarargs itself is not interfering with the candidate's slots. This is because
LoadVarargs can be lowered to the sequence of PutStacks and we may OSR exit in the middle of these
PutStacks. So we would like to ensure that these PutStacks are not interfering with the candidate
nodes. We need this check only for LoadVarargs since it is the only node which can be lowered to
PutStacks in this phase.
And let's run storeArgumentCountIncludingThis at last since this is not included in interference analysis
since it is putting a constant.
* JSTests/stress/loaded-argument-conflict-with-new-argument.js: Added.
(foo):
(bar):
(baz):
* Source/JavaScriptCore/dfg/DFGArgumentsEliminationPhase.cpp:
Canonical link: https://commits.webkit.org/259548.261@safari-7615-branch
Commit: be460012452d0eeb7aed6d2f2de27c5d19270913
https://github.com/WebKit/WebKit/commit/be460012452d0eeb7aed6d2f2de27c5d19270913
Author: Dawn Flores <dawn_flores at apple.com>
Date: 2023-02-23 (Thu, 23 Feb 2023)
Changed paths:
M LayoutTests/platform/mac-wk1/TestExpectations
M LayoutTests/platform/mac/TestExpectations
Log Message:
-----------
(Cherry-pick)[ macOS ] webaudio/AudioBuffer/huge-buffer.html is a flaky time out
https://bugs.webkit.org/show_bug.cgi?id=251710
rdar://105807641
Unreviewed test gardening.
* LayoutTests/platform/mac-wk1/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
Canonical link: https://commits.webkit.org/259548.262@safari-7615-branch
Commit: 1e81bff061414a3e413d51036dce5f75afe96916
https://github.com/WebKit/WebKit/commit/1e81bff061414a3e413d51036dce5f75afe96916
Author: Said Abou-Hallawa <said at apple.com>
Date: 2023-02-23 (Thu, 23 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp
M Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h
M Source/WebCore/platform/graphics/GraphicsContext.cpp
M Source/WebCore/platform/graphics/GraphicsContext.h
M Source/WebCore/platform/graphics/NativeImage.cpp
M Source/WebCore/platform/graphics/NativeImage.h
M Source/WebCore/platform/graphics/NullGraphicsContext.h
M Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
M Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.h
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.h
M Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
M Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp
M Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h
Log Message:
-----------
Cherry-pick 49563768826f. rdar://problem/105409701
Make GraphicsContext::drawNativeImage() platform independent
https://bugs.webkit.org/show_bug.cgi?id=252182
rdar://105409701
Reviewed by Simon Fraser.
All implementations of drawNativeImage() will be renamed drawPlatformImage(). A
new implementation for drawNativeImage() will be added to GraphicsContext. All
it does it calls the new method NativeImage::draw(). For now NativeImage::draw()
will just call GraphicsContext ::drawPlatformImage() which is the original
implementation of GraphicsContext::drawNativeImage().
* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp:
(WebCore::BifurcatedGraphicsContext::drawNativeImageInternal):
(WebCore::BifurcatedGraphicsContext::drawNativeImage): Deleted.
* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h:
* Source/WebCore/platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawNativeImage):
* Source/WebCore/platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::drawNativeImage):
(WebCore::GraphicsContext::isInTransparencyLayer const):
(WebCore::GraphicsContext::drawNativeImageInternal):
(WebCore::GraphicsContext::supportsTransparencyLayers const): Deleted.
* Source/WebCore/platform/graphics/NativeImage.cpp:
(WebCore::NativeImage::draw):
* Source/WebCore/platform/graphics/NativeImage.h:
* Source/WebCore/platform/graphics/NullGraphicsContext.h:
* Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContextCairo::drawNativeImageInternal):
(WebCore::GraphicsContextCairo::drawNativeImage): Deleted.
* Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.h:
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContextCG::drawNativeImageInternal):
(WebCore::GraphicsContextCG::drawNativeImage): Deleted.
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::drawNativeImageInternal):
(WebCore::DisplayList::Recorder::drawNativeImage): Deleted.
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h:
* Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:
(Nicosia::CairoOperationRecorder::drawNativeImageInternal):
(Nicosia::CairoOperationRecorder::drawNativeImage): Deleted.
* Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h:
Canonical link: https://commits.webkit.org/260255@main
Canonical link: https://commits.webkit.org/259548.264@safari-7615-branch
Commit: 62a3678a3ee8dcc28de9161f7e1cb0072be78c04
https://github.com/WebKit/WebKit/commit/62a3678a3ee8dcc28de9161f7e1cb0072be78c04
Author: Dean Jackson <dino at apple.com>
Date: 2023-02-23 (Thu, 23 Feb 2023)
Changed paths:
M Source/WebKit/Platform/Logging.h
M Source/WebKit/UIProcess/Cocoa/SystemPreviewControllerCocoa.mm
Log Message:
-----------
Cherry-pick 17ea4508cabe. rdar://problem/105800886
Some SystemPreview actions are not being detected
https://bugs.webkit.org/show_bug.cgi?id=252780
rdar://105800886
Reviewed by Darin Adler.
We're getting reports of some SystemPreviews not detecting the user action.
We've been unable to reproduce, so this is adding some release logging to help
us narrow down the problem.
* Source/WebKit/Platform/Logging.h:
* Source/WebKit/UIProcess/Cocoa/SystemPreviewControllerCocoa.mm: Add logging when a user
taps on a link, it finishes loading, the user clicks, and the preview ends.
Canonical link: https://commits.webkit.org/260727@main
Canonical link: https://commits.webkit.org/259548.265@safari-7615-branch
Commit: 54b1b3a994f655e063134e4fdd333772b719e5fc
https://github.com/WebKit/WebKit/commit/54b1b3a994f655e063134e4fdd333772b719e5fc
Author: Myah Cobbs <mcobbs at apple.com>
Date: 2023-02-23 (Thu, 23 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp
M Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h
M Source/WebCore/platform/graphics/GraphicsContext.cpp
M Source/WebCore/platform/graphics/GraphicsContext.h
M Source/WebCore/platform/graphics/NativeImage.cpp
M Source/WebCore/platform/graphics/NativeImage.h
M Source/WebCore/platform/graphics/NullGraphicsContext.h
M Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
M Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.h
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.h
M Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
M Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp
M Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h
Log Message:
-----------
Revert "Cherry-pick 49563768826f. rdar://problem/105409701"
This reverts commit 1e81bff061414a3e413d51036dce5f75afe96916.
Canonical link: https://commits.webkit.org/259548.266@safari-7615-branch
Commit: 4615181c272504f447d15443f03112858f20b78c
https://github.com/WebKit/WebKit/commit/4615181c272504f447d15443f03112858f20b78c
Author: Myah Cobbs <mcobbs at apple.com>
Date: 2023-02-23 (Thu, 23 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
Log Message:
-----------
Revert "Cherry-pick fab6d531c24f. rdar://problem/105637444"
This reverts commit 2601bbbb9e55d905df0934fec891e05cf1c0cef7.
Canonical link: https://commits.webkit.org/259548.267@safari-7615-branch
Commit: ba3fb12600d579eef31ae083959386c96330752f
https://github.com/WebKit/WebKit/commit/ba3fb12600d579eef31ae083959386c96330752f
Author: Myah Cobbs <mcobbs at apple.com>
Date: 2023-02-23 (Thu, 23 Feb 2023)
Changed paths:
R LayoutTests/platform/ios/fast/canvas/canvas-drawImage-hdr-video-expected.txt
M Source/WebCore/platform/graphics/cairo/NativeImageCairo.cpp
M Source/WebCore/platform/graphics/cg/NativeImageCG.cpp
Log Message:
-----------
Revert "Cherry-pick 2ba4ecb0408c. rdar://problem/100879401"
This reverts commit 07facd77e2510812c7b4e2448ad0ef1850929e6f.
Canonical link: https://commits.webkit.org/259548.268@safari-7615-branch
Commit: 6ad66ed3808f4278e5fcbf06d31579edd9ea43ca
https://github.com/WebKit/WebKit/commit/6ad66ed3808f4278e5fcbf06d31579edd9ea43ca
Author: Myah Cobbs <mcobbs at apple.com>
Date: 2023-02-23 (Thu, 23 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp
M Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h
M Source/WebCore/platform/graphics/FontCascade.cpp
M Source/WebCore/platform/graphics/GraphicsContext.h
M Source/WebCore/platform/graphics/ImageBuffer.cpp
M Source/WebCore/platform/graphics/ImageBuffer.h
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.h
M Source/WebCore/platform/graphics/cg/ImageBufferCGBackend.cpp
M Source/WebCore/platform/graphics/cg/ImageBufferCGBackend.h
M Source/WebCore/platform/graphics/cg/ImageBufferCGBitmapBackend.cpp
M Source/WebCore/platform/graphics/cg/ImageBufferCGBitmapBackend.h
M Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp
M Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.h
M Source/WebCore/platform/graphics/displaylists/DisplayListDrawingContext.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListDrawingContext.h
M Source/WebCore/platform/graphics/displaylists/DisplayListImageBuffer.h
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h
M Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp
Log Message:
-----------
Revert "Cherry-pick 5170cf0d951e. rdar://problem/105525603"
This reverts commit 07ad5d296e0edb230cb039d934ee5500c5c5c4e9.
Canonical link: https://commits.webkit.org/259548.269@safari-7615-branch
Commit: 89a80db792e487093cc8e315dc597d363d11a21d
https://github.com/WebKit/WebKit/commit/89a80db792e487093cc8e315dc597d363d11a21d
Author: Said Abou-Hallawa <said at apple.com>
Date: 2023-02-23 (Thu, 23 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp
M Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h
M Source/WebCore/platform/graphics/GraphicsContext.cpp
M Source/WebCore/platform/graphics/GraphicsContext.h
M Source/WebCore/platform/graphics/NativeImage.cpp
M Source/WebCore/platform/graphics/NativeImage.h
M Source/WebCore/platform/graphics/NullGraphicsContext.h
M Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
M Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.h
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.h
M Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
M Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp
M Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h
Log Message:
-----------
Cherry-pick 49563768826f. rdar://problem/105409701
Make GraphicsContext::drawNativeImage() platform independent
https://bugs.webkit.org/show_bug.cgi?id=252182
rdar://105409701
Reviewed by Simon Fraser.
All implementations of drawNativeImage() will be renamed drawPlatformImage(). A
new implementation for drawNativeImage() will be added to GraphicsContext. All
it does it calls the new method NativeImage::draw(). For now NativeImage::draw()
will just call GraphicsContext ::drawPlatformImage() which is the original
implementation of GraphicsContext::drawNativeImage().
* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp:
(WebCore::BifurcatedGraphicsContext::drawNativeImageInternal):
(WebCore::BifurcatedGraphicsContext::drawNativeImage): Deleted.
* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h:
* Source/WebCore/platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawNativeImage):
* Source/WebCore/platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::drawNativeImage):
(WebCore::GraphicsContext::isInTransparencyLayer const):
(WebCore::GraphicsContext::drawNativeImageInternal):
(WebCore::GraphicsContext::supportsTransparencyLayers const): Deleted.
* Source/WebCore/platform/graphics/NativeImage.cpp:
(WebCore::NativeImage::draw):
* Source/WebCore/platform/graphics/NativeImage.h:
* Source/WebCore/platform/graphics/NullGraphicsContext.h:
* Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContextCairo::drawNativeImageInternal):
(WebCore::GraphicsContextCairo::drawNativeImage): Deleted.
* Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.h:
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContextCG::drawNativeImageInternal):
(WebCore::GraphicsContextCG::drawNativeImage): Deleted.
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::drawNativeImageInternal):
(WebCore::DisplayList::Recorder::drawNativeImage): Deleted.
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h:
* Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:
(Nicosia::CairoOperationRecorder::drawNativeImageInternal):
(Nicosia::CairoOperationRecorder::drawNativeImage): Deleted.
* Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h:
Canonical link: https://commits.webkit.org/260255@main
Canonical link: https://commits.webkit.org/259548.270@safari-7615-branch
Commit: 81c50a100173a79c51a72c510c7c09747422a24f
https://github.com/WebKit/WebKit/commit/81c50a100173a79c51a72c510c7c09747422a24f
Author: Said Abou-Hallawa <said at apple.com>
Date: 2023-02-23 (Thu, 23 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp
M Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h
M Source/WebCore/platform/graphics/FontCascade.cpp
M Source/WebCore/platform/graphics/GraphicsContext.h
M Source/WebCore/platform/graphics/ImageBuffer.cpp
M Source/WebCore/platform/graphics/ImageBuffer.h
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.h
M Source/WebCore/platform/graphics/cg/ImageBufferCGBackend.cpp
M Source/WebCore/platform/graphics/cg/ImageBufferCGBackend.h
M Source/WebCore/platform/graphics/cg/ImageBufferCGBitmapBackend.cpp
M Source/WebCore/platform/graphics/cg/ImageBufferCGBitmapBackend.h
M Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp
M Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.h
M Source/WebCore/platform/graphics/displaylists/DisplayListDrawingContext.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListDrawingContext.h
M Source/WebCore/platform/graphics/displaylists/DisplayListImageBuffer.h
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h
M Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp
Log Message:
-----------
Cherry-pick 5170cf0d951e. rdar://problem/105525603
Add the method GraphicsContext::colorSpace()
https://bugs.webkit.org/show_bug.cgi?id=252382
rdar://105525603
Reviewed by Simon Fraser.
colorSpace() will return the DestinationColorSpace of the underlying context for
the following cases:
1. Accelerated IOSurface based GraphicsContext
2. Unaccelerated GraphicsContext
3. CGBitmapContext based context
4. DisplayRecorder based GraphicsContext
Other types such as kCGContextTypePDF will be handled in a future patch.
* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp:
(WebCore::BifurcatedGraphicsContext::colorSpace const):
* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h:
* Source/WebCore/platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::displayListForTextRun const):
* Source/WebCore/platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::colorSpace const):
* Source/WebCore/platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::create):
* Source/WebCore/platform/graphics/ImageBuffer.h:
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContextCG::colorSpace const):
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.h:
* Source/WebCore/platform/graphics/cg/ImageBufferCGBackend.cpp:
(WebCore::ImageBufferCGBackend::contextColorSpace): Deleted.
* Source/WebCore/platform/graphics/cg/ImageBufferCGBackend.h:
* Source/WebCore/platform/graphics/cg/ImageBufferCGBitmapBackend.cpp:
* Source/WebCore/platform/graphics/cg/ImageBufferCGBitmapBackend.h:
* Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp:
(WebCore::ImageBufferIOSurfaceBackend::contextColorSpace): Deleted.
* Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListDrawingContext.cpp:
(WebCore::DisplayList::DrawingContext::DrawingContext):
* Source/WebCore/platform/graphics/displaylists/DisplayListDrawingContext.h:
(WebCore::DisplayList::DrawingContext::DrawingContext):
* Source/WebCore/platform/graphics/displaylists/DisplayListImageBuffer.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::Recorder):
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp:
(WebCore::DisplayList::RecorderImpl::RecorderImpl):
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h:
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
(WebKit::RemoteDisplayListRecorderProxy::RemoteDisplayListRecorderProxy):
Canonical link: https://commits.webkit.org/260471@main
Canonical link: https://commits.webkit.org/259548.271@safari-7615-branch
Commit: c1aa3770ef64d07551f6d36cd21b21c444cc855d
https://github.com/WebKit/WebKit/commit/c1aa3770ef64d07551f6d36cd21b21c444cc855d
Author: Said Abou-Hallawa <said at apple.com>
Date: 2023-02-23 (Thu, 23 Feb 2023)
Changed paths:
A LayoutTests/platform/ios/fast/canvas/canvas-drawImage-hdr-video-expected.txt
M Source/WebCore/platform/graphics/NativeImage.cpp
M Source/WebCore/platform/graphics/cairo/NativeImageCairo.cpp
M Source/WebCore/platform/graphics/cg/NativeImageCG.cpp
Log Message:
-----------
Cherry-pick 2ba4ecb0408c. rdar://problem/100879401
HDR data is clipped in AVIF images
https://bugs.webkit.org/show_bug.cgi?id=245858
rdar://100879401
Reviewed by Simon Fraser.
This implements a temporary fix for rendering images with HDR data on macOS. The
system libraries on macOS BigSur and Ventura do a smooth conversion for the HDR
to SDR if the destination is a CGBitmapContext. This workaround will be used to
fix this problem by drawing the HDR image to a temporary local CGBitmapContext
before drawing it to the destination context.
* LayoutTests/platform/ios/fast/canvas/canvas-drawImage-hdr-video-expected.txt: Added.
* Source/WebCore/platform/graphics/NativeImage.cpp:
(WebCore::NativeImage::draw): Deleted.
* Source/WebCore/platform/graphics/cairo/NativeImageCairo.cpp:
(WebCore::NativeImage::draw):
* Source/WebCore/platform/graphics/cg/NativeImageCG.cpp:
(WebCore::NativeImage::draw):
Canonical link: https://commits.webkit.org/260512@main
Canonical link: https://commits.webkit.org/259548.272@safari-7615-branch
Commit: 42fcece21e3c50244a65ae2a602803314d77de04
https://github.com/WebKit/WebKit/commit/42fcece21e3c50244a65ae2a602803314d77de04
Author: Said Abou-Hallawa <said at apple.com>
Date: 2023-02-23 (Thu, 23 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
Log Message:
-----------
Cherry-pick fab6d531c24f. rdar://problem/105637444
REGRESSION(260471 at main): The platform graphics context colorspace should not be adopted
https://bugs.webkit.org/show_bug.cgi?id=252629
rdar://105637444
Reviewed by Darin Adler.
When storing the return raw pointer of CGIOSurfaceContextGetColorSpace() or
CGBitmapContextGetColorSpace() in a RetainPtr, we should not be using adoptCF().
The refcount of the colorspace should be incremented when WebKit references it.
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContextCG::colorSpace const):
Canonical link: https://commits.webkit.org/260609@main
Canonical link: https://commits.webkit.org/259548.273@safari-7615-branch
Commit: 0501c9fc905ef2cc7543dfa153066c54370f2a8d
https://github.com/WebKit/WebKit/commit/0501c9fc905ef2cc7543dfa153066c54370f2a8d
Author: Ryosuke Niwa <rniwa at webkit.org>
Date: 2023-02-23 (Thu, 23 Feb 2023)
Changed paths:
A LayoutTests/editing/selection/redo-selection-restore-different-document-crash-expected.txt
A LayoutTests/editing/selection/redo-selection-restore-different-document-crash.html
M Source/WebCore/editing/Editor.cpp
M Source/WebCore/editing/VisibleSelection.cpp
Log Message:
-----------
Assertion failure in ContainerNode::removeAllChildrenWithScriptAssertion
https://bugs.webkit.org/show_bug.cgi?id=252785
rdar://105643144
Reviewed by Chris Dumez and Geoffrey Garen.
The bug was caused by Editor::changeSelectionAfterCommand setting selection pointing to a wrong document.
Fixed the bug by detecting this case and exiting early.
* LayoutTests/editing/selection/redo-selection-restore-different-document-crash-expected.txt: Added.
* LayoutTests/editing/selection/redo-selection-restore-different-document-crash.html: Added.
* Source/WebCore/editing/Editor.cpp:
(WebCore::Editor::changeSelectionAfterCommand):
* Source/WebCore/editing/VisibleSelection.cpp:
(WebCore::VisibleSelection::document const): Now returns the document of m_anchor when base is null but anchor isn't.
Canonical link: https://commits.webkit.org/259548.273@safari-7615-branch
Commit: b25aa011e7aa4ac15941c635e99a3df945797bce
https://github.com/WebKit/WebKit/commit/b25aa011e7aa4ac15941c635e99a3df945797bce
Author: Antti Koivisto <antti at apple.com>
Date: 2023-02-23 (Thu, 23 Feb 2023)
Changed paths:
A LayoutTests/fast/frames/stylesheet-mutation-focus-crash-expected.txt
A LayoutTests/fast/frames/stylesheet-mutation-focus-crash.html
M Source/WebCore/css/StyleRule.h
M Source/WebCore/editing/FrameSelection.cpp
Log Message:
-----------
REGRESSION(252324 at main): crash in WebCore::Style::ElementRuleCollector::ruleMatches
https://bugs.webkit.org/show_bug.cgi?id=252814
rdar://105545642
Reviewed by Ryosuke Niwa and Geoffrey Garen.
* LayoutTests/fast/frames/stylesheet-mutation-focus-crash-expected.txt: Added.
* LayoutTests/fast/frames/stylesheet-mutation-focus-crash.html: Added.
* Source/WebCore/css/StyleRule.h:
(WebCore::StyleRule::compiledSelectorForListIndex const):
Add some asserts.
* Source/WebCore/editing/FrameSelection.cpp:
(WebCore::FrameSelection::pageActivationChanged):
(WebCore::FrameSelection::setFocused):
Scope style invalidation over the state change only. Previously it was scoped over event sending too.
Canonical link: https://commits.webkit.org/259548.274@safari-7615-branch
Commit: b022d8caf5608e969f5f10bcde373cf5e3198f84
https://github.com/WebKit/WebKit/commit/b022d8caf5608e969f5f10bcde373cf5e3198f84
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2023-02-23 (Thu, 23 Feb 2023)
Changed paths:
M Source/JavaScriptCore/dfg/DFGArgumentsEliminationPhase.cpp
M Source/JavaScriptCore/dfg/DFGAvailabilityMap.h
M Source/JavaScriptCore/dfg/DFGForAllKills.h
Log Message:
-----------
[JSC] Restore liveness based interference analysis too
https://bugs.webkit.org/show_bug.cgi?id=252798
rdar://problem/105818549
Reviewed by Ryan Haddad and Michael Saboff.
This is partial revert of https://commits.webkit.org/259548.47@safari-7615-branch.
While the above change fixed the global interference problem, we have a problem.
1. We would like to check interference on all the live place since OSR exit may need to restore
phantomized candidate nodes.
2. If PutStack / GetStack happens in the basic block and the stack state gets incorrect in the
middle of basic block, we cannot know.
loc0 => @b
PutStack loc0 @a
...
OSR exit
...
PutStack loc0 @b
...
loc0 => @b
So we partially revert the change in https://commits.webkit.org/259548.47@safari-7615-branch,
1. First collect all stack modification. And record which part of stack is modified for each basic block unit.
2. Then, for each basic block
2.1. If this basic block does not have stack modification, then just check availability for live candidates availability
this head. Since this basic block does not have stack modification, this basic block itself never incurs interference.
Only thing we need to check is that now the live nodes are already clobbered in terms of availability because the
successors modified the stack.
2.2. If this basic block does stack modification, let's take live candidates at the tail of basic block and check whether
the basic block is clobbering this candidate's relying stack. If so, remove it from candidate.
2.3. For each newly killed DFG node at a node-index in this basic block, check (2.2)'s stack modification and remove it
from candidate if its stack is modified.
This added part is effectively the code removed in https://commits.webkit.org/259548.47@safari-7615-branch (so, existing code before).
Compared to the old behavior, 2.1 is added newly to cover inter-block handling.
* Source/JavaScriptCore/dfg/DFGArgumentsEliminationPhase.cpp:
* Source/JavaScriptCore/dfg/DFGAvailabilityMap.h:
(JSC::DFG::AvailabilityMap::forEachAvailability const):
(JSC::DFG::AvailabilityMap::closeOverNodes const):
(JSC::DFG::AvailabilityMap::closeStartingWithLocal const):
(JSC::DFG::AvailabilityMap::forEachAvailability): Deleted.
(JSC::DFG::AvailabilityMap::closeOverNodes): Deleted.
(JSC::DFG::AvailabilityMap::closeStartingWithLocal): Deleted.
Canonical link: https://commits.webkit.org/259548.275@safari-7615-branch
Commit: 403ebdb08ec14d92b3f73f4649725d8491015b6d
https://github.com/WebKit/WebKit/commit/403ebdb08ec14d92b3f73f4649725d8491015b6d
Author: Russell Epstein <repstein at apple.com>
Date: 2023-02-23 (Thu, 23 Feb 2023)
Changed paths:
M Source/WebCore/dom/Element.cpp
M Source/WebCore/dom/Element.h
M Source/WebCore/dom/ElementRareData.cpp
M Source/WebCore/dom/ElementRareData.h
M Source/WebCore/dom/Node.cpp
M Source/WebCore/dom/NodeRareData.h
M Source/WebCore/rendering/updating/RenderTreeUpdater.cpp
M Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp
M Source/WebCore/style/StyleTreeResolver.cpp
Log Message:
-----------
Cherry-pick 260270 at main (53814777b5f2). rdar://problem/105102892
REGRESSION (256782 at main): Animating visibility with a display:contents child causes an element to disappear
https://bugs.webkit.org/show_bug.cgi?id=251597
rdar://105102892
Reviewed by Cameron McCormack.
We currently use ElementRareData::computedStyle() to store styles for Elements that don't have renderers
because they have "display:contents". This creates various problems because the computedStyle field can
update outside normal style resolution/render tree update (as a performance optimization). This can lead
to substly inconsistent state where display:contents style doesn't match the render tree style and
some assumptions break.
This patch gives display:contents style a separate field in element rare data that is only written to
by RenderTreeUpdater. This way it is always in sync with the render tree style.
* LayoutTests/fast/animation/animation-display-contents-expected.html: Added.
* LayoutTests/fast/animation/animation-display-contents.html: Added.
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::hasDisplayContents const):
(WebCore::Element::storeDisplayContentsStyle):
(WebCore::Element::clearDisplayContentsStyle):
(WebCore::Element::existingComputedStyle const):
(WebCore::Element::renderOrDisplayContentsStyle const):
(WebCore::Element::resolveComputedStyle):
(WebCore::Element::resetComputedStyle):
* Source/WebCore/dom/Element.h:
* Source/WebCore/dom/ElementRareData.cpp:
* Source/WebCore/dom/ElementRareData.h:
(WebCore::ElementRareData::displayContentsStyle const):
(WebCore::ElementRareData::setDisplayContentsStyle):
* Source/WebCore/rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::updateElementRenderer):
* Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
(WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement):
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::affectsRenderedSubtree):
(WebCore::Style::TreeResolver::resolveComposedTree):
Canonical link: https://commits.webkit.org/260270@main
Canonical link: https://commits.webkit.org/259548.276@safari-7615-branch
Commit: 7b275845a79fb1a67a0779d928b7ce35de8f35a9
https://github.com/WebKit/WebKit/commit/7b275845a79fb1a67a0779d928b7ce35de8f35a9
Author: Ryan Haddad <ryanhaddad at apple.com>
Date: 2023-02-23 (Thu, 23 Feb 2023)
Changed paths:
M LayoutTests/platform/ios-wk2/TestExpectations
M LayoutTests/platform/mac/TestExpectations
M LayoutTests/svg/compositing/outermost-svg-with-border-padding.html
Log Message:
-----------
Cherry-pick 260135 at main (bd12cf66ee67). rdar://105301796
[iOS / macOS] svg/compositing/outermost-svg-with-border-padding.html is consistently failing
https://bugs.webkit.org/show_bug.cgi?id=252088
rdar://105301796
Unreviewed test gardening.
Expand the existing failure expectation for the test, but also tweak the fuzzy
matching metrics so we can check if that makes it consistently pass before
removing any failure expectations.
* LayoutTests/platform/ios-wk2/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
* LayoutTests/svg/compositing/outermost-svg-with-border-padding.html:
Canonical link: https://commits.webkit.org/260135@main
Canonical link: https://commits.webkit.org/259548.277@safari-7615-branch
Commit: c089ce0a439a649e94c3976fcf42d58ddd244af2
https://github.com/WebKit/WebKit/commit/c089ce0a439a649e94c3976fcf42d58ddd244af2
Author: Elliott Williams <emw at apple.com>
Date: 2023-02-23 (Thu, 23 Feb 2023)
Changed paths:
M Source/WebKit/Configurations/WebKit.xcconfig
Log Message:
-----------
Cherry-pick 6e4108c84c04. rdar://problem/105031778
[Xcode] Change header postprocessing logic to better reflect when it's needed internally
https://bugs.webkit.org/show_bug.cgi?id=251818
rdar://105031778
Reviewed by Alexey Proskuryakov.
WebKit currently assumes that API_AVAILABLE annotations will only use a
major OS version. We have to remember to bump this number annually, and
it prevents us from using minor versions in WebKit's API/SPI headers to
more accurately reflect availability.
Rather than make WebKit's internal configuration logic aware of all
software update versions (which is prohibitively difficult due to
xcconfig's limitations), introduce a new policy for when to enable
API_AVAILABLE annotations:
- Annotations are OFF in debug/release builds.
- Annotations are ON in production builds, unless the build has staged
frameworks (i.e. it is a downlevel or STP build).
Internally, the production build environment may modify this policy by
overriding the WK_FRAMEWORK_HEADER_POSTPROCESSING_DISABLED setting.
* Source/WebKit/Configurations/WebKit.xcconfig:
Canonical link: https://commits.webkit.org/260346@main
Canonical link: https://commits.webkit.org/259548.279@safari-7615-branch
Commit: 41f425bc0ef8325b74c2f932e66668eff6797d70
https://github.com/WebKit/WebKit/commit/41f425bc0ef8325b74c2f932e66668eff6797d70
Author: Myles C. Maxfield <mmaxfield at apple.com>
Date: 2023-02-23 (Thu, 23 Feb 2023)
Changed paths:
M Source/WebCore/css/CSSFontSelector.h
M Source/WebCore/rendering/svg/RenderSVGInlineText.cpp
M Source/WebCore/rendering/svg/RenderSVGText.cpp
M Source/WebCore/rendering/svg/RenderSVGText.h
M Source/WebCore/svg/SVGFontFaceElement.cpp
Log Message:
-----------
Crash in SVGFontFaceElement::associatedFontElement crash when removing SVGFontFaceElement
https://bugs.webkit.org/show_bug.cgi?id=249434
<rdar://problem/103420468>
Reviewed by Said Abou-Hallawa.
Port of Blink commit https://src.chromium.org/viewvc/blink?revision=167993&view=revision.
The Blink commit message is:
> Fix crash in SVGFontFaceElement::associatedFontElement crash when removing SVGFontFaceElement.
>
> (1) We need to remove its font-face rule from FontCache when removing SVGFontFaceElement,
>
> (2) We should not use old styles in RenderSVGInlineText::styleDidChange.
> Since styleRecalc is done in document-order, we cannot see any styles of next renderer
> (obtained by nextInPreOrder).
> The old styles might have old fonts which are created by SVGFontFaceElement.
* Source/WebCore/css/CSSFontFaceSet.cpp:
(WebCore::CSSFontFaceSet::remove):
* Source/WebCore/css/CSSFontFaceSet.h:
* Source/WebCore/css/CSSFontSelector.h:
* Source/WebCore/rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::styleDidChange):
* Source/WebCore/rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::subtreeStyleDidChange):
(WebCore::RenderSVGText::layout):
* Source/WebCore/rendering/svg/RenderSVGText.h:
* Source/WebCore/svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::removedFromAncestor):
Canonical link: https://commits.webkit.org/259548.279@safari-7615-branch
Commit: 93e397005fd8bdd613e02457f7b79423e9528742
https://github.com/WebKit/WebKit/commit/93e397005fd8bdd613e02457f7b79423e9528742
Author: Elliott Williams <emw at apple.com>
Date: 2023-02-24 (Fri, 24 Feb 2023)
Changed paths:
M Source/WebKit/UIProcess/API/Cocoa/WKErrorPrivate.h
M Source/WebKit/UIProcess/API/Cocoa/WKFrameInfoPrivate.h
M Source/WebKit/UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h
M Source/WebKit/UIProcess/API/Cocoa/WKNavigationActionPrivate.h
M Source/WebKit/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h
M Source/WebKit/UIProcess/API/Cocoa/WKPreferences.h
M Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h
M Source/WebKit/UIProcess/API/Cocoa/WKSecurityOriginPrivate.h
M Source/WebKit/UIProcess/API/Cocoa/WKSnapshotConfigurationPrivate.h
M Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h
M Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h
M Source/WebKit/UIProcess/API/Cocoa/WKUserContentControllerPrivate.h
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.h
M Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
M Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h
M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h
M Source/WebKit/UIProcess/API/Cocoa/_WKApplicationManifest.h
M Source/WebKit/UIProcess/API/Cocoa/_WKContextMenuElementInfo.h
M Source/WebKit/UIProcess/API/Cocoa/_WKFeature.h
M Source/WebKit/UIProcess/API/Cocoa/_WKInspectorWindow.h
M Source/WebKit/UIProcess/API/Cocoa/_WKNotificationData.h
M Source/WebKit/UIProcess/API/Cocoa/_WKUserContentExtensionStore.h
M Source/WebKit/UIProcess/API/Cocoa/_WKUserContentFilter.h
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtension.h
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContext.h
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionController.h
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionControllerConfiguration.h
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionControllerDelegate.h
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionControllerDelegatePrivate.h
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionMatchPattern.h
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionPermission.h
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionTab.h
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionWindow.h
M Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h
Log Message:
-----------
Revert "Cherry-pick 64e9b86994e7. rdar://problem/105765090"
This reverts commit 9ec1f869a67deb5accf7b21e271b1b78a64a3c63, which
was a build fix for main only. It would have added new symbols to
the release branch.
Cherry-pick 260627 at main (02e38c5d95a1). https://bugs.webkit.org/show_bug.cgi?id=252437
Update WebKit TBA versions for macOS 13.3 and iOS 16.4
https://bugs.webkit.org/show_bug.cgi?id=252437
rdar://104761823
Reviewed by Tim Horton.
Replace these TBAs with the OS versions they ship in.
* Source/WebKit/UIProcess/API/Cocoa/WKErrorPrivate.h:
* Source/WebKit/UIProcess/API/Cocoa/WKFrameInfoPrivate.h:
* Source/WebKit/UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h:
* Source/WebKit/UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
* Source/WebKit/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
* Source/WebKit/UIProcess/API/Cocoa/WKPreferences.h:
* Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* Source/WebKit/UIProcess/API/Cocoa/WKSecurityOriginPrivate.h:
* Source/WebKit/UIProcess/API/Cocoa/WKSnapshotConfigurationPrivate.h:
* Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h:
* Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* Source/WebKit/UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKApplicationManifest.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKContextMenuElementInfo.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKFeature.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKInspectorWindow.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKNotificationData.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKUserContentFilter.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtension.h:
(NS_ERROR_ENUM):
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContext.h:
(NS_ERROR_ENUM):
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionController.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionControllerConfiguration.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionControllerDelegate.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionControllerDelegatePrivate.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionMatchPattern.h:
(NS_ERROR_ENUM):
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionPermission.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionTab.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionWindow.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
Canonical link: https://commits.webkit.org/260627@main
Canonical link: https://commits.webkit.org/259548.280@safari-7615-branch
Commit: 4aa98f6050fe85ad4d3b1b942a628fab9bf93d4d
https://github.com/WebKit/WebKit/commit/4aa98f6050fe85ad4d3b1b942a628fab9bf93d4d
Author: Myles C. Maxfield <mmaxfield at apple.com>
Date: 2023-02-24 (Fri, 24 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
Log Message:
-----------
Cherry-pick 97c690d57e5e. rdar://problem/105258409
[Cocoa] Defer creating CTFonts a little longer for installed fonts
https://bugs.webkit.org/show_bug.cgi?id=252033
rdar://105258409
Reviewed by Cameron McCormack.
https://bugs.webkit.org/show_bug.cgi?id=247987 is about how we need to defer the
CTFontDescriptor -> CTFont transformation until as late as possible, to avoid
ping-ponging between fonts and descriptors. This patch takes one small step toward
that goal, by preserving the CTFontDescriptor slightly longer when we create
a CTFont for an installed font.
* Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::preparePlatformFont):
(WebCore::platformFontLookupWithFamily):
(WebCore::fontWithFamily):
Canonical link: https://commits.webkit.org/260140@main
Canonical link: https://commits.webkit.org/259548.282@safari-7615-branch
Commit: 4d63aa4e83b52a2da92478f93cdad2f3e2855324
https://github.com/WebKit/WebKit/commit/4d63aa4e83b52a2da92478f93cdad2f3e2855324
Author: Myles C. Maxfield <mmaxfield at apple.com>
Date: 2023-02-24 (Fri, 24 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
Log Message:
-----------
Cherry-pick bb80fff2246e. rdar://problem/105258615
[Cocoa] Stop working around a Core Text bug that has been fixed
https://bugs.webkit.org/show_bug.cgi?id=252034
rdar://105258615
Reviewed by Alan Baradlay.
A long time ago, if you set a variation axis to an out-of-range value with Core Text, bad things happened.
But now they get clamped as expected.
* Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::preparePlatformFont):
Canonical link: https://commits.webkit.org/260130@main
Canonical link: https://commits.webkit.org/259548.283@safari-7615-branch
Commit: e9637d08958e6b4fcb98b9d380d497aef5861a56
https://github.com/WebKit/WebKit/commit/e9637d08958e6b4fcb98b9d380d497aef5861a56
Author: Myles C. Maxfield <mmaxfield at apple.com>
Date: 2023-02-24 (Fri, 24 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
M Source/WebCore/platform/graphics/cocoa/FontDescriptionCocoa.cpp
Log Message:
-----------
Cherry-pick 99a9366c1abf. rdar://problem/105259235
[Cocoa] Defer creating CTFonts a little longer for "special case" fonts
https://bugs.webkit.org/show_bug.cgi?id=252035
rdar://105259235
Reviewed by Cameron McCormack.
https://bugs.webkit.org/show_bug.cgi?id=247987 is about how we need to defer the
CTFontDescriptor -> CTFont transformation until as late as possible, to avoid
ping-pinging between fonts and descriptors. This pach takes one small step toward
that goal, by preserving the CTFontDescriptor slightly longer when we create
a CTFont for our so-called "special case" fonts.
* Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::fontWithFamilySpecialCase):
(WebCore::fontWithFamily):
Canonical link: https://commits.webkit.org/260149@main
Canonical link: https://commits.webkit.org/259548.284@safari-7615-branch
Commit: bad19119e211fbaa6319b6af17620e4c83707d0a
https://github.com/WebKit/WebKit/commit/bad19119e211fbaa6319b6af17620e4c83707d0a
Author: Myles C. Maxfield <mmaxfield at apple.com>
Date: 2023-02-24 (Fri, 24 Feb 2023)
Changed paths:
M Source/WTF/wtf/PlatformHave.h
M Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
Log Message:
-----------
Cherry-pick 1facae010716. rdar://problem/105370115
[Cocoa] Delete HAVE(CORETEXT_AUTO_OPTICAL_SIZING) because it's available everywhere
https://bugs.webkit.org/show_bug.cgi?id=252140
<rdar://problem/105370115>
Reviewed by Cameron McCormack.
No need for the HAVE() macro.
* Source/WTF/wtf/PlatformHave.h:
* Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::preparePlatformFont):
Canonical link: https://commits.webkit.org/260174@main
Canonical link: https://commits.webkit.org/259548.285@safari-7615-branch
Commit: 970b684ea0d3595b579a047511b767ca8f9d1ede
https://github.com/WebKit/WebKit/commit/970b684ea0d3595b579a047511b767ca8f9d1ede
Author: Myles C. Maxfield <mmaxfield at apple.com>
Date: 2023-02-24 (Fri, 24 Feb 2023)
Changed paths:
M LayoutTests/css3/font-feature-settings-font-face-rendering-expected.html
M LayoutTests/css3/font-feature-settings-font-face-rendering.html
M LayoutTests/css3/font-feature-settings-rendering-expected.html
M LayoutTests/css3/font-feature-settings-rendering.html
M LayoutTests/css3/font-variant-all-expected.html
M LayoutTests/css3/font-variant-all.html
M Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
Log Message:
-----------
Cherry-pick fffd79dee910. rdar://problem/105377912
[Cocoa] Map OpenType features to AAT more faithfully
https://bugs.webkit.org/show_bug.cgi?id=252149
rdar://105377912
Reviewed by Alan Baradlay.
The CSS Fonts spec is written in terms of OpenType, and the mapping of those terms to AAT
is not always direct. Core Text is the source of truth for how to perform that mapping:
if someone writes a native app and applies an OpenType feature to an AAT font, Core Text
will do the right thing. (After all, the first "A" in "AAT" stands for "Apple"; the Core
Text team invented this stuff.)
In WebKit, we have some code to change around some of the mappings that Core Text uses,
but this is backwards; Core Text is the source of truth so we should be more faithful
to the mapping they use.
Font features are comprehensively tested by WPT, and this patch doesn't need to touch the
WPT checkout, because that repo already correctly affords a certain amount of flexibility
with these feature mappings. This patch only touches our local tests, which are over-
specific about the mapping.
* LayoutTests/css3/font-feature-settings-font-face-rendering-expected.html:
* LayoutTests/css3/font-feature-settings-font-face-rendering.html:
* LayoutTests/css3/font-feature-settings-rendering-expected.html:
* LayoutTests/css3/font-feature-settings-rendering.html:
* LayoutTests/css3/font-variant-all-expected.html:
* LayoutTests/css3/font-variant-all.html:
* Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::preparePlatformFont):
Canonical link: https://commits.webkit.org/260245@main
Canonical link: https://commits.webkit.org/259548.286@safari-7615-branch
Commit: d72fce3642b1984c8493f3d07dcf4296e1ae1365
https://github.com/WebKit/WebKit/commit/d72fce3642b1984c8493f3d07dcf4296e1ae1365
Author: Myles C. Maxfield <mmaxfield at apple.com>
Date: 2023-02-24 (Fri, 24 Feb 2023)
Changed paths:
M Source/WebCore/PlatformMac.cmake
M Source/WebCore/SourcesCocoa.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
A Source/WebCore/platform/graphics/cocoa/UnrealizedCoreTextFont.cpp
A Source/WebCore/platform/graphics/cocoa/UnrealizedCoreTextFont.h
M Source/WebCore/platform/mediarecorder/MediaRecorderPrivateMock.h
M Source/WebCore/platform/mediastream/mac/MediaStreamTrackAudioSourceProviderCocoa.h
Log Message:
-----------
Cherry-pick 7dff0d1ab2dd. rdar://problem/105378692
[Cocoa] Add UnrealizedCoreTextFont to make it easier to make CTFontDescriptor and CTFont transformations more deliberate
https://bugs.webkit.org/show_bug.cgi?id=252150
rdar://105378692
Reviewed by Alan Baradlay.
The solution to https://bugs.webkit.org/show_bug.cgi?id=247987 requires having explicit locations where we transform
a CTFontDescriptor into a CTFont.
Today, we ping-pong back and forth between CTFontDescriptors and CTFonts without much thought. Not only that, but we
also ping-pong between CTFontDescriptors and modified CTFontDescriptors sometimes too.
At the beginning of a font's lifetime (at the point it's looked up by WebKit), it usually begins life as a CTFontDescriptor.
(There is an exception where we fall off the end of the font-family list and ask the platform for _some_ font that supports
the character at hand; the result of that is a CTFont rather than a CTFontDescriptor.) This CTFontDescriptor (or CTFont)
needs to have a bunch of transformations applied to it before we can use it in web content: We need to set up the user-
installed-fonts state, the font features and font variations, the palettes, etc. Instead of handling each one of these
individually, by either modifying a CTFontDescriptor or modifying a CTFont, we should try to be more deliberate about when
the transformations take place, and to batch up all modifications so we can do all the modifications in one go.
This patch is the first step in a design where:
- UnrealizedCoreTextFont is a new class that holds either a CTFont or a CTFontDescriptor, and a CFMutableDictionary of
modifications to be made to it.
- It has a modify() function that takes a lambda that can modify the CFMutableDictionary. Because these modifications
never even hit Core Text, they are extremely lightweight.
- There's a modifyFromContext() which conceptually is like modify(), but is intended to take the place of what
preparePlatformFont() does now. It's intentionally unimplemented for now; a future patch will migrate code to it.
- Once WebCore is done modifying the CFMutableDictionary, there's a realize() function, which produces the final CTFont which
WebCore can directly use.
* Source/WebCore/PlatformMac.cmake:
* Source/WebCore/SourcesCocoa.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/graphics/cocoa/UnrealizedCoreTextFont.cpp: Added.
(WebCore::getCGFloatValue):
(WebCore::UnrealizedCoreTextFont::getSize const):
(WebCore::UnrealizedCoreTextFont::realize const):
(WebCore::UnrealizedCoreTextFont::operator bool const):
(WebCore::modifyFromContext):
(WebCore::UnrealizedCoreTextFont::modifyFromContext):
* Source/WebCore/platform/graphics/cocoa/UnrealizedCoreTextFont.h: Added.
(WebCore::UnrealizedCoreTextFont::UnrealizedCoreTextFont):
(WebCore::UnrealizedCoreTextFont::modify):
(WebCore::UnrealizedCoreTextFont::setSize):
* Source/WebCore/platform/mediarecorder/MediaRecorderPrivateMock.h:
* Source/WebCore/platform/mediastream/mac/MediaStreamTrackAudioSourceProviderCocoa.h:
Canonical link: https://commits.webkit.org/260208@main
Canonical link: https://commits.webkit.org/259548.287@safari-7615-branch
Commit: c3b30f5bbac712f4e41c29edfe069120e940798a
https://github.com/WebKit/WebKit/commit/c3b30f5bbac712f4e41c29edfe069120e940798a
Author: Myles C. Maxfield <mmaxfield at apple.com>
Date: 2023-02-24 (Fri, 24 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
M Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h
M Source/WebCore/platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp
M Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp
Log Message:
-----------
Cherry-pick 3563129ef78f. rdar://problem/105428870
[WebGPU] Hook up UnrealizedCoreTextFont to callers
https://bugs.webkit.org/show_bug.cgi?id=252221
Reviewed by Cameron McCormack.
The solution to https://bugs.webkit.org/show_bug.cgi?id=247987 requires having explicit locations where we transform
a CTFontDescriptor into a CTFont. UnrealizedCoreTextFont is the critical object in a design which enforces this: It
holds the original CTFontDescriptor/CTFont which Core Text gave us originally, plus a CFMutableDictionary of
modifications to be made to it. Updating the modifications never hits Core Text, and are as such very lightweight.
Once we're done setting the modifications, there's a "commit" step where we finally make the final CTFont. This
means that we avoid ping-ponging between CTFontDescriptors and CTFonts unnecessarily.
Eventually, preparePlatformFont() will be integrated into this object, but that's too big for a single patch. This
patch just hooks up callers of preparePlatformFont() to use this object, which will temporarily be resolved to a
CTFont just before calling preparePlatformFont. The next few patches will be updating preparePlatformFont() to be
able to represent it as a pure modification to the UnrealizedCoreTextFont.
* Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::preparePlatformFont):
(WebCore::fontDescriptorWithFamilySpecialCase):
(WebCore::fontWithFamily):
(WebCore::FontCache::systemFallbackForCharacters):
* Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h:
* Source/WebCore/platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:
(WebCore::FontFamilySpecificationCoreText::fontRanges const):
* Source/WebCore/platform/graphics/mac/FontCustomPlatformDataMac.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
Canonical link: https://commits.webkit.org/260241@main
Canonical link: https://commits.webkit.org/259548.288@safari-7615-branch
Commit: eeb3f324223909d29b86336a4826a0bc89683770
https://github.com/WebKit/WebKit/commit/eeb3f324223909d29b86336a4826a0bc89683770
Author: Myles C. Maxfield <mmaxfield at apple.com>
Date: 2023-02-24 (Fri, 24 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
Log Message:
-----------
Cherry-pick b323e68196e9. rdar://problem/105438464
[Cocoa] Inline an unnecessary one-line lambda within preparePlatformFont()
https://bugs.webkit.org/show_bug.cgi?id=252231
rdar://105438464
Reviewed by Tim Nguyen.
There's no reason for it to exist.
* Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::preparePlatformFont):
Canonical link: https://commits.webkit.org/260248@main
Canonical link: https://commits.webkit.org/259548.289@safari-7615-branch
Commit: f9a5d91fd198b56d03baa8744ab2774af739e865
https://github.com/WebKit/WebKit/commit/f9a5d91fd198b56d03baa8744ab2774af739e865
Author: Myles C. Maxfield <mmaxfield at apple.com>
Date: 2023-02-24 (Fri, 24 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
M Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h
M Source/WebCore/platform/graphics/cocoa/UnrealizedCoreTextFont.cpp
M Source/WebCore/platform/graphics/cocoa/UnrealizedCoreTextFont.h
Log Message:
-----------
Cherry-pick 999e6580a40d. rdar://problem/105439787
[Cocoa] Replace bool parameter to preparePlatformFont() with a 2-state enum
https://bugs.webkit.org/show_bug.cgi?id=252232
rdar://105439787
Reviewed by Tim Nguyen.
WebKit style prefers 2-state enums for parameters instead of bools.
* Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::preparePlatformFont):
(WebCore::fontWithFamily):
* Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h:
Canonical link: https://commits.webkit.org/260250@main
Canonical link: https://commits.webkit.org/259548.290@safari-7615-branch
Commit: 5f8c9c73e959b6da041bf53ada66ab6a6a71d490
https://github.com/WebKit/WebKit/commit/5f8c9c73e959b6da041bf53ada66ab6a6a71d490
Author: Myles C. Maxfield <mmaxfield at apple.com>
Date: 2023-02-24 (Fri, 24 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
M Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h
M Source/WebCore/platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp
Log Message:
-----------
Cherry-pick ad421fc347f6. rdar://problem/105442047
[Cocoa] We're unnecessarily asking the system whether fonts we created are the system font or not
https://bugs.webkit.org/show_bug.cgi?id=252235
rdar://105442047
Reviewed by Alan Baradlay.
We create the fonts in the first place, so we already know whether or not they are
the system font or not. We should just remember the kind of font we created, rather
than having to call into Core Text for them to tell us.
* Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::preparePlatformFont):
(WebCore::fontDescriptorWithFamilySpecialCase):
(WebCore::fontWithFamily):
* Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h:
* Source/WebCore/platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:
(WebCore::FontFamilySpecificationCoreText::fontRanges const):
Canonical link: https://commits.webkit.org/260289@main
Canonical link: https://commits.webkit.org/259548.291@safari-7615-branch
Commit: 531c3f740bc2fdb159401e6f02b008366022cd2b
https://github.com/WebKit/WebKit/commit/531c3f740bc2fdb159401e6f02b008366022cd2b
Author: Bri Harris <bharris9 at apple.com>
Date: 2023-02-24 (Fri, 24 Feb 2023)
Changed paths:
M LayoutTests/platform/mac-wk1/TestExpectations
Log Message:
-----------
Cherry-pick f5437fdf2683. rdar://problem/105472048
[ macOS WK1 ] editing/mac/attributed-string/font-style-variant-effect.html is a constant failure.
https://bugs.webkit.org/show_bug.cgi?id=252273
rdar://105472048
Unreviewed test gardening.
Setting expectations for failing test.
* LayoutTests/platform/mac-wk1/TestExpectations:
Canonical link: https://commits.webkit.org/260284@main
Canonical link: https://commits.webkit.org/259548.292@safari-7615-branch
Commit: c4a4726e497863b0a3362939cf66ce8082f4f735
https://github.com/WebKit/WebKit/commit/c4a4726e497863b0a3362939cf66ce8082f4f735
Author: Myles C. Maxfield <mmaxfield at apple.com>
Date: 2023-02-24 (Fri, 24 Feb 2023)
Changed paths:
M LayoutTests/platform/mac-wk1/TestExpectations
M LayoutTests/platform/mac-wk1/editing/mac/attributed-string/font-style-variant-effect-expected.txt
Log Message:
-----------
Cherry-pick 0e5a3f28aeb2. rdar://problem/105472048
[ macOS WK1 ] editing/mac/attributed-string/font-style-variant-effect.html is a constant failure.
https://bugs.webkit.org/show_bug.cgi?id=252273
rdar://105472048
Unreviewed test gardening.
* LayoutTests/platform/mac-wk1/TestExpectations
* LayoutTests/platform/mac-wk1/editing/mac/attributed-string/font-style-variant-effect-expected.txt:
Canonical link: https://commits.webkit.org/260295@main
Canonical link: https://commits.webkit.org/259548.293@safari-7615-branch
Commit: ea46b4c3957ddc530409c1ea0aca1445c6addffd
https://github.com/WebKit/WebKit/commit/ea46b4c3957ddc530409c1ea0aca1445c6addffd
Author: Myles C. Maxfield <mmaxfield at apple.com>
Date: 2023-02-24 (Fri, 24 Feb 2023)
Changed paths:
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
M Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h
M Source/WebCore/platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp
A Source/WebCore/platform/graphics/cocoa/FontInterrogation.h
A Source/WebCore/platform/graphics/cocoa/FontMetricsNormalization.h
M Source/WebCore/platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp
M Source/WebCore/platform/graphics/cocoa/UnrealizedCoreTextFont.cpp
M Source/WebCore/platform/graphics/cocoa/UnrealizedCoreTextFont.h
Log Message:
-----------
Cherry-pick 78f657ca44f6. rdar://problem/102432138
Regression: "font-optical-sizing: auto" has no effect in Safari 16 on macOS Ventura & iOS 16
https://bugs.webkit.org/show_bug.cgi?id=247987
rdar://102432138
Reviewed by Alan Baradlay.
This patch hooks up the newly-created UnrealizedCoreTextFont to the logic that was formerly
in preparePlatformFont(). The purpose of UnrealizedCoreTextFont is so that we can make all
the font modifications we want without actually hitting Core Text; once we're done making
modifications there's a final "commit" step that finally ends up making a font.
Most of the reason for this is for preparePlatformFont(): its job used to be to take a font
as input, modify it, and produce a new font, but now with this patch its functionality is
represented as a set of modifications just on a dictionary of attributes inside the
UnrealizedCoreTextFont. This means we create no temporary fonts, and also means we are going
fast enough that we can enable optical sizing on every font - because doing so is just an
attribute in a dictionary, rather than creating a whole new CTFont. That is the fix for this
bug: enabling optical sizing on all fonts. All the previous patches in this series of
patches I've been writing were just to set up UnrealizedCoreTextFont so that we could make
enabling optical sizing fast enough to do unconditionally, and to not create temporary font
objects when doing so.
There is one caveat to this: Without inspecting a CTFont, we can't know whether a font is
an OpenType or a TrueType font, and we need to know that in order to set the appropriate
values for the 'wght', 'wdth', 'slnt', and 'ital' variation axes. This patch works around
that by exploiting the fact that the vast majority of fonts out there are A) not variable
fonts, and B) are OpenType fonts, so its actually beneficial to just assume the font is an
OpenType font and set it up accordingly, and then check after we've created it whether our
guess was right. If our guess wasn't right, we can just fix up the font object we've just
created, rather than creating a whole new one from scratch.
I originally wrote 2 tests, and the he test font Newsreader was downloaded from
https://fonts.google.com/specimen/Newsreader/about?preview.size=35&preview.layout=row&category=Serif&vfonly=true
and is licensed with the Open Font License, which means we can use it in layout tests. We
have to keep it and all its files unmodified, which is why there are so many extra font
files - those just come with the one font file we actually want to test this. However,
because we have to check in the entire release unmodified, that would add megabytes to the
WebKit repo forever, we've decided to check in this patch without a test and then I'll
asynchronously write a test that can use a smaller font.
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::preparePlatformFont):
(WebCore::variationCapabilitiesForFontDescriptor):
(WebCore::appendOpenTypeFeature): Deleted.
(WebCore::normalizeGXWeight): Deleted.
(WebCore::normalizeCTWeight): Deleted.
(WebCore::normalizeSlope): Deleted.
(WebCore::denormalizeGXWeight): Deleted.
(WebCore::denormalizeCTWeight): Deleted.
(WebCore::denormalizeSlope): Deleted.
(WebCore::denormalizeVariationWidth): Deleted.
(WebCore::normalizeVariationWidth): Deleted.
(WebCore::FontType::FontType): Deleted.
(WebCore::addLightPalette): Deleted.
(WebCore::addDarkPalette): Deleted.
(WebCore::addAttributesForCustomFontPalettes): Deleted.
(WebCore::addAttributesForFontPalettes): Deleted.
* Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h:
* Source/WebCore/platform/graphics/cocoa/FontInterrogation.h: Added.
(WebCore::FontInterrogation::FontInterrogation):
* Source/WebCore/platform/graphics/cocoa/FontMetricsNormalization.h: Added.
(WebCore::normalizeGXWeight):
(WebCore::normalizeCTWeight):
(WebCore::normalizeSlope):
(WebCore::denormalizeGXWeight):
(WebCore::denormalizeCTWeight):
(WebCore::denormalizeSlope):
(WebCore::denormalizeVariationWidth):
(WebCore::normalizeVariationWidth):
* Source/WebCore/platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:
* Source/WebCore/platform/graphics/cocoa/UnrealizedCoreTextFont.cpp:
(WebCore::appendOpenTypeFeature):
(WebCore::addLightPalette):
(WebCore::addDarkPalette):
(WebCore::addAttributesForCustomFontPalettes):
(WebCore::addAttributesForFontPalettes):
(WebCore::applyFeatures):
(WebCore::applyVariations):
(WebCore::modifyFromContext):
(WebCore::UnrealizedCoreTextFont::modifyFromContext):
(WebCore::UnrealizedCoreTextFont::realize const):
* Source/WebCore/platform/graphics/cocoa/UnrealizedCoreTextFont.h:
Canonical link: https://commits.webkit.org/260447@main
Canonical link: https://commits.webkit.org/259548.294@safari-7615-branch
Commit: 3e295cf38bde7cb21001b73233f8347ec9526e6d
https://github.com/WebKit/WebKit/commit/3e295cf38bde7cb21001b73233f8347ec9526e6d
Author: Russell Epstein <repstein at apple.com>
Date: 2023-02-24 (Fri, 24 Feb 2023)
Changed paths:
M Source/WebCore/loader/DocumentLoader.cpp
M Source/WebCore/loader/DocumentLoader.h
M Source/WebCore/workers/service/ServiceWorkerRegistrationData.h
Log Message:
-----------
Cherry-pick 259977 at main (f0228a3f07df). rdar://problem/105074302
DocumentLoader should use std::unique_ptr<ServiceWorkerRegistrationData> rather than std::optional<>
https://bugs.webkit.org/show_bug.cgi?id=251772
rdar://problem/105074302
Reviewed by Chris Dumez.
Reduce memory consumption by storing service worker data in DocumentLoader as a separate pointer.
Covered by existing tests.
* Source/WebCore/loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::setControllingServiceWorkerRegistration):
(WebCore::DocumentLoader::responseReceived):
(WebCore::DocumentLoader::startLoadingMainResource):
* Source/WebCore/loader/DocumentLoader.h:
* Source/WebCore/workers/service/ServiceWorkerRegistrationData.h:
Canonical link: https://commits.webkit.org/259977@main
Canonical link: https://commits.webkit.org/259548.294@safari-7615-branch
Commit: d553e25fb026c1b6e6b926ababba312ccc3ed1b5
https://github.com/WebKit/WebKit/commit/d553e25fb026c1b6e6b926ababba312ccc3ed1b5
Author: Myah Cobbs <mcobbs at apple.com>
Date: 2023-02-27 (Mon, 27 Feb 2023)
Changed paths:
M Configurations/Version.xcconfig
Log Message:
-----------
Versioning.
WebKit-7615.1.26
Canonical link: https://commits.webkit.org/259548.296@safari-7615-branch
Commit: 3e8213ae52d6f768eb2f773be15af75ef3422140
https://github.com/WebKit/WebKit/commit/3e8213ae52d6f768eb2f773be15af75ef3422140
Author: Jean-Yves Avenard <jya at apple.com>
Date: 2023-02-27 (Mon, 27 Feb 2023)
Changed paths:
M Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp
M Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
Log Message:
-----------
Cherry-pick 53ce8c35db43. rdar://problem/103823114
Ensure WebFullScreenManager is removed as EventListener when page closes
https://bugs.webkit.org/show_bug.cgi?id=251566
rdar://103823114
Reviewed by Youenn Fablet.
When the page close, break the cycles with WebFullScreenManager and ensure
WebFullScreenManager is no longer registered as event listener.
* Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::~WebFullScreenManager):
(WebKit::WebFullScreenManager::invalidate):
(WebKit::WebFullScreenManager::element):
* Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::close):
Canonical link: https://commits.webkit.org/259855@main
Canonical link: https://commits.webkit.org/259548.296@safari-7615-branch
Commit: e5daff9a2eea244bb465a9662ef51f5744c87077
https://github.com/WebKit/WebKit/commit/e5daff9a2eea244bb465a9662ef51f5744c87077
Author: Arunsundar Kannan <arunsundar_kannan at apple.com>
Date: 2023-02-27 (Mon, 27 Feb 2023)
Changed paths:
A LayoutTests/fast/html/parent-less-source-crash-type-change-expected.txt
A LayoutTests/fast/html/parent-less-source-crash-type-change.html
M Source/WebCore/html/HTMLSourceElement.cpp
Log Message:
-----------
Cherry-pick 0ba2b3fa758f. rdar://problem/104819364
Attribute change results in assertion failure checking for parent node for a parent less element.
https://bugs.webkit.org/show_bug.cgi?id=251888
rdar://104819364
Reviewed by Ryosuke Niwa.
This change sets 'm_shouldCallSourcesChanged' to false after the parentNode is disassociated from the Node in question. This will avoid the call that leads to the crash.
* LayoutTests/fast/html/parent-less-source-crash-type-change-expected.txt: Added.
* LayoutTests/fast/html/parent-less-source-crash-type-change.html: Added.
* Source/WebCore/dom/ContainerNodeAlgorithms.cpp:
(WebCore::removeDetachedChildrenInContainer):
* Source/WebCore/html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::setShouldCallSourcesChanged):
* Source/WebCore/html/HTMLSourceElement.h:
Canonical link: https://commits.webkit.org/260072@main
Canonical link: https://commits.webkit.org/259548.297@safari-7615-branch
Commit: b341acca62bf97f9d03203d2486508e060295865
https://github.com/WebKit/WebKit/commit/b341acca62bf97f9d03203d2486508e060295865
Author: Chirag M Shah <chirag_m_shah at apple.com>
Date: 2023-02-27 (Mon, 27 Feb 2023)
Changed paths:
A LayoutTests/fast/history/add-file-with-invalid-utf8-crash-expected.txt
A LayoutTests/fast/history/add-file-with-invalid-utf8-crash.html
M Source/WebKit/UIProcess/WebProcessProxy.cpp
Log Message:
-----------
Cherry-pick 9605dc730f98. rdar://problem/99575855
Check for fileSystemPath being non-null when adding to set
https://bugs.webkit.org/show_bug.cgi?id=252341
rdar://99575855
Reviewed by Chris Dumez.
This change fixes the crash in the UI process when the fileSystemPath is
not a valid UTF-8.
* LayoutTests/fast/history/add-file-with-invalid-utf8-crash-expected.txt: Added.
* LayoutTests/fast/history/add-file-with-invalid-utf8-crash.html: Added.
* Source/WebKit/UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addPreviouslyApprovedFileURL):
(WebKit::WebProcessProxy::wasPreviouslyApprovedFileURL const):
Canonical link: https://commits.webkit.org/260351@main
Canonical link: https://commits.webkit.org/259548.298@safari-7615-branch
Commit: e31cb4648767a1c5b4ec05a81a9a0d2f20d56117
https://github.com/WebKit/WebKit/commit/e31cb4648767a1c5b4ec05a81a9a0d2f20d56117
Author: Alex Christensen <achristensen at webkit.org>
Date: 2023-02-27 (Mon, 27 Feb 2023)
Changed paths:
M Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm
Log Message:
-----------
Cherry-pick 44c8e8efbec8. rdar://problem/105728219
Keep CString around until after it's used in DestinationClickFraudPrevention API test
https://bugs.webkit.org/show_bug.cgi?id=252705
rdar://105728219
Reviewed by Chris Dumez and Wenson Hsieh.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:
(TestWebKitAPI::triggerAttributionWithSubresourceRedirect):
Canonical link: https://commits.webkit.org/260646@main
Canonical link: https://commits.webkit.org/259548.299@safari-7615-branch
Commit: 360b6ba773b17cd6a5c3d7111744aeeda3a7f295
https://github.com/WebKit/WebKit/commit/360b6ba773b17cd6a5c3d7111744aeeda3a7f295
Author: Alex Christensen <achristensen at webkit.org>
Date: 2023-02-27 (Mon, 27 Feb 2023)
Changed paths:
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm
Log Message:
-----------
Cherry-pick 623410d6e0d7. rdar://problem/105685416
Use strnstr instead of strstr in WKWebsiteDataStore.ClearCustomDataStoreNoWebViews API test
https://bugs.webkit.org/show_bug.cgi?id=252710
rdar://105685416
Reviewed by Chris Dumez.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm:
(TestWebKitAPI::TEST):
Canonical link: https://commits.webkit.org/260648@main
Canonical link: https://commits.webkit.org/259548.300@safari-7615-branch
Commit: 7a1408693327d15e420ebba0fe259425b26370f0
https://github.com/WebKit/WebKit/commit/7a1408693327d15e420ebba0fe259425b26370f0
Author: Cameron McCormack <heycam at apple.com>
Date: 2023-02-27 (Mon, 27 Feb 2023)
Changed paths:
M Source/WebCore/css/parser/CSSPropertyParserWorkerSafe.cpp
Log Message:
-----------
Cherry-pick 7995dcceaf86. rdar://problem/105801659
Produce 8 bit @font-face URL strings when possible
https://bugs.webkit.org/show_bug.cgi?id=252781
<rdar://problem/105801659>
Reviewed by Simon Fraser.
We can end up wasting memory storing @font-face URLs (which can be large data:
URLs) as 16 bit strings, if they appear in style sheet text stored as a 16 bit
string, even when the URL itself is 8 bit only.
This uses isAllASCII(), when really we could be checking for "is all
Latin-1", but there's an existing fast path for ASCII-checking.
* Source/WebCore/css/parser/CSSPropertyParserWorkerSafe.cpp:
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontFaceSrcURI):
Canonical link: https://commits.webkit.org/260716@main
Canonical link: https://commits.webkit.org/259548.301@safari-7615-branch
Commit: 1825fd3e178e7a8cc3fd5ad0ca9801ee301b2f36
https://github.com/WebKit/WebKit/commit/1825fd3e178e7a8cc3fd5ad0ca9801ee301b2f36
Author: Chris Dumez <cdumez at apple.com>
Date: 2023-02-27 (Mon, 27 Feb 2023)
Changed paths:
M Source/WebKit/UIProcess/WebProcessPool.cpp
Log Message:
-----------
Cherry-pick 9e54e083d6c2. rdar://problem/105375981
WebProcessPool::processForNavigation() should prevent the process from getting shut down while waiting for AddAllowedFirstPartyForCookies IPC reply
https://bugs.webkit.org/show_bug.cgi?id=252843
rdar://105375981
Reviewed by Alex Christensen.
ebProcessPool::processForNavigation() should prevent the process from getting
shut down (or added to the process cache) while waiting for
AddAllowedFirstPartyForCookies IPC reply.
We recently fixed the lambda in WebPageProxy::triggerBrowsingContextGroupSwitchForNavigation()
but failed to fix this one.
* Source/WebKit/UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForNavigation):
Canonical link: https://commits.webkit.org/260754@main
Canonical link: https://commits.webkit.org/259548.302@safari-7615-branch
Commit: 8c8e0554d30bcd315e7015cc4a130dc4c7d3fab4
https://github.com/WebKit/WebKit/commit/8c8e0554d30bcd315e7015cc4a130dc4c7d3fab4
Author: Myles C. Maxfield <mmaxfield at apple.com>
Date: 2023-02-27 (Mon, 27 Feb 2023)
Changed paths:
M Source/WTF/wtf/PlatformUse.h
M Source/WebCore/platform/graphics/cocoa/UnrealizedCoreTextFont.cpp
M Source/WebCore/platform/graphics/cocoa/UnrealizedCoreTextFont.h
Log Message:
-----------
Cherry-pick b2e8181dbd75. rdar://problem/105662167
[Cocoa] font-optical-sizing:auto doesn't set the opsz variation axis for all fonts that need it
https://bugs.webkit.org/show_bug.cgi?id=252552
rdar://105662167
Reviewed by Alan Baradlay.
This is a follow-up from 260447 at main. That previous patch went almost all the way toward fixing the
problem, but couldn't actually apply optical sizing to all text that requested it. The reason for
this is that the trigger we were using to enable optical sizing, `kCTFontOpticalSizeAttribute`,
enables the `opsz` variation axis, but also enables the `trak` table. Unfortunately, we have a lot
of tests which use fonts that don't support the optical sizing variation axis, but do have a `trak`
table. So, if we just naively started enabling `kCTFontOpticalSizeAttribute` for all text that
requests it, we'll get tons of test failures. It's not really great if we make tons of text on the
web look different, without it being a deliberate decision. So, the previous patch stopped just
short of enabling `kCTFontOpticalSizeAttribute` everywhere.
However, all fonts which *do* support the `opsz` variation axis should have it set automatically,
which is what 260447 at main was aiming to address. We have the ability to *just* set the variation
axis without also setting `trak`, so that's what we need to do for fonts that request optical
sizing but for which we can't use `kCTFontOpticalSizeAttribute` because of compatibility.
So, we need 3 buckets:
- Disable optical sizing. This is triggered by font-optical-sizing:none. This maps to telling Core
Text to use `kCTFontOpticalSizeAttribute`: `none`.
- Enable full optical sizing, including `trak`. This is triggered by
text-rendering:optimizeLegibility. This maps to telling Core Text to use
`kCTFontOpticalSizeAttribute`: `auto`.
- Enable optical sizing, but just the `opsz` variation, and not `trak`, for compatibility. This
is what all situations not captured by the above use. This maps to telling Core Text to use
`kCTFontVariationAttribute`: {`opsz`: font size}.
This patch implements the third bucket, which wasn't implemented in the previous patch. The third
bucket doesn't actually work correctly on older OSes, so it's guarded behind a OS version check.
https://bugs.webkit.org/show_bug.cgi?id=252592 is about deleting the compatibility third bucket in
favor of the second bucket: actually enabling `trak` for all text that should have optical sizing
enabled.
Just like 260447 at main, the tests for this adds a megabyte of fonts (because we have to keep the
whole release of an OFL font together) so I'm not including the test with this PR, and will upload
another PR later with a custom font that I create from scratch for testing this.
* Source/WTF/wtf/PlatformUse.h:
* Source/WebCore/platform/graphics/cocoa/UnrealizedCoreTextFont.cpp:
(WebCore::UnrealizedCoreTextFont::addAttributesForOpticalSizing):
(WebCore::UnrealizedCoreTextFont::applyVariations):
(WebCore::UnrealizedCoreTextFont::modifyFromContext):
(WebCore::UnrealizedCoreTextFont::realize const):
(WebCore::applyVariations): Deleted.
(WebCore::modifyFromContext): Deleted.
* Source/WebCore/platform/graphics/cocoa/UnrealizedCoreTextFont.h:
Canonical link: https://commits.webkit.org/260781@main
Canonical link: https://commits.webkit.org/259548.303@safari-7615-branch
Commit: 54a0be35f500b3c5c8729ae3138dd40ebd9945da
https://github.com/WebKit/WebKit/commit/54a0be35f500b3c5c8729ae3138dd40ebd9945da
Author: Myles C. Maxfield <mmaxfield at apple.com>
Date: 2023-02-27 (Mon, 27 Feb 2023)
Changed paths:
M Tools/TestWebKitAPI/Tests/mac/FontManagerTests.mm
Log Message:
-----------
Cherry-pick 7f06b13867ff. rdar://problem/105893191
REGRESSION (260447 at main): [Monterey+] TestWebKitAPI.FontManagerTests.ChangeFontWithPanel is consistently failing
https://bugs.webkit.org/show_bug.cgi?id=252922
rdar://105893191
Unreviewed test gardening.
* Tools/TestWebKitAPI/Tests/mac/FontManagerTests.mm:
(TestWebKitAPI::TEST):
Canonical link: https://commits.webkit.org/260826@main
Canonical link: https://commits.webkit.org/259548.304@safari-7615-branch
Commit: 55109fabd2a376572efd99f8f4bacf62be57367b
https://github.com/WebKit/WebKit/commit/55109fabd2a376572efd99f8f4bacf62be57367b
Author: Chris Dumez <cdumez at apple.com>
Date: 2023-02-27 (Mon, 27 Feb 2023)
Changed paths:
M Source/WebCore/platform/mac/PowerObserverMac.cpp
M Source/WebCore/platform/mac/PowerObserverMac.h
Log Message:
-----------
Cherry-pick 624d3538fd22. rdar://problem/90891509
Crash under PowerObserver::didReceiveSystemPowerNotification()
https://bugs.webkit.org/show_bug.cgi?id=252940
rdar://90891509
Reviewed by David Kilzer.
Make sure `this` is still alive when we execute the block on the main thread,
before running m_powerOnHander.
* Source/WebCore/platform/mac/PowerObserverMac.cpp:
(WebCore::PowerObserver::didReceiveSystemPowerNotification):
* Source/WebCore/platform/mac/PowerObserverMac.h:
Canonical link: https://commits.webkit.org/260835@main
Canonical link: https://commits.webkit.org/259548.305@safari-7615-branch
Commit: bb40c5bfa024a370f56201540667d32b75f32c0f
https://github.com/WebKit/WebKit/commit/bb40c5bfa024a370f56201540667d32b75f32c0f
Author: Charlie Wolfe <charliew at apple.com>
Date: 2023-02-27 (Mon, 27 Feb 2023)
Changed paths:
A LayoutTests/http/tests/navigation/cross-origin-iframe-location-hash-reexecute-onload-expected.txt
A LayoutTests/http/tests/navigation/cross-origin-iframe-location-hash-reexecute-onload.html
A LayoutTests/http/tests/navigation/resources/change-location-hash-onload.html
M Source/WebCore/loader/FrameLoader.cpp
Log Message:
-----------
Cherry-pick e9dd88dee673. rdar://problem/105158419
window.onload is repeatedly re-executed when changing URL fragment during onload
https://bugs.webkit.org/show_bug.cgi?id=252931
rdar://105158419
Reviewed by Chris Dumez.
When a cross-origin iframe changes its fragment identifier while its load event is being processed,
we end up in a state where we will continually re-fire window.onload. We should fix this by only
firing the load event on the frame's owner element. This still addresses the concern the original
change fixed (259384 at main), but without needing to always re-fire the window load event.
* LayoutTests/http/tests/navigation/cross-origin-iframe-location-hash-reexecute-onload-expected.txt: Added.
* LayoutTests/http/tests/navigation/cross-origin-iframe-location-hash-reexecute-onload.html: Added.
* LayoutTests/http/tests/navigation/resources/change-location-hash-onload.html: Added.
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadInSameDocument):
Canonical link: https://commits.webkit.org/260860@main
Canonical link: https://commits.webkit.org/259548.306@safari-7615-branch
Commit: c40fa6ccbd63bdca6c607ddc7656765bcc56d330
https://github.com/WebKit/WebKit/commit/c40fa6ccbd63bdca6c607ddc7656765bcc56d330
Author: Myles C. Maxfield <mmaxfield at apple.com>
Date: 2023-02-27 (Mon, 27 Feb 2023)
Changed paths:
M Source/WebCore/editing/cocoa/FontAttributeChangesCocoa.mm
M Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
M Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h
Log Message:
-----------
Cherry-pick 3f1cb9750c4d. rdar://problem/105891055
REGRESSION (260781 at main): [iOS] TestWebKitAPI.FontAttributes.FontTextStyle is consistently failing
https://bugs.webkit.org/show_bug.cgi?id=252916
rdar://105891055
Reviewed by Wenson Hsieh.
This was caused by the logic in FontChanges::platformFontFamilyNameForCSS(). When a font
change occurs, the FontChanges object represents it with 2 fields: m_fontName and m_fontFamily.
The purpose of FontChanges::platformFontFamilyNameForCSS() is to determine what value should be
supplied to the font-family CSS property, to represent the change.
The logic in that function is: Prefer using m_fontFamily, but only if round-tripping the font
family through our font selection logic would end up creating the same font that's specified by
m_fontName. In the previous sentence, the phrase "the same font" is implemented by comparing
PostScript name. If round-tripping the font creates a different font than m_fontName, use
m_fontName directly.
However, when the font changes to a text style font, m_fontName is ".SFUI-Regular" and
m_fontFamily is "UICTFontTextStyleTitle1". FontChanges::platformFontFamilyNameForCSS() was
finding that round-tripping the family through our font selection code was no longer producing
a font with the exact same postscript name as ".SFUI-Regular", and was therefore implementing
the font change by specifying "font-family: .SFUI-Regular" instead of
"font-family: UICTFontTextStyleTitle1". Ever since 240717 at main, dot-prefixed fonts intentionally
don't work in WebKit, so "font-family: .SFUI-Regular" was causing the test to fail.
Our round-tripping code wasn't producing a font with the exact same name as ".SFUI-Regular"
because it was instead producing a font with the name ".SFUI-Regular_wdth_opsz_GRAD_wght1F40000".
This font name _means_ the same thing as the original, but it's a synthesized name that Core Text
created. Eventually, we should migrate this check to be more robust.
However, a more straightforward solution is to just react to the fact that dot-prefixed fonts
intentionally don't work in WebKit, and therefore FontChanges::platformFontFamilyNameForCSS()
should just not return a dot-prefixed font name. This is more defensive than changing the font
equality check, and it's also easier to implement. If there are behavior changes in content,
those behavior changes would be to make more fonts work as requested.
* Source/WebCore/editing/cocoa/FontAttributeChangesCocoa.mm:
(WebCore::FontChanges::platformFontFamilyNameForCSS const):
* Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::fontNameIsSystemFont):
* Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h:
Canonical link: https://commits.webkit.org/260866@main
Canonical link: https://commits.webkit.org/259548.307@safari-7615-branch
Commit: 9cd406ca0d7c3e22a6d32bf70dcd3adb614613e5
https://github.com/WebKit/WebKit/commit/9cd406ca0d7c3e22a6d32bf70dcd3adb614613e5
Author: Richard Robinson <richard_robinson2 at apple.com>
Date: 2023-02-27 (Mon, 27 Feb 2023)
Changed paths:
M Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h
M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Log Message:
-----------
Cherry-pick 887ab6d07a27. rdar://problem/104329203
REGRESSION: sreality.cz: pinch zooming on maps causes tab to enter Tab Overview instead of interacting with map
https://bugs.webkit.org/show_bug.cgi?id=252023
rdar://104329203
Reviewed by Wenson Hsieh.
https://github.com/WebKit/WebKit/commit/b7a998fb59f59222ea76fe60141f38cfd2fc8cde introduced a new deferring gesture recognizer
for pan and pinch gestures. This had the conseequence of now letting Safari take
precedence over consuming these gestures rather than WebKit, causing the tab overview
to appear instead of zooming out of the map.
This PR adds a new private delegate method to `WKUIDelegate` that allows clients to specify
if a recognizer can be prevented by touch events. Then, if the gesture is also one that is
installed over the web view, the web view will take precedence.
* Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _gestureRecognizerCanBePreventedByTouchEvents:]):
(-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]):
Canonical link: https://commits.webkit.org/260294@main
Canonical link: https://commits.webkit.org/259548.308@safari-7615-branch
Commit: ac7b0ae66b7ddc76b6241a9ddfe07192760a5328
https://github.com/WebKit/WebKit/commit/ac7b0ae66b7ddc76b6241a9ddfe07192760a5328
Author: Chris Dumez <cdumez at apple.com>
Date: 2023-02-27 (Mon, 27 Feb 2023)
Changed paths:
M Source/WebCore/dom/Document.cpp
Log Message:
-----------
Cherry-pick f223f5839426. rdar://problem/104964478
Ref document in Document::postTask() lambda to make sure it stays alive during the task execution
https://bugs.webkit.org/show_bug.cgi?id=251695
Reviewed by Ryosuke Niwa.
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::postTask):
(WebCore::Document::pendingTasksTimerFired):
Canonical link: https://commits.webkit.org/259841@main
Canonical link: https://commits.webkit.org/259548.309@safari-7615-branch
Commit: f88767f8e44089317c210b7fc07a7cf38d1fafd4
https://github.com/WebKit/WebKit/commit/f88767f8e44089317c210b7fc07a7cf38d1fafd4
Author: Myah Cobbs <mcobbs at apple.com>
Date: 2023-02-27 (Mon, 27 Feb 2023)
Changed paths:
M Source/WebCore/platform/mac/PowerObserverMac.cpp
M Source/WebCore/platform/mac/PowerObserverMac.h
Log Message:
-----------
Revert "Cherry-pick 624d3538fd22. rdar://problem/90891509"
This reverts commit 331e9b2428621e2b8dfbd9057fc86b5219ec7383.
Canonical link: https://commits.webkit.org/259548.310@safari-7615-branch
Commit: 61396fbdb922aeb50efb358dc4b09430c65a4fc3
https://github.com/WebKit/WebKit/commit/61396fbdb922aeb50efb358dc4b09430c65a4fc3
Author: Myah Cobbs <mcobbs at apple.com>
Date: 2023-02-27 (Mon, 27 Feb 2023)
Changed paths:
M Source/WebKit/UIProcess/WebProcessPool.cpp
Log Message:
-----------
Revert "Cherry-pick 9e54e083d6c2. rdar://problem/105375981"
This reverts commit a68b230c79aecad1329e8402e6d4d3af17f07d05.
Canonical link: https://commits.webkit.org/259548.311@safari-7615-branch
Commit: 6cd569b99c9c3daba275763be710e5d770dd28ee
https://github.com/WebKit/WebKit/commit/6cd569b99c9c3daba275763be710e5d770dd28ee
Author: Myah Cobbs <mcobbs at apple.com>
Date: 2023-02-27 (Mon, 27 Feb 2023)
Changed paths:
M Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp
M Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
Log Message:
-----------
Revert "Cherry-pick 53ce8c35db43. rdar://problem/103823114"
This reverts commit 35e9877a4e93c452f66dde1765fc4d1f09fa0556.
Canonical link: https://commits.webkit.org/259548.312@safari-7615-branch
Commit: 2debf50525f59cfef48f9243f0be012b3bd8b29d
https://github.com/WebKit/WebKit/commit/2debf50525f59cfef48f9243f0be012b3bd8b29d
Author: Jean-Yves Avenard <jya at apple.com>
Date: 2023-02-27 (Mon, 27 Feb 2023)
Changed paths:
M Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp
M Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
Log Message:
-----------
Cherry-pick 53ce8c35db43. rdar://problem/103823114
Ensure WebFullScreenManager is removed as EventListener when page closes
https://bugs.webkit.org/show_bug.cgi?id=251566
rdar://103823114
Reviewed by Youenn Fablet.
When the page close, break the cycles with WebFullScreenManager and ensure
WebFullScreenManager is no longer registered as event listener.
* Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::~WebFullScreenManager):
(WebKit::WebFullScreenManager::invalidate):
(WebKit::WebFullScreenManager::element):
* Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::close):
Canonical link: https://commits.webkit.org/259855@main
Canonical link: https://commits.webkit.org/259548.313@safari-7615-branch
Commit: cfc556b0bff6b0ae73916b3edcd50da0430f4ae7
https://github.com/WebKit/WebKit/commit/cfc556b0bff6b0ae73916b3edcd50da0430f4ae7
Author: Alex Christensen <achristensen at webkit.org>
Date: 2023-02-27 (Mon, 27 Feb 2023)
Changed paths:
M Tools/TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp
Log Message:
-----------
Cherry-pick fb9f9ec928c1. rdar://problem/105728059
Pass length as parameter with non-literal expected buffers in FragmentedSharedBufferTest
https://bugs.webkit.org/show_bug.cgi?id=252707
Reviewed by Chris Dumez.
Using strlen on a non-null-terminated buffer isn't great.
* Tools/TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:
(TestWebKitAPI::checkBufferWithLength):
(TestWebKitAPI::checkBuffer):
(TestWebKitAPI::TEST_F):
Canonical link: https://commits.webkit.org/260647@main
Canonical link: https://commits.webkit.org/259548.314@safari-7615-branch
Commit: 19a229b9c939a794239617e9423790fbb3c5b910
https://github.com/WebKit/WebKit/commit/19a229b9c939a794239617e9423790fbb3c5b910
Author: Alex Christensen <achristensen at webkit.org>
Date: 2023-02-27 (Mon, 27 Feb 2023)
Changed paths:
M Tools/TestWebKitAPI/Tests/WTF/RunLoop.cpp
Log Message:
-----------
Cherry-pick a0191862c8d6. rdar://problem/105728188
Extend scope of counter in WTF_RunLoop API tests
https://bugs.webkit.org/show_bug.cgi?id=252706
Reviewed by Chris Dumez.
i is referenced by a lambda that is used outside of the scope of the for loop.
* Tools/TestWebKitAPI/Tests/WTF/RunLoop.cpp:
(TestWebKitAPI::TEST):
Canonical link: https://commits.webkit.org/260650@main
Canonical link: https://commits.webkit.org/259548.315@safari-7615-branch
Commit: 38826446002c93610a1d7f6b4a3fcd641f008b0d
https://github.com/WebKit/WebKit/commit/38826446002c93610a1d7f6b4a3fcd641f008b0d
Author: Kimmo Kinnunen <kkinnunen at apple.com>
Date: 2023-02-27 (Mon, 27 Feb 2023)
Changed paths:
M LayoutTests/platform/glib/TestExpectations
M LayoutTests/webgl/webgl-fail-platform-context-creation-no-crash.html
A LayoutTests/webgl/webgl-fail-remote-context-ipc-buffer-allocation-no-crash-expected.txt
A LayoutTests/webgl/webgl-fail-remote-context-ipc-buffer-allocation-no-crash.html
M Source/WebCore/html/canvas/WebGLContextAttributes.idl
M Source/WebCore/platform/graphics/GraphicsContextGLAttributes.h
M Source/WebKit/Platform/IPC/StreamClientConnection.cpp
M Source/WebKit/Platform/IPC/StreamClientConnection.h
M Source/WebKit/Platform/IPC/StreamClientConnectionBuffer.h
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp
M Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h
M Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp
M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.cpp
M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.h
M Source/WebKit/WebProcess/GPU/graphics/cocoa/RemoteGraphicsContextGLProxyCocoa.mm
M Source/WebKit/WebProcess/GPU/graphics/wc/RemoteGraphicsContextGLProxyWC.cpp
M Tools/TestWebKitAPI/Tests/IPC/StreamConnectionBufferTests.cpp
M Tools/TestWebKitAPI/Tests/IPC/StreamConnectionTests.cpp
Log Message:
-----------
Cherry-pick 8e47c0fabb97. rdar://problem/105612611
WebContent crashes if GPUP WebGL remote context buffer cannot be allocated
https://bugs.webkit.org/show_bug.cgi?id=252732
rdar://105612611
Reviewed by Geoffrey Garen.
Change RemoteGraphicsContextGLProxy and RemoteGPUProxy creation to be
nullable. If the IPC stream connection buffer allocation fails,
return gracefully instead of previous inteded CRASH().
Preserves the CRASH() in RemoteRenderingBackendProxy as current code
structure is such that it is expected always to be succesfully created.
* LayoutTests/webgl/webgl-fail-platform-context-creation-no-crash.html:
Remove a unneeded <script> from a similar test as below.
* LayoutTests/webgl/webgl-fail-remote-context-ipc-buffer-allocation-no-crash-expected.txt: Added.
* LayoutTests/webgl/webgl-fail-remote-context-ipc-buffer-allocation-no-crash.html: Copied from LayoutTests/webgl/webgl-fail-platform-context-creation-no-crash.html.
Add the test.
* Source/WebCore/html/canvas/WebGLContextAttributes.idl:
* Source/WebCore/platform/graphics/GraphicsContextGLAttributes.h:
* Source/WebKit/Platform/IPC/StreamClientConnection.cpp:
(IPC::StreamClientConnection::create):
(IPC::StreamClientConnection::StreamClientConnection):
* Source/WebKit/Platform/IPC/StreamClientConnection.h:
* Source/WebKit/Platform/IPC/StreamClientConnectionBuffer.h:
(IPC::StreamClientConnectionBuffer::create):
(IPC::StreamClientConnectionBuffer::StreamClientConnectionBuffer):
(IPC::StreamClientConnectionBuffer::createMemory): Deleted.
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:
(WebKit::RemoteGraphicsContextGLProxy::create):
(WebKit::RemoteGraphicsContextGLProxy::RemoteGraphicsContextGLProxy):
(WebKit::RemoteGraphicsContextGLProxy::initializeIPC):
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
* Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
(WebKit::RemoteRenderingBackendProxy::ensureGPUProcessConnection):
* Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.cpp:
(WebKit::RemoteGPUProxy::create):
(WebKit::RemoteGPUProxy::RemoteGPUProxy):
(WebKit::RemoteGPUProxy::initializeIPC):
* Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.h:
* Source/WebKit/WebProcess/GPU/graphics/cocoa/RemoteGraphicsContextGLProxyCocoa.mm:
(WebKit::RemoteGraphicsContextGLProxy::platformCreate):
(WebKit::RemoteGraphicsContextGLProxy::create): Deleted.
* Source/WebKit/WebProcess/GPU/graphics/wc/RemoteGraphicsContextGLProxyWC.cpp:
(WebKit::RemoteGraphicsContextGLProxy::platformCreate):
(WebKit::RemoteGraphicsContextGLProxy::create): Deleted.
* Tools/TestWebKitAPI/Tests/IPC/StreamConnectionBufferTests.cpp:
(TestWebKitAPI::TEST):
* Tools/TestWebKitAPI/Tests/IPC/StreamConnectionTests.cpp:
(TestWebKitAPI::TEST_F):
Canonical link: https://commits.webkit.org/260738@main
Canonical link: https://commits.webkit.org/259548.316@safari-7615-branch
Commit: 92bb5fbd72e5d00ee26cb955ccbceab192dba13f
https://github.com/WebKit/WebKit/commit/92bb5fbd72e5d00ee26cb955ccbceab192dba13f
Author: Youenn Fablet <youennf at gmail.com>
Date: 2023-02-28 (Tue, 28 Feb 2023)
Changed paths:
M Source/ThirdParty/libwebrtc/Source/third_party/libaom/source/libaom/av1/encoder/encodeframe_utils.c
Log Message:
-----------
Cherry-pick aom 3154860bdbe978da9271ba55eea60973b0be06b5
https://bugs.webkit.org/show_bug.cgi?id=253015
rdar://105507028
Reviewed by Geoffrey Garen.
Cherry-pick patch from upstream.
* Source/ThirdParty/libwebrtc/Source/third_party/libaom/source/libaom/av1/encoder/encodeframe_utils.c:
(av1_source_content_sb):
Canonical link: https://commits.webkit.org/259548.317@safari-7615-branch
Commit: 0131b02c27e831e58e6d2e74f5c1be18d143fcec
https://github.com/WebKit/WebKit/commit/0131b02c27e831e58e6d2e74f5c1be18d143fcec
Author: Alex Christensen <achristensen at webkit.org>
Date: 2023-02-28 (Tue, 28 Feb 2023)
Changed paths:
M Tools/TestWebKitAPI/Tests/WebKitCocoa/PDFLinkReferrer.mm
Log Message:
-----------
Cherry-pick 39d7b6a41851. rdar://problem/105685438
Null terminate string passed into strchr in PDFLinkReferrer test
https://bugs.webkit.org/show_bug.cgi?id=252709
Reviewed by Chris Dumez.
strnchr would be nice, but it's not available on Cocoa platforms.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/PDFLinkReferrer.mm:
(TEST):
Canonical link: https://commits.webkit.org/260645@main
Canonical link: https://commits.webkit.org/259548.318@safari-7615-branch
Commit: 37cb12d4fb79f7e78b9e745f7cb2d7dc73512951
https://github.com/WebKit/WebKit/commit/37cb12d4fb79f7e78b9e745f7cb2d7dc73512951
Author: Alex Christensen <achristensen at webkit.org>
Date: 2023-02-28 (Tue, 28 Feb 2023)
Changed paths:
M Tools/TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm
Log Message:
-----------
Cherry-pick ce8d9c65b8dd. rdar://problem/105730231
Use strnstr instead of strstr in RelaxThirdPartyCookieBlocking API test
https://bugs.webkit.org/show_bug.cgi?id=252704
Reviewed by Wenson Hsieh.
Make sure we don't read out of bounds.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:
(TestWebKitAPI::TEST):
Canonical link: https://commits.webkit.org/260649@main
Canonical link: https://commits.webkit.org/259548.319@safari-7615-branch
Commit: b49bd20cd2e0478d0c85b1c7fd93fc437c413760
https://github.com/WebKit/WebKit/commit/b49bd20cd2e0478d0c85b1c7fd93fc437c413760
Author: Antoine Quint <graouts at webkit.org>
Date: 2023-02-28 (Tue, 28 Feb 2023)
Changed paths:
A LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-animation-used-in-shorthand-expected.txt
A LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-animation-used-in-shorthand.html
M Source/WebCore/style/PropertyCascade.cpp
Log Message:
-----------
Cherry-pick 875f1eabd79a. rdar://problem/105845603
The animation of CSS custom properties is not valid in the shorthand property
https://bugs.webkit.org/show_bug.cgi?id=252808
Reviewed by Antti Koivisto.
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-animation-used-in-shorthand-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-animation-used-in-shorthand.html: Added.
* Source/WebCore/style/PropertyCascade.cpp:
(WebCore::Style::PropertyCascade::shouldApplyAfterAnimation):
Canonical link: https://commits.webkit.org/260759@main
Canonical link: https://commits.webkit.org/259548.320@safari-7615-branch
Commit: a729ac62872dcd3f7c78fc07f60eafef76c0ccdf
https://github.com/WebKit/WebKit/commit/a729ac62872dcd3f7c78fc07f60eafef76c0ccdf
Author: Chris Dumez <cdumez at apple.com>
Date: 2023-02-28 (Tue, 28 Feb 2023)
Changed paths:
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.h
M Source/WebCore/page/ScreenOrientation.idl
M Source/WebKit/Shared/WebPreferencesDefaultValues.cpp
M Source/WebKit/Shared/WebPreferencesDefaultValues.h
Log Message:
-----------
Cherry-pick f144d4e39c66. rdar://problem/105743884
Regression(255659 at main) ABN AMRO Creditcard app hangs on launch
https://bugs.webkit.org/show_bug.cgi?id=252910
rdar://105743884
Reviewed by Geoffrey Garen.
This app is a Cordova/PhoneGap app using the following plugin to support the
screen orientation API:
- https://www.npmjs.com/package/cordova-plugin-screen-orientation
The app expects the screen orientation API to work and tries to lock the
orientation to portrait when on an iPhone. When we expose our native screen
orientation API support, the app's polyfill is no longer used and they try to
lock the orientation using our native API. However, we reject the orientation
locking promise with an UnsupportedError since we only support orientation lock
after using the JS fullscreen API to be in full screen. The promise rejection
was breaking the app, causing it to stop loading after showing its splash
screen.
To address the issue, I made the following changes:
1. Move ScreenOrientation.lock() / ScreenOrientation.unlock() behind a runtime
feature flag, off by default. Sadly, these functions are not currently useful
and always reject the promise with UnsupportedError. The reasons for this are
that locking is gated on using the fullscreen API, which is currently supported
on iPad but not iPhone. As a result, no support on iPhone. While the fullscreen
API works on iPad, screen orientation locking usually doesn't because apps are
not in control of their orientation if they opt into multitask support (aka
split-view), which apps (such as MobileSafari) usually do.
2. Move the rest of the Screen Orientation API (the readonly part which works
well: ScreenOrientation.type, ScreenOrientation.angle, change event) behind
a linked-on-after check so that it gets exposed only when the app gets rebuilt
with the new SDK.
Change 1 was not sufficient to fix the app. The polyfill will not currently
add the lock() / unlock() functions if `screen.orientation` exists. For this
reason, it had to make change 2 as well.
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.h:
* Source/WebCore/page/ScreenOrientation.idl:
* Source/WebKit/Shared/WebPreferencesDefaultValues.cpp:
(WebKit::defaultShouldEnableScreenOrientationAPI):
* Source/WebKit/Shared/WebPreferencesDefaultValues.h:
Canonical link: https://commits.webkit.org/260812@main
Canonical link: https://commits.webkit.org/259548.321@safari-7615-branch
Commit: 002abd5edfb6920606f8bb503dfcec973e0bd6ee
https://github.com/WebKit/WebKit/commit/002abd5edfb6920606f8bb503dfcec973e0bd6ee
Author: Wenson Hsieh <wenson_hsieh at apple.com>
Date: 2023-02-28 (Tue, 28 Feb 2023)
Changed paths:
M Tools/TestWebKitAPI/Tests/mac/FontManagerTests.mm
Log Message:
-----------
Cherry-pick 6d701f331859. rdar://problem/105982496
Fix a couple of memory leaks after 260826 at main
https://bugs.webkit.org/show_bug.cgi?id=252922
Reviewed by Aditya Keerthi.
Use `adoptNS()` to avoid leaking the +1 dictionaries, returned from `-mutableCopy`.
* Tools/TestWebKitAPI/Tests/mac/FontManagerTests.mm:
(TestWebKitAPI::TEST):
Canonical link: https://commits.webkit.org/260841@main
Canonical link: https://commits.webkit.org/259548.322@safari-7615-branch
Commit: 27b204564711abe00e83f7858908577997799e7d
https://github.com/WebKit/WebKit/commit/27b204564711abe00e83f7858908577997799e7d
Author: Sammy Gill <sammy.gill at apple.com>
Date: 2023-02-28 (Tue, 28 Feb 2023)
Changed paths:
A LayoutTests/fast/inline/legacy-margin-trim/block-container-float-inline-start-trim-float-drives-container-intrinsic-size-expected.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-float-inline-start-trim-float-drives-container-intrinsic-size-orthogonal-expected.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-float-inline-start-trim-float-drives-container-intrinsic-size-orthogonal.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-float-inline-start-trim-float-drives-container-intrinsic-size-rtl-expected.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-float-inline-start-trim-float-drives-container-intrinsic-size-rtl.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-float-inline-start-trim-float-drives-container-intrinsic-size.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-float-inline-trim-float-drives-container-intrinsic-size-inline-layout-expected.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-float-inline-trim-float-drives-container-intrinsic-size-inline-layout.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-float-inline-trim-text-drives-container-intrinsic-size-inline-layout-expected.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-float-inline-trim-text-drives-container-intrinsic-size-inline-layout-vert-lr-expected.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-float-inline-trim-text-drives-container-intrinsic-size-inline-layout-vert-lr.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-float-inline-trim-text-drives-container-intrinsic-size-inline-layout.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-start-trim-float-drives-container-intrinsic-size-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-start-trim-float-drives-container-intrinsic-size-orthogonal-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-start-trim-float-drives-container-intrinsic-size-orthogonal.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-start-trim-float-drives-container-intrinsic-size-rtl-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-start-trim-float-drives-container-intrinsic-size-rtl.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-start-trim-float-drives-container-intrinsic-size.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-trim-float-drives-container-intrinsic-size-inline-layout-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-trim-float-drives-container-intrinsic-size-inline-layout.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-trim-text-drives-container-intrinsic-size-inline-layout-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-trim-text-drives-container-intrinsic-size-inline-layout-vert-lr-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-trim-text-drives-container-intrinsic-size-inline-layout-vert-lr.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-trim-text-drives-container-intrinsic-size-inline-layout.html
M Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp
M Source/WebCore/rendering/RenderBlockFlow.cpp
Log Message:
-----------
Cherry-pick 35416b6b8ce4. rdar://problem/105960289
Floats' trimmed margins should not contribute to containing block's intrinsic sizing (legacy line layout)
https://bugs.webkit.org/show_bug.cgi?id=252976
rdar://105960289
Reviewed by Alan Baradlay.
When a containing block establishes and inline formatting context and
it is being sized under some sort of intrinsic sizing constraint (e.g.
width: min-content), then the margins of any float within that
containing block should not contribute to the intrinsic sizing if it
is specified under margin-trim. The logic is the same as in the block
layout case and we can use the same helper to check whether a margin
should contribute to the sizing:
shouldChildInlineMarginContributeToContainerIntrinsicSize.
container {
display: block;
inline-size: min-content;
font-family: monospace;
font-size: 10px;
margin-trim: inline;
border: 1px solid black;
}
item {
display: block;
float: left;
width: 50px;
height: 50px;
margin-inline: 200px;
background-color: green;
}
</style>
<container>
longwordinfluencescontainerintrinsicsize
<item></item>
text that should be after the float
</container>
Normally, the logical width of the containing block here would be drove
by the float and its margin box size, but since margin-trim: inline
is specified neither of its inline margins will be taken into
consideration. Only the border box width will be used.
<style>
container {
display: block;
width: min-content;
font-family: monospace;
font-size: 10px;
margin-trim: inline-start;
border: 1px solid black;
}
item {
display: block;
float: left;
width: 50px;
height: 50px;
margin-inline: 30px;
background-color: green;
}
</style>
<body>
<container>
<item></item>
many l e t t e r s s e p a r a t e d b y s p a c e s
</container>
In this case normally the containing block logical width would be drove
by the item's margin box with both inline margins, but since
margin-trim: inline-start is specified that margin will not be used.
Instead the logical width of the containing block is the float's
border box logical width + the inline-end margin.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-float-inline-start-trim-float-drives-container-intrinsic-size-expected.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-float-inline-start-trim-float-drives-container-intrinsic-size-orthogonal-expected.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-float-inline-start-trim-float-drives-container-intrinsic-size-orthogonal.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-float-inline-start-trim-float-drives-container-intrinsic-size-rtl-expected.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-float-inline-start-trim-float-drives-container-intrinsic-size-rtl.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-float-inline-start-trim-float-drives-container-intrinsic-size.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-float-inline-trim-float-drives-container-intrinsic-size-inline-layout-expected.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-float-inline-trim-float-drives-container-intrinsic-size-inline-layout.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-float-inline-trim-text-drives-container-intrinsic-size-inline-layout-expected.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-float-inline-trim-text-drives-container-intrinsic-size-inline-layout-vert-lr-expected.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-float-inline-trim-text-drives-container-intrinsic-size-inline-layout-vert-lr.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-float-inline-trim-text-drives-container-intrinsic-size-inline-layout.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-start-trim-float-drives-container-intrinsic-size-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-start-trim-float-drives-container-intrinsic-size-rtl-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-start-trim-float-drives-container-intrinsic-size-rtl.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-start-trim-float-drives-container-intrinsic-size.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-trim-float-drives-container-intrinsic-size-inline-layout-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-trim-float-drives-container-intrinsic-size-inline-layout.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-trim-text-drives-container-intrinsic-size-inline-layout-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-trim-text-drives-container-intrinsic-size-inline-layout-vert-lr-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-trim-text-drives-container-intrinsic-size-inline-layout-vert-lr.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-inline-trim-text-drives-container-intrinsic-size-inline-layout.html: Added.
* Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp:
(WebCore::LayoutIntegration::canUseForChild):
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):
Canonical link: https://commits.webkit.org/260906@main
Canonical link: https://commits.webkit.org/259548.323@safari-7615-branch
Commit: 43f9914f84678b179a2d56050cc856e8aac65275
https://github.com/WebKit/WebKit/commit/43f9914f84678b179a2d56050cc856e8aac65275
Author: Alan Baradlay <zalan at apple.com>
Date: 2023-02-28 (Tue, 28 Feb 2023)
Changed paths:
A LayoutTests/fast/repaint/out-of-flow-inside-relative-inline-expected.txt
A LayoutTests/fast/repaint/out-of-flow-inside-relative-inline.html
M Source/WebCore/rendering/RenderBlockFlow.cpp
Log Message:
-----------
Cherry-pick 2c2474150607. rdar://problem/104612196
REGRESSION (257937 at main): Hover state UI leaves graphic artifacts on Techmeme.com
https://bugs.webkit.org/show_bug.cgi?id=253014
<rdar://104612196>
Reviewed by Antti Koivisto.
This patch ensures that when the line layout path gets invalidated (and we eagerly destroy geometry information -there's a FIXME on that)
both in-, and out-of-flow content get repainted.
(This is the case when calling repaint on an absolute positioned box nested in a relative positioned inline box
(e.g. <span style="position: relative"><div style="position: absolute"></div></span>
ends up in RenderInline::offsetForInFlowPositionedInline which needs display box geometry information -which we eagerly destroy; see above).
* LayoutTests/fast/repaint/out-of-flow-inside-relative-inline-expected.txt: Added.
* LayoutTests/fast/repaint/out-of-flow-inside-relative-inline.html: Added.
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::invalidateLineLayoutPath):
Canonical link: https://commits.webkit.org/260913@main
Canonical link: https://commits.webkit.org/259548.324@safari-7615-branch
Commit: 7598848863ab89fe16bff31c90ab5a9b8f2af41d
https://github.com/WebKit/WebKit/commit/7598848863ab89fe16bff31c90ab5a9b8f2af41d
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-02-28 (Tue, 28 Feb 2023)
Changed paths:
M Tools/Scripts/git-webkit
M Tools/Scripts/libraries/webkitscmpy/setup.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
A Tools/Scripts/libraries/webkitscmpy/webkitscmpy/commit_classifier.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py
A Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/classify.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pickable.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/scm.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/scm_base.py
A Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/classify_unittest.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pickable_unittest.py
A metadata/commit_classes.json
M metadata/git_config_extension
Log Message:
-----------
Cherry-pick 260273 at main (45adfd10be41). rdar://105105664
[git-webkit] Automatically classify commits
https://bugs.webkit.org/show_bug.cgi?id=251824
rdar://105105664
Rubber-stamped by Aakash Jain.
The WebKit project often wants tools to reason about the type of commit they are
dealing with. For example, certain test gardening changes don't require review.
And many EWS tests don't need to be run when adding to contributors.json.
* Tools/Scripts/git-webkit: Pass WebKit's commit classifier as a default.
* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Export CommitClassifier.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/commit_classifier.py: Added.
(CommitClassifier.HeaderFilter): A string filter which can be a regex or a fuzzy matcher.
(CommitClassifier.CommitClass): Object representing a type of commit in a project.
(CommitClassifier.load): Load a list of commit classes from a json file.
(CommitClassifier.classify): Given a commit and a repository, attempt to assign the
commit a class.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.__init__): Pass classifier.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py:
(Scm.__init__): Pass classifier.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:
(Svn.__init__): Pass classifier.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
(main): Pass provisional classifier to parsers and help message generators.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/classify.py: Added.
(Classify.help): Generate a help message including commit class names.
(Classify.parser): Added.
(Classify.main): Classify the specified commit, printing out its classification.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pickable.py:
(Pickable.parser): Generate help message based on a provisional classifier.
(Pickable.pickable): Use CommitClassifier object instead of implementing classification.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py:
(BitBucket.__init__): Pass classifier.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/scm.py:
(Scm.from_url): Pass classifier.
(Scm.__init__): Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py:
(Svn.__init__): Pass classifier.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/scm_base.py:
(ScmBase.__init__): Pass classifier.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/classify_unittest.py: Added.
(TestClassify.test_no_classes):
(TestClassify.test_list_classes):
(TestClassify.test_header_success):
(TestClassify.test_header_failure):
(TestClassify.test_path_success):
(TestClassify.test_path_failure):
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pickable_unittest.py:
(TestPickable.test_branch):
(TestPickable.test_branch_diverged_cherry_pick):
(TestPickable.test_branch_none):
(TestPickable.test_branch_include_versioning):
(TestPickable.test_branch_gardening_exclude):
(TestPickable.test_branch_gardening_include):
* metadata/commit_classes.json: Added.
* metadata/git_config_extension: "Test" commits are now defined by their classifier.
Canonical link: https://commits.webkit.org/260273@main
Canonical link: https://commits.webkit.org/259548.325@safari-7615-branch
Commit: 30687a4c0111d5bb746f2856c29ef7310fece1d5
https://github.com/WebKit/WebKit/commit/30687a4c0111d5bb746f2856c29ef7310fece1d5
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-02-28 (Tue, 28 Feb 2023)
Changed paths:
M Tools/Scripts/libraries/webkitscmpy/setup.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py
Log Message:
-----------
Cherry-pick 260285 at main (f100538f41e3). rdar://103089092
[git-webkit] Allow git config to disable radar CCing
https://bugs.webkit.org/show_bug.cgi?id=248908
rdar://103089092
Reviewed by Elliott Williams.
* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git): Add 'webkitscmpy.cc-radar' configuration option.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py:
(Branch.parser): Add --no-cc-radar option.
(Branch.main): Conditionalize radar CC on 'webkitscmpy.cc-radar' git option and cc-radar
command line option.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.create_pull_request): Conditionalize radar CC on 'webkitscmpy.cc-radar'
git option and cc-radar command line option.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py:
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
Canonical link: https://commits.webkit.org/260285@main
Canonical link: https://commits.webkit.org/259548.326@safari-7615-branch
Commit: 8ebfd08feec1b1a01fd17d35847d34b5cb86ef13
https://github.com/WebKit/WebKit/commit/8ebfd08feec1b1a01fd17d35847d34b5cb86ef13
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-02-28 (Tue, 28 Feb 2023)
Changed paths:
M Tools/Scripts/libraries/webkitscmpy/setup.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py
Log Message:
-----------
Cherry-pick 260456 at main (fed358c486b6). rdar://105302485
[git-webkit] Force a PR onto a secure remote
https://bugs.webkit.org/show_bug.cgi?id=252090
rdar://105302485
Reviewed by Aakash Jain.
* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.parser): Add '--security' option.
(PullRequest.pull_request_branch_point): If --security is passed, force
a PR onto a secure remote.
Canonical link: https://commits.webkit.org/260456@main
Canonical link: https://commits.webkit.org/259548.327@safari-7615-branch
Commit: 57ce9099c8326b0f5ecf089cf0457933596d277c
https://github.com/WebKit/WebKit/commit/57ce9099c8326b0f5ecf089cf0457933596d277c
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-02-28 (Tue, 28 Feb 2023)
Changed paths:
M Tools/Scripts/libraries/webkitcorepy/setup.py
M Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
A Tools/Scripts/libraries/webkitcorepy/webkitcorepy/partial_proxy.py
A Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/partial_proxy_unittest.py
Log Message:
-----------
Cherry-pick 260909 at main (775f730ac67e). rdar://105984609
[webkitcorepy] Add a PartialProxy class
https://bugs.webkit.org/show_bug.cgi?id=253007
rdar://105984609
Rubber-stamped by Aakash Jain.
Allow Python programs to send requests to specific hosts through a proxy, but not requests
to all hosts.
* Tools/Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Export PartialProxy class.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/partial_proxy.py: Added.
(PartialProxy.__init__): Store the hosts and http and https proxies.
(PartialProxy.__enter__): Mock all request calls to use a temporary Session object.
(PartialProxy.__enter__.Session): Add proxy arguments to requests to the specified hosts.
(PartialProxy.__exit__):
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/partial_proxy_unittest.py: Added.
(DummySession): Session object which simply stores the passed proxy arguments.
(PartialProxyTest.test_session):
Canonical link: https://commits.webkit.org/260909@main
Canonical link: https://commits.webkit.org/259548.328@safari-7615-branch
Commit: 2ab97215da6351ddf2134fc0e03e98175bf529cf
https://github.com/WebKit/WebKit/commit/2ab97215da6351ddf2134fc0e03e98175bf529cf
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-03-01 (Wed, 01 Mar 2023)
Changed paths:
M Tools/Scripts/libraries/webkitbugspy/setup.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/radar.py
Log Message:
-----------
Cherry-pick 260956 at main (7f5163003777). https://bugs.webkit.org/show_bug.cgi?id=253090
[radar] Handle system with no LDAP look up
https://bugs.webkit.org/show_bug.cgi?id=253090
Reviewed by Aakash Jain.
* Tools/Scripts/libraries/webkitbugspy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/radar.py:
(Tracker.user): Handle ldap lookup failing, use either name or
username to define an incomplete user.
Canonical link: https://commits.webkit.org/260956@main
Canonical link: https://commits.webkit.org/259548.329@safari-7615-branch
Commit: 8201f0c32dcf9248e2889b455f25455cd925ae1c
https://github.com/WebKit/WebKit/commit/8201f0c32dcf9248e2889b455f25455cd925ae1c
Author: Per Arne Vollan <pvollan at apple.com>
Date: 2023-03-01 (Wed, 01 Mar 2023)
Changed paths:
M LayoutTests/TestExpectations
A LayoutTests/http/wpt/service-workers/basic-fetch-with-contentfilter.https-expected.txt
A LayoutTests/http/wpt/service-workers/basic-fetch-with-contentfilter.https.html
A LayoutTests/http/wpt/service-workers/basic-fetch-with-contentfilter.js
M LayoutTests/platform/ios/TestExpectations
M LayoutTests/platform/mac/TestExpectations
M Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp
M Source/WebKit/NetworkProcess/NetworkResourceLoader.h
M Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp
M Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h
Log Message:
-----------
Cherry-pick 78e6b51bca33. rdar://problem/103032824
Twitter is not filtered by content filter
https://bugs.webkit.org/show_bug.cgi?id=252496
rdar://103032824
Reviewed by Sihui Liu.
Twitter is not filtered by content filter since service worker fetch is missing filtering code.
Make sure content filtering is started on service worker fetch, and let the content filter
intercept the fetch if it should be blocked. The didReceiveData method in ServiceWorkerFetchTask
has been split into two methods, since it was being called both when receiving data over IPC and
from the network. The unsafeBuffer method in IPC::SharedBufferReference is only allowed to be
called on the receiver side. The call to startContentFiltering was moved to a location where it
will also be called on service worker fetch, which required a little refactoring.
* LayoutTests/TestExpectations:
* LayoutTests/http/wpt/service-workers/basic-fetch-with-contentfilter.https-expected.txt: Added.
* LayoutTests/http/wpt/service-workers/basic-fetch-with-contentfilter.https.html: Added.
* LayoutTests/http/wpt/service-workers/basic-fetch-with-contentfilter.js: Added.
(doTest):
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
* Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::start):
(WebKit::NetworkResourceLoader::startRequest):
(WebKit::NetworkResourceLoader::startWithServiceWorker):
(WebKit::NetworkResourceLoader::requestIsForServiceWorkerOnly):
(WebKit::NetworkResourceLoader::serviceWorkerDidNotHandle):
(WebKit::NetworkResourceLoader::continueAfterServiceWorkerReceivedData):
(WebKit::NetworkResourceLoader::continueAfterServiceWorkerReceivedResponse):
(WebKit::NetworkResourceLoader::serviceWorkerDidFinish):
* Source/WebKit/NetworkProcess/NetworkResourceLoader.h:
* Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:
(WebKit::ServiceWorkerFetchTask::processResponse):
(WebKit::ServiceWorkerFetchTask::didReceiveData):
(WebKit::ServiceWorkerFetchTask::didReceiveDataFromPreloader):
(WebKit::ServiceWorkerFetchTask::didFinish):
(WebKit::ServiceWorkerFetchTask::loadBodyFromPreloader):
* Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h:
Canonical link: https://commits.webkit.org/260891@main
Canonical link: https://commits.webkit.org/259548.330@safari-7615-branch
Commit: 7211d16e7e4d725fa6e0073bfefc9db7dcb0ac4b
https://github.com/WebKit/WebKit/commit/7211d16e7e4d725fa6e0073bfefc9db7dcb0ac4b
Author: Sammy Gill <sammy.gill at apple.com>
Date: 2023-03-01 (Wed, 01 Mar 2023)
Changed paths:
M LayoutTests/TestExpectations
A LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-default-object-height-constrained-by-max-width-expected.html
A LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-default-object-height-constrained-by-max-width.html
A LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-default-object-width-constrained-by-max-height-expected.html
A LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-default-object-width-constrained-by-max-height.html
A LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-inline-size-containment-no-crash.html
M LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-intrinsic-width-height.html
M LayoutTests/platform/gtk/TestExpectations
M LayoutTests/platform/wpe/TestExpectations
M Source/WebCore/rendering/RenderReplaced.cpp
Log Message:
-----------
Cherry-pick e6a31953a657. rdar://problem/105489410
RenderReplaced::computeAspectRatioInformationForRenderBox does not need to call into RenderBox::computeReplacedLogicalWidth
https://bugs.webkit.org/show_bug.cgi?id=252589
rdar://105489410
Reviewed by Alan Baradlay.
The call to RenderBox::computeReplacedLogicalWidth from RenderReplaced::computeAspectRatioInformationForRenderBox
when the object was a video with a default object size was extraneous
and can be safely removed without changing any functionality. It could
also result in a stack overflow in certain conditions. At this
point we know the intrinsic sizes of the object anyway since it is a
video with a default object size (300px x 150px). This is
because:
1.) RenderBox::computeReplacedLogicalWidth would call into computeReplacedLogicalWidthUsing(MainOrPreferredSize, style().logicalWidth())
com compute the width value to use
2.) The caller (RenderReplaced::computeReplacedLogicalWidth in this case)
will only use the width value of style().logicalWidth().isAuto()
returns true.
3.) If this is true RenderBox::computeReplacedLogicalWidth would have
returned the intrinsic width but constrained to min/max sizes. However,
the caller constrains the intrinsic width anyway.
4.) If this is false (style().logicalWidth().isAuto() returns false),
then the caller (RenderReplaced::computeReplacedLogicalWidth) will
use the intrinsic width anyway by calling into intrinsicLogicalWidth.
We can also take advantage of the existing logic to constrain the
intrinsic sizes in each dimension by transferred constraints from the
opposite one.
Here is an example of when this extra call could cause a stack overflow:
<style>
video {
aspect-ratio: 1;
container-type: inline-size;
inset: 0 auto;
min-width: min-content;
position: fixed;
}
</style>
<video></video>
WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth(WebCore::LayoutUnit, WebCore::ShouldComputePreferred) const
WebCore::RenderBox::computeReplacedLogicalWidth(WebCore::ShouldComputePreferred) const
WebCore::RenderReplaced::computeIntrinsicSizesConstrainedByTransferredMinMaxSizes(WebCore::RenderBox*, WebCore::FloatSize&, WebCore::FloatSize&) const
WebCore::RenderReplaced::computeReplacedLogicalHeight(std::__1::optional<WebCore::LayoutUnit>) const
WebCore::RenderImage::computeReplacedLogicalHeight(std::__1::optional<WebCore::LayoutUnit>) const
WebCore::RenderBox::computePositionedLogicalHeightReplaced(WebCore::RenderBox::LogicalExtentComputedValues&) const
WebCore::RenderBox::computePositionedLogicalHeight(WebCore::RenderBox::LogicalExtentComputedValues&) const
WebCore::RenderBox::computeLogicalHeight(WebCore::LayoutUnit, WebCore::LayoutUnit) const
WebCore::RenderBox::computeLogicalWidthFromAspectRatioInternal() const
WebCore::RenderBox::computeIntrinsicLogicalWidthUsing(WebCore::Length, WebCore::LayoutUnit, WebCore::LayoutUnit) const
WebCore::RenderBox::computeReplacedLogicalWidthUsing(WebCore::SizeType, WebCore::Length) const
WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth(WebCore::LayoutUnit, WebCore::ShouldComputePreferred) const
WebCore::RenderVideo::computeReplacedLogicalWidth(WebCore::ShouldComputePreferred) const
WebCore::RenderBox::computePositionedLogicalWidthReplaced(WebCore::RenderBox::LogicalExtentComputedValues&) const
WebCore::RenderBox::computePositionedLogicalWidth(WebCore::RenderBox::LogicalExtentComputedValues&, WebCore::RenderFragmentContainer*) const
WebCore::RenderBox::computeLogicalWidthInFragment(WebCore::RenderBox::LogicalExtentComputedValues&, WebCore::RenderFragmentContainer*) const
WebCore::RenderBox::updateLogicalWidth()
WebCore::RenderReplaced::layout()
WebCore::RenderImage::layout()
WebCore::RenderMedia::layout()
WebCore::RenderVideo::layout()
After we have computed the width for the video, we call RenderBox::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth
to restrict it within any min and max constraints. This eventually calls into RenderBox::computeIntrinsicLogicalWidthUsing to compute the
min-width using MinContent as the width type.
The container-type: inline-size; and inset: 0 auto; properties cause RenderBox::shouldComputeLogicalWidthFromAspectRatio to return true
because the call to shouldComputeLogicalWidthFromAspectRatioAndInsets returns true. This last method returns true because:
1.) Applying the inline size containment causes hasConstrainedWidth to be false when it would normally be true from the video’s intrinsic width.
2.) hasConstrainedHeight gets set to false because inset causes the logical top and property values to get set to a fixed value
3.) The final call to style.logicalHeight().isAuto() returns true
Due to these series of events we end up calling computeLogicalWidthFromAspectRatioInternal inside RenderBox::computeIntrinsicLogicalWidthUsing.
This eventually recurses its way back into RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth through the reset of the stack trace.
* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-default-object-height-constrained-by-max-width-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-default-object-height-constrained-by-max-width.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-default-object-width-constrained-by-max-height-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-default-object-width-constrained-by-max-height.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-inline-size-containment-no-crash.html: Added.
This test currently crashes due to a different reason (webkit.org/b/252594),
but is still useful to this patch as it was causing the stack
overflow.
* LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-intrinsic-width-height.html:
One of the test cases was incorrectly changed in a previous patch and
is being restored to its previous version. The height for this test
should be 150px and not 300px because it falls under the case:
If 'height' and 'width' both have computed values of 'auto' and the
element also has an intrinsic height, then that intrinsic height is
the used value of 'height'.
https://www.w3.org/TR/CSS22/visudet.html#inline-replaced-height
* LayoutTests/platform/gtk/TestExpectations:
* LayoutTests/platform/wpe/TestExpectations:
* Source/WebCore/rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computeIntrinsicSizesConstrainedByTransferredMinMaxSizes const):
Canonical link: https://commits.webkit.org/260851@main
Canonical link: https://commits.webkit.org/259548.331@safari-7615-branch
Commit: 5b6fef50176f0cf2c41ac64c84a0154db9683f93
https://github.com/WebKit/WebKit/commit/5b6fef50176f0cf2c41ac64c84a0154db9683f93
Author: Youenn Fablet <youennf at gmail.com>
Date: 2023-03-01 (Wed, 01 Mar 2023)
Changed paths:
M LayoutTests/platform/ios/TestExpectations
R LayoutTests/platform/ios/imported/w3c/web-platform-tests/webcodecs/videoFrame-texImage.any.worker-expected.txt
M Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
Log Message:
-----------
Cherry-pick b1e18f0d12ca. rdar://problem/104720207
[ iOS Release ] imported/w3c/web-platform-tests/webcodecs/videoFrame-texImage.any.worker.html is a constant text only failure.
https://bugs.webkit.org/show_bug.cgi?id=251234
rdar://problem/104720207
Reviewed by Eric Carlson.
The fast code path does not work on iOS simulator when the image needs to be converted to YUV before becoming a texture.
We fallback to the SW code path in that case.
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/ios/imported/w3c/web-platform-tests/webcodecs/videoFrame-texImage.any.worker-expected.txt: Removed.
* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::texImageSourceHelper):
Canonical link: https://commits.webkit.org/259745@main
Canonical link: https://commits.webkit.org/259548.332@safari-7615-branch
Commit: 0d82b0989c6d7f6c7a322913e26594689ad0215f
https://github.com/WebKit/WebKit/commit/0d82b0989c6d7f6c7a322913e26594689ad0215f
Author: Myah Cobbs <mcobbs at apple.com>
Date: 2023-03-01 (Wed, 01 Mar 2023)
Changed paths:
M LayoutTests/TestExpectations
R LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-default-object-height-constrained-by-max-width-expected.html
R LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-default-object-height-constrained-by-max-width.html
R LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-default-object-width-constrained-by-max-height-expected.html
R LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-default-object-width-constrained-by-max-height.html
R LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-inline-size-containment-no-crash.html
M LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-intrinsic-width-height.html
M LayoutTests/platform/gtk/TestExpectations
M LayoutTests/platform/wpe/TestExpectations
M Source/WebCore/rendering/RenderReplaced.cpp
Log Message:
-----------
Revert "Cherry-pick e6a31953a657. rdar://problem/105489410"
This reverts commit 7211d16e7e4d725fa6e0073bfefc9db7dcb0ac4b.
Canonical link: https://commits.webkit.org/259548.333@safari-7615-branch
Commit: ec99ca2f8b2efef5937edec959d961f4c35b8182
https://github.com/WebKit/WebKit/commit/ec99ca2f8b2efef5937edec959d961f4c35b8182
Author: Bri Harris <bharris9 at apple.com>
Date: 2023-03-01 (Wed, 01 Mar 2023)
Changed paths:
M LayoutTests/platform/ios/TestExpectations
Log Message:
-----------
Cherry-pick bf9efb4e0c7e. rdar://problem/104774189
[ iOS ] http/tests/in-app-browser-privacy/sub-frame-redirect-to-non-app-bound-domain-blocked.html is a flaky crash.
https://bugs.webkit.org/show_bug.cgi?id=251306
rdar://104774189
Unreviewed test gardening.
* LayoutTests/platform/ios/TestExpectations:
Canonical link: https://commits.webkit.org/259579@main
Canonical link: https://commits.webkit.org/259548.334@safari-7615-branch
Commit: 97f33a202ca9cc8b7db2aceedd5cf5cd48b2ab4d
https://github.com/WebKit/WebKit/commit/97f33a202ca9cc8b7db2aceedd5cf5cd48b2ab4d
Author: Sihui Liu <sihui_liu at apple.com>
Date: 2023-03-01 (Wed, 01 Mar 2023)
Changed paths:
M Source/JavaScriptCore/jsc.cpp
M Source/JavaScriptCore/wasm/WasmStreamingParser.cpp
M Source/WTF/wtf/FileSystem.cpp
M Source/WTF/wtf/FileSystem.h
M Source/WTF/wtf/glib/FileSystemGlib.cpp
M Source/WTF/wtf/posix/FileSystemPOSIX.cpp
M Source/WTF/wtf/win/FileSystemWin.cpp
M Source/WebCore/Modules/webdatabase/OriginLock.cpp
M Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp
M Source/WebCore/platform/network/BlobRegistryImpl.cpp
M Source/WebCore/platform/network/curl/CookieJarDB.cpp
M Source/WebCore/platform/network/curl/CurlCacheEntry.cpp
M Source/WebCore/platform/network/curl/CurlCacheManager.cpp
M Source/WebCore/workers/service/server/SWScriptStorage.cpp
M Source/WebKit/NetworkProcess/NetworkDataTaskBlob.cpp
M Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerDownloadTask.cpp
M Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp
M Source/WebKit/NetworkProcess/cache/NetworkCache.cpp
M Source/WebKit/NetworkProcess/cache/NetworkCacheIOChannelCurl.cpp
M Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp
M Source/WebKit/NetworkProcess/storage/CacheStorageManager.cpp
M Source/WebKit/Shared/PersistencyUtils.cpp
M Source/WebKit/Shared/WebMemorySampler.cpp
M Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm
M Source/WebKit/UIProcess/API/APIContentRuleListStore.cpp
M Source/WebKit/UIProcess/ios/WKModelView.mm
M Source/WebKit/WebProcess/Model/mac/ARKitInlinePreviewModelPlayerMac.mm
M Tools/TestWebKitAPI/Tests/WTF/FileSystem.cpp
M Tools/TestWebKitAPI/Tests/WebCore/FileMonitor.cpp
M Tools/TestWebKitAPI/Tests/WebCore/cocoa/DatabaseTrackerTest.mm
Log Message:
-----------
Cherry-pick 22004f62ebe4. rdar://problem/104590894
Rename FileSystem::FileOpenMode::Write to FileSystem::FileOpenMode::Truncate
https://bugs.webkit.org/show_bug.cgi?id=251073
rdar://104590894
Reviewed by Žan Doberšek.
In existing implementation, file opened with FileSystem::FileOpenMode::Write will be truncated or recreated if it
exists. This behavior is not clearly indicated in the name, and it causes confusion to users. For example, some places
check file size or truncate file after opening it with FileSystem::FileOpenMode::Write mode. They may actually need to
use FileSystem::FileOpenMode::ReadWrite mode. Therefore, this patch renames FileSystem::FileOpenMode::Write to
FileSystem::FileOpenMode::Truncate. Also, this patch makes glib implementation of FileSystem::FileOpenMode::Truncate
mode aligned with POSIX and win implementation, which recreates file when file with same name already exists.
* Source/JavaScriptCore/jsc.cpp:
(JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/wasm/WasmStreamingParser.cpp:
(JSC::Wasm::dumpWasmSource):
* Source/WTF/wtf/FileSystem.cpp:
(WTF::FileSystemImpl::MappedFileData::mapFileHandle):
(WTF::FileSystemImpl::readOrMakeSalt):
(WTF::FileSystemImpl::overwriteEntireFile):
* Source/WTF/wtf/FileSystem.h:
* Source/WTF/wtf/glib/FileSystemGlib.cpp:
(WTF::FileSystemImpl::openFile):
* Source/WTF/wtf/posix/FileSystemPOSIX.cpp:
(WTF::FileSystemImpl::openFile):
* Source/WTF/wtf/win/FileSystemWin.cpp:
(WTF::FileSystemImpl::openFile):
(WTF::FileSystemImpl::MappedFileData::mapFileHandle):
* Source/WebCore/Modules/webdatabase/OriginLock.cpp:
* Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::writeDataToUniqueFileInDirectory):
* Source/WebCore/platform/network/BlobRegistryImpl.cpp:
(WebCore::BlobRegistryImpl::writeBlobToFilePath):
* Source/WebCore/platform/network/curl/CookieJarDB.cpp:
(WebCore::CookieJarDB::flagDatabaseCorruption):
* Source/WebCore/platform/network/curl/CurlCacheEntry.cpp:
(WebCore::CurlCacheEntry::saveResponseHeaders):
(WebCore::CurlCacheEntry::openContentFile):
* Source/WebCore/platform/network/curl/CurlCacheManager.cpp:
(WebCore::CurlCacheManager::saveIndex):
* Source/WebCore/workers/service/server/SWScriptStorage.cpp:
(WebCore::SWScriptStorage::store):
* Source/WebKit/NetworkProcess/NetworkDataTaskBlob.cpp:
(WebKit::NetworkDataTaskBlob::download):
* Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerDownloadTask.cpp:
(WebKit::ServiceWorkerDownloadTask::setPendingDownloadLocation):
* Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp:
(WebKit::CacheStorage::Engine::writeSizeFile):
* Source/WebKit/NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::dumpContentsToFile):
* Source/WebKit/NetworkProcess/cache/NetworkCacheIOChannelCurl.cpp:
(WebKit::NetworkCache::IOChannel::IOChannel):
* Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp:
(WebKit::NetworkDataTaskCurl::invokeDidReceiveResponse):
* Source/WebKit/NetworkProcess/storage/CacheStorageManager.cpp:
(WebKit::writeCachesList):
* Source/WebKit/Shared/PersistencyUtils.cpp:
(WebKit::writeToDisk):
* Source/WebKit/Shared/WebMemorySampler.cpp:
(WebKit::WebMemorySampler::initializeSandboxedLogFile):
* Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm:
(WebKit::writeSandboxDataToCacheFile):
* Source/WebKit/UIProcess/API/APIContentRuleListStore.cpp:
(API::ContentRuleListStore::invalidateContentRuleListVersion):
* Source/WebKit/UIProcess/ios/WKModelView.mm:
(-[WKModelView createFileForModel:]):
* Source/WebKit/WebProcess/Model/mac/ARKitInlinePreviewModelPlayerMac.mm:
(WebKit::ARKitInlinePreviewModelPlayerMac::createFile):
* Tools/TestWebKitAPI/Tests/WTF/FileSystem.cpp:
(TestWebKitAPI::createTestFile):
(TestWebKitAPI::TEST_F):
* Tools/TestWebKitAPI/Tests/WebCore/FileMonitor.cpp:
(TestWebKitAPI::TEST_F):
* Tools/TestWebKitAPI/Tests/WebCore/cocoa/DatabaseTrackerTest.mm:
(TestWebKitAPI::createFileAtPath):
Canonical link: https://commits.webkit.org/259689@main
Commit: eaa9e0f247058c3ec296de8e5cf647581fde2319
https://github.com/WebKit/WebKit/commit/eaa9e0f247058c3ec296de8e5cf647581fde2319
Author: Darin Adler <darin at apple.com>
Date: 2023-03-01 (Wed, 01 Mar 2023)
Changed paths:
M Source/WebCore/css/CSSPrimitiveValue.cpp
M Source/WebCore/css/CSSPrimitiveValue.h
M Source/WebCore/css/CSSPrimitiveValueMappings.h
M Source/WebCore/css/Counter.h
M Source/WebCore/css/DeprecatedCSSOMCounter.h
M Source/WebCore/css/DeprecatedCSSOMPrimitiveValue.cpp
M Source/WebCore/css/parser/CSSPropertyParser.cpp
M Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp
M Source/WebCore/css/parser/CSSPropertyParserHelpers.h
M Source/WebCore/css/process-css-values.py
M Source/WebCore/style/StyleBuilderCustom.h
Log Message:
-----------
Cherry-pick 29c1dd855828. rdar://problem/104803128
Save some memory by not putting serialized valueID strings into a hash map
https://bugs.webkit.org/show_bug.cgi?id=251340
rdar://104803128
Reviewed by Oriol Brufau.
We can efficiently get the serialized form of CSS value IDs. We should leave them out of the
HashMap that is used to store the serialized form of other CSSPrimitiveValue objects. There
are likely other improvements to make to this machinery, but this saves us some memory right
away, and should not have a measurable performance cost.
While looking over serialization, noticed that the Counter class used to hold counter
content was using CSSPrimitiveValue for no good reason. Turned the class into a struct
that uses AtomString and CSSValueID instead of CSSPrimitiveValue.
* Source/WebCore/css/CSSPrimitiveValue.cpp:
(WebCore::serializedPrimitiveValues): Renamed from cssTextCache. This is not a cache, since
it stores memoized values permanently until the primitive values are deallocated, so we will
not call it a cache.
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Updated for change to m_value.number.
(WebCore::CSSPrimitiveValue::~CSSPrimitiveValue): Merged in the code from the cleanup
function. Removed bits of the code that set the value to a cleaned up state, since we don't
need do do that in a destructor. Updated for name change of serializedPrimitiveValues.
(WebCore::CSSPrimitiveValue::cleanup): Deleted.
(WebCore::CSSPrimitiveValue::computeLengthDouble const): Updated for change to m_value.number.
(WebCore::CSSPrimitiveValue::doubleValue const): Ditto.
(WebCore::CSSPrimitiveValue::doubleValueDividingBy100IfPercentage const): Ditto.
(WebCore::CSSPrimitiveValue::isZero const): Ditto.
(WebCore::CSSPrimitiveValue::isPositive const): Ditto.
(WebCore::CSSPrimitiveValue::isNegative const): Ditto.
(WebCore::formatNonfiniteValue): Renamed from formatInfiniteOrNanValue and changed from
a member function to a non-member function. Also tweaked the idiom to make the code a bit
tighter, easier to read, and slightly more efficient for the NaN case.
(WebCore::CSSPrimitiveValue::formatNumberValue const): Use formatNonfiniteValue and
std::isfinite and updated for change to m_value.number.
(WebCore::CSSPrimitiveValue::formatIntegerValue const): Ditto.
(WebCore::CSSPrimitiveValue::unitTypeString): Fixed indentation to match WebKit guidelines.
Sorted cases alphabetically.
(WebCore::serialize): Added. Serializes the Counter struct. Put this here to avoid adding a
Counter.cpp file or adding includes to Counter.h. Use makeString for counter(), but we still need
to use StringBuilder for counters().
(WebCore::CSSPrimitiveValue::serializeInternal const): Renamed from formatNumberForCustomCSSText
since this covers all types, not just numbers. Changed code to use unitTypeString to avoid
repeating all the same suffixes, should still be fast. Sorted cases alphabetically. Use
makeString for CSS_ATTR and CSS_COUNTER_NAME to avoid a little bit of reference count churn for
slightly better performance. Use the new serialize function for CSS_COUNTER.
(WebCore::CSSPrimitiveValue::customCSSText const): Added special cases for CSS_UNKNOWN,
CSS_VALUE_ID, and CSS_PROPERTY_ID since all three can be serialized efficiently without memoizing
the result in the serializedPrimitiveValues map. Use HashMap::add instead of HashMap::set,
making the code slightly tighter.
(WebCore::CSSPrimitiveValue::equals const): Removed some unneeded null checks. Updated for change
to m_value.number.
* Source/WebCore/css/CSSPrimitiveValue.h: Changed Counter from a class to a struct. Removed
cleanup and formatInfiniteOrNanValue. Renamed formatNumberForCustomCSSText to serializeInternal.
Renamed m_value.num to m_value.number.
* Source/WebCore/css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator ColumnSpan const): Updated for change to m_value.number.
* Source/WebCore/css/Counter.h: Changed from a class to a struct. Use data members instead of
functions, AtomString and CSSValueID instead of CSSPrimitiveValue.
* Source/WebCore/css/DeprecatedCSSOMCounter.h: Use String and CSSValueID instead of
DeprecatedCSSOMPrimitiveValue.
* Source/WebCore/css/DeprecatedCSSOMPrimitiveValue.cpp:
(WebCore::DeprecatedCSSOMPrimitiveValue::getCounterValue const): Updated since we no longer
neeed to pass m_owner to create a DeprecatedCSSOMCounter, and tweaked code style a little.
* Source/WebCore/css/parser/CSSPropertyParser.cpp: Removed unneded include.
* Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeCustomIdentRaw): Added.
(WebCore::CSSPropertyParserHelpers::consumeCustomIdent): Use consumeCustomIdentRaw.
(WebCore::CSSPropertyParserHelpers::consumeCounterContent): Updated for change to Counter.
Use consumeCustomIdentRaw. Made this local to the file.
Source/WebCore/css/parser/CSSPropertyParserHelpers.h: Removed the declaration of
consumeCounterContent. It's better for future maintenance to only declare functions that are used
outside the .cpp file.
* Source/WebCore/css/process-css-values.py:
(GenerationContext): Export nameString. Now used in WebKitLegacy.
* Source/WebCore/style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyValueContent): Update counterValue code for the changes
to Counter.
Canonical link: https://commits.webkit.org/259562@main
Canonical link: https://commits.webkit.org/259548.336@safari-7615-branch
Commit: d9297d3f4c2d065dff82483346cef1188dd857b6
https://github.com/WebKit/WebKit/commit/d9297d3f4c2d065dff82483346cef1188dd857b6
Author: Chris Dumez <cdumez at apple.com>
Date: 2023-03-01 (Wed, 01 Mar 2023)
Changed paths:
M LayoutTests/TestExpectations
A LayoutTests/fast/dom/Orientation/no-orientation-change-event-when-unparenting-view-expected.txt
A LayoutTests/fast/dom/Orientation/no-orientation-change-event-when-unparenting-view.html
M LayoutTests/platform/ios/TestExpectations
M Source/WebCore/platform/ScreenOrientationProvider.cpp
M Source/WebCore/platform/ScreenOrientationProvider.h
M Source/WebCore/platform/ios/ScreenOrientationProviderIOS.mm
Log Message:
-----------
Cherry-pick 914c16e8facc. rdar://problem/104269674
Regression(ScreenOrientation API) Fullscreen exits right away on Youtube
https://bugs.webkit.org/show_bug.cgi?id=251396
rdar://104269674
Reviewed by Wenson Hsieh.
When entering fullscreen on youtube, the view would lose its window and
then get added to a new Window. This would end up calling
`ScreenOrientationProvider::setWindow()` first with nil then with the new
window.
To determine the screen orientation, the ScreenOrientationProvider currently
needs access to the window object inside platformCurrentOrientation(). If
it didn't have a window, platformCurrentOrientation() would just return
PortraitPrimary.
When updating the window, setWindow() would call screenOrientationDidChange()
which would call platformCurrentOrientation() again to make sure the cached
orientation is still accurate and to notify the clients that the orientation
has changed otherwise. However, since platformCurrentOrientation() requires
a window, there is no point in calling screenOrientationDidChange() if the
new window is nil. It will just reset the orientation to the PortaitPrimary
value and potentially send an incorrect orientation change notification to
clients. This incorrect notification is what was causing the fullscreen
mode to exit (since fullscreen mode exists on orientation change).
To address this, I made 2 changes:
1. setWindow() now only calls screenOrientationDidChange() if the new
window is non-nil.
2. platformCurrentOrientation() now returns a std::optional<> to make it
clear when it wasn't able to determinate the orientation.
4. In screenOrientationDidChange(), if platformCurrentOrientation() returns
std::nullopt, we now return early so that we don't send clients a
potentially inaccurate orientation. Once the view gets added again to
a window, we'll call screenOrientationDidChange() again to make sure
we send a change notification if needed.
* Source/WebCore/platform/ScreenOrientationProvider.cpp:
(WebCore::ScreenOrientationProvider::screenOrientationDidChange):
(WebCore::ScreenOrientationProvider::currentOrientation):
(WebCore::ScreenOrientationProvider::platformCurrentOrientation):
* Source/WebCore/platform/ScreenOrientationProvider.h:
* Source/WebCore/platform/ios/ScreenOrientationProviderIOS.mm:
(WebCore::ScreenOrientationProvider::platformCurrentOrientation):
(WebCore::ScreenOrientationProvider::setWindow):
Canonical link: https://commits.webkit.org/259678@main
Canonical link: https://commits.webkit.org/259548.337@safari-7615-branch
Commit: a99adc5e033d6e1e8cf4770a75883e85f420eebb
https://github.com/WebKit/WebKit/commit/a99adc5e033d6e1e8cf4770a75883e85f420eebb
Author: Vitaly Dyachkov <vitaly at igalia.com>
Date: 2023-03-01 (Wed, 01 Mar 2023)
Changed paths:
M Source/WebCore/platform/graphics/WidthIterator.cpp
Log Message:
-----------
Cherry-pick f7b4df2d3a2c. rdar://problem/104819130
`InlineTextBox`es containing `Zero Width Joiner`, `Zero Width Non-Joiner`, or `Zero Width No-Break Space` characters must not use simplified text measuring
https://bugs.webkit.org/show_bug.cgi?id=251009
Reviewed by Alan Baradlay.
When calculating the width of an InlineTexBox using simplified measuring,
we simply sum up the width of every glyph. Some fonts
(at least FreeType fonts) specify the non-zero width of
`Zero Width Joiner`, `Zero Width Non-Joiner`, and `Zero Width No-Break Space`.
Later, during the rendering, these glyphs are skipped causing
the `InlineTextBox`es to become wider than they should be.
Originally, `WidthIterator::characterCanUseSimplifiedTextMeasuring`
was returning `false` for these characters. It was flipped by
https://commits.webkit.org/241351@main along with `New Line`
and `Carriage Return`.
Fixes `css2.1/20110323/word-spacing-characters-003.htm` for WPE port.
* Source/WebCore/platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::characterCanUseSimplifiedTextMeasuring):
Canonical link: https://commits.webkit.org/259618@main
Canonical link: https://commits.webkit.org/259548.338@safari-7615-branch
Commit: 6c448bfc7081e8d698e03c7158d0e984fb689366
https://github.com/WebKit/WebKit/commit/6c448bfc7081e8d698e03c7158d0e984fb689366
Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
Date: 2023-03-01 (Wed, 01 Mar 2023)
Changed paths:
M Source/WebCore/platform/graphics/GeometryUtilities.cpp
Log Message:
-----------
Cherry-pick 4ecebb76cee1. rdar://problem/104671777
Improve intersection precision in FloatPoint
Improve intersection precision in FloatPoint
https://bugs.webkit.org/show_bug.cgi?id=250803
Reviewed by Myles C. Maxfield.
Merge - https://src.chromium.org/viewvc/blink?view=rev&revision=161214
This patch is to refactor 'findIntersection' code for FloatPoint based on Line-Line
intersection inspiration from Skia's library and Schneider and Eberly's book.
* Source/WebCore/platform/graphics/GeometryUtilities.cpp:
(findIntersection): Refactor code
Canonical link: https://commits.webkit.org/259574@main
Canonical link: https://commits.webkit.org/259548.339@safari-7615-branch
Commit: 87ce4726719dda9611eb333b8a732894529e4ec8
https://github.com/WebKit/WebKit/commit/87ce4726719dda9611eb333b8a732894529e4ec8
Author: Jon Jensen <jonj at netflix.com>
Date: 2023-03-01 (Wed, 01 Mar 2023)
Changed paths:
A LayoutTests/imported/w3c/web-platform-tests/xhr/formdata/constructor-submitter-expected.txt
A LayoutTests/imported/w3c/web-platform-tests/xhr/formdata/constructor-submitter.html
M Source/WebCore/html/DOMFormData.cpp
M Source/WebCore/html/DOMFormData.h
M Source/WebCore/html/DOMFormData.idl
M Source/WebCore/html/HTMLFormElement.cpp
Log Message:
-----------
Cherry-pick 136a23f12bae. rdar://problem/104820452
Add optional submitter parameter to FormData constructor
https://bugs.webkit.org/show_bug.cgi?id=251220
Reviewed by Chris Dumez
Implement the new submitter parameter to the FormData constructor
Spec PR: https://github.com/whatwg/xhr/pull/366
WPT PR: https://github.com/web-platform-tests/wpt/pull/37895
Test: imported/w3c/web-platform-tests/xhr/formdata/constructor-submitter.html
* LayoutTests/imported/w3c/web-platform-tests/xhr/formdata/constructor-submitter-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/xhr/formdata/constructor-submitter.html: Added.
* Source/WebCore/html/DOMFormData.cpp:
(WebCore::DOMFormData::create): add submitter support
* Source/WebCore/html/DOMFormData.h: update signature
* Source/WebCore/html/DOMFormData.idl: update interface
* Source/WebCore/html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::requestSubmit): improve error messages#
Canonical link: https://commits.webkit.org/259558@main
Canonical link: https://commits.webkit.org/259548.340@safari-7615-branch
Commit: fda69ff4951c5db9bf5da1990ae8100b04655611
https://github.com/WebKit/WebKit/commit/fda69ff4951c5db9bf5da1990ae8100b04655611
Author: Philippe Normand <philn at igalia.com>
Date: 2023-03-01 (Wed, 01 Mar 2023)
Changed paths:
M Source/WebCore/Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp
M Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
M Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h
M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
Log Message:
-----------
Cherry-pick 939a1163dd59. rdar://problem/104818556
[GStreamer] Utilities to query presence of element/pad properties
https://bugs.webkit.org/show_bug.cgi?id=251260
Reviewed by Xabier Rodriguez-Calvar.
Refactoring of existing code into a new utility function, `gstObjectHasProperty()`, working for
elements and pads.
* Source/WebCore/Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp:
(WebCore::GStreamerMediaEndpoint::requestPad):
(WebCore::GStreamerMediaEndpoint::addRemoteStream):
* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::configureVideoDecoderForHarnessing):
(WebCore::gstObjectHasProperty):
* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h:
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::configureDepayloader):
(WebCore::MediaPlayerPrivateGStreamer::configureVideoDecoder):
(WebCore::MediaPlayerPrivateGStreamer::createVideoSink):
Canonical link: https://commits.webkit.org/259555@main
Canonical link: https://commits.webkit.org/259548.341@safari-7615-branch
Commit: 720ce6f217de19e0ab1887a152b97c65161a07ad
https://github.com/WebKit/WebKit/commit/720ce6f217de19e0ab1887a152b97c65161a07ad
Author: Philippe Normand <philn at igalia.com>
Date: 2023-03-01 (Wed, 01 Mar 2023)
Changed paths:
M Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp
M Source/WebCore/platform/graphics/gstreamer/VideoDecoderGStreamer.cpp
M Source/WebCore/platform/graphics/gstreamer/VideoEncoderGStreamer.cpp
M Source/WebCore/platform/gstreamer/GStreamerElementHarness.cpp
M Source/WebCore/platform/gstreamer/GStreamerElementHarness.h
M Tools/TestWebKitAPI/Tests/WebCore/gstreamer/GstElementHarness.cpp
Log Message:
-----------
Cherry-pick f5ad43b3b1b4. rdar://problem/104817791
[GStreamer] Harness: Use GRefPtrs for sample/buffer/event push APIs
https://bugs.webkit.org/show_bug.cgi?id=251257
Reviewed by Xabier Rodriguez-Calvar.
* Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp:
(WebCore::ImageDecoderGStreamer::pushEncodedData):
* Source/WebCore/platform/graphics/gstreamer/VideoDecoderGStreamer.cpp:
(WebCore::GStreamerInternalVideoDecoder::decode):
* Source/WebCore/platform/graphics/gstreamer/VideoEncoderGStreamer.cpp:
(WebCore::GStreamerInternalVideoEncoder::encode):
* Source/WebCore/platform/gstreamer/GStreamerElementHarness.cpp:
(WebCore::GStreamerElementHarness::start):
(WebCore::GStreamerElementHarness::pushStickyEvents):
(WebCore::GStreamerElementHarness::pushSample):
(WebCore::GStreamerElementHarness::pushBuffer):
(WebCore::GStreamerElementHarness::pushBufferFull):
(WebCore::GStreamerElementHarness::pushEvent):
(WebCore::GStreamerElementHarness::flush):
* Source/WebCore/platform/gstreamer/GStreamerElementHarness.h:
* Tools/TestWebKitAPI/Tests/WebCore/gstreamer/GstElementHarness.cpp:
(TestWebKitAPI::TEST_F):
Canonical link: https://commits.webkit.org/259553@main
Canonical link: https://commits.webkit.org/259548.342@safari-7615-branch
Commit: cd730637e75338d17f8982ad5b59950bffd043a2
https://github.com/WebKit/WebKit/commit/cd730637e75338d17f8982ad5b59950bffd043a2
Author: Sihui Liu <sihui_liu at apple.com>
Date: 2023-03-01 (Wed, 01 Mar 2023)
Changed paths:
M Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp
M Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h
M Source/WebKit/NetworkProcess/NetworkProcess.cpp
M Source/WebKit/NetworkProcess/NetworkProcess.h
M Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp
M Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.h
M Source/WebKit/Shared/WebsiteDataStoreParameters.h
M Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
Log Message:
-----------
Cherry-pick 2c202f4d6f65. rdar://problem/104757451
Remove unused WebCore::StorageQuotaManager code
https://bugs.webkit.org/show_bug.cgi?id=251287
rdar://104757451
Reviewed by Chris Dumez.
* Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp:
* Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h:
* Source/WebKit/NetworkProcess/NetworkProcess.cpp:
* Source/WebKit/NetworkProcess/NetworkProcess.h:
* Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp:
* Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.h:
* Source/WebKit/Shared/WebsiteDataStoreParameters.h:
* Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:
Canonical link: https://commits.webkit.org/259567@main
Canonical link: https://commits.webkit.org/259548.343@safari-7615-branch
Commit: 68c9eaf07cf0b52e7923a0d919d7efd8a37c8713
https://github.com/WebKit/WebKit/commit/68c9eaf07cf0b52e7923a0d919d7efd8a37c8713
Author: Gavin Phillips <gavin.p at apple.com>
Date: 2023-03-01 (Wed, 01 Mar 2023)
Changed paths:
M Source/WebCore/Headers.cmake
M Source/WebCore/display/css/DisplayBoxDecorationPainter.cpp
M Source/WebCore/platform/graphics/DecodingOptions.h
M Source/WebCore/platform/graphics/GraphicsContext.cpp
M Source/WebCore/platform/graphics/GraphicsContext.h
M Source/WebCore/platform/graphics/GraphicsContextState.h
M Source/WebCore/platform/graphics/GraphicsTypes.h
M Source/WebCore/platform/graphics/ImageDecoder.h
M Source/WebCore/platform/graphics/InbandGenericCue.h
M Source/WebCore/platform/graphics/NullGraphicsContext.h
M Source/WebCore/platform/graphics/cairo/CairoOperations.cpp
M Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
M Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm
M Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListItems.h
M Source/WebCore/platform/graphics/filters/DistantLightSource.h
M Source/WebCore/platform/graphics/filters/FELighting.h
M Source/WebCore/platform/graphics/mac/controls/MenuListButtonMac.mm
M Source/WebCore/platform/graphics/mac/controls/TextFieldMac.mm
M Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp
M Source/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp
M Source/WebCore/rendering/BorderPainter.cpp
M Source/WebCore/rendering/RenderDetailsMarker.cpp
M Source/WebCore/rendering/RenderImage.cpp
M Source/WebCore/rendering/RenderListMarker.cpp
M Source/WebCore/rendering/RenderThemeIOS.mm
M Source/WebCore/rendering/RenderThemeMac.mm
M Source/WebCore/rendering/TextBoxPainter.cpp
M Source/WebCore/rendering/TextDecorationPainter.cpp
M Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp
M Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp
M Source/WebCore/rendering/mathml/RenderMathMLMenclose.cpp
M Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp
M Source/WebCore/rendering/svg/SVGRenderSupport.cpp
M Source/WebKit/Shared/WTFArgumentCoders.serialization.in
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Tools/TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp
Log Message:
-----------
Cherry-pick 4f6caeb7a661. rdar://problem/104643561
Continue porting of graphics related types to the new IPC serialization format
https://bugs.webkit.org/show_bug.cgi?id=251148
rdar://104643561
Reviewed by Alex Christensen.
Continue the porting work of platform/graphics related types to the new
serialization format. This change includes the porting of:
- CompositeOperator
- BlendMode
- GradientSpreadMethod
- InterpolationQuality
- LineCap
- LineJoin
- StrokeStyle
- TextDrawingMode
- DecodingMode
- CompositeMode
- DocumentMarkerLineStyleMode
- ShadowRadiusMode
- DropShadow
- GenericCueData::Alignment
- GenericCueData::Status
- GenericCueData
- ImageDecoderFrameInfo
- DistantLightSource
* Source/WebCore/Headers.cmake:
* Source/WebCore/display/css/DisplayBoxDecorationPainter.cpp:
(WebCore::Display::BorderPainter::drawBoxSideFromPath const):
(WebCore::Display::BorderPainter::drawLineForBoxSide const):
* Source/WebCore/platform/graphics/DecodingOptions.h:
* Source/WebCore/platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::adjustLineToPixelBoundaries):
(WebCore::GraphicsContext::dashedLineCornerWidthForStrokeWidth const):
(WebCore::GraphicsContext::dashedLinePatternWidthForStrokeWidth const):
* Source/WebCore/platform/graphics/GraphicsContext.h:
* Source/WebCore/platform/graphics/GraphicsContextState.h:
* Source/WebCore/platform/graphics/GraphicsTypes.h:
(WebCore::DropShadow::hasOutsets const):
(WebCore::CompositeMode::encode const): Deleted.
(WebCore::CompositeMode::decode): Deleted.
(WebCore::DocumentMarkerLineStyle::encode const): Deleted.
(WebCore::DocumentMarkerLineStyle::decode): Deleted.
(WebCore::DropShadow::encode const): Deleted.
(WebCore::DropShadow::decode): Deleted.
* Source/WebCore/platform/graphics/ImageDecoder.h:
(WebCore::ImageDecoder::FrameInfo::encode const): Deleted.
(WebCore::ImageDecoder::FrameInfo::decode): Deleted.
* Source/WebCore/platform/graphics/InbandGenericCue.h:
(WebCore::GenericCueData::decode): Deleted.
(WebCore::GenericCueData::encode const): Deleted.
* Source/WebCore/platform/graphics/NullGraphicsContext.h:
* Source/WebCore/platform/graphics/cairo/CairoOperations.cpp:
(WebCore::Cairo::dashedLineCornerWidthForStrokeWidth):
(WebCore::Cairo::dashedLinePatternWidthForStrokeWidth):
(WebCore::Cairo::State::setStrokeStyle):
(WebCore::Cairo::drawRect):
(WebCore::Cairo::drawLine):
(WebCore::Cairo::drawDotsForDocumentMarker):
(WebCore::Cairo::drawEllipse):
* Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContextCairo::drawLine):
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContextCG::drawRect):
(WebCore::GraphicsContextCG::drawLine):
(WebCore::calculateDrawingMode):
(WebCore::GraphicsContextCG::drawLinesForText):
* Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm:
(WebCore::colorForMarkerLineStyle):
* Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp:
(WebCore::DisplayList::DrawDotsForDocumentMarker::apply const):
* Source/WebCore/platform/graphics/displaylists/DisplayListItems.h:
(WebCore::DisplayList::DrawDotsForDocumentMarker::encode const):
(WebCore::DisplayList::DrawDotsForDocumentMarker::decode):
(WebCore::DisplayList::DrawDotsForDocumentMarker::isValid const): Deleted.
* Source/WebCore/platform/graphics/filters/DistantLightSource.h:
(WebCore::DistantLightSource::encode const): Deleted.
(WebCore::DistantLightSource::decode): Deleted.
* Source/WebCore/platform/graphics/filters/FELighting.h:
(WebCore::FELighting::encode const):
(WebCore::FELighting::decode):
* Source/WebCore/platform/graphics/mac/controls/MenuListButtonMac.mm:
(WebCore::MenuListButtonMac::draw):
* Source/WebCore/platform/graphics/mac/controls/TextFieldMac.mm:
(WebCore::TextFieldMac::draw):
* Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:
(Nicosia::CairoOperationRecorder::drawLine):
* Source/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp:
(WebCore::GraphicsContextCG::drawDotsForDocumentMarker):
* Source/WebCore/rendering/BorderPainter.cpp:
(WebCore::BorderPainter::paintOutline):
(WebCore::BorderPainter::drawBoxSideFromPath):
(WebCore::BorderPainter::drawLineForBoxSide):
* Source/WebCore/rendering/RenderDetailsMarker.cpp:
(WebCore::RenderDetailsMarker::paint):
* Source/WebCore/rendering/RenderImage.cpp:
(WebCore::RenderImage::paintIncompleteImageOutline const):
* Source/WebCore/rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint):
* Source/WebCore/rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintProgressBar):
(WebCore::RenderThemeIOS::paintCheckbox):
(WebCore::RenderThemeIOS::paintRadio):
(WebCore::RenderThemeIOS::paintColorWellDecorations):
* Source/WebCore/rendering/RenderThemeMac.mm:
(WebCore::paintAttachmentPlaceholderBorder):
* Source/WebCore/rendering/TextBoxPainter.cpp:
(WebCore::TextBoxPainter<TextBoxPath>::paintPlatformDocumentMarker):
* Source/WebCore/rendering/TextDecorationPainter.cpp:
(WebCore::textDecorationStyleToStrokeStyle):
* Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::RenderMathMLBlock::paint):
* Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::paint):
* Source/WebCore/rendering/mathml/RenderMathMLMenclose.cpp:
(WebCore::RenderMathMLMenclose::paint):
* Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::paint):
* Source/WebCore/rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::applyStrokeStyleToContext):
* Source/WebKit/Shared/WTFArgumentCoders.serialization.in:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Tools/TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp:
(TestWebKitAPI::TEST):
Canonical link: https://commits.webkit.org/259648@main
Canonical link: https://commits.webkit.org/259548.344@safari-7615-branch
Commit: c584e96d658ae9dc1bf1940a6f8fed2ce31e2e12
https://github.com/WebKit/WebKit/commit/c584e96d658ae9dc1bf1940a6f8fed2ce31e2e12
Author: Myah Cobbs <mcobbs at apple.com>
Date: 2023-03-01 (Wed, 01 Mar 2023)
Changed paths:
M Source/WebCore/Headers.cmake
M Source/WebCore/display/css/DisplayBoxDecorationPainter.cpp
M Source/WebCore/platform/graphics/DecodingOptions.h
M Source/WebCore/platform/graphics/GraphicsContext.cpp
M Source/WebCore/platform/graphics/GraphicsContext.h
M Source/WebCore/platform/graphics/GraphicsContextState.h
M Source/WebCore/platform/graphics/GraphicsTypes.h
M Source/WebCore/platform/graphics/ImageDecoder.h
M Source/WebCore/platform/graphics/InbandGenericCue.h
M Source/WebCore/platform/graphics/NullGraphicsContext.h
M Source/WebCore/platform/graphics/cairo/CairoOperations.cpp
M Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
M Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm
M Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListItems.h
M Source/WebCore/platform/graphics/filters/DistantLightSource.h
M Source/WebCore/platform/graphics/filters/FELighting.h
M Source/WebCore/platform/graphics/mac/controls/MenuListButtonMac.mm
M Source/WebCore/platform/graphics/mac/controls/TextFieldMac.mm
M Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp
M Source/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp
M Source/WebCore/rendering/BorderPainter.cpp
M Source/WebCore/rendering/RenderDetailsMarker.cpp
M Source/WebCore/rendering/RenderImage.cpp
M Source/WebCore/rendering/RenderListMarker.cpp
M Source/WebCore/rendering/RenderThemeIOS.mm
M Source/WebCore/rendering/RenderThemeMac.mm
M Source/WebCore/rendering/TextBoxPainter.cpp
M Source/WebCore/rendering/TextDecorationPainter.cpp
M Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp
M Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp
M Source/WebCore/rendering/mathml/RenderMathMLMenclose.cpp
M Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp
M Source/WebCore/rendering/svg/SVGRenderSupport.cpp
M Source/WebKit/Shared/WTFArgumentCoders.serialization.in
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Tools/TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp
Log Message:
-----------
Revert "Cherry-pick 4f6caeb7a661. rdar://problem/104643561"
This reverts commit 68c9eaf07cf0b52e7923a0d919d7efd8a37c8713.
Canonical link: https://commits.webkit.org/259548.345@safari-7615-branch
Commit: b550a53976208d4aef222aed1c7e3b87196b2ff0
https://github.com/WebKit/WebKit/commit/b550a53976208d4aef222aed1c7e3b87196b2ff0
Author: Chris Dumez <cdumez at apple.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
M Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.h
M Source/WebCore/html/HTMLIFrameElement.cpp
M Source/WebCore/page/Quirks.cpp
M Source/WebCore/page/Quirks.h
M Source/WebCore/platform/RuntimeApplicationChecks.h
M Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm
Log Message:
-----------
Cherry-pick a3d9fd4fa28d. rdar://problem/104519846
Regression(LazyIframeLoading): "MySize ASSIST" view is empty in UNIQLO app
https://bugs.webkit.org/show_bug.cgi?id=251639
rdar://104519846
Reviewed by Ryosuke Niwa.
The "MySize ASSIST" view contains an iframe that is initially outside the
viewport and marked as `loading="lazy"`. There is JS logic on the page to wait
for the iframe's load event before moving the iframe to the viewport.
However, since the iframe is outside the viewport and loads lazily, its load
event never fires and the view remains blank.
This looks like a content issue so I am adding a quirk for the UNIQLO app
which deactivates lazy iframe loading with a linked-on-after SDK check.
* Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.h:
* Source/WebCore/html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::shouldLoadFrameLazily):
* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::shouldDisableLazyIframeLoadingQuirk const):
* Source/WebCore/page/Quirks.h:
* Source/WebCore/platform/RuntimeApplicationChecks.h:
* Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm:
(WebCore::IOSApplication::isUNIQLOApp):
Canonical link: https://commits.webkit.org/259790@main
Canonical link: https://commits.webkit.org/259456.438@safari-7615-branch
Commit: e69c4bed08c34fd2841d56d00c57066ac74a0a93
https://github.com/WebKit/WebKit/commit/e69c4bed08c34fd2841d56d00c57066ac74a0a93
Author: Chris Dumez <cdumez at apple.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
A LayoutTests/fast/frames/about-blank-frame-no-lazy-loading-expected.txt
A LayoutTests/fast/frames/about-blank-frame-no-lazy-loading.html
M Source/WebCore/html/HTMLFrameElementBase.cpp
M Source/WebCore/html/HTMLIFrameElement.cpp
Log Message:
-----------
Cherry-pick b57dc1f8ff99. rdar://problem/104392542
Regression(252852 at main) Games on kongregate.com are no longer loading
https://bugs.webkit.org/show_bug.cgi?id=252636
rdar://104392542
Reviewed by Ryosuke Niwa.
Do not lazy load iframes that have no valid URL or "about:blank" as URL. Lazily
loading such iframes has no performance benefits and can actually cause breakage
as JS (like on kongregate.com) may expect them to load synchronously.
Note that we have a more general problem where we fail to create the Frame &
initial empty document when we decide to lazy load an iframe. This is not correct,
and we should only delay the navigation to the frame URL *after* the creation of
the initial empty document. However, fixing this is a larger change and this is
not a regression from 252852 at main. As a result, I am merely adding a FIXME comment
in this patch and will address separately.
* LayoutTests/fast/frames/about-blank-frame-no-lazy-loading-expected.txt: Added.
* LayoutTests/fast/frames/about-blank-frame-no-lazy-loading.html: Added.
Add layout test coverage.
* Source/WebCore/html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::openURL):
* Source/WebCore/html/HTMLIFrameElement.cpp:
(WebCore::isFrameLazyLoadable):
(WebCore::HTMLIFrameElement::shouldLoadFrameLazily):
Canonical link: https://commits.webkit.org/260612@main
Canonical link: https://commits.webkit.org/259456.439@safari-7615-branch
Commit: 233324d04b67db9c59f5f20b9bceaa7f5837ca31
https://github.com/WebKit/WebKit/commit/233324d04b67db9c59f5f20b9bceaa7f5837ca31
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
M Source/JavaScriptCore/bytecode/BytecodeList.rb
M Source/JavaScriptCore/generator/DSL.rb
M Source/JavaScriptCore/generator/Section.rb
Log Message:
-----------
Cherry-pick 7b5086f554ea. rdar://problem/106151016
[JSC] Disable automatic sorting of JS opcodes
https://bugs.webkit.org/show_bug.cgi?id=251940
rdar://105186257
Reviewed by Yusuke Suzuki.
This patch doesn't really change anything yet. I simply dumped the order in which we
were sorting the opcodes, disabled the automatic sorting and added some validation,
then changed BytecodeList.rb so the source matches the previous order.
In a subsequent patch I'll actually use a different order based on the Metadata
alignment requirements so we can get rid of all padding in the MetadataTable.
* Source/JavaScriptCore/bytecode/BytecodeList.rb:
* Source/JavaScriptCore/generator/DSL.rb:
* Source/JavaScriptCore/generator/Section.rb:
Canonical link: https://commits.webkit.org/260055@main
Canonical link: https://commits.webkit.org/259456.440@safari-7615-branch
Commit: b7942af07b5dfb6cbf50e5363b662d14c9289ffc
https://github.com/WebKit/WebKit/commit/b7942af07b5dfb6cbf50e5363b662d14c9289ffc
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
M Source/JavaScriptCore/bytecode/BytecodeList.rb
M Source/JavaScriptCore/bytecode/UnlinkedMetadataTable.cpp
Log Message:
-----------
Cherry-pick e2606b1940c6. rdar://problem/105276503
[JSC] Sort opcodes to remove padding from metadata table
https://bugs.webkit.org/show_bug.cgi?id=252055
rdar://105276503
Reviewed by Yusuke Suzuki.
Sort the opcodes by metadata alignment requirements. We start with 8-byte aligned,
followed by 4-byte, etc. The memory savings are minimal (too small to measure with
confidence), but they are also free.
* Source/JavaScriptCore/bytecode/BytecodeList.rb:
* Source/JavaScriptCore/bytecode/UnlinkedMetadataTable.cpp:
(JSC::UnlinkedMetadataTable::finalize):
Canonical link: https://commits.webkit.org/260193@main
Canonical link: https://commits.webkit.org/259456.441@safari-7615-branch
Commit: 42a8cbc19dc61ca4f9958ee8a7a0f939d3ffc773
https://github.com/WebKit/WebKit/commit/42a8cbc19dc61ca4f9958ee8a7a0f939d3ffc773
Author: Antti Koivisto <antti at apple.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
A LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/transition-important-expected.txt
A LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/transition-important.html
M Source/WebCore/style/PropertyCascade.cpp
M Source/WebCore/style/PropertyCascade.h
M Source/WebCore/style/StyleTreeResolver.cpp
M Source/WebCore/style/StyleTreeResolver.h
Log Message:
-----------
Cherry-pick e0fa0f2073f1. rdar://problem/105929421
REGRESSION (258514 at main): Transition of !important property fails to animate
https://bugs.webkit.org/show_bug.cgi?id=111329
rdar://105929421
Reviewed by Antoine Quint.
The cascade precedence is (https://drafts.csswg.org/css-cascade-5/#cascade-sort)
1) Transition declarations [css-transitions-1]
2) Important user agent declarations
3) Important user declarations
4) Important author declarations
5) Animation declarations [css-animations-1]
6) Normal author declarations
7) Normal user declarations
8) Normal user agent declarations
but we were treating transitions and animations similarly.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/transition-important-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/transition-important.html: Added.
* Source/WebCore/style/PropertyCascade.cpp:
(WebCore::Style::PropertyCascade::addMatch):
(WebCore::Style::PropertyCascade::shouldApplyAfterAnimation):
Don't let !important properties override transitions.
* Source/WebCore/style/PropertyCascade.h:
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::createAnimatedElementUpdate):
Tell the cascade if this is a transition or animation.
Note that this is still incorrect in the (rare) case where you would have both running on an element at the same time.
(WebCore::Style::TreeResolver::applyCascadeAfterAnimation):
* Source/WebCore/style/StyleTreeResolver.h:
Canonical link: https://commits.webkit.org/260880@main
Canonical link: https://commits.webkit.org/259456.442@safari-7615-branch
Commit: 85bdf36d80767a1057f13627a7d37e19e1741384
https://github.com/WebKit/WebKit/commit/85bdf36d80767a1057f13627a7d37e19e1741384
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
M Tools/Scripts/libraries/webkitbugspy/setup.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py
Log Message:
-----------
Cherry-pick 261075 at main (11dd252ef67c). rdar://106092628
[webkitbugspy] Handle empty issue members for bugzilla
https://bugs.webkit.org/show_bug.cgi?id=253167
rdar://106092628
Reviewed by Aakash Jain.
* Tools/Scripts/libraries/webkitbugspy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py:
(Tracker.populate): Treat 'None' as an empty list when invoking 'in' checks.
(Tracker.cc_radar): Ditto.
Canonical link: https://commits.webkit.org/261075@main
Canonical link: https://commits.webkit.org/259548.351@safari-7615-branch
Commit: 9f301d9e042ec74d5ae3abd0fb3e2bdd7a022e0c
https://github.com/WebKit/WebKit/commit/9f301d9e042ec74d5ae3abd0fb3e2bdd7a022e0c
Author: Chirag M Shah <chirag_m_shah at apple.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
A LayoutTests/fullscreen/element-clear-during-fullscreen-crash-expected.txt
A LayoutTests/fullscreen/element-clear-during-fullscreen-crash.html
M Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp
Log Message:
-----------
Bail out early if m_element is deleted
https://bugs.webkit.org/show_bug.cgi?id=253129
rdar://104290899
Reviewed by Jer Noble.
A call to WebFullScreenManager::willEnterFullScreen() can end up calling
WebFullScreenManager::clearElement() which can happen when location.hash
is changed. This clears the m_element which is then later used in
willEnterFullScreen(). This change bails out early if this happens and
cleans up the state-machine.
* LayoutTests/fullscreen/element-clear-during-fullscreen-crash-expected.txt: Added.
* LayoutTests/fullscreen/element-clear-during-fullscreen-crash.html: Added.
* Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::willEnterFullScreen):
Canonical link: https://commits.webkit.org/259548.352@safari-7615-branch
Commit: b82284c1f8c5c2dd555179a18bd0d2053cb537b4
https://github.com/WebKit/WebKit/commit/b82284c1f8c5c2dd555179a18bd0d2053cb537b4
Author: Chirag M Shah <chirag_m_shah at apple.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
A LayoutTests/fast/html/element-moving-to-new-document-crash-expected.txt
A LayoutTests/fast/html/element-moving-to-new-document-crash.html
M Source/WebCore/dom/Element.cpp
M Source/WebCore/dom/UserActionElementSet.cpp
M Source/WebCore/dom/UserActionElementSet.h
Log Message:
-----------
Clear UserActionElement state for the node when it is moved from the Document to a different one
https://bugs.webkit.org/show_bug.cgi?id=253012
rdar://105876245
Reviewed by Ryosuke Niwa.
Before this change, when an element was moved from oldDocument to
newDocument, and we had UserActionElementSet state for it, we never
cleared that. This meant that the element was still marked to have this
state, which the newDocument doesn't know about. This change fixes
that.
* LayoutTests/fast/html/element-moving-to-new-document-crash-expected.txt: Added.
* LayoutTests/fast/html/element-moving-to-new-document-crash.html: Added.
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::removedFromAncestor):
* Source/WebCore/dom/UserActionElementSet.cpp:
(WebCore::UserActionElementSet::clear):
* Source/WebCore/dom/UserActionElementSet.h:
(WebCore::UserActionElementSet::clearAllForElement):
Canonical link: https://commits.webkit.org/259548.353@safari-7615-branch
Commit: c2279007a3a558da49081d5a92b0451af620d8fd
https://github.com/WebKit/WebKit/commit/c2279007a3a558da49081d5a92b0451af620d8fd
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
M Tools/Scripts/libraries/webkitcorepy/setup.py
M Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
M Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py
Log Message:
-----------
Cherry-pick 261097 at main (752a2873e756). rdar://106095209
[webkitcorepy] AutoInstall unable to install pytest-asyncio (or other packages without setup.py)
https://bugs.webkit.org/show_bug.cgi?id=253066
rdar://106095209
Reviewed by Aakash Jain.
* Tools/Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
(Package.install): If a project has a setup.cfg, a dummy setup.py in the same location can be
invoked with our existing code to install the package.
Canonical link: https://commits.webkit.org/261097@main
Canonical link: https://commits.webkit.org/259548.354@safari-7615-branch
Commit: 630b1e2aa50f600a30e749d677220ab9550ffdbb
https://github.com/WebKit/WebKit/commit/630b1e2aa50f600a30e749d677220ab9550ffdbb
Author: Matt Woodrow <mattwoodrow at apple.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
M Source/WebCore/html/OffscreenCanvas.cpp
Log Message:
-----------
Disable main-thread WebGL in OffscreenCanvas.
https://bugs.webkit.org/show_bug.cgi?id=253267
<rdar://105684718>
Reviewed by Simon Fraser.
* Source/WebCore/html/OffscreenCanvas.cpp:
(WebCore::shouldEnableWebGL):
Canonical link: https://commits.webkit.org/259548.355@safari-7615-branch
Commit: 76096d8aa52c88daa06d994ef54eb75ecd8fb870
https://github.com/WebKit/WebKit/commit/76096d8aa52c88daa06d994ef54eb75ecd8fb870
Author: Russell Epstein <repstein at apple.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
M Configurations/Version.xcconfig
Log Message:
-----------
Versioning.
WebKit-7615.2.1
Canonical link: https://commits.webkit.org/259548.356@safari-7615-branch
Commit: e8aa828f10daa163541888be25471906251a0ad4
https://github.com/WebKit/WebKit/commit/e8aa828f10daa163541888be25471906251a0ad4
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
M Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
Log Message:
-----------
Cherry-pick 05b9d3d37cb2. rdar://problem/105887432
[JSC] Avoid unnecessary move in FunctionCallResolveNode
https://bugs.webkit.org/show_bug.cgi?id=252912
rdar://105887432
Reviewed by Yusuke Suzuki.
When generating bytecode for FunctionCallResolveNode, if the target function is
a local variable, we don't need to move it into a new temporary unless there's
an assignment in the call arguments. E.g. we need to copy `f` for `f(f=x)`, but
not for `f(x)`.
* Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:
(JSC::FunctionCallResolveNode::emitBytecode):
Canonical link: https://commits.webkit.org/260872@main
Canonical link: https://commits.webkit.org/259548.357@safari-7615-branch
Commit: dc7e063da2661c0d77e3c2c59e2f7ef699c7ce9f
https://github.com/WebKit/WebKit/commit/dc7e063da2661c0d77e3c2c59e2f7ef699c7ce9f
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
M Source/JavaScriptCore/parser/ASTBuilder.h
Log Message:
-----------
Cherry-pick cbbc1673e3e5. rdar://problem/105883674
[JSC] Fix unnecessary moves in read/modify assignment
https://bugs.webkit.org/show_bug.cgi?id=252902
<rdar://problem/105883674>
Reviewed by Yusuke Suzuki.
When generating bytecode for read/modify assignments, e.g. `x += y`, we have to
guard against the right-hand side modifying the variables (e.g. `x += y[x=z]`
or `x += y[y=z]`). In order to do so, the variables are copied after reading.
We detect whether there are assignments on the left- and right-hand sides by
recording the number of assignments the code contains at three points: before
and after parsing the left-hand side and after parsing the right-hand side
expression. We then check if the values before and after parsing the left are
equal to determine if it contains any assignments on the left, and compare the
values after parsing the left and after parsing the right. However, we never
take into account that we are actively parsing an assignment, so the values
after parsing the left-hand side and after parsing the right-hand side could
never be the same. The fix is to simply take into account the assignment we
just parsed, so we say the right doesn't contain any assignments if after
parsing the right-hand side expression we have 1 more assingment than after
parsing the left-hand side expression.
* Source/JavaScriptCore/parser/ASTBuilder.h:
(JSC::ASTBuilder::createAssignment):
Canonical link: https://commits.webkit.org/260874@main
Canonical link: https://commits.webkit.org/259548.358@safari-7615-branch
Commit: 7b9dcc71d6e9ebe97ca01b7c3e8286b807749378
https://github.com/WebKit/WebKit/commit/7b9dcc71d6e9ebe97ca01b7c3e8286b807749378
Author: Myles C. Maxfield <mmaxfield at apple.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
M LayoutTests/platform/mac-wk1/editing/mac/attributed-string/font-style-variant-effect-expected.txt
Log Message:
-----------
Cherry-pick 5f719dd2df1a. rdar://problem/105997287
Revert 260295 at main because it was unnecessary
https://bugs.webkit.org/show_bug.cgi?id=253033
rdar://105997287
Unreviewed gardening.
1. https://commits.webkit.org/260130@main caused the test to fail
2. https://commits.webkit.org/260295@main updated the test's expected results (which is what this radar was originally about)
3. https://commits.webkit.org/260447@main caused the test to fail the opposite way
So https://commits.webkit.org/260447@main fixed the bug, and https://commits.webkit.org/260295@main was wrong.
* LayoutTests/platform/mac-wk1/editing/mac/attributed-string/font-style-variant-effect-expected.txt:
Canonical link: https://commits.webkit.org/260918@main
Canonical link: https://commits.webkit.org/259548.359@safari-7615-branch
Commit: f101053a3f1ad6aef17d1ec8c261a1fd8fc427eb
https://github.com/WebKit/WebKit/commit/f101053a3f1ad6aef17d1ec8c261a1fd8fc427eb
Author: Brandon Stewart <brandonstewart at apple.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
M Source/WebCore/Modules/compression/DecompressionStreamDecoder.cpp
M Source/WebCore/Modules/compression/DecompressionStreamDecoder.h
Log Message:
-----------
Cherry-pick fe58e5cd0281. rdar://problem/106003684
Disable Apple Compression API in Compression Streams
https://bugs.webkit.org/show_bug.cgi?id=253042
Reviewed by Brent Fulgham.
Disable Compression API for Compression Streams right now as it is causing issues
on web sites.
* Source/WebCore/Modules/compression/DecompressionStreamDecoder.cpp:
(WebCore::DecompressionStreamDecoder::decompress):
* Source/WebCore/Modules/compression/DecompressionStreamDecoder.h:
(WebCore::DecompressionStreamDecoder::DecompressionStreamDecoder):
Canonical link: https://commits.webkit.org/260923@main
Canonical link: https://commits.webkit.org/259548.360@safari-7615-branch
Commit: 742cec095c8f00cc5b4a4d6fcfd3f2d70970bda4
https://github.com/WebKit/WebKit/commit/742cec095c8f00cc5b4a4d6fcfd3f2d70970bda4
Author: Jer Noble <jer.noble at apple.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
M Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm
Log Message:
-----------
Cherry-pick 96230945f879. rdar://problem/94878533
CRASH: GPUP at -[WebCoreNSURLSessionDataTask _cancel]
https://bugs.webkit.org/show_bug.cgi?id=253044
rdar://94878533
Reviewed by Eric Carlson.
-[WebCoreNSURLSessionDataTask session] currently converts a WeakObjC pointer (safely) into
a RetainPtr, then returns a raw pointer from that RetainPtr. The RetainPtr is destroyed after
returning, which reduces the retain count. It is then stored into a RetainPtr again by the
caller inside -_cancel;
Meanwhile, on another thread, the WebCoreNSURLSession can be released by the system, leaving
an opportunity to release the WebCoreNSURLSession and reduce it's retain count to zero in
between the two RetainPtr calls on the main thread, leading to the client retaining a dealloc'd
object.
Instead, -session should return an autorelease()'d pointer, thereby ensuring the session is
retained long enough for the client to retain it. This will increase retain-count churn, but
will also guarantee the object cannot be destroyed on a background thread while it's still
being used on the main thread.
* Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm:
(-[WebCoreNSURLSessionDataTask session]):
Canonical link: https://commits.webkit.org/260941@main
Canonical link: https://commits.webkit.org/259548.361@safari-7615-branch
Commit: eb8c7e2308388f3560b425d65b4510834dae496e
https://github.com/WebKit/WebKit/commit/eb8c7e2308388f3560b425d65b4510834dae496e
Author: Chris Dumez <cdumez at apple.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
A LayoutTests/fast/screen-orientation/natural-orientation-expected.txt
A LayoutTests/fast/screen-orientation/natural-orientation.html
M LayoutTests/imported/w3c/web-platform-tests/screen-orientation/orientation-reading-expected.txt
A LayoutTests/platform/ios/fast/screen-orientation/natural-orientation-expected.txt
M Source/WebCore/page/ScreenOrientation.cpp
M Source/WebCore/page/ScreenOrientationType.h
M Source/WebCore/platform/ScreenOrientationProvider.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebScreenOrientationManager.cpp
Log Message:
-----------
Cherry-pick 541ca5a79560. rdar://problem/105891522
Regression(255659 at main) Unable to log into twitch.tv
https://bugs.webkit.org/show_bug.cgi?id=253026
rdar://105891522
Reviewed by Wenson Hsieh and Darin Adler.
The Twitch.tv login was failing because `screen.orientation` was returning
"portrait-primary" on macOS. The natural/default orientation on desktop should
be "landscape-primary" so this was confusing Twitch.
Also update our `screen.angle` logic to take into account the natural
orientation based on:
- https://w3c.github.io/screen-orientation/#dfn-screen-orientation-values-table
I have verified that Chrome on macOS returns "landscape-primary" for the type
and 0 for the angle. Our behavior is now aligned.
* LayoutTests/fast/screen-orientation/natural-orientation-expected.txt: Added.
* LayoutTests/fast/screen-orientation/natural-orientation.html: Added.
* LayoutTests/platform/ios/screen-orientation/natural-orientation-expected.txt: Added.
* Source/WebCore/page/ScreenOrientation.cpp:
(WebCore::ScreenOrientation::lock):
* Source/WebCore/page/ScreenOrientationType.h:
(WebCore::naturalScreenOrientationType):
* Source/WebCore/platform/ScreenOrientationProvider.cpp:
(WebCore::ScreenOrientationProvider::currentOrientation):
* Source/WebKit/WebProcess/WebCoreSupport/WebScreenOrientationManager.cpp:
(WebKit::WebScreenOrientationManager::currentOrientation):
Canonical link: https://commits.webkit.org/260944@main
Canonical link: https://commits.webkit.org/259548.362@safari-7615-branch
Commit: 668fa3829165ebb159805543d1a56b9af9cd5f2e
https://github.com/WebKit/WebKit/commit/668fa3829165ebb159805543d1a56b9af9cd5f2e
Author: Sammy Gill <sammy.gill at apple.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
M LayoutTests/TestExpectations
A LayoutTests/fast/inline/legacy-margin-trim/block-container-float-nested-inside-nested-inline-expected.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-float-nested-inside-nested-inline.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-floats-adjacent-to-containing-block-should-be-trimmed-only-expected.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-floats-adjacent-to-containing-block-should-be-trimmed-only.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-left-positioned-float-intersecting-other-float-to-fit-expected.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-left-positioned-float-intersecting-other-float-to-fit.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-left-positioned-float-overconstraining-line-box-to-fit-expected.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-left-positioned-float-overconstraining-line-box-to-fit-rtl-expected.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-left-positioned-float-overconstraining-line-box-to-fit-rtl.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-left-positioned-float-overconstraining-line-box-to-fit-vert-lr-expected.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-left-positioned-float-overconstraining-line-box-to-fit-vert-lr.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-left-positioned-float-overconstraining-line-box-to-fit.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-orthogonal-float-overconstraining-line-box-to-fit-expected.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-orthogonal-float-overconstraining-line-box-to-fit.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-right-positioned-float-intersecting-other-float-to-fit-expected.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-right-positioned-float-intersecting-other-float-to-fit.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-right-positioned-float-overconstraining-line-box-to-fit-expected.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-right-positioned-float-overconstraining-line-box-to-fit-rtl-expected.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-right-positioned-float-overconstraining-line-box-to-fit-rtl.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-right-positioned-float-overconstraining-line-box-to-fit-vert-lr-expected.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-right-positioned-float-overconstraining-line-box-to-fit-vert-lr.html
A LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-right-positioned-float-overconstraining-line-box-to-fit.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-nested-inside-nested-inline-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-nested-inside-nested-inline.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-floats-adjacent-to-containing-block-should-be-trimmed-only-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-floats-adjacent-to-containing-block-should-be-trimmed-only.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-left-positioned-float-intersecting-other-float-to-fit-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-left-positioned-float-intersecting-other-float-to-fit.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-left-positioned-float-overconstraining-line-box-to-fit-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-left-positioned-float-overconstraining-line-box-to-fit-rtl-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-left-positioned-float-overconstraining-line-box-to-fit-rtl.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-left-positioned-float-overconstraining-line-box-to-fit-vert-lr-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-left-positioned-float-overconstraining-line-box-to-fit-vert-lr.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-left-positioned-float-overconstraining-line-box-to-fit.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-orthogonal-float-overconstraining-line-box-to-fit-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-orthogonal-float-overconstraining-line-box-to-fit.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-right-positioned-float-intersecting-other-float-to-fit-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-right-positioned-float-intersecting-other-float-to-fit.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-right-positioned-float-overconstraining-line-box-to-fit-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-right-positioned-float-overconstraining-line-box-to-fit-rtl-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-right-positioned-float-overconstraining-line-box-to-fit-rtl.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-right-positioned-float-overconstraining-line-box-to-fit-vert-lr-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-right-positioned-float-overconstraining-line-box-to-fit-vert-lr.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-right-positioned-float-overconstraining-line-box-to-fit.html
M Source/WebCore/rendering/line/BreakingContext.h
Log Message:
-----------
Cherry-pick bad6e12c6625. rdar://problem/105984917
Trim margins for overconstraining floats that are adjacent to the containing block inner without clear and other intrusive floats
https://bugs.webkit.org/show_bug.cgi?id=253008
rdar://105984917
Reviewed by Alan Baradlay.
When going through float layout and determining their position within a
containing block we check to see if they would overconstrain any lines
boxes or would intersect with any other floats at that candidate
position. If they would, we would hold off on positioning them until we
finish inline layout with the current line. However, with margin-trim
it is possible that these floats would fit at these positions with their
margins trimmed.
In order to determine whether we can trim such a margin, the following
must be true for the float:
1.) The float's candidate position is adjacent to the containing block's
inner edge
2.) margin-trim is set for that edge (e.g. margin-trim:
inline/inline-start for a left positioned float)
3.) The float overconstrains a line box or intersects with another float
at that vertical position but would not overconstrain a line
box/intersect a float if that margin were trimmed
In these scenarios we can trim the appropriate margin for the float and
place it at that vertical position.
container {
display: block;
border: 1px solid black;
inline-size: 100px;
font-family: monospace;
font-size: 10px;
margin-trim: inline;
}
item {
display: block;
inline-size: 25px;
block-size: 80px;
background-color: green;
margin-inline-end: 80px;
float: right;
}
</style>
<container>
<span>The text</span>
<item></item>
<span>should wrap alongside the float to the right</span>
</container>
Without margin-trim the float would overconstrain the first line box
and would not get placed at the same vertical position. However, since
margin-trim is specified, resulting box would fit at that position, and
it would get placed against the containing block's inner edge,
then we can trim its margins and place it there.
container {
display: block;
inline-size: 100px;
font-family: monospace;
font-size: 10px;
margin-trim: inline;
}
item {
display: block;
inline-size: 50px;
block-size: 100px;
background-color: green;
}
.float-right {
float: right;
margin-inline-end: 80px;
}
.float-left {
float: left;
}
</style>
<container>
<span>Test passes if there is a filled green square below.</span></br>
<item class="float-left"></item>
<item class="float-right"></item>
</container>
Similarly, after placing the first float we would not normally be able
to position the second one since the margin would result in it
intersecting with the other one. However due to the same conditions
in the first example we can trim the inline-end margin and place it at
the same vertical position as the other float.
* LayoutTests/TestExpectations:
* LayoutTests/fast/inline/legacy-margin-trim/block-container-float-nested-inside-nested-inline-expected.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-float-nested-inside-nested-inline.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-floats-adjacent-to-containing-block-should-be-trimmed-only-expected.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-floats-adjacent-to-containing-block-should-be-trimmed-only.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-left-positioned-float-intersecting-other-float-to-fit-expected.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-left-positioned-float-intersecting-other-float-to-fit.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-left-positioned-float-overconstraining-line-box-to-fit-expected.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-left-positioned-float-overconstraining-line-box-to-fit-rtl-expected.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-left-positioned-float-overconstraining-line-box-to-fit-rtl.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-left-positioned-float-overconstraining-line-box-to-fit-vert-lr-expected.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-left-positioned-float-overconstraining-line-box-to-fit-vert-lr.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-left-positioned-float-overconstraining-line-box-to-fit.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-orthogonal-float-overconstraining-line-box-to-fit-expected.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-orthogonal-float-overconstraining-line-box-to-fit.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-right-positioned-float-intersecting-other-float-to-fit-expected.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-right-positioned-float-intersecting-other-float-to-fit.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-right-positioned-float-overconstraining-line-box-to-fit-expected.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-right-positioned-float-overconstraining-line-box-to-fit-rtl-expected.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-right-positioned-float-overconstraining-line-box-to-fit-rtl.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-right-positioned-float-overconstraining-line-box-to-fit-vert-lr-expected.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-right-positioned-float-overconstraining-line-box-to-fit-vert-lr.html: Added.
* LayoutTests/fast/inline/legacy-margin-trim/block-container-trimmed-margin-allows-right-positioned-float-overconstraining-line-box-to-fit.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-nested-inside-nested-inline-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-float-nested-inside-nested-inline.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-floats-adjacent-to-containing-block-should-be-trimmed-only-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-floats-adjacent-to-containing-block-should-be-trimmed-only.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-left-positioned-float-intersecting-other-float-to-fit-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-left-positioned-float-intersecting-other-float-to-fit.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-left-positioned-float-overconstraining-line-box-to-fit-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-left-positioned-float-overconstraining-line-box-to-fit-rtl-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-left-positioned-float-overconstraining-line-box-to-fit-rtl.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-left-positioned-float-overconstraining-line-box-to-fit-vert-lr-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-left-positioned-float-overconstraining-line-box-to-fit-vert-lr.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-left-positioned-float-overconstraining-line-box-to-fit.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-orthogonal-float-overconstraining-line-box-to-fit-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-orthogonal-float-overconstraining-line-box-to-fit.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-right-positioned-float-intersecting-other-float-to-fit-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-right-positioned-float-intersecting-other-float-to-fit.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-right-positioned-float-overconstraining-line-box-to-fit-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-right-positioned-float-overconstraining-line-box-to-fit-rtl-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-right-positioned-float-overconstraining-line-box-to-fit-rtl.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-right-positioned-float-overconstraining-line-box-to-fit-vert-lr-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-right-positioned-float-overconstraining-line-box-to-fit-vert-lr.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-trimmed-margin-allows-right-positioned-float-overconstraining-line-box-to-fit.html: Added.
* Source/WebCore/rendering/line/BreakingContext.h:
(WebCore::BreakingContext::handleFloat):
Canonical link: https://commits.webkit.org/260950@main
Canonical link: https://commits.webkit.org/259548.363@safari-7615-branch
Commit: cde9671150333d33a991333f239881ce265798ef
https://github.com/WebKit/WebKit/commit/cde9671150333d33a991333f239881ce265798ef
Author: Youenn Fablet <youennf at gmail.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
M Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp
M Source/WebCore/platform/mediastream/RealtimeMediaSource.h
M Source/WebCore/platform/mediastream/RealtimeVideoSource.h
M Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.h
M Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm
Log Message:
-----------
Cherry-pick c9e35ddc3cab. rdar://problem/105677398
REGRESSION (iOS 16.4 Public Beta) getUserMedia ignores facingMode constraint
https://bugs.webkit.org/show_bug.cgi?id=252560
rdar://problem/105677398
Reviewed by Eric Carlson.
We added a way to favor some back cameras (those that have a great focal range) against other back cameras.
We did this by increasing the facingMode fitness distance for the telephoto back cameras.
The base fitness distance for user/environment facingMode constraint is either 0 (match) or 1 (no match).
When facingMode is environement, the front camera will have a base fitness distance of 1 and a final fitness distance of 1.
The back camera will have a base fitness distance of 0 and a final fitness distance of 0 + the fitness distance increase.
The fitness distance increase is either 0, 1, 2...
The issue is that RealtimeMediaSource::supportsConstraints computes the fitness score by checking whether distance is 0 or something else.
If distance is 0, the score is 32 otherwise it is 1.
This ensures that facingMode has a big weight on the global fitness score.
We now apply facingModeFitnessDistanceAdjustment directly to the global fitness score.
This requires having good devices with a high value.
Renaming facingModeFitnessDistanceAdjustment to facingModeFitnessScoreAdjustment for that reason.
* Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp:
(WebCore::RealtimeMediaSource::fitnessDistance):
(WebCore::RealtimeMediaSource::supportsConstraints):
* Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::facingModeFitnessDistanceAdjustment const):
Canonical link: https://commits.webkit.org/260953@main
Canonical link: https://commits.webkit.org/259548.364@safari-7615-branch
Commit: d7c09962f75d027a933579050ec84e24d02527b9
https://github.com/WebKit/WebKit/commit/d7c09962f75d027a933579050ec84e24d02527b9
Author: Tim Nguyen <ntim at apple.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
A LayoutTests/imported/w3c/web-platform-tests/fullscreen/model/move-fullscreen-element-expected.txt
A LayoutTests/imported/w3c/web-platform-tests/fullscreen/model/move-fullscreen-element.html
M Source/WebCore/dom/FullscreenManager.cpp
Log Message:
-----------
Cherry-pick d8b353380562. rdar://problem/105713729
REGRESSION(257542 at main): Video is misaligned on YouTube site's PiP player after transitioning from full screen
https://bugs.webkit.org/show_bug.cgi?id=253121
rdar://105713729
Reviewed by Ryosuke Niwa.
There is a bug with the fullscreen spec that leaves a dangling fullscreen flag when moving elements: https://github.com/whatwg/fullscreen/issues/217
This causes fullscreen styles to unintentionally apply on the YouTube site even though the player element which has moved in the DOM tree, has exited
fullscreen.
To fix this, we follow Chromium's pattern of running an extra "unfullscreen element" step in the synchronous exit fullscreen steps when the element to
be exited is disconnected.
* LayoutTests/imported/w3c/web-platform-tests/fullscreen/model/move-fullscreen-element-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/fullscreen/model/move-fullscreen-element.html: Added.
* Source/WebCore/dom/FullscreenManager.cpp:
(WebCore::FullscreenManager::exitFullscreen):
Canonical link: https://commits.webkit.org/260985@main
Canonical link: https://commits.webkit.org/259548.365@safari-7615-branch
Commit: c21723ddf108084d87c4f0e8b4f78ac2afc883ec
https://github.com/WebKit/WebKit/commit/c21723ddf108084d87c4f0e8b4f78ac2afc883ec
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
A JSTests/stress/tdz-check-catch-read.js
M Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
Log Message:
-----------
Cherry-pick e7b74be2715f. rdar://problem/106019944
[JSC] ResolveNode can't always skip the extra move
https://bugs.webkit.org/show_bug.cgi?id=253142
rdar://106076478
Reviewed by Keith Miller.
In http://commits.webkit.org/260555@main I landed an optimization avoid the extra
move in ResolveNode. However, that's not valid when we actually need the TDZ check.
If the check fails, we throw an exception, but we already wrote to the destination.
As a compromise, we still avoid the move unless we actually need the TDZ check.
* JSTests/stress/tdz-check-catch-read.js: Added.
(f):
* Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:
(JSC::ResolveNode::emitBytecode):
Canonical link: https://commits.webkit.org/261006@main
Canonical link: https://commits.webkit.org/259548.366@safari-7615-branch
Commit: 074f14fa6c38736e51d6599a9cc5f6b0fd8cfe77
https://github.com/WebKit/WebKit/commit/074f14fa6c38736e51d6599a9cc5f6b0fd8cfe77
Author: Cameron McCormack <heycam at apple.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
M Source/WebCore/page/MemoryRelease.cpp
Log Message:
-----------
Cherry-pick 69098ebe6b1e. rdar://problem/106065668
Make memory pressure handler call deleteAllCode with PreventCollectionAndDeleteAllCode
https://bugs.webkit.org/show_bug.cgi?id=253133
<rdar://problem/106065668>
Reviewed by Mark Lam and Yusuke Suzuki.
The memory pressure handler currently calls
GCController::deleteAllCode(DeleteAllCodeIfNotCollecting), but it turns out we
hit the case of a collection being in progress moderately often. We already
do a bunch of blocky work here to get memory usage down, so let's change this
to PreventCollectionAndDeleteAllCode to guarantee we can drop all JIT code.
* Source/WebCore/page/MemoryRelease.cpp:
(WebCore::releaseCriticalMemory):
Canonical link: https://commits.webkit.org/261061@main
Canonical link: https://commits.webkit.org/259548.367@safari-7615-branch
Commit: a273d4a745fb982c8000892bbb574eef5fb430d5
https://github.com/WebKit/WebKit/commit/a273d4a745fb982c8000892bbb574eef5fb430d5
Author: Aditya Keerthi <akeerthi at apple.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
M Source/WebKit/UIProcess/ios/WKPDFView.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm
Log Message:
-----------
Cherry-pick ad5c950167f1. rdar://problem/105784161
REGRESSION (259655 at main): [iOS] Crash when opening a PDF after searching for text in a webpage
https://bugs.webkit.org/show_bug.cgi?id=253194
rdar://105784161
Reviewed by Wenson Hsieh, Megan Gardner and Tim Horton.
259655 at main fixed find-in-PDF behavior by ensuring the `UIFindSession`'s
"searchable object" is always up-to-date.
When switching from a webpage to a PDF, WebKit switches the type of the
searchable object from `WKContentView` to `WKPDFView`. UIKit is not robust
against searchable object modification, as they cache the existence of
optional protocol methods and do not update the result when the object changes.
Consequently, optional protocol methods are called unconditionally on
`WKPDFView`, simply because `WKContentView` implements them.
Ideally, WebKit would recreate the `UIFindSession` itself when the searchable
object changes. However, this is not possible with existing API/SPI.
To fix, implement "optional" protocol methods that UIKit may end up calling
when searching for text. This prevents crashing due to unrecognized selectors.
* Source/WebKit/UIProcess/ios/WKPDFView.mm:
(-[WKPDFView supportsTextReplacement]):
(-[WKPDFView scrollRangeToVisible:inDocument:]):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm:
(TEST):
Add a regression test that opens and closes the find panel on web content, loads
a PDF, and then attempts to open and close the find panel on the PDF content.
The test crashes without this patch.
Canonical link: https://commits.webkit.org/261071@main
Canonical link: https://commits.webkit.org/259548.368@safari-7615-branch
Commit: 8d02384f8461819df3d149c8f94978a4ccb962f7
https://github.com/WebKit/WebKit/commit/8d02384f8461819df3d149c8f94978a4ccb962f7
Author: Antti Koivisto <antti at apple.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
M Source/WebCore/style/AttributeChangeInvalidation.cpp
Log Message:
-----------
Cherry-pick 2c5baee03fa2. rdar://problem/105628059
nullptr crash in WebCore::SelectorChecker::attributeSelectorMatches
https://bugs.webkit.org/show_bug.cgi?id=253067
rdar://105628059
Reviewed by Geoffrey Garen and Alan Baradlay.
Speculative fix.
* Source/WebCore/style/AttributeChangeInvalidation.cpp:
(WebCore::Style::AttributeChangeInvalidation::invalidateStyle):
Check that we actually have an attribute selector.
Canonical link: https://commits.webkit.org/261076@main
Canonical link: https://commits.webkit.org/259548.369@safari-7615-branch
Commit: 959c62ac0cf1fc8730ed49cdd793d39a30fe9f3c
https://github.com/WebKit/WebKit/commit/959c62ac0cf1fc8730ed49cdd793d39a30fe9f3c
Author: Cameron McCormack <heycam at apple.com>
Date: 2023-03-02 (Thu, 02 Mar 2023)
Changed paths:
M Source/WebKit/WebProcess/WebProcess.cpp
M Source/WebKit/WebProcess/WebProcess.h
M Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
Log Message:
-----------
Cherry-pick 0668d887feed. rdar://problem/106009868
Ask system malloc to free up memory in non-visible Web processes
https://bugs.webkit.org/show_bug.cgi?id=253173
rdar://106009868
Reviewed by Geoffrey Garen.
We currently do some memory reduction work in non-visible Web processes (those
that only have background tabs) off a timer. We can ask the system malloc to
free up memory off one of these timers too.
malloc_zone_pressure_relief will block the thread it's called on, so we
call it on a background thread, which is allowed. Local testing shows it
can run for several ms, but it will only cause regular malloc
contention, not block other threads entirely.
This patch repurposes the "graphics cleanup timer" to be an "early
memory cleanup timer", and we perform the system malloc cleanup off it.
The more aggressive cleanup tasks that can clear caches etc. remain off
the other memory cleanup timer, which runs later.
* Source/WebKit/WebProcess/WebProcess.cpp:
(WebKit::WebProcess::pageDidEnterWindow):
(WebKit::WebProcess::pageWillLeaveWindow):
(WebKit::WebProcess::nonVisibleProcessEarlyMemoryCleanupTimerFired):
(WebKit::WebProcess::nonVisibleProcessGraphicsCleanupTimerFired): Deleted.
* Source/WebKit/WebProcess/WebProcess.h:
* Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::releaseSystemMallocMemory):
Canonical link: https://commits.webkit.org/261087@main
Canonical link: https://commits.webkit.org/259548.370@safari-7615-branch
Commit: 6f9b18dfa549e47f5006aa5f8fec5ae36261a443
https://github.com/WebKit/WebKit/commit/6f9b18dfa549e47f5006aa5f8fec5ae36261a443
Author: Russell Epstein <repstein at apple.com>
Date: 2023-03-03 (Fri, 03 Mar 2023)
Changed paths:
M LayoutTests/TestExpectations
A LayoutTests/fast/editing/ruby-with-edited-text-crash-expected.txt
A LayoutTests/fast/editing/ruby-with-edited-text-crash.html
M Source/WebCore/rendering/RenderBlock.cpp
Log Message:
-----------
Cherry-pick 261063 at main (02bb8ae9d573). rdar://problem/105848359
Make sure child is a RenderElement before trying to pass it into shouldChildInlineMarginContributeToContainerIntrinsicSize in RenderBlock::computeBlockPreferredLogicalWidths
https://bugs.webkit.org/show_bug.cgi?id=253165
rdar://105848359
Reviewed by Alan Baradlay.
We should not be assuming that child is always doing to be a
RenderElement in this method. It can sometimes be a RenderText (like
in the attached test case), which will cause a nullptr dereference.
Instead, we should check the result of the dynamicDowncast before
passing it into shouldChildInlineMarginContributeToContainerIntrinsicSize.
The only other change is that we use the default constructor for
startMarginLength and endMarginLength. This should be ok even if we do
not enter the code guarded by the if statement because the isFixed()
call will return false and not impact the margins.
* LayoutTests/TestExpectations:
* LayoutTests/fast/editing/ruby-with-edited-text-crash-expected.txt: Added.
* LayoutTests/fast/editing/ruby-with-edited-text-crash.html: Added.
* Source/WebCore/rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeBlockPreferredLogicalWidths const):
Canonical link: https://commits.webkit.org/261063@main
Canonical link: https://commits.webkit.org/259548.371@safari-7615-branch
Commit: ac22fd93ff2e77be4517324f7785ebf5d06c8464
https://github.com/WebKit/WebKit/commit/ac22fd93ff2e77be4517324f7785ebf5d06c8464
Author: Chris Dumez <cdumez at apple.com>
Date: 2023-03-03 (Fri, 03 Mar 2023)
Changed paths:
M Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.cpp
M Source/WebCore/loader/cache/CachedResourceLoader.cpp
M Source/WebCore/page/Quirks.cpp
M Source/WebCore/page/Quirks.h
Log Message:
-----------
Cherry-pick eb5cfc861737. rdar://problem/104818312
Regression(256456 at main) Express checkout is broken on victoriassecret.com
https://bugs.webkit.org/show_bug.cgi?id=253265
rdar://104818312
Reviewed by Brent Fulgham and Youenn Fablet.
Temporarily disable the Fetch Metadata feature on victoriassecret.com since it
breaks express checkout and while we're investigate the root cause.
* Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.cpp:
(WebCore::ThreadableWebSocketChannel::webSocketConnectRequest):
* Source/WebCore/loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::updateRequestAfterRedirection):
(WebCore::CachedResourceLoader::updateHTTPRequestHeaders):
* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::shouldDisableFetchMetadata const):
* Source/WebCore/page/Quirks.h:
Canonical link: https://commits.webkit.org/261141@main
Commit: 93a64d9ea625c24087246bf551f14b83ab422ad9
https://github.com/WebKit/WebKit/commit/93a64d9ea625c24087246bf551f14b83ab422ad9
Author: Alex Christensen <achristensen at apple.com>
Date: 2023-03-03 (Fri, 03 Mar 2023)
Changed paths:
M Source/WebKit/NetworkProcess/NetworkProcess.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/CookiePrivateBrowsing.mm
Log Message:
-----------
Cherry-pick 6dd3a73e5aa2. rdar://problem/105201326
REGRESSION(255420 at main) Embed-loading PDFs from newly opened about:blank terminates web process
https://bugs.webkit.org/show_bug.cgi?id=253285
rdar://105201326
Reviewed by J Pascoe.
In 255420 at main I introduced checks in the network process to make sure that firstPartyForCookies
is an allowed domain for that process. There are a few places in WebKit where we still have
about:blank or a null firstPartyForCookies, which is fine most of the time because
ResourceRequest::allowCookies is false so it doesn't matter that there's no firstPartyForCookies.
Sometimes, though, we have a piece of code that loads without a firstPartyForCookies and allows
cookies. This is an existing bug and should probably be fixed, but it is not catastrophic
because the result is that no cookie access is given. However, with 255420 at main it became catastrophic
because we terminate the web content process, which I'm told is undesirable when a user is trying to do
something like download a PDF. This change makes it no longer terminate the web content process.
* Source/WebKit/NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::allowsFirstPartyForCookies):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/CookiePrivateBrowsing.mm:
(TEST):
Canonical link: https://commits.webkit.org/261142@main
Commit: 1aa80d9409992605f1f65d31ec73aab3cd5c449d
https://github.com/WebKit/WebKit/commit/1aa80d9409992605f1f65d31ec73aab3cd5c449d
Author: Sihui Liu <sihui_liu at apple.com>
Date: 2023-03-03 (Fri, 03 Mar 2023)
Changed paths:
M Source/WebKit/NetworkProcess/storage/CacheStorageCache.cpp
M Source/WebKit/NetworkProcess/storage/CacheStorageCache.h
Log Message:
-----------
Cherry-pick 5c2607837be6. rdar://problem/105122133
Add assertions in CacheStorageCache to help debug threading issues
https://bugs.webkit.org/show_bug.cgi?id=253223
rdar://106124999
Reviewed by Chris Dumez.
rdar://105122133 indicates CacheStorageCache may have threading issues (e.g. record url may become AtomString at some
point), so adding some assertion to help debug that.
This patch also make an isolated copy for record url before passing it to CacheStorageCache.
* Source/WebKit/NetworkProcess/storage/CacheStorageCache.cpp:
(WebKit::computeKeyURL):
(WebKit::CacheStorageCache::CacheStorageCache):
(WebKit::CacheStorageCache::getSize):
(WebKit::CacheStorageCache::open):
(WebKit::CacheStorageCache::retrieveRecords):
(WebKit::CacheStorageCache::removeRecords):
(WebKit::CacheStorageCache::findExistingRecord):
(WebKit::CacheStorageCache::putRecords):
(WebKit::CacheStorageCache::putRecordsAfterQuotaCheck):
(WebKit::CacheStorageCache::putRecordsInStore):
(WebKit::CacheStorageCache::removeAllRecords):
(WebKit::CacheStorageCache::close):
* Source/WebKit/NetworkProcess/storage/CacheStorageCache.h:
(WebKit::CacheStorageCache::assertIsOnCorrectQueue):
Canonical link: https://commits.webkit.org/261147@main
Commit: 841ab1df8b81be5a4240b5e50036c6533dfb0cdf
https://github.com/WebKit/WebKit/commit/841ab1df8b81be5a4240b5e50036c6533dfb0cdf
Author: Said Abou-Hallawa <said at apple.com>
Date: 2023-03-03 (Fri, 03 Mar 2023)
Changed paths:
M Source/WebCore/platform/graphics/GraphicsContext.h
M Source/WebCore/platform/graphics/ImageBuffer.cpp
M Source/WebCore/platform/graphics/cg/NativeImageCG.cpp
Log Message:
-----------
Cherry-pick 9180e60fc30a. rdar://problem/106017462
REGRESSION(260512 at main): HDR images should be drawn directly if the destination context has HDR color space
https://bugs.webkit.org/show_bug.cgi?id=253275
rdar://106055782
Reviewed by Simon Fraser.
CoreGraphics should draw the HDR images directly to the destination context if
it has HDR color space.
ImageBuffer::draw() should call GraphicsContext::drawNativeImageInternal() to
prevent the possible recursion from NativeImage::draw() to ImageBuffer::draw().
* Source/WebCore/platform/graphics/GraphicsContext.h:
* Source/WebCore/platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::draw):
(WebCore::ImageBuffer::drawConsuming):
* Source/WebCore/platform/graphics/cg/NativeImageCG.cpp:
(WebCore::NativeImage::draw):
Canonical link: https://commits.webkit.org/261149@main
Commit: 189d480c5fbdf4275ff64b95d182f60ba753fbcf
https://github.com/WebKit/WebKit/commit/189d480c5fbdf4275ff64b95d182f60ba753fbcf
Author: Arunsundar Kannan <arunsundar_kannan at apple.com>
Date: 2023-03-03 (Fri, 03 Mar 2023)
Changed paths:
A LayoutTests/fast/css-grid-layout/gridmatrix-columnSize-failure-expected.txt
A LayoutTests/fast/css-grid-layout/gridmatrix-columnSize-failure.html
M Source/WebCore/rendering/Grid.cpp
M Source/WebCore/rendering/Grid.h
Log Message:
-----------
Assertion failure in GridIterator ASSERT(m_grid.numTracks(ForColumns))
https://bugs.webkit.org/show_bug.cgi?id=253127
rdar://105548703
Reviewed by Matt Woodrow.
The grid matrix for a subgrid of an element in the row-axis has one row with no columns, which are then lazily created as needed. An assertion in GridIterator constructor fails as column size is zero. This change additionally checks the maximum Columns ivar of the grid class to assert only for valid cases.
* Source/WebCore/rendering/Grid.cpp:
(WebCore::Grid::gridItemSpanIgnoringCollapsedTracks const):
(WebCore::GridIterator::GridIterator):
(WebCore::GridIterator::nextGridItem):
(WebCore::GridIterator::isEmptyAreaEnough const):
(WebCore::GridIterator::nextEmptyGridArea):
* Source/WebCore/rendering/Grid.h:
Canonical link: https://commits.webkit.org/259548.376@safari-7615-branch
Commit: 25a414a61f3e31137deaef19bcc055235ddb2754
https://github.com/WebKit/WebKit/commit/25a414a61f3e31137deaef19bcc055235ddb2754
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2023-03-06 (Mon, 06 Mar 2023)
Changed paths:
A JSTests/stress/ftl-bound-check-for-enumerator-next-update-index-and-mode.js
M Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
Log Message:
-----------
FTL missing bound check of for-in loop
https://bugs.webkit.org/show_bug.cgi?id=252801
rdar://105820083
Reviewed by Michael Saboff.
EnumeratorNextUpdateIndexAndMode for IndexedMode uses HasIndexProperty internally. But
this node does not do bound check when ArrayMode is inBounds in FTL since FTL SSALowering
phase extracts this bound check as a separate CheckInBounds node. But EnumeratorNextUpdateIndexAndMode,
we cannot do that since EnumeratorNextUpdateIndexAndMode's index is incremented internally. Thus,
we need to do bound check inside EnumeratorNextUpdateIndexAndMode when it is not done in HasIndexProperty's
code.
* JSTests/stress/ftl-bound-check-for-enumerator-next-update-index-and-mode.js: Added.
(shouldBe):
(opt):
* Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
Canonical link: https://commits.webkit.org/259548.377@safari-7615-branch
Commit: 3d135908241d5bf6c0ec77159e8185ee648de269
https://github.com/WebKit/WebKit/commit/3d135908241d5bf6c0ec77159e8185ee648de269
Author: Michael Saboff <msaboff at apple.com>
Date: 2023-03-06 (Mon, 06 Mar 2023)
Changed paths:
A JSTests/stress/regexp-lookbehind-greedy-backreference.js
M Source/JavaScriptCore/yarr/YarrInterpreter.cpp
Log Message:
-----------
ASAN_BUS | Yarr::Interpreter::matchDisjunction; Yarr::Interpreter::backtrackParentheses; Yarr::Interpreter::matchDisjunction
https://bugs.webkit.org/show_bug.cgi?id=253466
rdar://105669717
Reviewed by Yusuke Suzuki.
When backtracking, i.e. unmatching a greedy backreference in a lookbehind, the unmatch requires moving the input pointer
forward. THis means we need to do a checkInput() instead of a rewind() in this case.
* JSTests/stress/regexp-lookbehind-greedy-backreference.js: Added.
(arrayToString):
(dumpValue):
(compareArray):
(testRegExp):
* Source/JavaScriptCore/yarr/YarrInterpreter.cpp:
(JSC::Yarr::Interpreter::backtrackBackReference):
Canonical link: https://commits.webkit.org/259548.378@safari-7615-branch
Commit: 04c8873c0803d47ea1629c5b841b7e032e6360a7
https://github.com/WebKit/WebKit/commit/04c8873c0803d47ea1629c5b841b7e032e6360a7
Author: Chris Dumez <cdumez at apple.com>
Date: 2023-03-07 (Tue, 07 Mar 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/compat/idlharness.window-expected.txt
M Source/WTF/wtf/PlatformEnable.h
M Source/WTF/wtf/PlatformEnableCocoa.h
M Source/WebCore/html/HTMLBodyElement+Compat.idl
M Source/WebCore/page/DOMWindow+Compat.idl
M Source/WebCore/page/DOMWindow.cpp
M Source/WebCore/page/DOMWindow.h
Log Message:
-----------
Cherry-pick b35ab41a5c7a. rdar://problem/106273441
Revert 256469 at main as it violates the specification
https://bugs.webkit.org/show_bug.cgi?id=253435
rdar://106273441
Reviewed by Alex Christensen.
Revert 256469 at main. The specification [1] says that we should not expose this
API on non-mobile devices. This broke the Final Cut Pro download page as it
relies on this API being missing to detect we're on desktop.
Note that neither Firefox not Chrome expose the window orientation API on
Desktop.
[1] https://compat.spec.whatwg.org/#windoworientation-interface
* LayoutTests/imported/w3c/web-platform-tests/compat/idlharness.window-expected.txt:
* Source/WTF/wtf/PlatformEnable.h:
* Source/WTF/wtf/PlatformEnableCocoa.h:
* Source/WebCore/html/HTMLBodyElement+Compat.idl:
* Source/WebCore/page/DOMWindow+Compat.idl:
* Source/WebCore/page/DOMWindow.cpp:
(WebCore::DOMWindow::orientation const):
* Source/WebCore/page/DOMWindow.h:
Canonical link: https://commits.webkit.org/261282@main
Canonical link: https://commits.webkit.org/259548.379@safari-7615-branch
Commit: 966f6830a3855d5855e2cac0704fc26bfe30391c
https://github.com/WebKit/WebKit/commit/966f6830a3855d5855e2cac0704fc26bfe30391c
Author: Rose <83477269+AtariDreams at users.noreply.github.com>
Date: 2023-03-07 (Tue, 07 Mar 2023)
Changed paths:
M Tools/Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py
Log Message:
-----------
Cherry-pick 261332 at main (3b16fd1ed523). rdar://106367061
Scripts: Run the start command to open a URL in a browser on Windows
https://bugs.webkit.org/show_bug.cgi?id=253515
rdar://106367061
Reviewed by Jonathan Bedard.
On Windows, running explorer https://www.github.com opens a File
Explorer window, not a web browser window.
The start command on the other hand opens the URL in the correct
browser, so let's use that instead.
* Tools\Scripts\libraries\webkitcorepy\webkitcorepy\terminal.py: Run
'start' command instead of 'explorer'
Canonical link: https://commits.webkit.org/261332@main
Canonical link: https://commits.webkit.org/259548.380@safari-7615-branch
Commit: 1de648970cbf71514df7edf55deaf35c1dcf1445
https://github.com/WebKit/WebKit/commit/1de648970cbf71514df7edf55deaf35c1dcf1445
Author: Youenn Fablet <youennf at gmail.com>
Date: 2023-03-08 (Wed, 08 Mar 2023)
Changed paths:
M Source/ThirdParty/libwebrtc/Source/third_party/libaom/source/libaom/av1/common/resize.c
M Source/ThirdParty/libwebrtc/Source/third_party/libaom/source/libaom/av1/common/resize.h
M Source/ThirdParty/libwebrtc/Source/third_party/libaom/source/libaom/av1/encoder/encoder_utils.c
Log Message:
-----------
av1/encoder/encoder_utils.c & a/av1/common/resize: Stack-buffer-overflow in aom_scaled_2d_ssse3
https://bugs.webkit.org/show_bug.cgi?id=253498
rdar://106063201
Reviewed by Eric Carlson.
Cherry-pick upstream change from https://aomedia.googlesource.com/aom/+/6318378f833b2a0d8e67fb3d12bcdc4e1c26b0e6%5E%21/#F2.
* Source/ThirdParty/libwebrtc/Source/third_party/libaom/source/libaom/av1/common/resize.c:
(av1_realloc_and_scale_if_required):
* Source/ThirdParty/libwebrtc/Source/third_party/libaom/source/libaom/av1/common/resize.h:
* Source/ThirdParty/libwebrtc/Source/third_party/libaom/source/libaom/av1/encoder/encoder_utils.c:
(av1_scale_references):
Canonical link: https://commits.webkit.org/259548.381@safari-7615-branch
Commit: adde9296b1b17025287513c8738c16b5c5edb278
https://github.com/WebKit/WebKit/commit/adde9296b1b17025287513c8738c16b5c5edb278
Author: Youenn Fablet <youennf at gmail.com>
Date: 2023-03-08 (Wed, 08 Mar 2023)
Changed paths:
M Source/ThirdParty/libwebrtc/Source/webrtc/api/stats/rtc_stats_report.h
M Source/ThirdParty/libwebrtc/Source/webrtc/pc/rtc_stats_collector.cc
M Source/ThirdParty/libwebrtc/Source/webrtc/pc/rtc_stats_collector_unittest.cc
M Source/ThirdParty/libwebrtc/Source/webrtc/pc/test/fake_peer_connection_for_stats.h
M Source/ThirdParty/libwebrtc/Source/webrtc/stats/rtc_stats_report.cc
Log Message:
-----------
[WebRTC] heap-use-after-free : webrtc::`anonymous namespace'::ProduceRemoteInboundRtpStreamStatsFromReportBlockData
https://bugs.webkit.org/show_bug.cgi?id=253510
rdar://106063452
Reviewed by Eric Carlson.
We first cherry-pick libwebrc b2be392c708c975ff5a81d8cd4dba588752a8dad to remove duplicate RTCCodec entries.
We then apply da6297dc53cb2eaae7b1c5381652de9d707a7d48.
* Source/ThirdParty/libwebrtc/Source/webrtc/api/stats/rtc_stats_report.h:
* Source/ThirdParty/libwebrtc/Source/webrtc/pc/rtc_stats_collector.cc:
* Source/ThirdParty/libwebrtc/Source/webrtc/pc/rtc_stats_collector_unittest.cc:
* Source/ThirdParty/libwebrtc/Source/webrtc/pc/test/fake_peer_connection_for_stats.h:
(webrtc::FakePeerConnectionForStats::AddVoiceChannel):
(webrtc::FakePeerConnectionForStats::AddVideoChannel):
(webrtc::FakePeerConnectionForStats::GetOrCreateFirstTransceiverOfType):
(webrtc::FakePeerConnectionForStats::CreateTransceiverOfType):
* Source/ThirdParty/libwebrtc/Source/webrtc/stats/rtc_stats_report.cc:
Canonical link: https://commits.webkit.org/259548.382@safari-7615-branch
Commit: 4b0ac875e7fa419e4ac73227835e9ad5102254ce
https://github.com/WebKit/WebKit/commit/4b0ac875e7fa419e4ac73227835e9ad5102254ce
Author: Youenn Fablet <youennf at gmail.com>
Date: 2023-03-08 (Wed, 08 Mar 2023)
Changed paths:
M Source/ThirdParty/libwebrtc/Source/third_party/libaom/source/libaom/av1/encoder/arm/neon/av1_fwd_txfm2d_neon.c
Log Message:
-----------
ASan global-buffer-overflow READ in com.apple.WebKit.WebContent.Development at libwebrtc.dylib: av1_lowbd_fwd_txfm2d_8x8_neon
https://bugs.webkit.org/show_bug.cgi?id=253512
rdar://105650593
Reviewed by Eric Carlson.
Cherry-pick from upstream the corresponding fix (582d2fd1e9b6a212cb7d30bcf63d3c1e78aa8fca).
Remove the call to vld1_s8, which reads 8 bytes while only 3 bytes are available, even though only 2 are used.
* Source/ThirdParty/libwebrtc/Source/third_party/libaom/source/libaom/av1/encoder/arm/neon/av1_fwd_txfm2d_neon.c:
(av1_lowbd_fwd_txfm2d_4x8_neon):
(av1_lowbd_fwd_txfm2d_4x16_neon):
(av1_lowbd_fwd_txfm2d_8x4_neon):
(av1_lowbd_fwd_txfm2d_8x8_neon):
(av1_lowbd_fwd_txfm2d_8x16_neon):
(av1_lowbd_fwd_txfm2d_8x32_neon):
(av1_lowbd_fwd_txfm2d_16x4_neon):
(av1_lowbd_fwd_txfm2d_16x8_neon):
(av1_lowbd_fwd_txfm2d_16x16_neon):
(av1_lowbd_fwd_txfm2d_16x32_neon):
(av1_lowbd_fwd_txfm2d_32x8_neon):
(av1_lowbd_fwd_txfm2d_32x16_neon):
Canonical link: https://commits.webkit.org/259548.383@safari-7615-branch
Commit: 7a4d4c345b7ba0bc658a37508f123826e6355e7c
https://github.com/WebKit/WebKit/commit/7a4d4c345b7ba0bc658a37508f123826e6355e7c
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-03-08 (Wed, 08 Mar 2023)
Changed paths:
M Tools/Scripts/libraries/webkitscmpy/setup.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/publish.py
Log Message:
-----------
Cherry-pick 261334 at main (8f7664b5f011). rdar://106202718
[git-webkit] Expose stdout and stderr of push during publish operation
https://bugs.webkit.org/show_bug.cgi?id=253330
rdar://106202718
Reviewed by Elliott Williams.
* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/publish.py:
(Publish.main): Do not capture output of 'git push' commands.
Canonical link: https://commits.webkit.org/261334@main
Canonical link: https://commits.webkit.org/259548.384@safari-7615-branch
Commit: 4bf0507391a9ef1a560f3979cb6a91ba1795c379
https://github.com/WebKit/WebKit/commit/4bf0507391a9ef1a560f3979cb6a91ba1795c379
Author: Chirag M Shah <chirag_m_shah at apple.com>
Date: 2023-03-08 (Wed, 08 Mar 2023)
Changed paths:
M Source/WebCore/loader/HistoryController.cpp
Log Message:
-----------
DocumentLoader might be null when calling HistoryController::updateCurrentItem (
https://bugs.webkit.org/show_bug.cgi?id=253465
rdar://106276228
Reviewed by Ryosuke Niwa.
FrameLoader::transitionToCommitted can set the documentLoader to nullptr
before it calls HistoryController::updateCurrentItem(), in which case we
crash. This change makes it so that we bail our early in that case.
* Source/WebCore/loader/HistoryController.cpp:
(WebCore::FrameLoader::HistoryController::updateCurrentItem):
Canonical link: https://commits.webkit.org/259548.385@safari-7615-branch
Commit: b521ddf1d98f41467af5a7706f11703eda0effbe
https://github.com/WebKit/WebKit/commit/b521ddf1d98f41467af5a7706f11703eda0effbe
Author: Chris Dumez <cdumez at apple.com>
Date: 2023-03-09 (Thu, 09 Mar 2023)
Changed paths:
M Source/WebKit/UIProcess/WebFrameProxy.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm
Log Message:
-----------
Cherry-pick e3cbd8226ecc. rdar://problem/106316283
Regression(258149 at main) 1Password autofill is broken on nytimes.com
https://bugs.webkit.org/show_bug.cgi?id=253576
rdar://106316283
Reviewed by Timothy Hatcher.
Before 258149 at main, the [WKWebView _frames:completionHander:] SPI was relying
on the WebProcess's FrameTree to return the state of the frames as a tree.
However, after the refactoring in 258149 at main, we do the tree traversal on
the UIProcess side and IPC each frame independently. To do this traversal,
we rely on WebFrameProxy::m_childFrames.
However, we have a bug where WebFrameProxy::m_childFrames could contain
subframes from previous pages that were previously visited in this view.
The reason for this is that the main frame (and thus the main WebFrameProxy)
gets reused on navigation. However, WebFrameProxy::m_childFrames is not getting
cleared whenever the frame navigates.
I initially tried to clear m_childFrames when a load gets committed in the
frame. However, this introduced crashes when restoring a back/forward cache
entry. The reason for this is that we currently don't notify the UIProcess
when restoring frames from the back/forward cache. As a result, m_childFrames
would not correctly get re-populated after restoring a back/forward cache
entry and it would lead to issues later on.
To make the fix as minimal and as safe as possible for the branch, I am opting
to update WebFrameProxy::getFrameInfo() to filter out frameData for frames
whose parentFrameID doesn't match the current frame's ID. This makes sure
that we only report about iframes that are currently in the frame tree, just
like we used to before 258149 at main.
In a follow-up, we should refactor this to make sure that m_childFrames is
an accurate and current representation of the frame tree, since we're going
to rely on it more and more for site isolation.
* Source/WebKit/UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didCommitLoad):
(WebKit::WebFrameProxy::didFailLoad):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm:
(TestWebKitAPI::TEST):
Canonical link: https://commits.webkit.org/261429@main
Commit: dd026e944caad22965789714877697f335096fb0
https://github.com/WebKit/WebKit/commit/dd026e944caad22965789714877697f335096fb0
Author: Tyler Wilcock <tyler_w at apple.com>
Date: 2023-03-13 (Mon, 13 Mar 2023)
Changed paths:
A LayoutTests/accessibility/changing-aria-hidden-with-display-none-parent-expected.txt
A LayoutTests/accessibility/changing-aria-hidden-with-display-none-parent.html
A LayoutTests/platform/ios-simulator/accessibility/changing-aria-hidden-with-display-none-parent-expected.txt
M LayoutTests/platform/ios/TestExpectations
M Source/WebCore/accessibility/AXObjectCache.cpp
M Source/WebCore/accessibility/AccessibilityNodeObject.cpp
Log Message:
-----------
Improve Ref / RefPtr hygiene in AXObjectCache::handleAttributeChange and AccessibilityNodeObject::textUnderElement
rdar://problem/106557770
Reviewed by Chris Fleizach.
Bring these two functions in line with the WebKit smart pointer style
guide (https://github.com/WebKit/WebKit/wiki/Smart-Pointer-Usage-Guidelines) by
reference counting AccessibilityObjects before passing them into non-trivial functions.
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::handleAttributeChange):
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::textUnderElement const):
* LayoutTests/platform/ios/TestExpectations:
Mark new test as passing.
* LayoutTests/accessibility/changing-aria-hidden-with-display-none-parent-expected.txt: Added.
* LayoutTests/accessibility/changing-aria-hidden-with-display-none-parent.html: Added.
* LayoutTests/platform/ios-simulator/accessibility/changing-aria-hidden-with-display-none-parent-expected.txt: Added.
Canonical link: https://commits.webkit.org/259548.387@safari-7615-branch
Commit: 00c69a96fd2fddee718a2e51fef66dc6aee41d8b
https://github.com/WebKit/WebKit/commit/00c69a96fd2fddee718a2e51fef66dc6aee41d8b
Author: Brian Weinstein <bweinstein at apple.com>
Date: 2023-03-13 (Mon, 13 Mar 2023)
Changed paths:
M Source/WebKit/UIProcess/API/APIContentRuleList.cpp
M Source/WebKit/UIProcess/API/APIContentRuleList.h
M Source/WebKit/UIProcess/API/Cocoa/WKContentRuleList.mm
M Source/WebKit/UIProcess/API/Cocoa/WKContentRuleListPrivate.h
M Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm
Log Message:
-----------
Cherry-pick a423cde6af09. rdar://problem/99753935
Expose WebCore::ContentExtensions::parseRuleList as WebKit SPI
https://bugs.webkit.org/show_bug.cgi?id=251465
<rdar://problem/99753935>
Reviewed by Alex Christensen.
This patch also adds tests for passing and failing rule parsing.
* Source/WebKit/UIProcess/API/APIContentRuleList.cpp:
(API::ContentRuleList::parseRuleList): Call into WebCore::ContentExtensions::parseRuleList and return the error code if it exists.
* Source/WebKit/UIProcess/API/APIContentRuleList.h:
* Source/WebKit/UIProcess/API/Cocoa/WKContentRuleList.mm:
(+[WKContentRuleList _parseRuleList:]): Call into API::ContentRuleList::parseRuleList and wrap the error code in an NSError if necessary.
* Source/WebKit/UIProcess/API/Cocoa/WKContentRuleListPrivate.h:
Canonical link: https://commits.webkit.org/259706@main
Canonical link: https://commits.webkit.org/259548.388@safari-7615-branch
Commit: 8e55f2341217fc6297e6e6cbf07ed23f3d232e4c
https://github.com/WebKit/WebKit/commit/8e55f2341217fc6297e6e6cbf07ed23f3d232e4c
Author: Said Abou-Hallawa <said at apple.com>
Date: 2023-03-13 (Mon, 13 Mar 2023)
Changed paths:
M LayoutTests/fast/images/cached-clipped-pdf-expected.html
M LayoutTests/fast/images/cached-clipped-pdf.html
M LayoutTests/fast/images/displaced-non-cached-pdf.html
M LayoutTests/fast/images/pdf-as-image-dest-rect-change-expected.txt
M LayoutTests/fast/images/pdf-as-image-dest-rect-change.html
M LayoutTests/fast/images/pdf-in-canvas.html
M Source/WebCore/Headers.cmake
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
R Source/WebCore/page/PDFImageCachingPolicy.h
M Source/WebCore/page/Settings.yaml
M Source/WebCore/page/SettingsBase.h
A Source/WebCore/platform/graphics/CachedSubimage.cpp
A Source/WebCore/platform/graphics/CachedSubimage.h
M Source/WebCore/platform/graphics/FloatRect.h
M Source/WebCore/platform/graphics/GeneratedImage.h
M Source/WebCore/platform/graphics/GraphicsContext.cpp
M Source/WebCore/platform/graphics/Image.cpp
M Source/WebCore/platform/graphics/Image.h
M Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp
M Source/WebCore/platform/graphics/cg/PDFDocumentImage.h
M Source/WebCore/platform/mediastream/WebRTCProvider.h
M Source/WebCore/rendering/RenderImage.cpp
M Source/WebCore/svg/graphics/SVGImage.h
M Source/WebCore/svg/graphics/SVGImageForContainer.h
M Source/WebCore/testing/InternalSettings.cpp
M Source/WebCore/testing/InternalSettings.h
M Source/WebCore/testing/InternalSettings.idl
M Source/WebCore/testing/Internals.cpp
M Source/WebCore/testing/Internals.h
M Source/WebCore/testing/Internals.idl
Log Message:
-----------
Cherry-pick 8382d4d3c6e3. rdar://problem/97254192
[CG] A large PDFDocumentImage may be displayed pixelated
https://bugs.webkit.org/show_bug.cgi?id=245664
rdar://97254192
Reviewed by Simon Fraser.
Introduce a new class called CachedSubimage. This class will be responsible of
creating a local ImageBuffer, drawing the source rectangle of the Image to the
ImageBuffer then drawing this ImageBuffer to the destination GraphicsContext.
The geometry of CachedSubimage will be calculated such that the resolution of
the CachedSubimage ImageBuffer matches the effective resolution of the destination
retangle when it is drawm to GraphicsContext.
For GPU Process rendering, we have to draw the PDF image in WebProcess into a local
ImageBuffer, get a NativeImage from this ImageBuffer and then send it to GPUProcess.
CachedSubimage will be used to do this seemlessly for all PDFDocumentImages regardless
of their size.
If Image::shouldDrawFromCachedSubimage() is true, a CachedSubimage of the Image
with the current resolution will be generated. If the local ImageBuffer can't be
created and Image::mustDrawFromCachedSubimage() is true, a pixelated CachedSubimage
of the Image will be created. If the pixelated CachedSubimage could not be created,
the Image will not be drawn.
* LayoutTests/fast/images/cached-clipped-pdf-expected.html:
* LayoutTests/fast/images/cached-clipped-pdf.html:
* LayoutTests/fast/images/displaced-non-cached-pdf.html:
* LayoutTests/fast/images/pdf-as-image-dest-rect-change-expected.txt:
* LayoutTests/fast/images/pdf-as-image-dest-rect-change.html:
* LayoutTests/fast/images/pdf-in-canvas.html:
* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/page/PDFImageCachingPolicy.h: Removed.
* Source/WebCore/page/Settings.yaml:
* Source/WebCore/page/SettingsBase.h:
* Source/WebCore/platform/graphics/CachedSubimage.cpp: Added.
(WebCore::CachedSubimage::create):
(WebCore::calculateCachedSubimageSourceRect):
(WebCore::CachedSubimage::createCachedSubimage):
(WebCore::CachedSubimage::createPixelatedCachedSubimage):
(WebCore::CachedSubimage::CachedSubimage):
(WebCore::CachedSubimage::canBeUsed const):
(WebCore::CachedSubimage::draw):
* Source/WebCore/platform/graphics/CachedSubimage.h: Added.
* Source/WebCore/platform/graphics/FloatRect.h:
(WebCore::areEssentiallyEqual):
* Source/WebCore/platform/graphics/GeneratedImage.h:
* Source/WebCore/platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawImage):
* Source/WebCore/platform/graphics/Image.cpp:
(WebCore::Image::drawCachedSubimage):
(WebCore::Image::destroyDecodedData):
* Source/WebCore/platform/graphics/Image.h:
(WebCore::Image::cachedSubimageCreateCountForTesting const):
(WebCore::Image::cachedSubimageDrawCountForTesting const):
(WebCore::Image::shouldDrawFromCachedSubimage const):
(WebCore::Image::mustDrawFromCachedSubimage const):
(WebCore::Image::drawCachedSubimage):
* Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::decodedSizeChanged):
(WebCore::PDFDocumentImage::shouldDrawFromCachedSubimage const):
(WebCore::PDFDocumentImage::mustDrawFromCachedSubimage const):
(WebCore::PDFDocumentImage::draw):
(WebCore::PDFDocumentImage::destroyDecodedData):
(WebCore::PDFDocumentImage::createPDFDocument):
(WebCore::PDFDocumentImage::setPdfImageCachingPolicy): Deleted.
(WebCore::PDFDocumentImage::cacheParametersMatch const): Deleted.
(WebCore::transformContextForPainting): Deleted.
(WebCore::cachedImageRect): Deleted.
(WebCore::PDFDocumentImage::updateCachedImageIfNeeded): Deleted.
* Source/WebCore/platform/graphics/cg/PDFDocumentImage.h:
* Source/WebCore/platform/mediastream/WebRTCProvider.h:
* Source/WebCore/rendering/RenderImage.cpp:
(WebCore::RenderImage::paintIntoRect):
* Source/WebCore/svg/graphics/SVGImage.h:
* Source/WebCore/svg/graphics/SVGImageForContainer.h:
* Source/WebCore/testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setStorageBlockingPolicy):
(WebCore::InternalSettings::setPDFImageCachingPolicy): Deleted.
* Source/WebCore/testing/InternalSettings.h:
* Source/WebCore/testing/InternalSettings.idl:
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::imageCachedSubimageCreateCount):
(WebCore::pdfDocumentImageFromImageElement): Deleted.
(WebCore::Internals::pdfDocumentCachingCount): Deleted.
* Source/WebCore/testing/Internals.h:
* Source/WebCore/testing/Internals.idl:
Canonical link: https://commits.webkit.org/259928@main
Canonical link: https://commits.webkit.org/259548.389@safari-7615-branch
Commit: 4960ddf60b1e2d5cd439fef56369cb93024bce2f
https://github.com/WebKit/WebKit/commit/4960ddf60b1e2d5cd439fef56369cb93024bce2f
Author: Patrick Angle <pangle at apple.com>
Date: 2023-03-13 (Mon, 13 Mar 2023)
Changed paths:
M Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.css
M Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js
Log Message:
-----------
Cherry-pick 80669e5b296b. rdar://problem/105298123
Web Inspector: Regression(258675 at main) "Selected element" console entry fills entire row
https://bugs.webkit.org/show_bug.cgi?id=252081
rdar://105298123
Reviewed by Devin Rousso.
Fix up some console-related styling after 258675 at main. The key change is to not set display: flex; on the console
message body and to return to using `span` for a few elements, undoing that change from the regression point and instead
making sure the timestamp itself is a span.
* Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.css:
(.console-message-body):
(.console-message .timestamp):
* Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js:
(WI.ConsoleMessageView.prototype.render):
(WI.ConsoleMessageView.prototype.renderTimestamp):
Canonical link: https://commits.webkit.org/260139@main
Canonical link: https://commits.webkit.org/259548.390@safari-7615-branch
Commit: e4bdf1740a86e74c8ccd694217cca33e09c619ae
https://github.com/WebKit/WebKit/commit/e4bdf1740a86e74c8ccd694217cca33e09c619ae
Author: Patrick Angle <pangle at apple.com>
Date: 2023-03-13 (Mon, 13 Mar 2023)
Changed paths:
M Source/WebInspectorUI/UserInterface/Models/Color.js
M Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js
Log Message:
-----------
Cherry-pick f6173b46292f. rdar://problem/105254118
Web Inspector: Add initial support for color-mix CSS values
https://bugs.webkit.org/show_bug.cgi?id=252031
rdar://105254118
Reviewed by Tim Nguyen.
Correct the display of `color-mix` to not truncate itself when not being edited, and to correctly show nested color
swatches within itself. This is achieved by sending tokens within a function's parentheses back through _addColorTokens
so that they in turn can be parsed for functions and color keywords. We also now enforce that a function keyword is
followed by a parenthesis to form a function, since some keywords like `rgb` and `hsl` are now also used to denote the
color space in which mixing should occur.
* Source/WebInspectorUI/UserInterface/Models/Color.js:
* Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype._addColorTokens):
Canonical link: https://commits.webkit.org/260332@main
Canonical link: https://commits.webkit.org/259548.391@safari-7615-branch
Commit: bf1251ff01e9fffdaa883289add033182724bf22
https://github.com/WebKit/WebKit/commit/bf1251ff01e9fffdaa883289add033182724bf22
Author: Eric Carlson <eric.carlson at apple.com>
Date: 2023-03-13 (Mon, 13 Mar 2023)
Changed paths:
M Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
Log Message:
-----------
Cherry-pick f3eb8e384292. rdar://problem/96305779
[iOS 15.3+] Crash at -[UIViewController presentViewController:withAnimationController:completion:], called on a wrong thread
https://bugs.webkit.org/show_bug.cgi?id=242235
rdar://96305779
Reviewed by Youenn Fablet.
* Source/WebKit/UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest): Always call request
methods that may prompt on the main runloop.
Canonical link: https://commits.webkit.org/260619@main
Canonical link: https://commits.webkit.org/259548.392@safari-7615-branch
Commit: 816e9d4cd72bad177a9a12230fbfbd1a350c4484
https://github.com/WebKit/WebKit/commit/816e9d4cd72bad177a9a12230fbfbd1a350c4484
Author: Alan Baradlay <zalan at apple.com>
Date: 2023-03-13 (Mon, 13 Mar 2023)
Changed paths:
A LayoutTests/fast/multicol/dynamic-column-count-change-expected.html
A LayoutTests/fast/multicol/dynamic-column-count-change.html
M Source/WebCore/rendering/RenderBlockFlow.cpp
M Source/WebCore/rendering/RenderBlockFlow.h
M Source/WebCore/rendering/RenderView.cpp
Log Message:
-----------
Cherry-pick e0b27b7e1c9b. rdar://problem/71808738
(REGRESSION) Increasing column-count above 2 at runtime has no effect
https://bugs.webkit.org/show_bug.cgi?id=219291
<rdar://problem/71808738>
Reviewed by Antti Koivisto.
In order to trigger column layout, we need to dirty the root RenderMultiColumnFlow(RenderMultiColumnSet).
* LayoutTests/fast/multicol/dynamic-column-count-change-expected.html: Added.
* LayoutTests/fast/multicol/dynamic-column-count-change.html: Added.
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::styleDidChange):
(WebCore::RenderBlockFlow::updateStylesForColumnChildren):
* Source/WebCore/rendering/RenderBlockFlow.h:
* Source/WebCore/rendering/RenderView.cpp:
(WebCore::RenderView::styleDidChange):
Canonical link: https://commits.webkit.org/260849@main
Canonical link: https://commits.webkit.org/259548.393@safari-7615-branch
Commit: 9e1263b8ead159ec5236c74608a78283ca36f4e9
https://github.com/WebKit/WebKit/commit/9e1263b8ead159ec5236c74608a78283ca36f4e9
Author: Megan Gardner <megan_gardner at apple.com>
Date: 2023-03-13 (Mon, 13 Mar 2023)
Changed paths:
A LayoutTests/http/tests/scroll-to-text-fragment/start-text-fancy-quote-expected.html
A LayoutTests/http/tests/scroll-to-text-fragment/start-text-fancy-quote.html
A LayoutTests/platform/glib/http/tests/scroll-to-text-fragment/start-text-fancy-quote-expected.html
A LayoutTests/platform/wincairo/http/tests/scroll-to-text-fragment/start-text-fancy-quote-expected.html
M Source/WebCore/dom/FragmentDirectiveRangeFinder.cpp
Log Message:
-----------
Cherry-pick 23b973250328. rdar://problem/103416130
Some Scroll To Text Fragment URLs do not find existing text on the page.
https://bugs.webkit.org/show_bug.cgi?id=253118
rdar://103416130
Reviewed by Aditya Keerthi.
We were carefully folding the quotes for the text to make sure that we would match
against all kinds of fancy quotes, but failed to fold the input quotes,
so if you had a query string with a fancy quote, it would fail to find matching
quotes on the page. Easily fixed by folding the quotes on the input string.
* LayoutTests/http/tests/scroll-to-text-fragment/start-text-fancy-quote-expected.html: Added.
* LayoutTests/http/tests/scroll-to-text-fragment/start-text-fancy-quote.html: Added.
* Source/WebCore/dom/FragmentDirectiveRangeFinder.cpp:
(WebCore::FragmentDirectiveRangeFinder::findRangeFromNodeList):
Canonical link: https://commits.webkit.org/261302@main
Canonical link: https://commits.webkit.org/259548.394@safari-7615-branch
Commit: 3f56e4a4353fbf95288162f5a9d1e4d20a25f7bf
https://github.com/WebKit/WebKit/commit/3f56e4a4353fbf95288162f5a9d1e4d20a25f7bf
Author: Justin Michaud <justin_michaud at apple.com>
Date: 2023-03-13 (Mon, 13 Mar 2023)
Changed paths:
A JSTests/wasm/stress/simd-regress.js
M Source/JavaScriptCore/assembler/MacroAssemblerARM64.h
Log Message:
-----------
Cherry-pick 03e6b1ff539c. rdar://problem/106264278
WASM SIMD VectorDotProduct should output lanes in the correct order.
https://bugs.webkit.org/show_bug.cgi?id=253307
rdar://106264278
Reviewed by Yusuke Suzuki.
We fix a surprising and silly vectorDotProduct bug. It is surprising that
the spec tests didn't catch this.
* JSTests/wasm/stress/simd-regress.js: Added.
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.func.main.export.string_appeared_here.result.i32.v128.const.i64x2.27866447905751188.27866447902605412.v128.const.i32x4.0x00080008.0x00080008.0x00080008.0x00080008.i32x4.dot_i16x8_s.i64x2.extract_lane.0.i64.const.6867652708672.i64.eq.async test):
* Source/JavaScriptCore/assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::vectorDotProduct):
Canonical link: https://commits.webkit.org/261326@main
Canonical link: https://commits.webkit.org/259548.395@safari-7615-branch
Commit: 84f396b298749b53f33c7be991d36c7d0c4e0b80
https://github.com/WebKit/WebKit/commit/84f396b298749b53f33c7be991d36c7d0c4e0b80
Author: Youenn Fablet <youennf at gmail.com>
Date: 2023-03-13 (Mon, 13 Mar 2023)
Changed paths:
M Source/WebCore/html/MediaElementSession.cpp
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/Tests/WebKit/GetUserMedia.mm
A Tools/TestWebKitAPI/Tests/WebKitCocoa/webrtc-remote-iframe.html
M Tools/TestWebKitAPI/Tests/WebKitCocoa/webrtc-remote.html
Log Message:
-----------
Cherry-pick 89829aa9cfdd. rdar://problem/104571980
A page with one document doing capture and another playing will not handle correctly remote commands
https://bugs.webkit.org/show_bug.cgi?id=253559
rdar://104571980
Reviewed by Eric Carlson.
We are processing the pause/play remote commands as mute/unmute capture in case document is capturing and playing several media streams.
Some video conference websites do capture in one document and play media streams in another document.
Handle this by changing the heuristic to check whether page is capturing instead of the document.
Covered by updated API test.
* Source/WebCore/html/MediaElementSession.cpp:
(WebCore::isDocumentPlayingSeveralMediaStreams):
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/webrtc-remote-iframe.html: Added.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/webrtc-remote.html:
Canonical link: https://commits.webkit.org/261414@main
Canonical link: https://commits.webkit.org/259548.396@safari-7615-branch
Commit: bcad05c2a260a993002f5c6ee089ad76d1069a5e
https://github.com/WebKit/WebKit/commit/bcad05c2a260a993002f5c6ee089ad76d1069a5e
Author: Patrick Angle <pangle at apple.com>
Date: 2023-03-13 (Mon, 13 Mar 2023)
Changed paths:
M LayoutTests/inspector/console/messagesCleared-expected.txt
M LayoutTests/inspector/console/messagesCleared.html
M Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp
M Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.h
M Source/JavaScriptCore/inspector/protocol/Console.json
M Source/WebCore/inspector/InspectorInstrumentation.cpp
M Source/WebInspectorUI/UserInterface/Controllers/ConsoleManager.js
M Source/WebInspectorUI/UserInterface/Protocol/ConsoleObserver.js
Log Message:
-----------
Cherry-pick 77830d12bea6. rdar://problem/104303833
Web Inspector: Console messages may be lost on main frame navigation depending on timing
https://bugs.webkit.org/show_bug.cgi?id=251659
rdar://104303833
Reviewed by Devin Rousso.
The existing heuristic to determine if console messages are being cleared as the result of a main frame navigation made
the assumption that console messages won't be received between the call to clear messages and the next tick in Web
Inspector. This isn't a safe assumption, and can be observed when logging immediately after a navigation on some
computers/under certain types of loads. Instead of inferring why the console is being cleared, introduce a `reason`
parameter that tells us if the request to clear is the result of a main frame navigation, removing any doubt. For
compatibility with older remote ends, we keep the existing heuristic, since its better than nothing.
* LayoutTests/inspector/console/messagesCleared-expected.txt:
* LayoutTests/inspector/console/messagesCleared.html:
- Ensure that a new session was signalled due to a refresh when the console is cleared.
* Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp:
(Inspector::InspectorConsoleAgent::clearMessages):
(Inspector::InspectorConsoleAgent::mainFrameNavigated):
(Inspector::InspectorConsoleAgent::clearMessages):
(Inspector::InspectorConsoleAgent::reset): Deleted.
- Provide a reason for the clearing of the console.
* Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.h:
* Source/JavaScriptCore/inspector/protocol/Console.json:
* Source/WebCore/inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didCommitLoadImpl):
* Source/WebInspectorUI/UserInterface/Controllers/ConsoleManager.js:
(WI.ConsoleManager):
(WI.ConsoleManager.prototype.messagesCleared):
- Use the reason to immediately determine how to handle clearing the console, instead of waiting until the next tick.
(WI.ConsoleManager.prototype._clearMessages):
- Extract the common logic that actually clears the console so we can reuse it for both the new reason-based path as
well as the compatibility path.
(WI.ConsoleManager.prototype._delayedMessagesCleared):
* Source/WebInspectorUI/UserInterface/Protocol/ConsoleObserver.js:
(WI.ConsoleObserver.prototype.messagesCleared):
Canonical link: https://commits.webkit.org/261512@main
Canonical link: https://commits.webkit.org/259548.397@safari-7615-branch
Commit: 1e5f09d8a0a3d4cfe33172b24d839b30f3447671
https://github.com/WebKit/WebKit/commit/1e5f09d8a0a3d4cfe33172b24d839b30f3447671
Author: Wenson Hsieh <wenson_hsieh at apple.com>
Date: 2023-03-13 (Mon, 13 Mar 2023)
Changed paths:
A LayoutTests/editing/pasteboard/copy-paste-text-with-trailing-colon-expected.txt
A LayoutTests/editing/pasteboard/copy-paste-text-with-trailing-colon.html
M LayoutTests/platform/ios-wk2/TestExpectations
M Source/WebCore/page/Page.cpp
Log Message:
-----------
Cherry-pick cb882e942695. rdar://problem/105603708
Copying text on a GitHub pull request in split mode sometimes lowercases the first letter
https://bugs.webkit.org/show_bug.cgi?id=250119
rdar://105603708
Reviewed by Aditya Keerthi.
When running lookalike character sanitization upon pasting text, allow the original text to pass
through unchanged in the case where lookalike character sanitization didn't adjust the URL.
Test: editing/pasteboard/copy-paste-text-with-trailing-colon.html
* LayoutTests/editing/pasteboard/copy-paste-text-with-trailing-colon-expected.txt: Added.
* LayoutTests/editing/pasteboard/copy-paste-text-with-trailing-colon.html: Added.
* LayoutTests/platform/ios-wk2/TestExpectations:
Mark the test as failing on iOS for now, while I investigate a fix in <https://webkit.org/b/253708>.
* Source/WebCore/page/Page.cpp:
(WebCore::Page::sanitizeLookalikeCharacters const):
Canonical link: https://commits.webkit.org/261516@main
Canonical link: https://commits.webkit.org/259548.398@safari-7615-branch
Commit: b461eed1124cb45d32a64c4928619affa5cb8232
https://github.com/WebKit/WebKit/commit/b461eed1124cb45d32a64c4928619affa5cb8232
Author: Razvan Caliman <rcaliman at apple.com>
Date: 2023-03-13 (Mon, 13 Mar 2023)
Changed paths:
M Source/WebInspectorUI/UserInterface/Base/Main.js
M Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js
Log Message:
-----------
Cherry-pick 3c2de1a4af30. rdar://problem/105565615
Uncaught Exception: 'Page.setShowRulers' was not found
https://bugs.webkit.org/show_bug.cgi?id=252432
Reviewed by Patrick Angle.
* Source/WebInspectorUI/UserInterface/Base/Main.js:
(WI.initializeTarget):
* Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView.prototype._showRulersChanged):
Canonical link: https://commits.webkit.org/260409@main
Canonical link: https://commits.webkit.org/259548.399@safari-7615-branch
Commit: b0519bdcdd5f84234c049e352659b9f5671257f7
https://github.com/WebKit/WebKit/commit/b0519bdcdd5f84234c049e352659b9f5671257f7
Author: Matt Woodrow <mattwoodrow at apple.com>
Date: 2023-03-13 (Mon, 13 Mar 2023)
Changed paths:
M Source/WebCore/html/OffscreenCanvas.cpp
Log Message:
-----------
Cherry-pick 229b3dbf26eb. rdar://problem/105770085
ImageBuffer::clone can fail, and pass nullptr to sinkIntoSerializedImageBuffer
https://bugs.webkit.org/show_bug.cgi?id=252965
<rdar:105770085>
Reviewed by Said Abou-Hallawa.
ImageBuffer::clone can fail if the GPU process has crashed, and we can silently fail here and while waiting for it to restart.
* Source/WebCore/html/OffscreenCanvas.cpp:
(WebCore::OffscreenCanvas::commitToPlaceholderCanvas):
Canonical link: https://commits.webkit.org/260901@main
Canonical link: https://commits.webkit.org/259548.400@safari-7615-branch
Commit: ab802b9a842bbfd80dfb6ed5b00389e7660234f1
https://github.com/WebKit/WebKit/commit/ab802b9a842bbfd80dfb6ed5b00389e7660234f1
Author: Justin Michaud <justin at justinmichaud.com>
Date: 2023-03-13 (Mon, 13 Mar 2023)
Changed paths:
A JSTests/wasm/stress/simd-regalloc-stress-2-export-mutable-v128.wasm
A JSTests/wasm/stress/simd-regalloc-stress-2-module0.wasm
A JSTests/wasm/stress/simd-regalloc-stress-2-module1.wasm
A JSTests/wasm/stress/simd-regalloc-stress-2.js
M Source/JavaScriptCore/b3/air/AirAllocateRegistersByGraphColoring.cpp
Log Message:
-----------
Cherry-pick c83189eceb5f. rdar://problem/105878987
Do not coalesce unspillable tmps
https://bugs.webkit.org/show_bug.cgi?id=253006
rdar://105878987
Reviewed by Yusuke Suzuki.
We have been encountering multiple test cases where we make a graph
uncolourable by coalescing too aggressively. If a tmp is marked as unspillable
because its live range is too small, it will never be un-marked if it gets
coalesced. Let's try not coalescing these registers ever.
* Source/JavaScriptCore/b3/air/AirAllocateRegistersByGraphColoring.cpp:
Canonical link: https://commits.webkit.org/260969@main
Canonical link: https://commits.webkit.org/259548.401@safari-7615-branch
Commit: 9dbe527d7a5f266b8419cc055f6e3affbe5be155
https://github.com/WebKit/WebKit/commit/9dbe527d7a5f266b8419cc055f6e3affbe5be155
Author: Ryosuke Niwa <rniwa at webkit.org>
Date: 2023-03-13 (Mon, 13 Mar 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/dom/nodes/adoption.window-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/template-content-hierarcy-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/syntax/serializing-html-fragments/template-expected.txt
M Source/WebCore/dom/ContainerNode.cpp
M Source/WebCore/dom/Document.cpp
Log Message:
-----------
Cherry-pick dd0a5a2fd2e2. rdar://problem/106542160
document.adoptNode is a no-op when called on a template element's document fragment
https://bugs.webkit.org/show_bug.cgi?id=246899
Reviewed by Chris Dumez.
Partially revert 252098 at main as this change turned out to be not web compatible.
* LayoutTests/imported/w3c/web-platform-tests/dom/nodes/adoption.window-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/template-content-hierarcy-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/syntax/serializing-html-fragments/template-expected.txt:
* Source/WebCore/dom/ContainerNode.cpp:
(WebCore::containsIncludingHostElements):
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::adoptNode):
Canonical link: https://commits.webkit.org/261491@main
Canonical link: https://commits.webkit.org/259548.402@safari-7615-branch
Commit: 46403b47eceada5a65acf9bf7611816e8745689a
https://github.com/WebKit/WebKit/commit/46403b47eceada5a65acf9bf7611816e8745689a
Author: Razvan Caliman <rcaliman at apple.com>
Date: 2023-03-13 (Mon, 13 Mar 2023)
Changed paths:
M LayoutTests/inspector/css/overrideUserPreferenceMatchedStyles.html
M Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
M Source/WebInspectorUI/UserInterface/Controllers/CSSManager.js
M Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js
M Source/WebInspectorUI/UserInterface/Views/OverrideUserPreferencesPopover.js
Log Message:
-----------
Cherry-pick b0b51e5bb269. rdar://problem/105177370
Web Inspector: Typo in Override User Preferences Popover: "overriden" should be spelled "overridden"
https://bugs.webkit.org/show_bug.cgi?id=253731
Reviewed by Patrick Angle.
Fix the typo in the localization as well as in the variable and method names for this feature.
* Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js:
* Source/WebInspectorUI/UserInterface/Controllers/CSSManager.js:
(WI.CSSManager):
(WI.CSSManager.prototype.get overriddenUserPreferences):
(WI.CSSManager.prototype.overrideUserPreference):
(WI.CSSManager.prototype.get overridenUserPreferences): Deleted.
* Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView):
(WI.DOMTreeContentView.prototype._overriddenUserPreferencesDidChange):
(WI.DOMTreeContentView.prototype._overridenUserPreferencesDidChange): Deleted.
* Source/WebInspectorUI/UserInterface/Views/OverrideUserPreferencesPopover.js:
(WI.OverrideUserPreferencesPopover.prototype._createSelectElement):
Canonical link: https://commits.webkit.org/261534@main
Canonical link: https://commits.webkit.org/259548.403@safari-7615-branch
Commit: 9fdf738648e2499c0724de1b8e7a98b573fd6107
https://github.com/WebKit/WebKit/commit/9fdf738648e2499c0724de1b8e7a98b573fd6107
Author: Alan Baradlay <zalan at apple.com>
Date: 2023-03-13 (Mon, 13 Mar 2023)
Changed paths:
M Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h
Log Message:
-----------
Cherry-pick 1eb1d409c2d8. rdar://problem/105876093
[IFC][Partial layout] Do not run partial invalidation when IFC has out-of-flow content
https://bugs.webkit.org/show_bug.cgi?id=252930
<rdar://105876093>
Reviewed by Antti Koivisto.
Disable partial invalidation when out-of-flow content is present. This is not supported yet.
* Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp:
(WebCore::LayoutIntegration::shouldInvalidateLineLayoutPathAfterContentChangeFor):
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::hasOutOfFlowContent const):
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h:
Canonical link: https://commits.webkit.org/260847@main
Canonical link: https://commits.webkit.org/259548.404@safari-7615-branch
Commit: 5bfbc4a518889c71749529610ed9fdaf30ba6179
https://github.com/WebKit/WebKit/commit/5bfbc4a518889c71749529610ed9fdaf30ba6179
Author: Gerald Squelart <g_squelart at apple.com>
Date: 2023-03-13 (Mon, 13 Mar 2023)
Changed paths:
A LayoutTests/http/tests/paymentrequest/ApplePayModifier-deferredPaymentRequest.https-expected.txt
A LayoutTests/http/tests/paymentrequest/ApplePayModifier-deferredPaymentRequest.https.html
M LayoutTests/platform/ios-wk2/TestExpectations
M LayoutTests/platform/mac-wk2/TestExpectations
M Source/WTF/wtf/PlatformEnableCocoa.h
M Source/WTF/wtf/PlatformHave.h
M Source/WebCore/DerivedSources-input.xcfilelist
M Source/WebCore/DerivedSources-output.xcfilelist
M Source/WebCore/DerivedSources.make
A Source/WebCore/Modules/applepay/ApplePayDeferredPaymentRequest.h
A Source/WebCore/Modules/applepay/ApplePayDeferredPaymentRequest.idl
M Source/WebCore/Modules/applepay/ApplePayDetailsUpdateBase.h
M Source/WebCore/Modules/applepay/ApplePayDetailsUpdateBase.idl
M Source/WebCore/Modules/applepay/ApplePayFeature.h
M Source/WebCore/Modules/applepay/ApplePayFeature.idl
M Source/WebCore/Modules/applepay/ApplePayPaymentRequest.h
M Source/WebCore/Modules/applepay/ApplePayPaymentRequest.idl
M Source/WebCore/Modules/applepay/ApplePaySession.cpp
M Source/WebCore/Modules/applepay/ApplePaySessionPaymentRequest.h
M Source/WebCore/Modules/applepay/cocoa/PaymentAPIVersionCocoa.mm
M Source/WebCore/Modules/applepay/paymentrequest/ApplePayModifier.h
M Source/WebCore/Modules/applepay/paymentrequest/ApplePayModifier.idl
M Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp
M Source/WebCore/PAL/pal/cocoa/PassKitSoftLink.h
M Source/WebCore/PAL/pal/cocoa/PassKitSoftLink.mm
M Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h
M Source/WebCore/PlatformMac.cmake
M Source/WebCore/SourcesCocoa.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/testing/MockPaymentCoordinator.cpp
M Source/WebCore/testing/MockPaymentCoordinator.h
M Source/WebCore/testing/MockPaymentCoordinator.idl
M Source/WebKit/Platform/cocoa/PaymentAuthorizationPresenter.mm
A Source/WebKit/Shared/ApplePay/DeferredPaymentRequest.h
A Source/WebKit/Shared/ApplePay/cocoa/DeferredPaymentRequestCocoa.mm
M Source/WebKit/Shared/ApplePay/cocoa/PaymentTokenContextCocoa.mm
M Source/WebKit/Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm
M Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Source/WebKit/SourcesCocoa.txt
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
Log Message:
-----------
Cherry-pick 1fdc00a92679. rdar://problem/104562407
Implement the Apple Pay JS API for deferred payment requests
https://bugs.webkit.org/show_bug.cgi?id=253219
rdar://104562407
Reviewed by Aditya Keerthi and Dean Jackson.
The new Apple Pay JS API ApplePayDeferredPaymentRequest corresponds to PKDeferredPaymentRequest https://developer.apple.com/documentation/passkit/pkdeferredpaymentrequest
Payment requests now accept an optional property 'deferredPaymentRequest', which may contain an item with a deferred payment timing, and optionally a free cancellation date. This may be used for e.g.: pre-orders.
* LayoutTests/http/tests/paymentrequest/ApplePayModifier-deferredPaymentRequest.https-expected.txt: Added.
* LayoutTests/http/tests/paymentrequest/ApplePayModifier-deferredPaymentRequest.https.html: Added.
* LayoutTests/platform/ios-wk2/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* Source/WTF/wtf/PlatformEnableCocoa.h:
* Source/WTF/wtf/PlatformHave.h:
* Source/WebCore/DerivedSources-input.xcfilelist:
* Source/WebCore/DerivedSources-output.xcfilelist:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/Modules/applepay/ApplePayDeferredPaymentRequest.h: Copied from Source/WebCore/Modules/applepay/ApplePayDetailsUpdateBase.idl.
* Source/WebCore/Modules/applepay/ApplePayDeferredPaymentRequest.idl: Copied from Source/WebCore/Modules/applepay/ApplePayDetailsUpdateBase.idl.
* Source/WebCore/Modules/applepay/ApplePayDetailsUpdateBase.h:
* Source/WebCore/Modules/applepay/ApplePayDetailsUpdateBase.idl:
* Source/WebCore/Modules/applepay/ApplePayFeature.h:
* Source/WebCore/Modules/applepay/ApplePayFeature.idl:
* Source/WebCore/Modules/applepay/ApplePayPaymentRequest.h:
* Source/WebCore/Modules/applepay/ApplePayPaymentRequest.idl:
* Source/WebCore/Modules/applepay/ApplePaySession.cpp:
(WebCore::convertAndValidate):
* Source/WebCore/Modules/applepay/ApplePaySessionPaymentRequest.h:
(WebCore::ApplePaySessionPaymentRequest::deferredPaymentRequest const):
(WebCore::ApplePaySessionPaymentRequest::setDeferredPaymentRequest):
* Source/WebCore/Modules/applepay/cocoa/PaymentAPIVersionCocoa.mm:
(WebCore::PaymentAPIVersion::current):
* Source/WebCore/Modules/applepay/paymentrequest/ApplePayModifier.h:
* Source/WebCore/Modules/applepay/paymentrequest/ApplePayModifier.idl:
* Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
(WebCore::ApplePayPaymentHandler::show):
(WebCore::validate):
(WebCore::ApplePayPaymentHandler::shippingAddressUpdated):
(WebCore::ApplePayPaymentHandler::shippingOptionUpdated):
(WebCore::ApplePayPaymentHandler::paymentMethodUpdated):
* Source/WebCore/PAL/pal/cocoa/PassKitSoftLink.h:
* Source/WebCore/PAL/pal/cocoa/PassKitSoftLink.mm:
* Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h:
* Source/WebCore/PlatformMac.cmake:
* Source/WebCore/SourcesCocoa.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/testing/MockPaymentCoordinator.cpp:
(WebCore::MockPaymentCoordinator::showPaymentUI):
(WebCore::MockPaymentCoordinator::completeShippingMethodSelection):
(WebCore::MockPaymentCoordinator::completeShippingContactSelection):
(WebCore::MockPaymentCoordinator::completePaymentMethodSelection):
(WebCore::MockPaymentCoordinator::completeCouponCodeChange):
* Source/WebCore/testing/MockPaymentCoordinator.h:
* Source/WebCore/testing/MockPaymentCoordinator.idl:
* Source/WebKit/Platform/cocoa/PaymentAuthorizationPresenter.mm:
(WebKit::PaymentAuthorizationPresenter::completePaymentMethodSelection):
(WebKit::PaymentAuthorizationPresenter::completeShippingContactSelection):
(WebKit::PaymentAuthorizationPresenter::completeShippingMethodSelection):
(WebKit::PaymentAuthorizationPresenter::completeCouponCodeChange):
* Source/WebKit/Shared/ApplePay/DeferredPaymentRequest.h: Copied from Source/WebCore/Modules/applepay/ApplePayDetailsUpdateBase.idl.
* Source/WebKit/Shared/ApplePay/cocoa/DeferredPaymentRequestCocoa.mm: Added.
(WebKit::platformDeferredPaymentRequest):
* Source/WebKit/Shared/ApplePay/cocoa/PaymentTokenContextCocoa.mm:
(WebKit::toDecimalNumber): Deleted.
* Source/WebKit/Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest):
* Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
(IPC::ArgumentCoder<WebCore::ApplePaySessionPaymentRequest>::encode):
(IPC::ArgumentCoder<WebCore::ApplePaySessionPaymentRequest>::decode):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
Canonical link: https://commits.webkit.org/261216@main
Canonical link: https://commits.webkit.org/259548.405@safari-7615-branch
Commit: 51b8d43ae3c96e2667b139080470363422d1e8de
https://github.com/WebKit/WebKit/commit/51b8d43ae3c96e2667b139080470363422d1e8de
Author: Gerald Squelart <g_squelart at apple.com>
Date: 2023-03-13 (Mon, 13 Mar 2023)
Changed paths:
M Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h
M Source/WebKit/Shared/ApplePay/cocoa/DeferredPaymentRequestCocoa.mm
Log Message:
-----------
Cherry-pick 633a76e24024. rdar://problem/106239467
Ensure that [PKDeferredPaymentRequest setFreeCancellationDateTimeZone] exists before using it
https://bugs.webkit.org/show_bug.cgi?id=253395
rdar://106239467
Reviewed by Aditya Keerthi.
[PKDeferredPaymentRequest setFreeCancellationDateTimeZone] was added in a recent SDK, so we should ensure it's present before trying to use it.
* Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h:
* Source/WebKit/Shared/ApplePay/cocoa/DeferredPaymentRequestCocoa.mm:
(WebKit::platformDeferredPaymentRequest):
Canonical link: https://commits.webkit.org/261230@main
Canonical link: https://commits.webkit.org/259548.406@safari-7615-branch
Commit: 520550ae398dd78f41115ad12a6acd0fbc6d90ba
https://github.com/WebKit/WebKit/commit/520550ae398dd78f41115ad12a6acd0fbc6d90ba
Author: Patrick Angle <pangle at apple.com>
Date: 2023-03-13 (Mon, 13 Mar 2023)
Changed paths:
M LayoutTests/inspector/css/getMatchedStylesForNode-expected.txt
M LayoutTests/inspector/css/getMatchedStylesForNodeNestingStyleGrouping-expected.txt
M LayoutTests/inspector/css/getMatchedStylesForNodeNestingStyleGrouping.html
M LayoutTests/inspector/css/modify-css-property-expected.txt
M LayoutTests/inspector/css/modify-css-property.html
M LayoutTests/inspector/css/resources/modify-css-property.css
M Source/JavaScriptCore/inspector/protocol/CSS.json
M Source/WebCore/css/CSSPropertySourceData.h
M Source/WebCore/css/parser/CSSParserImpl.cpp
M Source/WebCore/css/parser/CSSParserImpl.h
M Source/WebCore/css/parser/CSSParserObserver.h
M Source/WebCore/inspector/InspectorStyleSheet.cpp
M Source/WebCore/inspector/InspectorStyleSheet.h
M Source/WebCore/inspector/agents/InspectorCSSAgent.cpp
M Source/WebInspectorUI/UserInterface/Models/CSSRule.js
M Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js
M Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js
Log Message:
-----------
Cherry-pick b1dd655b710e. rdar://problem/104821946
Web Inspector: Implicitly nested property declarations inside non-style rules results in nested content being deleted during editing or displaying incorrect matched styles for elements
https://bugs.webkit.org/show_bug.cgi?id=251565
rdar://104821946
Reviewed by Devin Rousso.
InspectorStyleSheet was built with the assumption that Style rules contained property declarations, and nothing else.
CSS nesting has proven this assumption wrong in significant ways by allowing properties and other rules to be declared,
interleaved inside a rule. This includes inside @ rules, which previously could not contain property delcarations
directly.
This means during editing, we only want to replace the property declarations, not the full body of a rule, since the
rule may contain other rules. Luckily, canonically all property declarations occur before all nested rules, so we can
safely move nested rules below to make our lives a bit easier with no harm to the meaning of the style sheet.
This fix adds instrumentation to the CSS parser so we can be informed of the new "implicit" nested rule that contains
properties inside of non-style rules. It also overhauls how rule body text is edited, much like we had to last year for
rule header text.
* LayoutTests/inspector/css/getMatchedStylesForNode-expected.txt:
- Account for new property of CSSRule.
* LayoutTests/inspector/css/getMatchedStylesForNodeNestingStyleGrouping-expected.txt:
* LayoutTests/inspector/css/getMatchedStylesForNodeNestingStyleGrouping.html:
* LayoutTests/inspector/css/modify-css-property-expected.txt:
* LayoutTests/inspector/css/modify-css-property.html:
* LayoutTests/inspector/css/resources/modify-css-property.css:
- Add test cases for implicitly nested rules and their siblings, children, and parents.
* Source/JavaScriptCore/inspector/protocol/CSS.json:
- Mark implicitly nested rules so that the frontend can prevent the editing of their selector.
* Source/WebCore/css/CSSPropertySourceData.h:
(WebCore::CSSRuleSourceData::CSSRuleSourceData):
- The container rule types can now contain properties, so we always need to have the buffer for that information ready,
since we won't be informed by the parser that an implicit nested context was created until after we have observed the
properties themselves.
* Source/WebCore/css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::consumeRegularRuleList):
(WebCore::CSSParserImpl::consumeDeclarationListOrStyleBlockHelper):
(WebCore::CSSParserImpl::consumeStyleBlock):
* Source/WebCore/css/parser/CSSParserImpl.h:
- Don't send duplicate bodyStart/bodyEnd messages to the observer.
- Notify the observer when the engine has created an implict nested rule inside a body.
* Source/WebCore/css/parser/CSSParserObserver.h:
* Source/WebCore/inspector/InspectorStyleSheet.cpp:
(WebCore::atRuleIdentifierForType):
(WebCore::isValidRuleHeaderText):
- Pull the mapping of types to their keyword text for reuse in setting new style text.
(WebCore::StyleSheetHandler::endRuleBody):
- In order to maintain parity with CSSOM's representation of styles, we need to create an implictly nested rule to
match against the CSSOM's implicitly nested rule. This also allows us to inform the frontend that said CSSOM rule was
implicitly nested, since the OM itself doesn't carry this information.
(WebCore::StyleSheetHandler::markRuleBodyContainsImplicitlyNestedProperties):
- Observe to mark the style rule data as containing implicitly nested properties, which will then trigger us to take those properties and mvoe them to a special implicit style rule data object.
(WebCore::InspectorStyleSheet::buildObjectForRule):
(WebCore::isNotSpaceOrTab):
(WebCore::InspectorStyleSheet::setRuleStyleText):
- Overhaul the setting of style text.
- Undo/oldText is handled specially because we want to restore the sheet back to the non-canonical form after an edit.
- The frontend does not provide nested rules as part of its new text, so we must readd them ourselves, which we can do
from the original style sheet.
- Indentation is matched to the new property delcartion text provided by the frontend.
(WebCore::InspectorStyleSheetForInlineStyle::setRuleStyleText):
- Match the method signature for non-inline styles, and simplify the indirection previously present for setting a style
rule's/inline style's text.
(WebCore::InspectorStyle::setText): Deleted.
(WebCore::InspectorStyleSheet::setStyleText): Deleted.
(WebCore::InspectorStyleSheetForInlineStyle::setStyleText): Deleted.
* Source/WebCore/inspector/InspectorStyleSheet.h:
* Source/WebCore/inspector/agents/InspectorCSSAgent.cpp:
- Adopt new method to set the body text of a rule.
* Source/WebInspectorUI/UserInterface/Models/CSSRule.js:
(WI.CSSRule):
(WI.CSSRule.prototype.get isImplicitlyNested):
* Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js:
(WI.CSSStyleDeclaration.prototype.get selectorEditable):
* Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js:
(WI.DOMNodeStyles.prototype._parseRulePayload):
- Mark the selector of implicitly nested rules as non-editable.
Canonical link: https://commits.webkit.org/261329@main
Canonical link: https://commits.webkit.org/259548.407@safari-7615-branch
Commit: 0489426718c94fef7a671eebb957bc58d541de8c
https://github.com/WebKit/WebKit/commit/0489426718c94fef7a671eebb957bc58d541de8c
Author: Matt Woodrow <mattwoodrow at apple.com>
Date: 2023-03-13 (Mon, 13 Mar 2023)
Changed paths:
A LayoutTests/fast/canvas/offscreen-disabled-construct3-quirk-expected.txt
A LayoutTests/fast/canvas/offscreen-disabled-construct3-quirk.html
M Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
Log Message:
-----------
OffscreenCanvas support without WebGL breaks Construct 3 content.
https://bugs.webkit.org/show_bug.cgi?id=253431
<rdar://106341361>
Reviewed by Chris Dumez.
Construct 3 is testing for the presence of OffscreenCanvas on the main thread, and then assumes
that a WebGL context will be able to be constructed from it.
We've only enabled Canvas2D on OffscreenCanvas currently, so detect this library and disable
OffscreenCanvas entirely.
* LayoutTests/fast/canvas/offscreen-disabled-construct3-quirk-expected.txt: Added.
* LayoutTests/fast/canvas/offscreen-disabled-construct3-quirk.html: Added.
* Source/WebCore/bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::getOwnPropertySlot):
Canonical link: https://commits.webkit.org/259548.408@safari-7615-branch
Commit: 17b8448a819fb56da4be8b30f6b86fd77d8f7a81
https://github.com/WebKit/WebKit/commit/17b8448a819fb56da4be8b30f6b86fd77d8f7a81
Author: Patrick Griffis <pgriffis at igalia.com>
Date: 2023-03-13 (Mon, 13 Mar 2023)
Changed paths:
M LayoutTests/platform/glib/imported/w3c/web-platform-tests/fetch/metadata/fetch-preflight.https.sub.any-expected.txt
M LayoutTests/platform/glib/imported/w3c/web-platform-tests/fetch/metadata/fetch-preflight.https.sub.any.serviceworker-expected.txt
M LayoutTests/platform/glib/imported/w3c/web-platform-tests/fetch/metadata/fetch-preflight.https.sub.any.sharedworker-expected.txt
M LayoutTests/platform/glib/imported/w3c/web-platform-tests/fetch/metadata/fetch-preflight.https.sub.any.worker-expected.txt
M Source/WebCore/loader/CrossOriginAccessControl.cpp
M Source/WebCore/loader/CrossOriginAccessControl.h
M Source/WebCore/loader/CrossOriginPreflightChecker.cpp
M Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.cpp
M Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.h
M Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp
Log Message:
-----------
Cherry-pick fc63906f700d. rdar://problem/106187113
Include FetchMetadata on preflight requests
https://bugs.webkit.org/show_bug.cgi?id=253300
Reviewed by Brent Fulgham and Youenn Fablet.
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/fetch/metadata/fetch-preflight.https.sub.any-expected.txt:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/fetch/metadata/fetch-preflight.https.sub.any.serviceworker-expected.txt:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/fetch/metadata/fetch-preflight.https.sub.any.sharedworker-expected.txt:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/fetch/metadata/fetch-preflight.https.sub.any.worker-expected.txt:
* Source/WebCore/loader/CrossOriginAccessControl.cpp:
(WebCore::createAccessControlPreflightRequest):
* Source/WebCore/loader/CrossOriginAccessControl.h:
* Source/WebCore/loader/CrossOriginPreflightChecker.cpp:
(WebCore::CrossOriginPreflightChecker::startPreflight):
(WebCore::CrossOriginPreflightChecker::doPreflight):
* Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.cpp:
(WebKit::NetworkCORSPreflightChecker::startPreflight):
* Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::addParametersShared):
Canonical link: https://commits.webkit.org/261587@main
Canonical link: https://commits.webkit.org/259548.409@safari-7615-branch
Commit: b5b8a1c83775684a0c1177584878d41c218ee9c2
https://github.com/WebKit/WebKit/commit/b5b8a1c83775684a0c1177584878d41c218ee9c2
Author: Sam Sneddon <gsnedders at apple.com>
Date: 2023-03-14 (Tue, 14 Mar 2023)
Changed paths:
M Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py
Log Message:
-----------
Cherry-pick 261370 at main (0505ac5005b9). rdar://106428885
[AutoInstall] updates to implicit_deps don't get applied
https://bugs.webkit.org/show_bug.cgi?id=253566
Reviewed by Jonathan Bedard.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
(Package.is_cached): Recurse into implicit_deps.
Canonical link: https://commits.webkit.org/261370@main
Canonical link: https://commits.webkit.org/259548.410@safari-7615-branch
Commit: b241e3297326e957c122c94bd0905437ec6fdf16
https://github.com/WebKit/WebKit/commit/b241e3297326e957c122c94bd0905437ec6fdf16
Author: Aakash Jain <aakash_jain at apple.com>
Date: 2023-03-14 (Tue, 14 Mar 2023)
Changed paths:
M Tools/CISupport/ews-build/steps_unittest.py
Log Message:
-----------
Cherry-pick 261585 at main (a358af782fce). rdar://106659604
EWS unit-tests are getting stuck trying to talk to live bugzilla instance
https://bugs.webkit.org/show_bug.cgi?id=253839
Reviewed by Ryan Haddad.
Unit-tests shouldn't talk to live bugzilla instance. In fact EWS bots do
not store any bugzilla credentials and IIRC shouldn't talk to bugzilla.
* Tools/CISupport/ews-build/steps_unittest.py:
Canonical link: https://commits.webkit.org/261585@main
Canonical link: https://commits.webkit.org/259548.411@safari-7615-branch
Commit: 8331f8ec7522b28799987539cbeba3ef06486085
https://github.com/WebKit/WebKit/commit/8331f8ec7522b28799987539cbeba3ef06486085
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-03-14 (Tue, 14 Mar 2023)
Changed paths:
M Tools/Scripts/libraries/webkitcorepy/setup.py
M Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
M Tools/Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py
M Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/terminal_unittest.py
M Tools/Scripts/libraries/webkitscmpy/setup.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py
Log Message:
-----------
Cherry-pick 261487 at main (2ce712d55076). rdar://106201813
[git-webkit] Handle interupts while pushing
https://bugs.webkit.org/show_bug.cgi?id=253327
rdar://106201813
Reviewed by Elliott Williams.
We should gracefully handle keyboard interupts when running push commands,
since that is a common (and expected) place for engineers to interupt git-webkit.
* Tools/Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py:
(Terminal.disable_keyboard_interrupt_stacktracktrace): Disable KeyboardInterupt stacktraces based on logging level.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/terminal_unittest.py:
(TerminalTests.test_interrupt_decorator):
* Tools/Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py: Disable KeyboardInterupt stacktraces
at the default logging level.
Canonical link: https://commits.webkit.org/261487@main
Canonical link: https://commits.webkit.org/259548.412@safari-7615-branch
Commit: 182d422f31947a01e96bc85b0e41140eee42757d
https://github.com/WebKit/WebKit/commit/182d422f31947a01e96bc85b0e41140eee42757d
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2023-03-14 (Tue, 14 Mar 2023)
Changed paths:
R JSTests/microbenchmarks/map-iteration-and-array-destructuring.js
M JSTests/stress/destructuring-assignment-accepts-iterables.js
M Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
M Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
Log Message:
-----------
Revert [255681 at main] [JSC] Use fast iteration for array destructuring
rdar://106578250
Reviewed by Mark Lam.
Revert 255681 at main based on regression in rdar://106578250.
* JSTests/microbenchmarks/map-iteration-and-array-destructuring.js: Removed.
* JSTests/stress/destructuring-assignment-accepts-iterables.js:
(set shouldBe):
(set new):
* Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitEnumeration):
* Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:
(JSC::ArrayPatternNode::bindValue const):
Canonical link: https://commits.webkit.org/259548.413@safari-7615-branch
Commit: f4ae724ad01650ef91152eb3c7928e1ae3b11dc9
https://github.com/WebKit/WebKit/commit/f4ae724ad01650ef91152eb3c7928e1ae3b11dc9
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-03-14 (Tue, 14 Mar 2023)
Changed paths:
M Tools/Scripts/libraries/webkitscmpy/setup.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/track_unittest.py
M metadata/git_config_extension
Log Message:
-----------
Cherry-pick 261500 at main (e6817dacbecc). rdar://106447269
[git-webkit] Make remote security level explicit
https://bugs.webkit.org/show_bug.cgi?id=253598
rdar://106447269
Reviewed by Elliott Williams.
* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.source_remotes): Sort remotes by security level.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
(Setup.git): Extract remote URL specifically.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/track_unittest.py:
(TestTrack.test_branch):
(TestTrack.test_eng_branch):
* metadata/git_config_extension: Add explicit security level declarations.
Canonical link: https://commits.webkit.org/261500@main
Canonical link: https://commits.webkit.org/259548.414@safari-7615-branch
Commit: 16c7018215b70f681a7dce65a432912cf463afc1
https://github.com/WebKit/WebKit/commit/16c7018215b70f681a7dce65a432912cf463afc1
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-03-14 (Tue, 14 Mar 2023)
Changed paths:
A Tools/Scripts/hooks/pre-push
M Tools/Scripts/libraries/webkitscmpy/setup.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/clean.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/land.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/publish.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py
Log Message:
-----------
Cherry-pick 261526 at main (604395a516c1). rdar://106216593
[git-webkit] Add pre-push hook to prevent publication of security sensative commits
https://bugs.webkit.org/show_bug.cgi?id=253354
rdar://106216593
Reviewed by Elliott Williams.
Write a pre-push hook to block or prompt the user in 3 situations to prevent the
inadvertent publication of security sensative commits:
- Class 1: A commit exists on a remote more secure than the one a contributor is pushing to
- Class 2: A commit is a cherry-pick of a commit from a more secure remote
- Class 3: The commit references a security bug the target remote is public
The goal of this hook is to prevent class 1 and 2 without relying on code in the checkout, while
class 3 relies on webkitbugspy to determine if a linked issue is redacted.
* Tools/Scripts/hooks/pre-push: Added.
* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
(Git): Add `git config --get-regexp`
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/clean.py:
(Clean.cleanup): Forward verbosity into `git push`.
(Clean.main): Ditto.
(DeletePRBranches.main): Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/land.py:
(Land.main): Forward verbosity into `git push`.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/publish.py:
(Publish.main): Change operating mode of our pre-push hook to allow class-1 security
publication with a prompt.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.create_pull_request): Forward verbosity into `git push`.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
(Setup._security_levels): Provide a security level for source and fork remotes based on
the order of our source remotes.
(Setup.git): Pass arguments to template for our pre-push hook.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py:
Canonical link: https://commits.webkit.org/261526@main
Canonical link: https://commits.webkit.org/259548.415@safari-7615-branch
Commit: 82aa7c668a54c82f593de600fac3ca43e86eb9a0
https://github.com/WebKit/WebKit/commit/82aa7c668a54c82f593de600fac3ca43e86eb9a0
Author: Per Arne Vollan <pvollan at apple.com>
Date: 2023-03-14 (Tue, 14 Mar 2023)
Changed paths:
M Source/WebKit/Scripts/process-entitlements.sh
Log Message:
-----------
Cherry-pick 927c75f9049d. rdar://problem/106504425
Add entitlement for creating sandbox extensions to local files
https://bugs.webkit.org/show_bug.cgi?id=253831
rdar://106504425
Reviewed by Brent Fulgham.
Add entitlement for creating sandbox extensions to local files in the WebContent process.
These extensions are being sent to the Network process to provide read access.
* Source/WebKit/Scripts/process-entitlements.sh:
Canonical link: https://commits.webkit.org/261594@main
Canonical link: https://commits.webkit.org/259456.508@safari-7615-branch
Commit: 403610f445063d05bb90dc56f160ee62ec34b255
https://github.com/WebKit/WebKit/commit/403610f445063d05bb90dc56f160ee62ec34b255
Author: Richard Robinson <richard_robinson2 at apple.com>
Date: 2023-03-14 (Tue, 14 Mar 2023)
Changed paths:
M Source/WebCore/editing/EditorCommand.cpp
M Source/WebCore/page/EventHandler.cpp
M Source/WebKit/UIProcess/mac/WebViewImpl.mm
Log Message:
-----------
Cherry-pick 1dc77463aa23. rdar://problem/106201169
REGRESSION (macOS 13.3 Beta): WKWebView doesn't scroll in response to NSResponder.scrollPageDown(_:)
https://bugs.webkit.org/show_bug.cgi?id=253785
rdar://106201169
Reviewed by Simon Fraser.
259146 at main caused this regression since it directly removed these selectors and their
corresponding functions. They were removed so that the new key-repeat behavior was consistent
between Page Up/Down and the space bar.
This PR fixes this by reverting the part of 259146 at main that altered these functions to restore
their original behavior, while also maintaining the consistency of the key-repeat behavior that 259146 at main implemented.
* Source/WebCore/editing/EditorCommand.cpp:
(WebCore::executeScrollPageBackward):
(WebCore::executeScrollPageForward):
(WebCore::createCommandMap):
* Source/WebCore/page/EventHandler.cpp:
(WebCore::EventHandler::defaultKeyboardEventHandler):
(WebCore::EventHandler::defaultPageUpDownEventHandler):
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::selectorExceptionMap):
Canonical link: https://commits.webkit.org/261589@main
Canonical link: https://commits.webkit.org/259456.509@safari-7615-branch
Commit: 47015dea77b8b2c85896a8cf8e3f51951e437200
https://github.com/WebKit/WebKit/commit/47015dea77b8b2c85896a8cf8e3f51951e437200
Author: David Kilzer <ddkilzer at apple.com>
Date: 2023-03-14 (Tue, 14 Mar 2023)
Changed paths:
M Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h
Log Message:
-----------
Revert "Cherry-pick 1eb1d409c2d8. rdar://problem/105876093"
This reverts commit 9fdf738648e2499c0724de1b8e7a98b573fd6107.
Unreviewed build fix.
Canonical link: https://commits.webkit.org/259548.418@safari-7615-branch
Commit: 56d07b6880c2673b9c21cb141ff7662afd871095
https://github.com/WebKit/WebKit/commit/56d07b6880c2673b9c21cb141ff7662afd871095
Author: David Kilzer <ddkilzer at apple.com>
Date: 2023-03-14 (Tue, 14 Mar 2023)
Changed paths:
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
Log Message:
-----------
rdar://106711950 (Unreviewed build fix for "Cherry-pick 1fdc00a92679. rdar://problem/104562407")
Unreviewed build fix.
Cherry-pick 1fdc00a92679. rdar://problem/104562407
Implement the Apple Pay JS API for deferred payment requests
https://bugs.webkit.org/show_bug.cgi?id=253219
rdar://104562407
Canonical link: https://commits.webkit.org/259548.419@safari-7615-branch
Commit: db594115f7a9c7dd8d36f378e6c2fb73e3df3857
https://github.com/WebKit/WebKit/commit/db594115f7a9c7dd8d36f378e6c2fb73e3df3857
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-03-14 (Tue, 14 Mar 2023)
Changed paths:
M LayoutTests/inspector/css/getMatchedStylesForNode-expected.txt
M LayoutTests/inspector/css/getMatchedStylesForNodeNestingStyleGrouping-expected.txt
M LayoutTests/inspector/css/getMatchedStylesForNodeNestingStyleGrouping.html
M LayoutTests/inspector/css/modify-css-property-expected.txt
M LayoutTests/inspector/css/modify-css-property.html
M LayoutTests/inspector/css/resources/modify-css-property.css
M Source/JavaScriptCore/inspector/protocol/CSS.json
M Source/WebCore/css/CSSPropertySourceData.h
M Source/WebCore/css/parser/CSSParserImpl.cpp
M Source/WebCore/css/parser/CSSParserImpl.h
M Source/WebCore/css/parser/CSSParserObserver.h
M Source/WebCore/inspector/InspectorStyleSheet.cpp
M Source/WebCore/inspector/InspectorStyleSheet.h
M Source/WebCore/inspector/agents/InspectorCSSAgent.cpp
M Source/WebInspectorUI/UserInterface/Models/CSSRule.js
M Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js
M Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js
Log Message:
-----------
Revert 259548.407 at safari-7615-branch (520550ae398d) Cherry-pick b1dd655b710e. rdar://problem/104821946
Unreviewed revert.
Fix the build.
* LayoutTests/inspector/css/getMatchedStylesForNode-expected.txt:
* LayoutTests/inspector/css/getMatchedStylesForNodeNestingStyleGrouping-expected.txt:
* LayoutTests/inspector/css/getMatchedStylesForNodeNestingStyleGrouping.html:
* LayoutTests/inspector/css/modify-css-property-expected.txt:
* LayoutTests/inspector/css/modify-css-property.html:
* LayoutTests/inspector/css/resources/modify-css-property.css:
(.rule-e):
(.rule-f): Deleted.
(color: green;): Deleted.
(.rule-g): Deleted.
* Source/JavaScriptCore/inspector/protocol/CSS.json:
* Source/WebCore/css/CSSPropertySourceData.h:
(WebCore::CSSRuleSourceData::CSSRuleSourceData):
* Source/WebCore/css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::consumeRegularRuleList):
(WebCore::CSSParserImpl::consumeDeclarationListOrStyleBlockHelper):
(WebCore::CSSParserImpl::consumeStyleBlock):
* Source/WebCore/css/parser/CSSParserImpl.h:
* Source/WebCore/css/parser/CSSParserObserver.h:
* Source/WebCore/inspector/InspectorStyleSheet.cpp:
(WebCore::isValidRuleHeaderText):
(WebCore::StyleSheetHandler::endRuleBody):
(WebCore::InspectorStyle::setText):
(WebCore::InspectorStyleSheet::buildObjectForRule):
(WebCore::InspectorStyleSheet::setStyleText):
(WebCore::InspectorStyleSheetForInlineStyle::setStyleText):
(WebCore::atRuleIdentifierForType): Deleted.
(WebCore::StyleSheetHandler::markRuleBodyContainsImplicitlyNestedProperties): Deleted.
(WebCore::isNotSpaceOrTab): Deleted.
(WebCore::InspectorStyleSheet::setRuleStyleText): Deleted.
(WebCore::InspectorStyleSheetForInlineStyle::setRuleStyleText): Deleted.
* Source/WebCore/inspector/InspectorStyleSheet.h:
* Source/WebCore/inspector/agents/InspectorCSSAgent.cpp:
* Source/WebInspectorUI/UserInterface/Models/CSSRule.js:
(WI.CSSRule):
(WI.CSSRule.prototype.get groupings):
(WI.CSSRule.prototype.get isImplicitlyNested): Deleted.
* Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js:
(WI.CSSStyleDeclaration.prototype.get selectorEditable):
* Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js:
(WI.DOMNodeStyles.prototype._parseRulePayload):
Canonical link: https://commits.webkit.org/259548.420@safari-7615-branch
Commit: 5d7823982c2fcb6f47704f60addf5826b1da697d
https://github.com/WebKit/WebKit/commit/5d7823982c2fcb6f47704f60addf5826b1da697d
Author: Matthieu Dubet <m_dubet at apple.com>
Date: 2023-03-14 (Tue, 14 Mar 2023)
Changed paths:
A LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/supports-rule-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/supports-rule-ref.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/supports-rule.html
M Source/WebCore/Headers.cmake
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/css/parser/CSSParser.cpp
M Source/WebCore/css/parser/CSSParser.h
A Source/WebCore/css/parser/CSSParserEnum.h
M Source/WebCore/css/parser/CSSParserImpl.cpp
M Source/WebCore/css/parser/CSSSelectorParser.cpp
M Source/WebCore/css/parser/CSSSelectorParser.h
M Source/WebCore/css/parser/CSSSupportsParser.cpp
M Source/WebCore/css/parser/CSSSupportsParser.h
M Source/WebCore/inspector/InspectorStyleSheet.cpp
Log Message:
-----------
Cherry-pick c4adae4df0f3. rdar://problem/106712577
Implement @supports with CSS nesting
https://bugs.webkit.org/show_bug.cgi?id=252301
rdar://105485711
Reviewed by Brent Fulgham.
The @supports(selector(...)) feature need to be aware of the
parser nesting context to properly works with relative nested selector.
* LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/supports-rule-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/supports-rule-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-nesting/supports-rule.html: Added.
* Source/WebCore/Headers.cmake:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseSupportsCondition):
(WebCore::CSSParser::parseSelector):
* Source/WebCore/css/parser/CSSParser.h:
* Source/WebCore/css/parser/CSSParserEnum.h: Added
* Source/WebCore/css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::consumeSupportsRule):
(WebCore::CSSParserImpl::consumeStyleRule):
* Source/WebCore/css/parser/CSSSelectorParser.cpp:
(WebCore::parseCSSSelector):
(WebCore::CSSSelectorParser::CSSSelectorParser):
(WebCore::CSSSelectorParser::consumeNestedSelectorList):
(WebCore::CSSSelectorParser::supportsComplexSelector):
(WebCore::CSSSelectorParser::consumeNestedComplexSelector):
(WebCore::CSSSelectorParser::consumeSimpleSelector):
* Source/WebCore/css/parser/CSSSelectorParser.h:
* Source/WebCore/css/parser/CSSSupportsParser.cpp:
(WebCore::CSSSupportsParser::supportsCondition):
(WebCore::CSSSupportsParser::consumeSupportsSelectorFunction):
* Source/WebCore/css/parser/CSSSupportsParser.h:
(WebCore::CSSSupportsParser::CSSSupportsParser):
* Source/WebCore/inspector/InspectorStyleSheet.cpp:
(WebCore::isValidRuleHeaderText):
(WebCore::isNestedContext):
Canonical link: https://commits.webkit.org/261004@main
Commit: 2632cd893f8ecf56a5d5db4ce3810f694563163c
https://github.com/WebKit/WebKit/commit/2632cd893f8ecf56a5d5db4ce3810f694563163c
Author: Jonathan Bedard <jbedard at apple.com>
Date: 2023-03-14 (Tue, 14 Mar 2023)
Changed paths:
M Tools/Scripts/libraries/webkitscmpy/setup.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py
A Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/install_hooks.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py
Log Message:
-----------
Cherry-pick 261653 at main (a4daad5b9fbd). rdar://106716871
[git-webkit] Allow independent installation of hooks
https://bugs.webkit.org/show_bug.cgi?id=253897
rdar://106716871
Reviewed by Elliott Williams.
Move hook installation into an independent program so services can install specific hooks.
* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py: Include InstallHooks program.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/install_hooks.py: Added.
(InstallHooks.parser): Allow caller to specify default mode and specific hook to install.
(InstallHooks._security_levels): Moved from Setup._security_levels.
(InstallHooks.main): Moveed hook installation from Setup.git.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
(Setup.git): Move hook installation to InstallHooks.
(Setup._security_levels): Move to InstallHooks._security_levels.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py:
Canonical link: https://commits.webkit.org/261653@main
Canonical link: https://commits.webkit.org/259548.422@safari-7615-branch
Commit: 0ebd0ef02734857d49f843b46d69bd82889c7bee
https://github.com/WebKit/WebKit/commit/0ebd0ef02734857d49f843b46d69bd82889c7bee
Author: Patrick Angle <pangle at apple.com>
Date: 2023-03-14 (Tue, 14 Mar 2023)
Changed paths:
M LayoutTests/inspector/css/getMatchedStylesForNode-expected.txt
M LayoutTests/inspector/css/getMatchedStylesForNodeNestingStyleGrouping-expected.txt
M LayoutTests/inspector/css/getMatchedStylesForNodeNestingStyleGrouping.html
M LayoutTests/inspector/css/modify-css-property-expected.txt
M LayoutTests/inspector/css/modify-css-property.html
M LayoutTests/inspector/css/resources/modify-css-property.css
M Source/JavaScriptCore/inspector/protocol/CSS.json
M Source/WebCore/css/CSSPropertySourceData.h
M Source/WebCore/css/parser/CSSParserImpl.cpp
M Source/WebCore/css/parser/CSSParserImpl.h
M Source/WebCore/css/parser/CSSParserObserver.h
M Source/WebCore/inspector/InspectorStyleSheet.cpp
M Source/WebCore/inspector/InspectorStyleSheet.h
M Source/WebCore/inspector/agents/InspectorCSSAgent.cpp
M Source/WebInspectorUI/UserInterface/Models/CSSRule.js
M Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js
M Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js
Log Message:
-----------
Cherry-pick 261329 at main (b1dd655b710e). rdar://104821946
Web Inspector: Implicitly nested property declarations inside non-style rules results in nested content being deleted during editing or displaying incorrect matched styles for elements
https://bugs.webkit.org/show_bug.cgi?id=251565
rdar://104821946
Reviewed by Devin Rousso.
InspectorStyleSheet was built with the assumption that Style rules contained property declarations, and nothing else.
CSS nesting has proven this assumption wrong in significant ways by allowing properties and other rules to be declared,
interleaved inside a rule. This includes inside @ rules, which previously could not contain property delcarations
directly.
This means during editing, we only want to replace the property declarations, not the full body of a rule, since the
rule may contain other rules. Luckily, canonically all property declarations occur before all nested rules, so we can
safely move nested rules below to make our lives a bit easier with no harm to the meaning of the style sheet.
This fix adds instrumentation to the CSS parser so we can be informed of the new "implicit" nested rule that contains
properties inside of non-style rules. It also overhauls how rule body text is edited, much like we had to last year for
rule header text.
* LayoutTests/inspector/css/getMatchedStylesForNode-expected.txt:
- Account for new property of CSSRule.
* LayoutTests/inspector/css/getMatchedStylesForNodeNestingStyleGrouping-expected.txt:
* LayoutTests/inspector/css/getMatchedStylesForNodeNestingStyleGrouping.html:
* LayoutTests/inspector/css/modify-css-property-expected.txt:
* LayoutTests/inspector/css/modify-css-property.html:
* LayoutTests/inspector/css/resources/modify-css-property.css:
- Add test cases for implicitly nested rules and their siblings, children, and parents.
* Source/JavaScriptCore/inspector/protocol/CSS.json:
- Mark implicitly nested rules so that the frontend can prevent the editing of their selector.
* Source/WebCore/css/CSSPropertySourceData.h:
(WebCore::CSSRuleSourceData::CSSRuleSourceData):
- The container rule types can now contain properties, so we always need to have the buffer for that information ready,
since we won't be informed by the parser that an implicit nested context was created until after we have observed the
properties themselves.
* Source/WebCore/css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::consumeRegularRuleList):
(WebCore::CSSParserImpl::consumeDeclarationListOrStyleBlockHelper):
(WebCore::CSSParserImpl::consumeStyleBlock):
* Source/WebCore/css/parser/CSSParserImpl.h:
- Don't send duplicate bodyStart/bodyEnd messages to the observer.
- Notify the observer when the engine has created an implict nested rule inside a body.
* Source/WebCore/css/parser/CSSParserObserver.h:
* Source/WebCore/inspector/InspectorStyleSheet.cpp:
(WebCore::atRuleIdentifierForType):
(WebCore::isValidRuleHeaderText):
- Pull the mapping of types to their keyword text for reuse in setting new style text.
(WebCore::StyleSheetHandler::endRuleBody):
- In order to maintain parity with CSSOM's representation of styles, we need to create an implictly nested rule to
match against the CSSOM's implicitly nested rule. This also allows us to inform the frontend that said CSSOM rule was
implicitly nested, since the OM itself doesn't carry this information.
(WebCore::StyleSheetHandler::markRuleBodyContainsImplicitlyNestedProperties):
- Observe to mark the style rule data as containing implicitly nested properties, which will then trigger us to take those properties and mvoe them to a special implicit style rule data object.
(WebCore::InspectorStyleSheet::buildObjectForRule):
(WebCore::isNotSpaceOrTab):
(WebCore::InspectorStyleSheet::setRuleStyleText):
- Overhaul the setting of style text.
- Undo/oldText is handled specially because we want to restore the sheet back to the non-canonical form after an edit.
- The frontend does not provide nested rules as part of its new text, so we must readd them ourselves, which we can do
from the original style sheet.
- Indentation is matched to the new property delcartion text provided by the frontend.
(WebCore::InspectorStyleSheetForInlineStyle::setRuleStyleText):
- Match the method signature for non-inline styles, and simplify the indirection previously present for setting a style
rule's/inline style's text.
(WebCore::InspectorStyle::setText): Deleted.
(WebCore::InspectorStyleSheet::setStyleText): Deleted.
(WebCore::InspectorStyleSheetForInlineStyle::setStyleText): Deleted.
* Source/WebCore/inspector/InspectorStyleSheet.h:
* Source/WebCore/inspector/agents/InspectorCSSAgent.cpp:
- Adopt new method to set the body text of a rule.
* Source/WebInspectorUI/UserInterface/Models/CSSRule.js:
(WI.CSSRule):
(WI.CSSRule.prototype.get isImplicitlyNested):
* Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js:
(WI.CSSStyleDeclaration.prototype.get selectorEditable):
* Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js:
(WI.DOMNodeStyles.prototype._parseRulePayload):
- Mark the selector of implicitly nested rules as non-editable.
Canonical link: https://commits.webkit.org/261329@main
Canonical link: https://commits.webkit.org/259456.515@safari-7615-branch
Commit: c58d7acb5608de5649fa519ce2d72af556c34cca
https://github.com/WebKit/WebKit/commit/c58d7acb5608de5649fa519ce2d72af556c34cca
Author: Myah Cobbs <mcobbs at apple.com>
Date: 2023-03-14 (Tue, 14 Mar 2023)
Changed paths:
M Source/WebKit/Scripts/process-entitlements.sh
Log Message:
-----------
Revert 927c75f9049d. rdar://problem/106504425
Canonical link: https://commits.webkit.org/259456.516@safari-7615-branch
Commit: 499c0bf6a8a9885141c231d43d16f89eadb2c9c3
https://github.com/WebKit/WebKit/commit/499c0bf6a8a9885141c231d43d16f89eadb2c9c3
Author: Chirag M Shah <chirag_m_shah at apple.com>
Date: 2023-03-15 (Wed, 15 Mar 2023)
Changed paths:
A LayoutTests/svg/filters/feconvolve-matrix-invalid-target-offset-crash-expected.txt
A LayoutTests/svg/filters/feconvolve-matrix-invalid-target-offset-crash.html
M Source/WebCore/platform/graphics/filters/FEConvolveMatrix.cpp
M Source/WebCore/platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.cpp
M Source/WebCore/platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.h
M Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp
M Source/WebCore/svg/SVGFEConvolveMatrixElement.h
Log Message:
-----------
Fix buffer overflow in FEConvolveMatrixSoftwareApplier
https://bugs.webkit.org/show_bug.cgi?id=253721
rdar://97909186
Reviewed by Said Abou-Hallawa.
This change fixes a buffer overflow issue in the
FEConvolveMatrixSoftwareApplier code which happens when dealing with the
interior area and setting the destination pixels. This happens because
when the targetX/targetY doesn't fit in the convolution kernel, we don't
clip it, and that ends up moving the pixel offset by more than what is
needed. This change fixes that by making sure that when the SVG
attribute changes, we detect the invalid offset and rebuild the filter.
* LayoutTests/svg/filters/feconvolve-matrix-invalid-target-offset-crash-expected.txt: Added.
* LayoutTests/svg/filters/feconvolve-matrix-invalid-target-offset-crash.html: Added.
* Source/WebCore/platform/graphics/filters/FEConvolveMatrix.cpp:
(WebCore::FEConvolveMatrix::FEConvolveMatrix):
* Source/WebCore/platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.cpp:
(WebCore::FEConvolveMatrixSoftwareApplier::FEConvolveMatrixSoftwareApplier):
* Source/WebCore/platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.h:
* Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp:
(WebCore::SVGFEConvolveMatrixElement::isValidTargetXOffset const):
(WebCore::SVGFEConvolveMatrixElement::isValidTargetYOffset const):
(WebCore::SVGFEConvolveMatrixElement::svgAttributeChanged):
(WebCore::SVGFEConvolveMatrixElement::createFilterEffect const):
* Source/WebCore/svg/SVGFEConvolveMatrixElement.h:
Canonical link: https://commits.webkit.org/259548.425@safari-7615-branch
Commit: dde3cbd3402746d9c37140696222fe900bbe520c
https://github.com/WebKit/WebKit/commit/dde3cbd3402746d9c37140696222fe900bbe520c
Author: David Degazio <d_degazio at apple.com>
Date: 2023-03-15 (Wed, 15 Mar 2023)
Changed paths:
A JSTests/stress/loop-osr-with-inlined-create-rest.js
Log Message:
-----------
Add stress test for liveness-based interference analysis across loop OSR
https://bugs.webkit.org/show_bug.cgi?id=253902
rdar://105671759
Reviewed by Yusuke Suzuki.
Adds a stress test that breaks without https://bugs.webkit.org/show_bug.cgi?id=252798,
to ensure we don't regress this behavior in the future.
* JSTests/stress/loop-osr-with-inlined-create-rest.js: Added.
(bar):
(foo):
Canonical link: https://commits.webkit.org/259548.426@safari-7615-branch
Commit: 0a78c0fbc8a8a2e692dd1c2a86e71973e96cee53
https://github.com/WebKit/WebKit/commit/0a78c0fbc8a8a2e692dd1c2a86e71973e96cee53
Author: Sammy Gill <sammy.gill at apple.com>
Date: 2023-03-15 (Wed, 15 Mar 2023)
Changed paths:
M LayoutTests/TestExpectations
A LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-default-object-height-constrained-by-max-width-expected.html
A LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-default-object-height-constrained-by-max-width.html
A LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-default-object-width-constrained-by-max-height-expected.html
A LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-default-object-width-constrained-by-max-height.html
A LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-inline-size-containment-no-crash.html
M LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-intrinsic-width-height.html
M LayoutTests/platform/gtk/TestExpectations
M Source/WebCore/rendering/RenderReplaced.cpp
Log Message:
-----------
Cherry-pick 260851 at main (e6a31953a657). rdar://105489410
RenderReplaced::computeAspectRatioInformationForRenderBox does not need to call into RenderBox::computeReplacedLogicalWidth
https://bugs.webkit.org/show_bug.cgi?id=252589
rdar://105489410
Reviewed by Alan Baradlay.
The call to RenderBox::computeReplacedLogicalWidth from RenderReplaced::computeAspectRatioInformationForRenderBox
when the object was a video with a default object size was extraneous
and can be safely removed without changing any functionality. It could
also result in a stack overflow in certain conditions. At this
point we know the intrinsic sizes of the object anyway since it is a
video with a default object size (300px x 150px). This is
because:
1.) RenderBox::computeReplacedLogicalWidth would call into computeReplacedLogicalWidthUsing(MainOrPreferredSize, style().logicalWidth())
com compute the width value to use
2.) The caller (RenderReplaced::computeReplacedLogicalWidth in this case)
will only use the width value of style().logicalWidth().isAuto()
returns true.
3.) If this is true RenderBox::computeReplacedLogicalWidth would have
returned the intrinsic width but constrained to min/max sizes. However,
the caller constrains the intrinsic width anyway.
4.) If this is false (style().logicalWidth().isAuto() returns false),
then the caller (RenderReplaced::computeReplacedLogicalWidth) will
use the intrinsic width anyway by calling into intrinsicLogicalWidth.
We can also take advantage of the existing logic to constrain the
intrinsic sizes in each dimension by transferred constraints from the
opposite one.
Here is an example of when this extra call could cause a stack overflow:
<style>
video {
aspect-ratio: 1;
container-type: inline-size;
inset: 0 auto;
min-width: min-content;
position: fixed;
}
</style>
<video></video>
WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth(WebCore::LayoutUnit, WebCore::ShouldComputePreferred) const
WebCore::RenderBox::computeReplacedLogicalWidth(WebCore::ShouldComputePreferred) const
WebCore::RenderReplaced::computeIntrinsicSizesConstrainedByTransferredMinMaxSizes(WebCore::RenderBox*, WebCore::FloatSize&, WebCore::FloatSize&) const
WebCore::RenderReplaced::computeReplacedLogicalHeight(std::__1::optional<WebCore::LayoutUnit>) const
WebCore::RenderImage::computeReplacedLogicalHeight(std::__1::optional<WebCore::LayoutUnit>) const
WebCore::RenderBox::computePositionedLogicalHeightReplaced(WebCore::RenderBox::LogicalExtentComputedValues&) const
WebCore::RenderBox::computePositionedLogicalHeight(WebCore::RenderBox::LogicalExtentComputedValues&) const
WebCore::RenderBox::computeLogicalHeight(WebCore::LayoutUnit, WebCore::LayoutUnit) const
WebCore::RenderBox::computeLogicalWidthFromAspectRatioInternal() const
WebCore::RenderBox::computeIntrinsicLogicalWidthUsing(WebCore::Length, WebCore::LayoutUnit, WebCore::LayoutUnit) const
WebCore::RenderBox::computeReplacedLogicalWidthUsing(WebCore::SizeType, WebCore::Length) const
WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth(WebCore::LayoutUnit, WebCore::ShouldComputePreferred) const
WebCore::RenderVideo::computeReplacedLogicalWidth(WebCore::ShouldComputePreferred) const
WebCore::RenderBox::computePositionedLogicalWidthReplaced(WebCore::RenderBox::LogicalExtentComputedValues&) const
WebCore::RenderBox::computePositionedLogicalWidth(WebCore::RenderBox::LogicalExtentComputedValues&, WebCore::RenderFragmentContainer*) const
WebCore::RenderBox::computeLogicalWidthInFragment(WebCore::RenderBox::LogicalExtentComputedValues&, WebCore::RenderFragmentContainer*) const
WebCore::RenderBox::updateLogicalWidth()
WebCore::RenderReplaced::layout()
WebCore::RenderImage::layout()
WebCore::RenderMedia::layout()
WebCore::RenderVideo::layout()
After we have computed the width for the video, we call RenderBox::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth
to restrict it within any min and max constraints. This eventually calls into RenderBox::computeIntrinsicLogicalWidthUsing to compute the
min-width using MinContent as the width type.
The container-type: inline-size; and inset: 0 auto; properties cause RenderBox::shouldComputeLogicalWidthFromAspectRatio to return true
because the call to shouldComputeLogicalWidthFromAspectRatioAndInsets returns true. This last method returns true because:
1.) Applying the inline size containment causes hasConstrainedWidth to be false when it would normally be true from the video’s intrinsic width.
2.) hasConstrainedHeight gets set to false because inset causes the logical top and property values to get set to a fixed value
3.) The final call to style.logicalHeight().isAuto() returns true
Due to these series of events we end up calling computeLogicalWidthFromAspectRatioInternal inside RenderBox::computeIntrinsicLogicalWidthUsing.
This eventually recurses its way back into RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth through the reset of the stack trace.
* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-default-object-height-constrained-by-max-width-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-default-object-height-constrained-by-max-width.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-default-object-width-constrained-by-max-height-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-default-object-width-constrained-by-max-height.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-inline-size-containment-no-crash.html: Added.
This test currently crashes due to a different reason (webkit.org/b/252594),
but is still useful to this patch as it was causing the stack
overflow.
* LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-intrinsic-width-height.html:
One of the test cases was incorrectly changed in a previous patch and
is being restored to its previous version. The height for this test
should be 150px and not 300px because it falls under the case:
If 'height' and 'width' both have computed values of 'auto' and the
element also has an intrinsic height, then that intrinsic height is
the used value of 'height'.
https://www.w3.org/TR/CSS22/visudet.html#inline-replaced-height
* LayoutTests/platform/gtk/TestExpectations:
* LayoutTests/platform/wpe/TestExpectations:
* Source/WebCore/rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computeIntrinsicSizesConstrainedByTransferredMinMaxSizes const):
Canonical link: https://commits.webkit.org/260851@main
Canonical link: https://commits.webkit.org/259456.519@safari-7615-branch
Commit: 0f3c0493792c09aa9dfbbe4c26dfdb7687840c45
https://github.com/WebKit/WebKit/commit/0f3c0493792c09aa9dfbbe4c26dfdb7687840c45
Author: Rose <83477269+AtariDreams at users.noreply.github.com>
Date: 2023-03-15 (Wed, 15 Mar 2023)
Changed paths:
M Tools/Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py
M Tools/Scripts/webkitpy/common/system/user.py
Log Message:
-----------
Cherry-pick 261687 at main (82bd766bd89d). rdar://106367061
Scripts: Use webbrowser package in Python to open a URL in a web browser
https://bugs.webkit.org/show_bug.cgi?id=253515
Reviewed by Jonathan Bedard.
I made a mistake. Because "start" worked on the command line, I assumed
that it would work under the Terminal.run() command. Now I realize this
is not what actually happens. Instead of reverting that commit, commit
https://commits.webkit.org/261332@main, I am instead introducing a
proper fix, which is using the URL and opening it in a browser via the
webbrowser package.
* Tools\Scripts\libraries\webkitcorepy\webkitcorepy\terminal.py: Change
'start' back to 'explorer.' Teach open_url to call the webbrowser
url method to open webpages if the scheme is http or https.
* Tools\Scripts\webkitpy\common\system\user.py: Inline redundant method.
Canonical link: https://commits.webkit.org/261687@main
Canonical link: https://commits.webkit.org/259548.428@safari-7615-branch
Commit: b19945f7bd58b297be98f527f5fb904451fcf0ce
https://github.com/WebKit/WebKit/commit/b19945f7bd58b297be98f527f5fb904451fcf0ce
Author: Rose <83477269+AtariDreams at users.noreply.github.com>
Date: 2023-03-15 (Wed, 15 Mar 2023)
Changed paths:
M Tools/Scripts/hooks/pre-push
Log Message:
-----------
Cherry-pick 261606 at main (18dbbee3f2c7). rdar://106674052
Hooks: Fix typo in pre-push script
https://bugs.webkit.org/show_bug.cgi?id=253822
rdar://106674052
Reviewed by Alexey Proskuryakov.
The correct phrasing is "no classification," not "not classification."
* Tools\Scripts\hooks\pre-push:(main): Fix "not" typo.
Canonical link: https://commits.webkit.org/261606@main
Canonical link: https://commits.webkit.org/259548.429@safari-7615-branch
Commit: 06af3d226e2bc96a97828abbdf935fad6481b977
https://github.com/WebKit/WebKit/commit/06af3d226e2bc96a97828abbdf935fad6481b977
Author: David Kilzer <ddkilzer at apple.com>
Date: 2023-03-16 (Thu, 16 Mar 2023)
Changed paths:
A LayoutTests/fast/xsl/xslt-node-set-empty-expected.txt
A LayoutTests/fast/xsl/xslt-node-set-empty.html
M Source/WebCore/xml/SoftLinkLibxslt.cpp
M Source/WebCore/xml/SoftLinkLibxslt.h
M Source/WebCore/xml/XSLTExtensions.cpp
Log Message:
-----------
XSLTProcessor fails when xsl calls exsl:node-set() on empty variable
https://bugs.webkit.org/show_bug.cgi?id=253857
<rdar://103622929>
Reviewed by Alex Christensen.
Merge fix for Chromium Issue 689977:
https://chromium.googlesource.com/chromium/src.git/+/99ead7d1564d35a70799b7ee4c3821053fb3985c
Tests:
fast/xsl/exslt-node-set.xml
fast/xsl/xslt-node-set-empty.html
* LayoutTests/fast/xsl/xslt-node-set-empty-expected.txt: Add.
* LayoutTests/fast/xsl/xslt-node-set-empty.html: Add.
* Source/WebCore/xml/SoftLinkLibxslt.cpp:
* Source/WebCore/xml/SoftLinkLibxslt.h:
- Add soft-linking for newly called libxslt functions.
* Source/WebCore/xml/XSLTExtensions.cpp:
(xsltTransformErrorTrampoline): Add.
- Provide workaround for soft-linking xsltTransformError()
with varargs.
(WebCore::exsltNodeSetFunction):
- Update to match logic in libxslt v1.1.35.
Canonical link: https://commits.webkit.org/259548.430@safari-7615-branch
Commit: d4a83e5b26189a6c54f91fe79213fd669232f209
https://github.com/WebKit/WebKit/commit/d4a83e5b26189a6c54f91fe79213fd669232f209
Author: Chris Dumez <cdumez at apple.com>
Date: 2023-03-16 (Thu, 16 Mar 2023)
Changed paths:
M LayoutTests/fast/loader/stateobjects/popstate-does-not-fire-with-page-cache-expected.txt
M LayoutTests/fast/loader/stateobjects/popstate-does-not-fire-with-page-cache.html
M LayoutTests/fast/loader/stateobjects/resources/popstate-does-not-fire-with-page-cache-1.html
M LayoutTests/fast/loader/stateobjects/resources/popstate-does-not-fire-with-page-cache-2.html
M LayoutTests/platform/mac/TestExpectations
Log Message:
-----------
Cherry-pick 259873 at main (9b11ab322031). rdar://104775065
[ iOS BigSur+ ] fast/loader/stateobjects/popstate-does-not-fire-with-page-cache.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=251312
rdar://104775065
Reviewed by Ryosuke Niwa.
The test would:
1. open a popup and load popstate-does-not-fire-with-page-cache-1.html in it
2. Call history.pushState() to create an extra history item in the popup
(popstate-does-not-fire-with-page-cache-1.html#)
3. Navigate the popup to popstate-does-not-fire-with-page-cache-2.html
4. Call history.back() to go back to popstate-does-not-fire-with-page-cache-1.html#
5. Since the item would load from the back/forward cache, the test was relying
on the `pageshow` event inside the popup to determinate when the navigation
back had occurred (since no load event would fire).
6. When getting the `pageshow` event, the test would call history.back() again
in the popup to go back to the initial popstate-does-not-fire-with-page-cache-1.html
7. The test would then expect a popstate event to get fired.
The test would flakily fail because the step 6 would trigger at the wrong time.
The issue was that we had set the pageshow event listener on popstate-does-not-fire-with-page-cache-2.html
instead of popstate-does-not-fire-with-page-cache-1.html. Because we would call `history.back()`
in a setTimeout(10), we would sometimes have navigated back to popstate-does-not-fire-with-page-cache-1.html#
but not always. We really wanted to know when the back/forward cache navigation back to
popstate-does-not-fire-with-page-cache-1.html# had occurred so that `pageshow` event listener
needs to be on popstate-does-not-fire-with-page-cache-1.html.
* LayoutTests/fast/loader/stateobjects/popstate-does-not-fire-with-page-cache-expected.txt:
* LayoutTests/fast/loader/stateobjects/popstate-does-not-fire-with-page-cache.html:
* LayoutTests/fast/loader/stateobjects/resources/popstate-does-not-fire-with-page-cache-1.html:
* LayoutTests/fast/loader/stateobjects/resources/popstate-does-not-fire-with-page-cache-2.html:
* LayoutTests/platform/mac/TestExpectations:
Canonical link: https://commits.webkit.org/259873@main
Canonical link: https://commits.webkit.org/259548.431@safari-7615-branch
Commit: cce70955c480ad53882d8aa339c70e21544b95fa
https://github.com/WebKit/WebKit/commit/cce70955c480ad53882d8aa339c70e21544b95fa
Author: Russell Epstein <repstein at apple.com>
Date: 2023-03-16 (Thu, 16 Mar 2023)
Changed paths:
M Source/JavaScriptCore/parser/ASTBuilder.h
Log Message:
-----------
Revert dc7e063da266. rdar://problem/105883674
Canonical link: https://commits.webkit.org/259548.432@safari-7615-branch
Compare: https://github.com/WebKit/WebKit/compare/60635d719037%5E...cce70955c480
More information about the webkit-changes
mailing list