Skip to content

Upgrade to August 3 - #15

Merged
Jarred-Sumner merged 302 commits into
mainfrom
upgrade-aug3
Aug 3, 2023
Merged

Jarred-Sumner merged 302 commits into
mainfrom
upgrade-aug3

Conversation

@Jarred-Sumner

Copy link
Copy Markdown
Collaborator

Pull Request Template

File a Bug

All changes should be associated with a bug. The WebKit project is currently using Bugzilla as our bug tracker. Note that multiple changes may be associated with a single bug.

Provided Tooling

The WebKit Project strongly recommends contributors use Tools/Scripts/git-webkit to generate pull requests. See Setup and Contributing Code for how to do this.

Template

If a contributor wishes to file a pull request manually, the template is below. Manually-filed pull requests should contain their commit message as the pull request description, and their commit message should be formatted like the template below.

Additionally, the pull request should be mentioned on Bugzilla, labels applied to the pull request matching the component and version of the Bugzilla associated with the pull request and the pull request assigned to its author.

< bug title >
https://bugs.webkit.org/show_bug.cgi?id=#####

Reviewed by NOBODY (OOPS!).

Explanation of why this fixes the bug (OOPS!).

* path/changed.ext:
(function):
(class.function):

webkit-commit-queue and others added 30 commits July 25, 2023 03:59
… x86_64 ] fast/events/wheel/redispatched-wheel-event.html is a consistent failure

rdar://112801240
https://bugs.webkit.org/show_bug.cgi?id=259458

Unreviewed test gardening.

* LayoutTests/platform/mac-gpup/TestExpectations:

Canonical link: https://commits.webkit.org/266289@main
… the use of Siri in the middle of the WebRTC call, sometimes incoming audio is lost

https://bugs.webkit.org/show_bug.cgi?id=259368
rdar://112636992

Reviewed by Eric Carlson.

WebProcess might want to try active its audio session when being interrupted.
In case GPUProcess tells it succeeded activating, it will uninterrupt and restart capturing microphone.

RemoteAudioSessionProxyManager::tryToSetActiveForProcess may return true to activation even though the underlying shared session was not properly activated.
This happens in case there is one RemoteAudioSessionProxy which is active but interrupted.
In that case, RemoteAudioSessionProxyManager::tryToSetActiveForProcess would think everything is fine.

To prevent this, RemoteAudioSessionProxy is now tracking whether it is interrupted or not.
If it is active but interrupted, RemoteAudioSessionProxyManager will not consider it is actually active and will try to activate the underlying audio session.
If activation succeeds, uninterruption will follow.
If activation fails, uninterruption will be further delayed.

Manually tested.

* Source/WebKit/GPUProcess/media/RemoteAudioSessionProxy.cpp:
* Source/WebKit/GPUProcess/media/RemoteAudioSessionProxy.h:
(WebKit::RemoteAudioSessionProxy::isInterrupted const):
* Source/WebKit/GPUProcess/media/RemoteAudioSessionProxyManager.cpp:
(WebKit::RemoteAudioSessionProxyManager::tryToSetActiveForProcess):

Canonical link: https://commits.webkit.org/266293@main
…t image failure

https://bugs.webkit.org/show_bug.cgi?id=259469
rdar://111077813

Reviewed by Megan Gardner and Aditya Keerthi.

When the caret doesn't need to use the system accent color, it should just get the color the normal
way, which already both accounts for the visited-ness and any color filter.

* LayoutTests/fast/history/visited-link-caret-color-expected.html:
* LayoutTests/fast/history/visited-link-caret-color.html:
* Source/WebCore/editing/FrameSelection.cpp:
(WebCore::CaretBase::computeCaretColor):

Canonical link: https://commits.webkit.org/266295@main
https://bugs.webkit.org/show_bug.cgi?id=259452
rdar://110029481

Reviewed by Chris Fleizach.

These tests needed to be re-based and the value of the static text needs to be trimEnd() to accomodate differences in trailing \n between OS versions.

* LayoutTests/accessibility/mac/basic-embed-pdf-accessibility-expected.txt:
* LayoutTests/accessibility/mac/basic-embed-pdf-accessibility.html:
* LayoutTests/accessibility/mac/iframe-pdf-expected.txt:

Canonical link: https://commits.webkit.org/266296@main
https://bugs.webkit.org/show_bug.cgi?id=259484

Reviewed by Tim Nguyen.

Reimport css/css-scrollbars WPT tests.
This is to get fixes for certain scrollbar-color tests.
Along with some extra scrollbar-width repaint tests.

WPT Commit: b8294eb

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/resources/resource-files.json:
* LayoutTests/imported/w3c/web-platform-tests/css/css-scrollbars/scrollbar-color-007-expected.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-scrollbars/scrollbar-color-007-ref.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-scrollbars/scrollbar-color-008-expected.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-scrollbars/scrollbar-color-008-ref.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-scrollbars/scrollbar-width-014.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-004-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-004-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-004.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-005-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-005-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-005.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-006-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-006-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-scrollbars/scrollbar-width-paint-006.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-scrollbars/w3c-import.log:

Canonical link: https://commits.webkit.org/266297@main
…ntent tests are failing

https://bugs.webkit.org/show_bug.cgi?id=259466

Reviewed by Don Olmstead.

Some http/tests/security/mixedContent tests are failing after
266167@main (bug#259324) due to a preceding tests configuration
change. 266231@main fixed the Cocoa port problem by recreating a
WKPreferencesRef object. non-Cocoa ports also need the similar fix.

* Tools/WebKitTestRunner/TestController.cpp:
(WTR::TestController::platformAdjustContext):
Recreate a WKPreferencesRef object.

Canonical link: https://commits.webkit.org/266298@main
https://bugs.webkit.org/show_bug.cgi?id=259456
rdar://112800063

Reviewed by Ryosuke Niwa.

When a frame is created when site isolation is enabled, all the other
web content processes need to create a RemoteFrame in that place in the
frame tree indicating that a LocalFrame exists in another process.
This has already been implemented.  In this PR, I implement the complement:
when a frame is destroyed, all the other web content processes need to
remove the Frame in that place in their own frame trees.

* Source/WebCore/html/HTMLFrameOwnerElement.cpp:
(WebCore::HTMLFrameOwnerElement::disconnectContentFrame):
* Source/WebCore/loader/EmptyFrameLoaderClient.h:
* Source/WebCore/loader/LocalFrameLoaderClient.h:
* Source/WebCore/page/Frame.h:
* Source/WebCore/page/LocalFrame.cpp:
(WebCore::LocalFrame::broadcastFrameRemovalToOtherProcesses):
* Source/WebCore/page/LocalFrame.h:
* Source/WebCore/page/RemoteFrame.cpp:
(WebCore::RemoteFrame::broadcastFrameRemovalToOtherProcesses):
* Source/WebCore/page/RemoteFrame.h:
* Source/WebCore/page/RemoteFrameClient.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::forEachWebContentProcess):
(WebKit::WebPageProxy::createRemoteSubframesInOtherProcesses):
(WebKit::WebPageProxy::broadcastFrameRemovalToOtherProcesses):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.messages.in:
* Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::broadcastFrameRemovalToOtherProcesses):
* Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp:
(WebKit::WebLocalFrameLoaderClient::broadcastFrameRemovalToOtherProcesses):
* Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.h:
* Source/WebKit/WebProcess/WebCoreSupport/WebRemoteFrameClient.cpp:
(WebKit::WebRemoteFrameClient::broadcastFrameRemovalToOtherProcesses):
* Source/WebKit/WebProcess/WebCoreSupport/WebRemoteFrameClient.h:
* Source/WebKit/WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::removeFromTree):
* Source/WebKit/WebProcess/WebPage/WebFrame.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::frameWasRemovedInAnotherProcess):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:
* Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm:
(TestWebKitAPI::TEST):

Canonical link: https://commits.webkit.org/266301@main
…t' to 'unsigned'

https://bugs.webkit.org/show_bug.cgi?id=253364
rdar://problem/106580337

Reviewed by Ryosuke Niwa.

This patch aligns WebKit with Web-Spec [1] by changing 'naturalWidth'
and 'naturalHeight' from 'int' to 'unsigned'.

[1] https://html.spec.whatwg.org/#the-img-element

* Source/WebCore/html/HTMLImageElement.cpp:
(HTMLImageElement::naturalWidth): Change to 'unsigned' and return to have 'toUnsigned'
(HTMLImageElement::naturalHeight): Ditto
* Source/WebCore/html/HTMLImageElement.h: Update definition to 'unsigned' from 'int' for 'naturalWidth' and 'naturalHeight'
* Source/WebCore/html/HTMLImageElement.idl: Update 'naturalWidth' and 'naturalHeight' to have 'unsigned'

Canonical link: https://commits.webkit.org/266302@main
…3c/web-platform-tests/webcodecs/temporal-svc-encoding.https.any.worker.html?vp9 is a constant failure

rdar://112858534
https://bugs.webkit.org/show_bug.cgi?id=259496

Unreviewed test gardening.

* LayoutTests/platform/mac-wk2/TestExpectations:

Canonical link: https://commits.webkit.org/266303@main
https://bugs.webkit.org/show_bug.cgi?id=259498

Reviewed by Eric Carlson.

Use WeakHasMap instead of HashMap of raw pointers.

* Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.h:
* Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm:
(WebKit::VideoFullscreenManager::removeContext):
(WebKit::VideoFullscreenManager::setupRemoteLayerHosting):
(WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement):
(WebKit::VideoFullscreenManager::exitVideoFullscreenForVideoElement):
(WebKit::VideoFullscreenManager::exitVideoFullscreenToModeWithoutAnimation):
(WebKit::VideoFullscreenManager::updateTextTrackRepresentationForVideoElement):
(WebKit::VideoFullscreenManager::setTextTrackRepresentationContentScaleForVideoElement):
(WebKit::VideoFullscreenManager::setTextTrackRepresentationIsHiddenForVideoElement):

Canonical link: https://commits.webkit.org/266304@main
https://bugs.webkit.org/show_bug.cgi?id=259508
rdar://112868658

Unreviewed.

The new call to broadcastFrameRemovalToOtherProcesses was causing assertions.
Restrict it to when site isolation is enabled to restore existing behavior when it is not enabled.

* Source/WebCore/html/HTMLFrameOwnerElement.cpp:
(WebCore::HTMLFrameOwnerElement::disconnectContentFrame):

Canonical link: https://commits.webkit.org/266305@main
https://bugs.webkit.org/show_bug.cgi?id=259460
rdar://112802752

Reviewed by Justin Michaud.

Adds in implementations for (i32|i64|f32|f64).(load|store) instructions (including for smaller sizes), and global.get / global.set.

* JSTests/wasm/ipint-tests/ipint-test-global.js: Added.
* JSTests/wasm/ipint-tests/ipint-test-memory-read-sizes.js: Added.
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.memory.export.string_appeared_here.1.10.func.export.string_appeared_here.result.i32.i32.const.0.i32.load.func.export.string_appeared_here.result.i32.i32.const.0.i32.load8_s.func.export.string_appeared_here.result.i32.i32.const.0.i32.load8_u.func.export.string_appeared_here.result.i32.i32.const.0.i32.load16_s.func.export.string_appeared_here.result.i32.i32.const.0.i32.load16_u.func.export.string_appeared_here.result.i64.i32.const.0.i64.load.func.export.string_appeared_here.result.i64.i32.const.0.i64.load8_s.func.export.string_appeared_here.result.i64.i32.const.0.i64.load8_u.func.export.string_appeared_here.result.i64.i32.const.0.i64.load16_s.func.export.string_appeared_here.result.i64.i32.const.0.i64.load16_u.func.export.string_appeared_here.result.i64.i32.const.0.i64.load32_s.func.export.string_appeared_here.result.i64.i32.const.0.i64.load32_u.writeToMemory):
(async test):
* JSTests/wasm/ipint-tests/ipint-test-memory-read.js: Added.
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.memory.export.string_appeared_here.1.10.data.i32.const.0x0.string_appeared_here.func.export.string_appeared_here.param.i32.result.i32.local.0.i32.load8_u.return.writeStringToMemory):
(async test):
* JSTests/wasm/ipint-tests/ipint-test-memory-simple.js: Added.
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.memory.export.string_appeared_here.1.10.data.i32.const.0x0.string_appeared_here.func.export.string_appeared_here.i32.const.0.i32.const.1717661556.i32.store.i32.const.4.i32.const.117.i32.store.decodeString):
(async test):
* JSTests/wasm/ipint-tests/ipint-test-memory-write-sizes.js: Added.
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.memory.export.string_appeared_here.1.10.func.export.string_appeared_here.param.i32.i32.local.0.local.1.i32.store.func.export.string_appeared_here.param.i32.i32.local.0.local.1.i32.store8.func.export.string_appeared_here.param.i32.i32.local.0.local.1.i32.store16.func.export.string_appeared_here.param.i32.i64.local.0.local.1.i64.store.func.export.string_appeared_here.param.i32.i64.local.0.local.1.i64.store8.func.export.string_appeared_here.param.i32.i64.local.0.local.1.i64.store16.func.export.string_appeared_here.param.i32.i64.local.0.local.1.i64.store32.decodeString):
(async test):
* Source/JavaScriptCore/llint/InPlaceInterpreter.asm:
* Source/JavaScriptCore/wasm/WasmFunctionIPIntMetadataGenerator.cpp:
(JSC::Wasm::FunctionIPIntMetadataGenerator::addLEB128ConstantInt32AndLength):
(JSC::Wasm::sizeOfLEB128): Deleted.
* Source/JavaScriptCore/wasm/WasmIPIntGenerator.cpp:
(JSC::Wasm::IPIntGenerator::getLocal):
(JSC::Wasm::IPIntGenerator::setLocal):
(JSC::Wasm::IPIntGenerator::getGlobal):
(JSC::Wasm::IPIntGenerator::setGlobal):
(JSC::Wasm::IPIntGenerator::load):
(JSC::Wasm::IPIntGenerator::store):
* Source/JavaScriptCore/wasm/WasmSlowPaths.cpp:
(JSC::LLInt::doWasmIPIntCallIndirect):
(JSC::LLInt::ipintGetGlobal64B):
(JSC::LLInt::ipintSetGlobal64B):
* Source/JavaScriptCore/wasm/WasmSlowPaths.h:

Canonical link: https://commits.webkit.org/266306@main
https://bugs.webkit.org/show_bug.cgi?id=259509
<rdar://112819533>
Reviewed by Alex Christensen.

The autogenerated metal file was accidently included as a
build target in ANGLE's default shared library. It's previously
been compiled in a seperate project that builds to
"ANGLEMetalLib.metallib". After the last ANGLE roll,
it was building to both "default.metallib" and 'ANGLEMetalLib.metallib'

This change restores the previous behavior for this library.

* Source/ThirdParty/ANGLE/ANGLE.xcodeproj/project.pbxproj:

Canonical link: https://commits.webkit.org/266307@main
…es are observed

https://bugs.webkit.org/show_bug.cgi?id=259511

Reviewed by Wenson Hsieh.

The bug was caused by didCommitLoad always starting text manipulation even if it was
a navigation for the main frame. Stop observing text for manipulation in this case.

* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:
(TestWebKitAPI::TEST):

Canonical link: https://commits.webkit.org/266308@main
…t of the screen on Twitter

https://bugs.webkit.org/show_bug.cgi?id=258907
rdar://111095697>

Reviewed by Simon Fraser and Tim Nguyen.

Add-to-top-layer changes containing block state which may affect geometry and requires layout to run.

This patch ensures that all the relevant pieces are marked for layout when transitioning to fullscreen including cases when a child frame initiates it.
It is essentially mimicking what out-of-flow type of containing block change triggers through styleDid/WillChange
e.g. when going from absolute to fix with a relative positioned ancestor.

(Test case credit goes to Tim Nguyen)

* LayoutTests/fullscreen/fullscreen-containing-block-change-expected.txt: Added.
* LayoutTests/fullscreen/fullscreen-containing-block-change-with-continuation-expected.txt: Added.
* LayoutTests/fullscreen/fullscreen-containing-block-change-with-continuation.html: Added.
* LayoutTests/fullscreen/fullscreen-containing-block-change.html: Added.
* Source/WebCore/dom/FullscreenManager.cpp:
(WebCore::markRendererDirtyAfterTopLayerChange):
(WebCore::FullscreenManager::willEnterFullscreen):

Canonical link: https://commits.webkit.org/266309@main
https://bugs.webkit.org/show_bug.cgi?id=259479
rdar://112834936

Reviewed by Andy Estes.

This is the result of running the script and attempting to address the
issues it reports. In particular these strings had conflicting
descriptions:

- "Play Animation"
- "Pause Animation"
- "Weight @ Font Details Sidebar Property"

* Source/WebCore/en.lproj/Localizable.strings:
* Source/WebCore/platform/LocalizedStrings.cpp:
(WebCore::contextMenuItemTagPlayAnimation):
(WebCore::contextMenuItemTagPauseAnimation):
* Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js:
* Source/WebInspectorUI/UserInterface/Views/FontDetailsPanel.js:
(WI.FontDetailsPanel.prototype._createDetailsSectionRowForProperty):
* Source/WebKit/UIProcess/API/Cocoa/_WKElementAction.mm:
(+[_WKElementAction _elementActionWithType:customTitle:assistant:]):
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _presentLockdownMode]):
* Tools/Scripts/update-webkit-localizable-strings:

Canonical link: https://commits.webkit.org/266310@main
https://bugs.webkit.org/show_bug.cgi?id=258301
rdar://111394402

Reviewed by Aditya Keerthi.

The HTML Standard suggests that the title attribute can be used to
augment the message presented to the end user. As this is not trusted
UI space this seems reasonable (JavaScript has full control over this
UI) and also matches other browsers.

* LayoutTests/fast/forms/validation-messages-expected.txt:
* LayoutTests/fast/forms/validation-messages.html:
* LayoutTests/platform/ios-wk2/fast/forms/validation-messages-expected.txt:
* Source/WebCore/en.lproj/Localizable.strings:
* Source/WebCore/html/InputType.cpp:
(WebCore::InputType::validationMessage const):
* Source/WebCore/platform/LocalizedStrings.cpp:
(WebCore::validationMessagePatternMismatchText):
* Source/WebCore/platform/LocalizedStrings.h:

Canonical link: https://commits.webkit.org/266311@main
…d is set to false

https://bugs.webkit.org/show_bug.cgi?id=259443
rdar://112769420

Reviewed by Alex Christensen.

When builtInNotificationsEnabled is set to false, we don't need to expose the
endpoints associated with the feature. This change syncs the feature state to the
network process and checks the endpoints is only reached when it's enabled.

* LayoutTests/TestExpectations:
* LayoutTests/ipc/restrictedendpoints/deny-access-webPush.html: Added.
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
* Source/WebKit/NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
* Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h:
* Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.serialization.in:
* Source/WebKit/NetworkProcess/NetworkSession.cpp:
(WebKit::m_shouldAcceptInsecureCertificatesForWebSockets):
* Source/WebKit/Shared/Notifications/NotificationManagerMessageHandler.h:
* Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::sendCreationParametersToNewProcess):

Canonical link: https://commits.webkit.org/266312@main
…arkerRangeRef.

https://bugs.webkit.org/show_bug.cgi?id=259512
<rdar://problem/112870208>

Reviewed by Chris Fleizach.

Added null-checks in the conversion between AXTextMarkerRange objects and AXTextMarkerRangeRefs and VisiblePositionRanges.

* Source/WebCore/accessibility/AXTextMarker.cpp:
(WebCore::AXTextMarkerRange::operator VisiblePositionRange const):
* Source/WebCore/accessibility/cocoa/AXTextMarkerCocoa.mm:
(WebCore::AXTextMarker::AXTextMarker):
(WebCore::AXTextMarkerRange::AXTextMarkerRange):

Canonical link: https://commits.webkit.org/266313@main
https://bugs.webkit.org/show_bug.cgi?id=257614
rdar://problem/110480382

Reviewed by Simon Fraser.

This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.

Merge: https://chromium.googlesource.com/chromium/src.git/+/545b2183e1b4ee3eb433537f9a6386b5337d6588

RenderReplaced has a m_intrinsicSize that's updated when computing
logical widths and heights (and only if needed; specified style makes
it not being set at all).

But m_intrinsicSize can be used earlier that that, when computing
preferred widths for the container, see
RenderReplaced::computeIntrinsicLogicalWidths called from
RenderReplaced::computePreferredLogicalWidths().

This patch computes the intrinsic size in the constructor to avoid
returning the stale default size.

* Source/WebCore/rendering/svg/LegacyRenderSVGRoot.cpp:
(1) Add constants for 'defaultWidth' and 'defaultHeight'
(2) Add 'intrinsicSize' logic
(3) Introduce new function 'calculateIntrinsicSize'
(LegacyRenderSVGRoot::computeIntrinsicRatioInformation): Call above function and remove unneeded comments
* Source/WebCore/rendering/svg/LegacyRenderSVGRoot.h: Definition of 'calculateIntrinsicSize'
* Source/WebCore/rendering/svg/RenderSVGRoot.cpp: Same changes as 'Legacy' for LBSE
* Source/WebCore/rendering/svg/RenderSVGRoot.h: Ditto
* LayoutTests/svg/in-html/inside-inline-block.html: Add Test Case
* LayoutTests/svg/in-html/inside-inline-block-expected.html: Add Test Case Expectation

Canonical link: https://commits.webkit.org/266314@main
https://bugs.webkit.org/show_bug.cgi?id=259444
rdar://112774699

Reviewed by Tim Nguyen.

WPT @ 5685ca5

* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-lab-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-relative-color-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-mix-out-of-gamut-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-color/system-color-consistency-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/animation-display-lock-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-interpolation-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/animations/font-variation-settings-composition-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/variations/at-font-face-font-matching-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/animations/calc-interpolation-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-angle-values-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-infinity-nan-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-values/round-mod-rem-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/support/computed-testcommon.js:
(test_computed_value):
* LayoutTests/imported/w3c/web-platform-tests/css/support/delete-other-rule-crash.css: Added.
(.a):
(.b):
* LayoutTests/imported/w3c/web-platform-tests/css/support/height-keyword-classes.css:
(.fit-content):
(.max-height-fit-content):
(.min-height-fit-content):
* LayoutTests/imported/w3c/web-platform-tests/css/support/interpolation-testcommon.js:
(cssAnimationsInterpolation.notAnimatableExpectations):
(cssTransitionsInterpolation.notAnimatableExpectations):
(cssTransitionsInterpolation.interpolate):
(cssTransitionAllInterpolation.notAnimatableExpectations):
(cssTransitionAllInterpolation.interpolate):
(webAnimationsInterpolation.notAnimatableExpectations):
(createInterpolationTestTargets):
(test_not_animatable):
* LayoutTests/imported/w3c/web-platform-tests/css/support/numeric-testcommon.js:
* LayoutTests/imported/w3c/web-platform-tests/css/support/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/css/support/width-keyword-classes.css:
(.fit-content):
(.max-width-fit-content):
(.min-width-fit-content):
* LayoutTests/platform/mac-monterey/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-relative-color-expected.txt:
* LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-color/system-color-consistency-expected.txt:
* LayoutTests/platform/mac/imported/w3c/web-platform-tests/css/css-color/parsing/color-computed-color-mix-function-expected.txt:

Canonical link: https://commits.webkit.org/266315@main
https://bugs.webkit.org/show_bug.cgi?id=257972
rdar://110656783

Reviewed by Darin Adler.

Enable this behavior as part of Interop 2023 now that is has baked a bit in STP.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:

Canonical link: https://commits.webkit.org/266316@main
… the Cookie Store API

https://bugs.webkit.org/show_bug.cgi?id=259505

Reviewed by Chris Dumez and Alex Christensen.

The spec (https://wicg.github.io/cookie-store/#set-cookie-algorithm)
dictates that in the set function, if the path is not null, then if
the path does not begin with a '/', the promise should be rejected
with a TypeError. If the path does begin with a '/',  but does not
end with a '/', then a '/' should be added, and then the rest of the

* LayoutTests/imported/w3c/web-platform-tests/cookie-store/cookieStore_delete_arguments.https.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/cookie-store/cookieStore_set_arguments.https.any-expected.txt:
* Source/WebCore/Modules/cookie-store/CookieStore.cpp:
(WebCore::CookieStore::set):

Canonical link: https://commits.webkit.org/266317@main
eric-carlson and others added 25 commits August 2, 2023 08:55
…sh (media/modern-media-controls/tracks-support/text-track-selected-via-media-api.html)

https://bugs.webkit.org/show_bug.cgi?id=259544
rdar://112951082

Reviewed by Jer Noble.

Remove two unneeded asserts. Both checked a condition that is commonly encountered and which
is not dangerous or harmful.

* LayoutTests/platform/mac-wk2/TestExpectations: Unskip test.

* Source/WebCore/rendering/RenderVTTCue.cpp:
(WebCore::RenderVTTCue::repositionCueSnapToLinesSet): Remove assert.
(WebCore::RenderVTTCue::repositionGenericCue): Ditto.

Canonical link: https://commits.webkit.org/266513@main
…onAction message

https://bugs.webkit.org/show_bug.cgi?id=259705
rdar://113227343

Reviewed by Brady Eidson.

FrameInfoData always has the same frame identifier.
I also removed a redundant message check.
I also did similar redundant parameters in decidePolicyForNewWindowAction,
decidePolicyForNavigationActionSync, and decidePolicyForResponse

In order to still have a FrameIdentifier from a Document after it is removed from
the frame tree and to keep the layout test working at http/tests/navigation/window-open-redirect-and-remove-opener.html
I store the FrameIdentifier on the Document and use that when finding the opener's FrameIdentifier.

* Source/WebKit/Shared/FrameInfoData.h:
* Source/WebKit/Shared/FrameInfoData.serialization.in:
* Source/WebKit/UIProcess/API/APIFrameInfo.cpp:
(API::FrameInfo::handle const):
* Source/WebKit/UIProcess/Cocoa/NavigationState.mm:
(WebKit::createErrorWithRecoveryAttempter):
* Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync):
* Source/WebKit/UIProcess/ProvisionalPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
(WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::createNewPage):
(WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.messages.in:
* Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

Canonical link: https://commits.webkit.org/266514@main
…on tvOS.

https://bugs.webkit.org/show_bug.cgi?id=259722

Reviewed by Andy Estes.

NEFilterSource does not exist on tvOS, so we can't enable content filtering there.

* Source/WTF/wtf/PlatformEnableCocoa.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:
(TEST):

Canonical link: https://commits.webkit.org/266515@main
https://bugs.webkit.org/show_bug.cgi?id=259526

Reviewed by Mark Lam.

The asserts-enabled and asserts-not-enabled implementations of this macro don't
agree about whether or not it allows a message--allow one for the sake of
form. Since revision f0224c3 it's used in at least one place with a
message.

* Source/WTF/wtf/Assertions.h:

Canonical link: https://commits.webkit.org/266516@main
…ia-source-paint-after-display-none.html is a consistent crash/failure/timeout.

rdar://113233606
https://bugs.webkit.org/show_bug.cgi?id=259712

Unreviewed test gardening.

* LayoutTests/platform/mac-wk2/TestExpectations:

Canonical link: https://commits.webkit.org/266517@main
https://bugs.webkit.org/show_bug.cgi?id=258338
rdar://111082116

Reviewed by Mark Lam.

This patch newly adds op_call_ignore_result. The concept is very simple: this call is procedure invocation, and
not expecting result from the call. This results in two effects.

1. Removing ValueProfile, dst register. This reduces profiling collection heaviness. Removing many baseline JIT instructions.
2. Telling that the result is not used to DFG nodes even though MovHint removal is not done (in DFG, it is not done. In FTL, it is done).
   Later, this can be leveraged, for example, we can add ArraySplice intrinsic. And by using this information, we can skip creating result arrays.

By adding this new op_call_ignore_result, CLoop's llint_cloop_did_return_from_js_xxx exceeds the threshold, so we separate them out of OpcodeID's <= 256
space to make it work (they do not need to be <= 256 since it is only used for LR).

* Source/JavaScriptCore/bytecode/BytecodeList.rb:
* Source/JavaScriptCore/bytecode/BytecodeOperandsForCheckpoint.h:
(JSC::destinationFor):
* Source/JavaScriptCore/bytecode/BytecodeUseDef.cpp:
(JSC::computeUsesForBytecodeIndexImpl):
(JSC::computeDefsForBytecodeIndexImpl):
* Source/JavaScriptCore/bytecode/CallLinkInfo.cpp:
(JSC::CallLinkInfo::callTypeFor):
* Source/JavaScriptCore/bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finishCreation):
* Source/JavaScriptCore/bytecode/Opcode.h:
* Source/JavaScriptCore/bytecode/OpcodeInlines.h:
(JSC::isOpcodeShape):
* Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitCallInTailPosition):
(JSC::BytecodeGenerator::emitCall):
* Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::emitNode):
(JSC::BytecodeGenerator::emitNodeInTailPositionFromReturnNode):
(JSC::BytecodeGenerator::emitNodeInTailPositionFromExprStatementNode):
* Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:
(JSC::ExprStatementNode::emitBytecode):
(JSC::ReturnNode::emitBytecode):
* Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit):
(JSC::DFG::ByteCodeParser::parseBlock):
* Source/JavaScriptCore/dfg/DFGGraph.cpp:
(JSC::DFG::Graph::methodOfGettingAValueProfileFor):
* Source/JavaScriptCore/dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::callerReturnPC):
(JSC::DFG::reifyInlinedCallFrames):
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileFunction):
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::lower):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
* Source/JavaScriptCore/ftl/FTLSlowPathCall.h:
(JSC::FTL::callOperation):
* Source/JavaScriptCore/jit/CallFrameShuffler.cpp:
(JSC::CallFrameShuffler::prepareAny):
* Source/JavaScriptCore/jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* Source/JavaScriptCore/jit/JIT.h:
* Source/JavaScriptCore/jit/JITCall.cpp:
(JSC::JIT::compileSetupFrame):
(JSC::JIT::compileOpCall):
(JSC::JIT::emit_op_call_ignore_result):
(JSC::JIT::emitSlow_op_call_ignore_result):
* Source/JavaScriptCore/llint/LLIntThunks.cpp:
(JSC::LLInt::returnLocationThunk):
* Source/JavaScriptCore/llint/LowLevelInterpreter.asm:
* Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm:
* Source/JavaScriptCore/llint/LowLevelInterpreter64.asm:
* Source/JavaScriptCore/runtime/FileBasedFuzzerAgent.cpp:
(JSC::FileBasedFuzzerAgent::getPredictionInternal):
* Source/JavaScriptCore/runtime/Gate.h:
* Source/JavaScriptCore/runtime/PredictionFileCreatingFuzzerAgent.cpp:
(JSC::PredictionFileCreatingFuzzerAgent::getPredictionInternal):

Canonical link: https://commits.webkit.org/266519@main
https://bugs.webkit.org/show_bug.cgi?id=259612
rdar://113048804

Reviewed by Chris Dumez.

It's possible that a database is simultaneously accessed by two processes, and transaction fails to start with
SQLITE_BUSY error. Add error log to help us discover these cases.

* Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
* Source/WebCore/platform/sql/SQLiteDatabase.cpp:
(WebCore::SQLiteDatabase::executeSlow):
(WebCore::SQLiteDatabase::execute):
(WebCore::SQLiteDatabase::executeCommandSlow):
(WebCore::SQLiteDatabase::executeCommand):
* Source/WebCore/platform/sql/SQLiteDatabase.h:
* Source/WebCore/platform/sql/SQLiteTransaction.cpp:
(WebCore::SQLiteTransaction::begin):

Canonical link: https://commits.webkit.org/266520@main
…c-as-heif.html is a flaky image failure

rdar://112199522
https://bugs.webkit.org/show_bug.cgi?id=259190

Unreviewed test gardening.

Updating test expectation to match correct parameters.

* LayoutTests/platform/mac/TestExpectations:

Canonical link: https://commits.webkit.org/266521@main
https://bugs.webkit.org/show_bug.cgi?id=188117

Unreviewed test gardening.

This test was marked as flaky in `gtk-linux-64-release/build` (bot 41)
in b/188117 in 2018; this test is now passing in that bot, as well as
on GTK-Linux-Release-Tests bots and on recent passes of WPE Test release
bots (see also `wk-bot-digest`, as this test passes in the last few
thousand reports for both WPE and GTK; WPE bots have been exiting early
for the last few weeks which is being worked on separately).

* Tools/TestWebKitAPI/glib/TestExpectations.json:

Canonical link: https://commits.webkit.org/266522@main
https://bugs.webkit.org/show_bug.cgi?id=259737
rdar://113275381

Reviewed by Andy Estes.

It is true everywhere it is meaningful, which is where ENABLE(CONTENT_FILTERING) is true.
For a few years after its introduction, we were still supporting macOS versions where it
was unavailable, but now that is not needed.  Both are still off on tvOS, and this removes
a few Network Extension items from the sandbox that were only used for content filtering,
so it should be no change in behavior.  Just simplifying the code and removing unneeded code.

* Source/WTF/wtf/PlatformEnableCocoa.h:
* Source/WebCore/loader/ContentFilter.cpp:
(WebCore::ContentFilter::startFilteringMainResource):
(WebCore::ContentFilter::stopFilteringMainResource):
(WebCore::ContentFilter::continueAfterDataReceived):
(WebCore::ContentFilter::continueAfterNotifyFinished):
(WebCore::ContentFilter::url):
(WebCore::ContentFilter::deliverStoredResourceData):
* Source/WebCore/loader/ContentFilter.h:
* Source/WebCore/loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource):
(WebCore::DocumentLoader::handleContentFilterDidBlock):
(WebCore::DocumentLoader::contentFilterWillHandleProvisionalLoadFailure):
(WebCore::DocumentLoader::contentFilterHandleProvisionalLoadFailure):
* Source/WebCore/loader/DocumentLoader.h:
(WebCore::DocumentLoader::setSubstituteDataFromContentFilter):
* Source/WebCore/platform/ContentFilterUnblockHandler.h:
(WebCore::ContentFilterUnblockHandler::unblockedAfterRequest const):
* Source/WebCore/platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
(WebCore::ContentFilterUnblockHandler::ContentFilterUnblockHandler):
(WebCore::ContentFilterUnblockHandler::canHandleRequest const):
(WebCore::ContentFilterUnblockHandler::requestUnblockAsync const):
(WebCore::ContentFilterUnblockHandler::setUnblockedAfterRequest):
* Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.h:
* Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.mm:
(WebCore::NetworkExtensionContentFilter::enabled):
(WebCore::NetworkExtensionContentFilter::setHasConsumedSandboxExtensions): Deleted.
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h:
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveResponse):
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::willSendRedirectedRequestInternal):
(WebKit::NetworkResourceLoader::bufferingTimerFired):
(WebKit::NetworkResourceLoader::sendBuffer):
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
(WebKit::NetworkResourceLoader::sendResultForCacheEntry):
(WebKit::NetworkResourceLoader::startWithServiceWorker):
* Source/WebKit/NetworkProcess/NetworkResourceLoader.h:
* Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:
(WebKit::ServiceWorkerFetchTask::processResponse):
(WebKit::ServiceWorkerFetchTask::didReceiveData):
(WebKit::ServiceWorkerFetchTask::didReceiveDataFromPreloader):
(WebKit::ServiceWorkerFetchTask::didFinish):
* Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb.in:
* Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
* Source/WebKit/Shared/Cocoa/LoadParametersCocoa.mm:
(WebKit::LoadParameters::platformEncode const):
(WebKit::LoadParameters::platformDecode):
* Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.serialization.in:
* Source/WebKit/Shared/LoadParameters.h:
* Source/WebKit/Shared/WebCoreArgumentCoders.h:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::addPlatformLoadParameters):
(WebKit::WebPageProxy::createNetworkExtensionsSandboxExtensions): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponseShared):
(WebKit::WebPageProxy::createNetworkExtensionsSandboxExtensions): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::hasManagedSessionSandboxAccess const): Deleted.
(WebKit::WebProcessProxy::markHasManagedSessionSandboxAccess): Deleted.
* Source/WebKit/WebProcess/Network/WebMockContentFilterManager.cpp:
* Source/WebKit/WebProcess/Network/WebResourceLoader.cpp:
* Source/WebKit/WebProcess/Network/WebResourceLoader.h:
* Source/WebKit/WebProcess/Network/WebResourceLoader.messages.in:
* Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::platformDidReceiveLoadParameters):
(WebKit::WebPage::consumeNetworkExtensionSandboxExtensions): Deleted.
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didReceivePolicyDecision):
(WebKit::WebPage::consumeNetworkExtensionSandboxExtensions): Deleted.
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:
* Source/WebKit/WebProcess/WebProcess.cpp:
* Source/WebKit/WebProcess/com.apple.WebProcess.sb.in:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:
(TEST):

Canonical link: https://commits.webkit.org/266523@main
* LayoutTests/platform/wincairo/TestExpectations:
* LayoutTests/platform/wincairo/css3/filters/effect-reference-composite-expected.txt:
* LayoutTests/platform/wincairo/css3/filters/effect-reference-composite-hw-expected.txt:
* LayoutTests/platform/wincairo/css3/filters/effect-reference-expected.txt:
* LayoutTests/platform/wincairo/css3/filters/effect-reference-hw-expected.txt:

Canonical link: https://commits.webkit.org/266525@main
https://bugs.webkit.org/show_bug.cgi?id=259214
rdar://112268906

Reviewed by Dewei Zhu and Ryan Haddad.

* 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): Disable radar CC when not updating an issue.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:

Canonical link: https://commits.webkit.org/266526@main
https://bugs.webkit.org/show_bug.cgi?id=259370
rdar://112621977

Reviewed by Dewei Zhu.

Un-indent cherry-picks of cherry-picks.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/hooks/prepare-commit-msg: Un-indent cherry-picks of cherry-picks.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/cherry_pick.py:
(CherryPick.parser): Set 'original' to 'None'.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/cherry_pick_unittest.py:
(TestCherryPick.test_resolve_default): Test the default arguments to cherry-pick.
(TestCherryPick.test_resolve): Pass '--use-original'.

Canonical link: https://commits.webkit.org/266527@main
https://bugs.webkit.org/show_bug.cgi?id=259747
rdar://113289849

Reviewed by Brady Eidson.

This should've been done a long time ago.

With site isolation and redirects, we will probably need to made
decidePolicyForNavigationAction go directly from the network process
to the UI process because the web content process may be discarded.
This makes the flow of information more straightforward and reusable.

Passing PolicyCheckIdentifier across IPC doesn't really have any benefit,
and it doesn't work well with sendWithAsyncReply's failure handling,
so I remove it.

* Source/WebKit/Shared/PolicyDecision.h:
* Source/WebKit/Shared/PolicyDecision.serialization.in:
* Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync):
(WebKit::ProvisionalPageProxy::decidePolicyForResponse):
(WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionSync):
(WebKit::ProvisionalPageProxy::didReceiveMessage):
* Source/WebKit/UIProcess/ProvisionalPageProxy.h:
* Source/WebKit/UIProcess/RemotePageProxy.cpp:
(WebKit::RemotePageProxy::didReceiveMessage):
(WebKit::RemotePageProxy::decidePolicyForResponse):
* Source/WebKit/UIProcess/RemotePageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::PolicyDecisionSender::create):
(WebKit::WebPageProxy::PolicyDecisionSender::send):
(WebKit::WebPageProxy::PolicyDecisionSender::PolicyDecisionSender):
(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForNavigationActionAsync):
(WebKit::WebPageProxy::decidePolicyForNavigationActionAsyncShared):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
(WebKit::WebPageProxy::decidePolicyForNavigationActionSyncShared):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::decidePolicyForResponseShared):
(WebKit::WebPageProxy::PolicyDecisionSender::identifier): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.messages.in:
* Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
* Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp:
(WebKit::WebLocalFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::WebLocalFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
* Source/WebKit/WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::didReceivePolicyDecision):
* Source/WebKit/WebProcess/WebPage/WebFrame.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didReceivePolicyDecision): Deleted.
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:

Canonical link: https://commits.webkit.org/266528@main
https://bugs.webkit.org/show_bug.cgi?id=259751
rdar://113293081

Reviewed by Chris Dumez.

This should reduce build times.

* Source/WebCore/platform/SleepDisablerIdentifier.h:
(): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
(WebKit::WebPageProxy::didCreateSleepDisabler):
(WebKit::WebPageProxy::didDestroySleepDisabler):
(WebKit::WebPageProxy::hasSleepDisabler const):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxyInternals.h:
* Source/WebKit/UIProcess/mac/WKQuickLookPreviewController.mm:
* Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
* Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp:
* Source/WebKit/WebProcess/WebCoreSupport/WebEditorClient.cpp:
* Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp:
* Source/WebKit/WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp:
* Source/WebKit/WebProcess/WebPage/WebContextMenu.cpp:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm:

Canonical link: https://commits.webkit.org/266529@main
https://bugs.webkit.org/show_bug.cgi?id=259759

Unreviewed follow-up typo fix..

Fix typo in the variable name LD_LIBRARY_PATH

* Tools/Scripts/webkitpy/port/glib.py:
(GLibPort.setup_environ_for_server):
(GLibPort.setup_environ_for_minibrowser):

Canonical link: https://commits.webkit.org/266530@main
https://bugs.webkit.org/show_bug.cgi?id=259666
rdar://112416568

Reviewed by Eric Carlson.

On CNN.com, the JS listens for the window `resize` event instead of the orientation change
event and queries `screen.orientation.angle` when this event is fired to determine if we're
in landscape or portrait.

The issue is that Safari has very special handling to deal with rotation (_beginAnimatedResizeWithUpdates
& _endAnimatedResize), where it temporarily overrides the screen orientation. While `window.orientation`
was properly handling this (making sure `window.orientation` stays consistent with the viewport size),
`window.screen.orientation.angle` wasn't. As a result, we'd fire a resize event for the rotation but
the value returned by `window.screen.orientation.angle` would be inconsistent, causing CNN.com to make
the wrong decision and not removing a CSS class when it should have. This was the root cause of the bug.

To address the issue, I am updating `window.screen.orientation` to get its orientation from the same
place as `window.orientation`, instead of the ScreenOrientationProvider, which didn't properly deal
with Safari animated resizing. This actually simplifies the code a lot and gets rid of the bug.

* LayoutTests/fast/screen-orientation/orientation-in-resize-event-expected.txt: Added.
* LayoutTests/fast/screen-orientation/orientation-in-resize-event.html: Added.
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/SourcesCocoa.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/ScreenOrientationProvider.cpp: Removed.
* Source/WebCore/platform/ScreenOrientationProvider.h: Removed.
* Source/WebCore/platform/ios/ScreenOrientationProviderIOS.mm: Removed.
* Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::setCocoaView):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didAttachToRunningProcess):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebScreenOrientationManagerProxy.cpp:
(WebKit::toString):
(WebKit::WebScreenOrientationManagerProxy::WebScreenOrientationManagerProxy):
(WebKit::WebScreenOrientationManagerProxy::~WebScreenOrientationManagerProxy):
(WebKit::WebScreenOrientationManagerProxy::currentOrientation):
(WebKit::WebScreenOrientationManagerProxy::setCurrentOrientation):
(WebKit::WebScreenOrientationManagerProxy::lock):
(WebKit::WebScreenOrientationManagerProxy::setShouldSendChangeNotification):
(WebKit::WebScreenOrientationManagerProxy::screenOrientationDidChange): Deleted.
(WebKit::WebScreenOrientationManagerProxy::platformInitialize): Deleted.
(WebKit::WebScreenOrientationManagerProxy::platformDestroy): Deleted.
* Source/WebKit/UIProcess/WebScreenOrientationManagerProxy.h:
* Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::toScreenOrientationType):
(WebKit::WebPageProxy::setDeviceOrientation):
* Source/WebKit/UIProcess/ios/WebScreenOrientationManagerProxyIOS.mm:
(WebKit::WebScreenOrientationManagerProxy::platformInitialize): Deleted.
(WebKit::WebScreenOrientationManagerProxy::platformDestroy): Deleted.
(WebKit::WebScreenOrientationManagerProxy::setWindow): Deleted.
(WebKit::WebScreenOrientationManagerProxy::webViewDidMoveToWindow): Deleted.

Canonical link: https://commits.webkit.org/266531@main
https://bugs.webkit.org/show_bug.cgi?id=259757
rdar://113302470

Limiting this to ASCII since this is the motivation (2-character atom is for minified scripts' property names, which is ASCII).

* Source/JavaScriptCore/heap/Heap.cpp:
(JSC::Heap::reportExtraMemoryAllocatedSlowCase):
(JSC::Heap::deprecatedReportExtraMemorySlowCase):
* Source/JavaScriptCore/heap/Heap.h:
* Source/JavaScriptCore/heap/HeapInlines.h:
(JSC::Heap::reportExtraMemoryAllocated):
* Source/JavaScriptCore/runtime/JSString.h:
(JSC::JSString::finishCreation):
(JSC::JSString::create):
* Source/JavaScriptCore/runtime/JSStringInlines.h:
(JSC::jsSubstringOfResolved):

Canonical link: https://commits.webkit.org/266532@main
https://bugs.webkit.org/show_bug.cgi?id=259626

Reviewed by Brady Eidson.

LayerProperties is basically a bunch of std::optionals, but efficiently packed
with all their bools stored as a bit in an OptionSet.  So it's a tuple of optionals.

This introduces a new primitive, an OptionalTuple that is serialized by sending
a uint64_t of all the bools followed by the tuple members if the bit is 1.
This can also be used for RemoteScrollingCoordinatorTransaction.

I think OptionalTuple is a monad.  It's never been completely clear to me
what is and what is not a monad.

* Source/WebKit/Scripts/generate-serializers.py:
(SerializedType.has_optional_tuple_bits):
(MemberVariable.optional_tuple_bit):
(encode_optional_tuple):
(decode_optional_tuple):
(generate_impl):
(generate_optional_tuple_type_info):
(generate_serialized_type_info):
* Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.cpp:
(IPC::ArgumentCoder<WebKit::LayerProperties>::encode):
(IPC::ArgumentCoder<WebKit::LayerProperties>::decode):
* Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.h:
* Source/WebKit/Scripts/webkit/tests/SerializedTypeInfo.cpp:
(WebKit::allSerializedTypes):
* Source/WebKit/Scripts/webkit/tests/TestSerializedType.serialization.in:
* Source/WebKit/Scripts/webkit/tests/WebKitPlatformGeneratedSerializers.cpp:
* Source/WebKit/Shared/RemoteLayerTree/LayerProperties.h:
(WebKit::RemoteLayerBackingStoreOrProperties::RemoteLayerBackingStoreOrProperties):
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm:
(WebKit::RemoteLayerBackingStoreCollection::didFlushLayers):
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTree.serialization.in:
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
(WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer):
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
(WebKit::dumpChangedLayers):
(IPC::ArgumentCoder<WebKit::RemoteLayerBackingStoreOrProperties>::encode):
(WebKit::LayerProperties::encode const): Deleted.
(WebKit::LayerProperties::decode): Deleted.
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.mm:
(WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
(WebKit::PlatformCALayerRemote::didCommit):
(WebKit::PlatformCALayerRemote::ensureBackingStore):
(WebKit::PlatformCALayerRemote::updateBackingStore):
(WebKit::PlatformCALayerRemote::setNeedsDisplayInRect):
(WebKit::PlatformCALayerRemote::setNeedsDisplay):
(WebKit::PlatformCALayerRemote::addAnimationForKey):
(WebKit::PlatformCALayerRemote::removeAnimationForKey):
(WebKit::PlatformCALayerRemote::setBackingStoreAttached):
(WebKit::PlatformCALayerRemote::hasContents const):
(WebKit::PlatformCALayerRemote::setContents):
(WebKit::PlatformCALayerRemote::setDelegatedContents):
(WebKit::PlatformCALayerRemote::enumerateRectsBeingDrawn):
(WebKit::PlatformCALayerRemote::backingStoreBytesPerPixel const):
(WebKit::PlatformCALayerRemote::clearAcceleratedEffectsAndBaseValues):
(WebKit::PlatformCALayerRemote::setAcceleratedEffectsAndBaseValues):

Canonical link: https://commits.webkit.org/266533@main
…t() function

https://bugs.webkit.org/show_bug.cgi?id=259758
rdar://problem/113303890

Reviewed by Chris Fleizach.

* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
(WebCore::AccessibilityRenderObject::addImageMapChildren):
(WebCore::AccessibilityRenderObject::renderBoxModelObject const): Deleted.
* Source/WebCore/accessibility/AccessibilityRenderObject.h:

Canonical link: https://commits.webkit.org/266534@main
https://bugs.webkit.org/show_bug.cgi?id=259724
rdar://113255131

Reviewed by Dan Glastonbury.

Remove the unused constructors.

* Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::WebGL2RenderingContext):
* Source/WebCore/html/canvas/WebGL2RenderingContext.h:
* Source/WebCore/html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::WebGLRenderingContext):
* Source/WebCore/html/canvas/WebGLRenderingContext.h:
* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
* Source/WebCore/html/canvas/WebGLRenderingContextBase.h:

Canonical link: https://commits.webkit.org/266535@main
…cations

https://bugs.webkit.org/show_bug.cgi?id=259765
rdar://113315414

Reviewed by Mark Lam.

It turned out that large typed array can consume long time for zeroing its backing store.
But libpas already knows that this is zero-filled or not (for example, newly allocated pages are zeroed),
and libpas have try_allocate_zeroed APIs to return efficiently zero-filled memory.
This patch leverages this for TypedArray allocations.

* Source/JavaScriptCore/runtime/ArrayBuffer.cpp:
(JSC::ArrayBufferContents::tryAllocate):
* Source/JavaScriptCore/runtime/JSArrayBufferView.cpp:
(JSC::JSArrayBufferView::ConstructionContext::ConstructionContext):
* Source/WTF/wtf/FastMalloc.cpp:
(WTF::fastZeroedMalloc):
(WTF::tryFastZeroedMalloc):
* Source/WTF/wtf/Gigacage.cpp:
(Gigacage::tryZeroedMalloc):
(Gigacage::zeroedMalloc):
* Source/WTF/wtf/Gigacage.h:
* Source/bmalloc/bmalloc/bmalloc.h:
(bmalloc::api::tryZeroedMalloc):
(bmalloc::api::zeroedMalloc):

Canonical link: https://commits.webkit.org/266536@main
@Jarred-Sumner
Jarred-Sumner merged commit 99e3ead into main Aug 3, 2023
springmin pushed a commit to springmin/WebKit that referenced this pull request Aug 3, 2026
…utItem) and rename its layout entry points

https://bugs.webkit.org/show_bug.cgi?id=318643

Reviewed by Antti Koivisto.

FlexLayout threaded the render-tree RelayoutChildren flag through layout() and layoutFlexItems only to
hand it to RenderFlexibleBox's per-item layout, even though FlexLayout is meant to reach the render tree
only through the container. The flag is really a property of each item RenderFlexibleBox collects.

Carry it on FlexLayoutItem as shouldInvalidateChildContent, set in collectFlexItems from
relayoutChildren == RelayoutChildren::Yes, and read it in layoutFlexItemWithMainSize. FlexLayout no
longer mentions RelayoutChildren, and the multi-line-column re-resolve no longer passes
RelayoutChildren::No: that was already a no-op, because the !hasFlexItemCompletedLayout guard makes a
re-layout non-forcing regardless.

While here, rename for clarity, mirroring the LFC Layout::FlexLayout the legacy path converges on:
performFlexLayout becomes layout, and layoutFlexItemAfterMainSizing becomes layoutFlexItemWithMainSize
(the point is that the flexed main size is imposed on the item, not that it runs "after" a step). The
line-positioning lambda becomes computeFlexLineCrossPositions (it fills flexLinesCrossPositionList; the
used cross size, 9.6 oven-sh#15, is resolved later in updateFlexContainerLogicalHeight), which also fixes a
comment that labeled it 9.6 ahead of the 9.5 main-axis step that necessarily precedes it.

No change in behavior.

* Source/WebCore/rendering/RenderFlexLayout.cpp:
* Source/WebCore/rendering/RenderFlexLayout.h:
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
* Source/WebCore/rendering/RenderFlexibleBox.h:

Canonical link: https://commits.webkit.org/317429@main
springmin pushed a commit to springmin/WebKit that referenced this pull request Aug 3, 2026
…ogicalHeight instead of reading it off the container

https://bugs.webkit.org/show_bug.cgi?id=318648

Reviewed by Antti Koivisto.

FlexLayout read the flex container's used cross size live off the container (crossAxisContentExtent
and crossAxisExtent, via FlexLayoutUtils) in five places: the single-line height, the align-content
pass, the two stretch helpers, and the final item placement. That size is only settled once
updateFlexContainerLogicalHeight has resolved the container's logical height (9.6 oven-sh#15), so each of
those reads reached back through the container after the fact.

Have updateFlexContainerLogicalHeight return the used cross extents instead, as a
FlexContainerCrossExtents: the content-box extent (line positioning, align-content, and each item's
cross size) and the border-box extent (the right-to-left column flip). layout() captures them once
and threads them to the consumers, so FlexLayout no longer reads the container's cross size anywhere.

No change in behavior.

* Source/WebCore/rendering/RenderFlexLayout.cpp:
* Source/WebCore/rendering/RenderFlexLayout.h:
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
* Source/WebCore/rendering/RenderFlexibleBox.h:

Canonical link: https://commits.webkit.org/317446@main
springmin pushed a commit to springmin/WebKit that referenced this pull request Aug 3, 2026
…s' per-flex-item static helpers

https://bugs.webkit.org/show_bug.cgi?id=320019

Reviewed by Antti Koivisto.

The per-item static helpers in FlexFormattingUtils took the flex container as an
explicit (const RenderFlexibleBox&, const RenderBox& flexItem) pair, even though a
flex item's parent is always the flex container. Drop the container argument from
these twelve statics and derive it internally from the item's parent, mirroring
what ScopedCrossAxisOverrideForFlexItem already does:

    auto& flexBox = downcast<RenderFlexibleBox>(*flexItem.parent());

The two that only forwarded the container to other statics (useContentBasedMinimumSize,
flexBasisForFlexItem) no longer need it at all. All callers drop the container argument:
the utils' own static-to-static calls and instance forwarders, RenderFlexibleBox's proxies
and ScopedCrossAxisOverrideForFlexItem, and LayoutIntegration::FlexLayout (its positioned
flex items are direct out-of-flow children, so their parent is the container too). The
container-only statics (isColumnFlow, isHorizontalFlow, computeGap, ...) still take it.

Also correct the cross-axis step comments in FlexFormattingContext::layout(): they
labelled a section "9.6 (oven-sh#13 - oven-sh#16)" although the block also runs the §9.4 steps (oven-sh#9,
dependency around the container's used-cross-size finalization (oven-sh#15), not by spec number,
so the comment now says so.

No change in behavior.

* Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp:
(WebCore::FlexFormattingContext::layout):
* Source/WebCore/layout/formattingContexts/flex/FlexFormattingUtils.cpp:
(WebCore::FlexFormattingUtils::crossAxisMarginExtentForFlexItem):
(WebCore::FlexFormattingUtils::preferredMainSizeLengthForFlexItem):
(WebCore::FlexFormattingUtils::minMainSizeLengthForFlexItem):
(WebCore::FlexFormattingUtils::preferredCrossSizeLengthForFlexItem):
(WebCore::FlexFormattingUtils::mainAxisOverflowForFlexItem):
(WebCore::FlexFormattingUtils::hasAutoMarginsInCrossAxis):
(WebCore::FlexFormattingUtils::useContentBasedMinimumSize):
(WebCore::FlexFormattingUtils::preferredAspectRatioForFlexItem const):
(WebCore::FlexFormattingUtils::needToStretchFlexItemLogicalHeight const):
(WebCore::FlexFormattingUtils::innerCrossSizeForFlexItem):
(WebCore::FlexFormattingUtils::availableAlignmentSpaceForFlexItem const):
(WebCore::FlexFormattingUtils::marginBoxAscentForFlexItem const):
(WebCore::FlexFormattingUtils::mainAxisIsFlexItemInlineAxis):
(WebCore::FlexFormattingUtils::flexBasisForFlexItem):
(WebCore::FlexFormattingUtils::alignmentForFlexItem):
(WebCore::FlexFormattingUtils::hasDefiniteCrossSizeForFlexItem):
(WebCore::FlexFormattingUtils::crossAxisMarginExtentForFlexItem const):
(WebCore::FlexFormattingUtils::preferredMainSizeLengthForFlexItem const):
(WebCore::FlexFormattingUtils::minMainSizeLengthForFlexItem const):
(WebCore::FlexFormattingUtils::preferredCrossSizeLengthForFlexItem const):
(WebCore::FlexFormattingUtils::hasAutoMarginsInCrossAxis const):
(WebCore::FlexFormattingUtils::useContentBasedMinimumSize const):
(WebCore::FlexFormattingUtils::innerCrossSizeForFlexItem const):
(WebCore::FlexFormattingUtils::mainAxisIsFlexItemInlineAxis const):
(WebCore::FlexFormattingUtils::flexBasisForFlexItem const):
(WebCore::FlexFormattingUtils::alignmentForFlexItem const):
(WebCore::FlexFormattingUtils::hasDefiniteCrossSizeForFlexItem const):
* Source/WebCore/layout/formattingContexts/flex/FlexFormattingUtils.h:
* Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.cpp:
(WebCore::LayoutIntegration::FlexLayout::firstLineBaseline const):
(WebCore::LayoutIntegration::FlexLayout::lastLineBaseline const):
(WebCore::LayoutIntegration::FlexLayout::baselineFlexItemInLine const):
(WebCore::LayoutIntegration::FlexLayout::staticCrossAxisPositionForPositionedFlexItem):
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::ScopedCrossAxisOverrideForFlexItem::ScopedCrossAxisOverrideForFlexItem):
(WebCore::RenderFlexibleBox::canUseFlexItemForPercentageResolution):
(WebCore::RenderFlexibleBox::computeBlockAxisContentSizeForFlexItem):
(WebCore::RenderFlexibleBox::setOverridingMainSizeForFlexItem):
(WebCore::RenderFlexibleBox::resetAutoMarginsAndLogicalTopInCrossAxis):
(WebCore::RenderFlexibleBox::useContentBasedMinimumBlockSize const):
(WebCore::RenderFlexibleBox::hasStretchedFlexItemWithAspectRatio const):
(WebCore::RenderFlexibleBox::mainAxisIsFlexItemInlineAxis const):
(WebCore::RenderFlexibleBox::flexBasisForFlexItem const):
(WebCore::RenderFlexibleBox::alignmentForFlexItem const):
(WebCore::RenderFlexibleBox::hasDefiniteCrossSizeForFlexItem const):
(WebCore::RenderFlexibleBox::flexItemMainSizeIsDefinite):

Canonical link: https://commits.webkit.org/317776@main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.