Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Haiku_webkit2_gsoc2019: Bump to Webkit 608.5.12 #1

Closed
wants to merge 1,491 commits into from
Closed

Haiku_webkit2_gsoc2019: Bump to Webkit 608.5.12 #1

wants to merge 1,491 commits into from

Conversation

kenmays
Copy link

@kenmays kenmays commented Feb 24, 2021

This PR is to bump the Haiku GSOC 2019 project to the current Webkit 608 branch as of 2021-02-24.

rniwa and others added 30 commits September 10, 2019 05:30
    Crash under WebCore::firstPositionInNode()
    https://bugs.webkit.org/show_bug.cgi?id=201764
    <rdar://problem/54823754>

    Reviewed by Wenson Hsieh and Geoff Garen.

    Make sure to keep a Ref<> to the textNode when we call insertNodeAtTabSpanPosition()
    or insertNodeAt().

    Test: editing/firstPositionInNode-crash.html

    * editing/InsertTextCommand.cpp:
    (WebCore::InsertTextCommand::positionInsideTextNode):

    Canonical link: https://commits.webkit.org/215410@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249854 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Canonical link: https://commits.webkit.org/213666.348@safari-608-branch
git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-608-branch@249968 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    Line artifacts in note body after viewing note with <attachment>s
    https://bugs.webkit.org/show_bug.cgi?id=201474
    <rdar://problem/51306108>

    Reviewed by Simon Fraser.

    Source/WebCore:

    Test: fast/attachment/attachment-border-should-stay-inside-attachment.html

    * rendering/RenderThemeIOS.mm:
    (WebCore::attachmentBorderPath):
    (WebCore::paintAttachmentBorder):
    Inset the border rect by half the width, so that <attachment> doesn't
    paint out-of-bounds.

    LayoutTests:

    * fast/attachment/attachment-border-should-stay-inside-attachment-expected.html: Added.
    * fast/attachment/attachment-border-should-stay-inside-attachment.html: Added.
    Add a test that ensures that <attachment> stays inside its bounds.

    Canonical link: https://commits.webkit.org/215113@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249507 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Canonical link: https://commits.webkit.org/213666.349@safari-608-branch
git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-608-branch@249986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    Cancelled transitions on Google image search leave content with opacity 0 sometimes
    https://bugs.webkit.org/show_bug.cgi?id=201482
    rdar://problem/54921036

    Reviewed by Tim Horton.
    Source/WebCore:

    If, in a single rendering update, we started an accelerated opacity transition, and then removed
    it, we'd still push the transition onto the CALayer with fillForwards and never remove it, so its
    effects would last forever.

    Fix by making GraphicsLayerCA::removeAnimation() remove animations from the uncomittedAnimations
    list as well.

    Also fix layer names in debug; if a layer's primaryLayerID changed, we'd fail to rename the
    CALayer, causing confusion when logging at layer dumps. Fix by adding the layer ID just
    before pushing the name to the platform layer.

    Some drive-by logging cleanup.

    Test: legacy-animation-engine/compositing/transitions/add-remove-transition.html

    * platform/graphics/GraphicsLayer.cpp:
    (WebCore::GraphicsLayer::debugName const):
    * platform/graphics/GraphicsLayer.h:
    * platform/graphics/ca/GraphicsLayerCA.cpp:
    (WebCore::GraphicsLayerCA::setName):
    (WebCore::GraphicsLayerCA::debugName const):
    (WebCore::GraphicsLayerCA::addAnimation):
    (WebCore::GraphicsLayerCA::pauseAnimation):
    (WebCore::GraphicsLayerCA::seekAnimation):
    (WebCore::GraphicsLayerCA::removeAnimation):
    (WebCore::GraphicsLayerCA::platformCALayerAnimationStarted):
    (WebCore::GraphicsLayerCA::platformCALayerAnimationEnded):
    (WebCore::GraphicsLayerCA::updateNames):
    (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
    * platform/graphics/ca/GraphicsLayerCA.h:
    * rendering/RenderLayerCompositor.cpp:
    (WebCore::RenderLayerCompositor::logLayerInfo):

    LayoutTests:

    * legacy-animation-engine/compositing/transitions/add-remove-transition-expected.html: Added.
    * legacy-animation-engine/compositing/transitions/add-remove-transition.html: Added.

    Canonical link: https://commits.webkit.org/215116@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249511 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Canonical link: https://commits.webkit.org/213666.350@safari-608-branch
git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-608-branch@249987 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    Revert to pre-r243144 scavenging behavior for macOS
    https://bugs.webkit.org/show_bug.cgi?id=201555

    Reviewed by Saam Barati.

    The change in r243144 regressed internal power metrics for some Mac models.

    * bmalloc/Heap.cpp:
    (bmalloc::Heap::scavenge):
    (bmalloc::Heap::scavengeToHighWatermark):
    (bmalloc::Heap::allocateSmallChunk):
    (bmalloc::Heap::allocateSmallPage):
    (bmalloc::Heap::allocateLarge):
    * bmalloc/Heap.h:
    * bmalloc/IsoDirectory.h:
    * bmalloc/IsoDirectoryInlines.h:
    (bmalloc::passedNumPages>::takeFirstEligible):
    (bmalloc::passedNumPages>::scavenge):
    (bmalloc::passedNumPages>::scavengeToHighWatermark):
    * bmalloc/IsoHeapImpl.h:
    * bmalloc/IsoHeapImplInlines.h:
    (bmalloc::IsoHeapImpl<Config>::scavengeToHighWatermark):
    * bmalloc/LargeMap.cpp:
    (bmalloc::LargeMap::add):
    * bmalloc/LargeRange.h:
    (bmalloc::LargeRange::LargeRange):
    (bmalloc::merge):
    * bmalloc/Scavenger.cpp:
    (bmalloc::Scavenger::Scavenger):
    (bmalloc::Scavenger::timeSinceLastPartialScavenge):
    (bmalloc::Scavenger::scavenge):
    (bmalloc::Scavenger::partialScavenge):
    (bmalloc::Scavenger::threadRunLoop):
    * bmalloc/Scavenger.h:
    * bmalloc/SmallPage.h:

    Canonical link: https://commits.webkit.org/215259@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249670 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Canonical link: https://commits.webkit.org/213666.351@safari-608-branch
git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-608-branch@249988 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    Tap and hold on Facebook sometimes creates a tall empty selection.
    https://bugs.webkit.org/show_bug.cgi?id=201618
    rdar://53630145

    Reviewed by Megan Gardner.

    Source/WebCore:

    API Test: SelectionTests.ByWordAtEndOfDocument

    * editing/VisibleUnits.cpp:
    (WebCore::wordRangeFromPosition):
    Remove special case code for the possibility of an empty paragraph and at the end
    of the document. This is no longer needed and was causing a large selection to be
    created on Facebook due to large areas of non-selectable content on the page.

    Tools:

    * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
    * TestWebKitAPI/Tests/ios/SelectionByWord.mm: Added.

    Canonical link: https://commits.webkit.org/215274@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249701 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Canonical link: https://commits.webkit.org/213666.352@safari-608-branch
git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-608-branch@249989 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    [iOS] We sometimes attempt to use a terminated prewarmed WebContent process
    https://bugs.webkit.org/show_bug.cgi?id=201614
    <rdar://problem/54714507>

    Reviewed by Geoffrey Garen.

    On iOS, it is possible for our processes to get terminated (e.g. jetsammed) while the UIProcess
    is suspended. Upon resuming, it takes a little while for the UIProcess to get the notification
    that the mac connection to its child process has been severed and the UIProcess may try to use
    it for a load. This is especially problematic for prewarmed process because the client will end
    up showing a crash banner and reloading when we could have used a new process rather the prewarmed
    one if we had known it was dead.

    This patch makes 2 improvements:
    1. It makes AuxiliaryProcessProxy::state() return Terminated if we still have a connection but
       the PID is not the PID of a running process. I also added a check in tryTakePrewarmedProcess()
       to not use the prewarmed process if it state() is Terminated.
    2. When the UIProcess is about to get suspended, have the process pools terminate their non-critical
       processes (i.e. prewarmed + the ones used for PageCache). This makes WebKit friendlier with
       other apps on the system when suspended with regards to memory. Also, it makes it less likely
       useful WebContent processes will get jetsammed.

    * UIProcess/AuxiliaryProcessProxy.cpp:
    (WebKit::AuxiliaryProcessProxy::state const):
    (WebKit::AuxiliaryProcessProxy::isRunningProcessPID):
    * UIProcess/AuxiliaryProcessProxy.h:
    * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
    (WebKit::WebProcessPool::applicationIsAboutToSuspend):
    * UIProcess/WebProcessPool.cpp:
    (WebKit::WebProcessPool::tryTakePrewarmedProcess):
    * UIProcess/WebProcessPool.h:
    * UIProcess/ios/ProcessAssertionIOS.mm:
    (-[WKProcessAssertionBackgroundTaskManager init]):
    (-[WKProcessAssertionBackgroundTaskManager _releaseBackgroundTask]):

    Canonical link: https://commits.webkit.org/215276@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249703 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Canonical link: https://commits.webkit.org/213666.353@safari-608-branch
git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-608-branch@249990 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    Hangs on Swiss.com due to the web process being blocked on StorageAreaMap::LoadValuesIfNeeded
    https://bugs.webkit.org/show_bug.cgi?id=201644
    <rdar://problem/54942761>

    Reviewed by Geoffrey Garen.

    Mark the StorageManagerSet::GetValues sync IPC from the WebContent process to the Network
    process with a UnboundedSynchronousIPCScope so that it will process critical sync IPC
    from the UIProcess (such as WebPage::GetPositionInformation) while waiting for a reply.

    * WebProcess/WebStorage/StorageAreaMap.cpp:
    (WebKit::StorageAreaMap::loadValuesIfNeeded):

    Canonical link: https://commits.webkit.org/215294@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249723 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Canonical link: https://commits.webkit.org/213666.354@safari-608-branch
git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-608-branch@249991 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    Attempt to make this test not flakey.
    https://bugs.webkit.org/show_bug.cgi?id=201482

    * legacy-animation-engine/compositing/transitions/add-remove-transition.html:

    Canonical link: https://commits.webkit.org/215303@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249734 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Canonical link: https://commits.webkit.org/213666.355@safari-608-branch
git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-608-branch@249992 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    Nullptr crash in Page::sessionID() via WebKit::WebFrameLoaderClient::detachedFromParent2()
    https://bugs.webkit.org/show_bug.cgi?id=201625

    Reviewed by Ryosuke Niwa.

    This is based on a patch from Ryosuke Niwa.

    Source/WebCore:

    Drop setHasFrameSpecificStorageAccess() in WebCore and call it from the WebKit layer instead.

    * dom/DocumentStorageAccess.cpp:
    (WebCore::DocumentStorageAccess::requestStorageAccess):
    (WebCore::DocumentStorageAccess::setHasFrameSpecificStorageAccess): Deleted.
    * dom/DocumentStorageAccess.h:
    * loader/EmptyFrameLoaderClient.h:
    * loader/FrameLoaderClient.h:

    Source/WebKit:

    The crash was caused by WebFrameLoaderClient::sessionID() calling WebPage::sessionID() without
    checking the nullity of WebPage::m_page which can be null. Added a null check.

    Because passing a wrong session to RemoveStorageAccessForFrame could result in a leak, this patch
    also replaces m_hasFrameSpecificStorageAccess boolean with an optioanl struct which stores
    session ID, frame ID, and page ID even after WebCore::Frame or WebCore::Page had been cleared
    or before WebFrameLoaderClient::m_frame is set.

    * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
    (WebKit::WebFrameLoaderClient::sessionID const):
    (WebKit::WebFrameLoaderClient::setHasFrameSpecificStorageAccess):
    (WebKit::WebFrameLoaderClient::detachedFromParent2):
    (WebKit::WebFrameLoaderClient::dispatchWillChangeDocument):
    * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
    * WebProcess/WebPage/WebFrame.h:
    (WebKit::WebFrame::frameLoaderClient const):
    * WebProcess/WebPage/WebPage.cpp:
    (WebKit::WebPage::requestStorageAccess):

    Canonical link: https://commits.webkit.org/215315@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249748 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Canonical link: https://commits.webkit.org/213666.356@safari-608-branch
git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-608-branch@249993 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    REGRESSION (r233780): After swiping to navigate back, pinching to zoom in on webcontent snaps back to zoomed out when letting go
    https://bugs.webkit.org/show_bug.cgi?id=201671
    <rdar://problem/50488372>

    Reviewed by Simon Fraser.

    * WebProcess/WebPage/WebPage.cpp:
    (WebKit::WebPage::didCommitLoad):
    Reset m_lastTransactionIDWithScaleChange, since it is not guaranteed
    to only march forward. Otherwise, we can get stuck with a very large
    m_lastTransactionIDWithScaleChange, and will not allow stable-state
    user-driven zooms until the current transactionID exceeds it.

    Canonical link: https://commits.webkit.org/215321@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249754 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Canonical link: https://commits.webkit.org/213666.357@safari-608-branch
git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-608-branch@249994 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    REGRESSION: Scrubbing on ted.com does not work well
    https://bugs.webkit.org/show_bug.cgi?id=201635
    <rdar://problem/51463649>

    Patch by Antoine Quint <graouts@apple.com> on 2019-09-11
    Reviewed by Dean Jackson.

    This website uses custom media controls that simply don't work well on iOS when the User-Agent string is the desktop one, so we default to the mobile UA.

    * UIProcess/ios/WebPageProxyIOS.mm:
    (WebKit::desktopClassBrowsingRecommendedForRequest):

    Canonical link: https://commits.webkit.org/215324@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249757 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Canonical link: https://commits.webkit.org/213666.358@safari-608-branch
git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-608-branch@249995 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    Prevent reentrancy FrameLoader::dispatchUnloadEvents()
    https://bugs.webkit.org/show_bug.cgi?id=200738

    Reviewed by Brady Eidson.

    Reentrancy causes m_pageDismissalEventBeingDispatched to be incorrectly
    updated, so don't allow reentrancy.

    Since this prevents m_pageDismissalEventBeingDispatched from being reset
    inside a reentrant call, it can have the unintended effect of causing
    FrameLoader::stopAllLoaders to early-out when called from
    FrameLoader::detachFromParent while a frame's unload event handler
    calls document.open() on a parent frame and causes itself to become
    detached. Allowing a load to continue in a detached frame will lead to
    a crash. To prevent this, add a new argument to FrameLoader::stopAllLoaders
    that FrameLoader::detachFromParent can use to prevent an early-out.

    * loader/FrameLoader.cpp:
    (WebCore::FrameLoader::stopAllLoaders):
    (WebCore::FrameLoader::detachFromParent):
    (WebCore::FrameLoader::dispatchUnloadEvents):
    (WebCore::FrameLoader::dispatchBeforeUnloadEvent):
    Ensure that m_pageDismissalEventBeingDispatched is reset to its previous value, even if this is not None.
    * loader/FrameLoader.h:
    * loader/FrameLoaderTypes.h:
    Add a StopLoadingPolicy enum.

    Canonical link: https://commits.webkit.org/215329@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249762 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Canonical link: https://commits.webkit.org/213666.359@safari-608-branch
git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-608-branch@249996 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    REGRESSION (245006): can't scroll in "read more" view in Eventbrite app
    https://bugs.webkit.org/show_bug.cgi?id=201683
    <rdar://problem/54582602>

    Reviewed by Simon Fraser.

    Source/WebCore:

    * platform/RuntimeApplicationChecks.h:
    * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
    (WebCore::IOSApplication::isEventbrite):

    Source/WebKit:

    Content <body> has 'overflow:hidden'.

    * UIProcess/Cocoa/VersionChecks.h:
    * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
    (WebKit::RemoteScrollingCoordinatorProxy::hasScrollableMainFrame const):

    Fix by adding an app specific LinkedOnOrAfter quirk that always allows main frame scrolling.

    Canonical link: https://commits.webkit.org/215333@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249770 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Canonical link: https://commits.webkit.org/213666.360@safari-608-branch
git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-608-branch@249997 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    [Cocoa] Text indicator for an image link on the front page of apple.com looks wrong
    https://bugs.webkit.org/show_bug.cgi?id=201724
    <rdar://problem/54622894>

    Reviewed by Tim Horton.

    Source/WebCore:

    When computing the bounds of the range (<a>, 0) to (<a>, 1) for a text indicator snapshot where <a> is a link
    with a single non-breaking whitespace character, we currently use the text rect of the single space. This leads
    to a confusing text indicator, as the resulting snapshot is a tiny blank square in the top left corner of the
    link. This problem manifests when starting a drag or showing the system context menu on iOS, or force clicking
    or three-finger tapping to show a preview on macOS.

    To address this scenario, tweak the heuristic in the case where the text indicator option
    TextIndicatorOptionUseBoundingRectAndPaintAllContentForComplexRanges is specified, such that we consider a range
    containing only text with whitespaces to be "complex"; additionally, instead of falling back to the range's
    bounding rect (which in this case is still tiny), fall back to the common ancestor container's bounding rect,
    which encompasses not only the text inside the range but also the element containing the range (in this case,
    the anchor element).

    Test: fast/text-indicator/text-indicator-empty-link.html

    * page/TextIndicator.cpp:
    (WebCore::containsOnlyWhiteSpaceText):

    Add a helper to determine whether a Range is comprised only of rendered text that only contains whitespace
    characters.

    (WebCore::initializeIndicator):

    See ChangeLog entry above for more detail.

    LayoutTests:

    Add a new layout test to exercise this scenario.

    * fast/text-indicator/text-indicator-empty-link-expected.txt: Added.
    * fast/text-indicator/text-indicator-empty-link.html: Added.

    Canonical link: https://commits.webkit.org/215369@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249813 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Canonical link: https://commits.webkit.org/213666.361@safari-608-branch
git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-608-branch@249998 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    REGRESSION (iOS 13): Top fixed element on apple.com flickers in size while pinching in
    https://bugs.webkit.org/show_bug.cgi?id=201668
    rdar://problem/51934041

    Reviewed by Frédéric Wang.

    Source/WebCore:

    When computing the new layout viewport rect in ScrollingTreeFrameScrollingNode, use
    "StickToDocumentBounds" mode, not "StickToViewportBounds", because otherwise we'll compute
    a layout viewport that has negative top/left offsets which causes fixed elements to jump outside
    the viewport. The only code that should be moving things outside the viewport (a temporary effect
    that happens when pinching) is the 'isBelowMinimumScale' path in WebPageProxy::computeCustomFixedPositionRect().

    With this change ScrollingTreeFrameScrollingNode no longer needs m_behaviorForFixed; it can be removed later.

    Not currently testable, since it involves pinching in past minimum zoom and transients state.

    * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
    (WebCore::ScrollingTreeFrameScrollingNode::layoutViewportForScrollPosition const):

    Source/WebKit:

    The UI process can have transient state that pushes scrolling-tree-managed layers into custom
    locations while pinch-zooming. We have to apply this state both when the visible rects
    in the UI process change (existing code in -[WKContentView didUpdateVisibleRect:...]) and when
    we get new layers from the web process (added in RemoteLayerTreeDrawingAreaProxy::commitLayerTree()
    in this patch).

    Move some code into WebPageProxy to create functions that we can call from both places.

    For manual testing, visit a page with fixed banners, pinch in slightly, then pinch out and,
    while keeping your fingers down, move the contents around.

    * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
    (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
    * UIProcess/WebPageProxy.h:
    * UIProcess/ios/WKContentView.mm:
    (-[WKContentView didUpdateVisibleRect:unobscuredRect:contentInsets:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
    * UIProcess/ios/WebPageProxyIOS.mm:
    (WebKit::WebPageProxy::unconstrainedLayoutViewportRect const):
    (WebKit::WebPageProxy::adjustLayersForLayoutViewport):

    Canonical link: https://commits.webkit.org/215371@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249815 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Canonical link: https://commits.webkit.org/213666.362@safari-608-branch
git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-608-branch@249999 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    [Pointer Events] The button and buttons properties are incorrect on iOS
    https://bugs.webkit.org/show_bug.cgi?id=199910
    <rdar://problem/52778374>

    Reviewed by Dean Jackson.

    Source/WebCore:

    The button and buttons properties were always set to 0 on iOS. We now use the correct values such that
    button is always 0 except for "pointermove" where it's -1, and "buttons" is 1 as long as the pointer is
    in contact with the touch surface.

    Tests: pointerevents/ios/pointer-event-button-and-buttons-pointer-cancel.html
           pointerevents/ios/pointer-event-button-and-buttons.html

    * dom/ios/PointerEventIOS.cpp:
    (WebCore::buttonForType):
    (WebCore::buttonsForType):
    (WebCore::PointerEvent::PointerEvent):

    LayoutTests:

    * pointerevents/ios/pointer-event-button-and-buttons-expected.txt: Added.
    * pointerevents/ios/pointer-event-button-and-buttons-pointer-cancel-expected.txt: Added.
    * pointerevents/ios/pointer-event-button-and-buttons-pointer-cancel.html: Added.
    * pointerevents/ios/pointer-event-button-and-buttons.html: Added.

    Canonical link: https://commits.webkit.org/213793@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247573 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Canonical link: https://commits.webkit.org/213666.365@safari-608-branch
git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-608-branch@250010 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    [WebIDL] Derived dictionaries should inherit their inherited dictionaries' partials
    https://bugs.webkit.org/show_bug.cgi?id=201802

    Reviewed by Sam Weinig.

    Prior to this change, a dictionary D that inherits from dictionary B would not inherit B's
    partial dictionaries. Fixed this by moving supplemental dependencies processing from
    generate-bindings.pl to CodeGenerator.pm and reusing it in GetDictionaryByType.

    Added new bindings tests.

    * bindings/scripts/CodeGenerator.pm:
    (new):
    (ProcessDocument):
    (ProcessSupplementalDependencies):
    (shouldPropertyBeExposed):
    (GetDictionaryByType):
    * bindings/scripts/generate-bindings.pl:
    (generateBindings):
    (shouldPropertyBeExposed): Deleted.
    * bindings/scripts/test/JS/JSTestDerivedDictionary.cpp: Added.
    (WebCore::convertDictionary<TestDerivedDictionary>):
    (WebCore::convertDictionaryToJS):
    * bindings/scripts/test/JS/JSTestDerivedDictionary.h: Added.
    * bindings/scripts/test/JS/JSTestInheritedDictionary.cpp: Added.
    (WebCore::convertDictionary<TestInheritedDictionary>):
    (WebCore::convertDictionaryToJS):
    * bindings/scripts/test/JS/JSTestInheritedDictionary.h: Added.
    * bindings/scripts/test/TestDerivedDictionary.idl: Added.
    * bindings/scripts/test/TestInheritedDictionary.idl: Added.
    * bindings/scripts/test/TestSupplemental.idl:

    Canonical link: https://commits.webkit.org/215442@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249888 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Canonical link: https://commits.webkit.org/213666.366@safari-608-branch
git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-608-branch@250011 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    JSObject::putInlineSlow should not ignore "__proto__" for Proxy
    https://bugs.webkit.org/show_bug.cgi?id=200386
    <rdar://problem/53854946>

    Reviewed by Yusuke Suzuki.

    JSTests:

    * stress/proxy-__proto__-in-prototype-chain.js: Added.
    * stress/proxy-property-replace-structure-transition.js: Added.

    Source/JavaScriptCore:

    We used to ignore '__proto__' in putInlineSlow when the object in question
    was Proxy. There is no reason for this, and it goes against the spec. So
    I've removed that condition. This also has the effect that it fixes an
    assertion firing inside our inline caching code which dictates that for a
    property replace that the base value's structure must be equal to the
    structure when we grabbed the structure prior to the put operation.
    The old code caused a weird edge case where we broke this invariant.

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

    Canonical link: https://commits.webkit.org/215465@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249911 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Canonical link: https://commits.webkit.org/213666.367@safari-608-branch
git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-608-branch@250012 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    Provide a prototype for AR QuickLook to trigger processing in the originating page
    https://bugs.webkit.org/show_bug.cgi?id=201371

    Hopefully fix the public iOS 13 build.

    Source/WebCore/PAL:

    * pal/spi/ios/SystemPreviewSPI.h:

    Source/WebKit:

    * UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:

    Canonical link: https://commits.webkit.org/215487@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249936 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Canonical link: https://commits.webkit.org/213666.368@safari-608-branch
git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-608-branch@250013 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    [First-letter] Use WeakPtr for the first-letter insertion point.
    https://bugs.webkit.org/show_bug.cgi?id=201842
    <rdar://problem/51373788>

    Reviewed by Antti Koivisto.

    Source/WebCore:

    The about-to-be-removed first letter renderer's sibling could potentially be destroyed too as the result of the anonymous subtree collapsing logic (when the next sibling is a generated anonymous block and it is not needed anymore.)

    Test: fast/text/first-letter-with-columns-crash.html

    * rendering/updating/RenderTreeBuilderFirstLetter.cpp:
    (WebCore::RenderTreeBuilder::FirstLetter::updateStyle):

    LayoutTests:

    * fast/text/first-letter-with-columns-crash-expected.txt: Added.
    * fast/text/first-letter-with-columns-crash.html: Added.

    Canonical link: https://commits.webkit.org/215505@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249954 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Canonical link: https://commits.webkit.org/213666.369@safari-608-branch
git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-608-branch@250014 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    Remove the "Show Link Previews" and "Hide Link Previews" action menus in the preview platter
    https://bugs.webkit.org/show_bug.cgi?id=201864
    <rdar://55190038>

    Reviewed by Simon Fraser.

    Source/WebKit:

    * UIProcess/ios/WKActionSheetAssistant.mm: Remove the toggle action from the
    default values.
    (-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
    * UIProcess/ios/WKContentViewInteraction.mm: No longer try to add a toggle when
    it isn't there.
    (-[WKContentView assignLegacyDataForContextMenuInteraction]):
    (menuWithShowLinkPreviewAction): Deleted.

    Tools:

    Test for the suggested actions.

    * TestWebKitAPI/Tests/WebKitCocoa/ContextMenus.mm:
    (-[TestContextMenuSuggestedActionsUIDelegate webView:contextMenuConfigurationForElement:completionHandler:]):
    (-[TestContextMenuSuggestedActionsUIDelegate webView:contextMenuWillPresentForElement:]):
    (TEST):

    Canonical link: https://commits.webkit.org/215541@main
    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250015 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Canonical link: https://commits.webkit.org/213666.374@safari-608-branch
git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-608-branch@250246 268f45cc-cd09-0410-ab3c-d52691b4dbfc
pulkomandy pushed a commit that referenced this pull request Mar 11, 2022
https://bugs.webkit.org/show_bug.cgi?id=237630
rdar://88690874

Reviewed by Jer Noble.

Source/WebCore:

Data cues have a start time but not an explicit duration, a data cue ends when
the next data cue from the same track starts. This means we don’t know the
duration of cue #1 until cue #2 is delivered, so when cue #1 is delivered it is
given the end time of the media file’s duration and the actual end time is updated
when cue #2 arrives.

http://webkit.org/b/229924 refactored text, audio, and video tracks to not depend
on HTMLMediaElement. Because InbandDataTextTrack could no longer access the
HTMLMediaElement to get its duration, a duration property was added to TextTrackList
that InbandDataTextTrack uses to set the duration of temporary cues.
TextTrackList.duration is set when it is created and updated when the media player
reports a duration change.

This means that if the media file’s duration is not known when the text track list
is created, and the file's duration never changes, the text track list never has a
valid duration and data cues were not added to the temporary list.

Fix this by updating TextTrackList.duration when a HTMLMediaElement reaches HAVE_METADATA.

Test: http/tests/media/hls/track-in-band-hls-metadata-cue-duration.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::durationChanged): Update m_textTracks.duration and post
the 'durationchange' event.
(WebCore::HTMLMediaElement::setReadyState): Call durationChanged.
(WebCore::HTMLMediaElement::mediaPlayerDurationChanged): Ditto.
* html/HTMLMediaElement.h:

* html/track/InbandDataTextTrack.cpp:
(WebCore::InbandDataTextTrack::addDataCue): Add cues to the incomplete cue map
even if the track list doesn't have duration.

LayoutTests:

* http/tests/media/hls/track-in-band-hls-metadata-cue-duration-expected.txt: Added.
* http/tests/media/hls/track-in-band-hls-metadata-cue-duration.html: Added.



Canonical link: https://commits.webkit.org/248203@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291029 268f45cc-cd09-0410-ab3c-d52691b4dbfc
pulkomandy pushed a commit that referenced this pull request May 26, 2022
…with-relative-parent.html is a flaky image failure

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

Reviewed by Antti Koivisto.

Source/WebCore:

1. Out of flow boxes are laid out independently from each other as the last step of their containing block layout.
2. However their static positions are computed during regular in-flow layout (as if their positions were static).

In order to do #1, we maintain a ListHashSet for the out-of-flow boxes and insert them at #2 (and we also have
a corresponding HashMap<ContainingBlock, ListHasSet>).

Normally this is a very simple list of descendant positioned boxes and since out-of-flow boxes don't interact with each
other, their position in the list is not important.
  e.g.
    <div id=A style="position: relative">
      <div>
        <div id=B style="position: absolute"></div>
        <div id=C style="position: absolute"></div>
      </div>
    </div>

At in-flow layout (#2), we insert B and C to "ListHashSet of A" as we come across them in DOM order and compute their static positions.
Later in the layout flow when we get to the "let's layout the out-of-flow boxes" phase (#1) we simply walk
the ListHashSet and lay out B and C (but "C and B" order would also work just fine).

However the ICB (RenderView) is a special containing block as it can hold different types of out-of-flow boxes (absolute and fixed)
and those out-of-flow boxes may have layout dependencies.
e.g.
    <body><div id=A class=absolute><div id=B class=fixed></div></div></body>

ICB's ListHasSet has both A and B, but in this case there's (static)layout dependency between these boxes.
In order to figure out the static position of B, we have to have A laid out first. In order to lay out A before B,
B has to be preceded by A in ICB's ListHasSet.

Now full layout always guarantees the correct order.
However in case of partial layout since we don't run a full #2, the ListHasSet may end up having an unexpected order.
  e.g.
   <body><div id=A class=absolute><div id=B><div id=C class=fixed></div></div></div></body>

 1. The initial (full) layout produces the following (correct) order for the ICB's ListHasSet -> AC.
 2. A subsequent partial layout (e.g. triggered by A's position change) runs an in-flow layout on the <body> which
 (re-)appends A to the ListHasSet (CA <- incorrect order). Now at this point we assume that the in-flow layout picks up B
 which eventually (re-)appends C to the ListHashSet (AC <- correct order). However since B does not need layout, we just
 stop at <body> which leaves us with an unexpected ListHashSet.
 3. As part of the ICB's out-of-flow layout, we pick C as the first box to lay out followed by A. However since C's static
 position depends on A's position, we end up using stale geometry when computing C's static position.

This patch fixes this issue by ensuring the absolute positioned boxes always come first in the ICB's ListHasSet (note
that their order is not really important -see above. What's important is that a potential (as-if-static) containing block always
comes before the fixed boxes).

Test: fast/block/fixed-inside-absolute-positioned.html

* rendering/RenderBlock.cpp:
(WebCore::PositionedDescendantsMap::addDescendant):
(WebCore::RenderBlock::insertPositionedObject):

LayoutTests:

* fast/block/fixed-inside-absolute-positioned-expected.html: Added.
* fast/block/fixed-inside-absolute-positioned.html: Added.
* platform/mac-wk1/TestExpectations:

Canonical link: https://commits.webkit.org/249597@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@292817 268f45cc-cd09-0410-ab3c-d52691b4dbfc
pulkomandy pushed a commit that referenced this pull request May 26, 2022
…with-relative-parent.html is a flaky image failure

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

Reviewed by Antti Koivisto.

Source/WebCore:

1. Out of flow boxes are laid out independently from each other as the last step of their containing block layout.
2. However their static positions are computed during regular in-flow layout (as if their positions were static).

In order to do #1, we maintain a ListHashSet for the out-of-flow boxes and insert them at #2 (and we also have
a corresponding HashMap<ContainingBlock, ListHasSet>).

Normally this is a very simple list of descendant positioned boxes and since out-of-flow boxes don't interact with each
other, their position in the list is not important.
  e.g.
    <div id=A style="position: relative">
      <div>
        <div id=B style="position: absolute"></div>
        <div id=C style="position: absolute"></div>
      </div>
    </div>

At in-flow layout (#2), we insert B and C to "ListHashSet of A" as we come across them in DOM order and compute their static positions.
Later in the layout flow when we get to the "let's layout the out-of-flow boxes" phase (#1) we simply walk
the ListHashSet and lay out B and C (but "C and B" order would also work just fine).

However the ICB (RenderView) is a special containing block as it can hold different types of out-of-flow boxes (absolute and fixed)
and those out-of-flow boxes may have layout dependencies.
e.g.
    <body><div id=A class=absolute><div id=B class=fixed></div></div></body>

ICB's ListHasSet has both A and B, but in this case there's (static)layout dependency between these boxes.
In order to figure out the static position of B, we have to have A laid out first. In order to lay out A before B,
B has to be preceded by A in ICB's ListHasSet.

Now full layout always guarantees the correct order.
However in case of partial layout since we don't run a full #2, the ListHasSet may end up having an unexpected order.
  e.g.
   <body><div id=A class=absolute><div id=B><div id=C class=fixed></div></div></div></body>

 1. The initial (full) layout produces the following (correct) order for the ICB's ListHasSet -> AC.
 2. A subsequent partial layout (e.g. triggered by A's position change) runs an in-flow layout on the <body> which
 (re-)appends A to the ListHasSet (CA <- incorrect order). Now at this point we assume that the in-flow layout picks up B
 which eventually (re-)appends C to the ListHashSet (AC <- correct order). However since B does not need layout, we just
 stop at <body> which leaves us with an unexpected ListHashSet.
 3. As part of the ICB's out-of-flow layout, we pick C as the first box to lay out followed by A. However since C's static
 position depends on A's position, we end up using stale geometry when computing C's static position.

This patch fixes this issue by ensuring the absolute positioned boxes always come first in the ICB's ListHasSet (note
that their order is not really important -see above. What's important is that a potential (as-if-static) containing block always
comes before the fixed boxes).

Test: fast/block/fixed-inside-absolute-positioned.html

* rendering/RenderBlock.cpp:
(WebCore::PositionedDescendantsMap::addDescendant):
(WebCore::RenderBlock::insertPositionedObject):

LayoutTests:

* fast/block/fixed-inside-absolute-positioned-expected.html: Added.
* fast/block/fixed-inside-absolute-positioned.html: Added.
* platform/mac-wk1/TestExpectations:

Canonical link: https://commits.webkit.org/249626@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@292855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
pulkomandy pushed a commit that referenced this pull request Jul 8, 2022
https://bugs.webkit.org/show_bug.cgi?id=241856

Reviewed by Yusuke Suzuki.

1. Ruby treats numeric 0 as truthy.  However, there's a test in arm64LowerMalformedLoadStoreAddresses
   which assumes a value of 0 would be false.  As a result, we see offlineasm emit inefficient LLInt
   code like this:
    ".loc 3 821\n"        "movz x16, #0 \n"                    // LowLevelInterpreter64.asm:821
                          "add x13, x3, x16 \n"
                          "ldr x0, [x13] \n"

  ...  instead of this:
    ".loc 3 821\n"        "ldr x0, [x3] \n"                    // LowLevelInterpreter64.asm:821

   This patch fixes this.

2. offlineasm's emitARM64MoveImmediate chooses to use `movn` instead of `movz` based on whether a
   64-bit value is negative or not.  Instead, it should be making that decision based on the number of
   halfwords (16-bits) in the value that is 0xffff vs 0.  As a result, offlineasm emits code like this:
    ".loc 1 1638\n"       "movn x27, #1, lsl #48 \n"           // LowLevelInterpreter.asm:1638
                          "movk x27, #0, lsl #32 \n"
                          "movk x27, #0, lsl #16 \n"
                          "movk x27, #0 \n"

  ...  instead of this:
    ".loc 1 1638\n"       "movz x27, #65534, lsl #48 \n"       // LowLevelInterpreter.asm:1638

   This patch fixes this.

3. offlineasm is trivially assuming the range of immediate offsets for ldr/str instructions is
   [-255..4095].  However, that's only the range for byte sized load-stores.  For 32-bit, the range
   is actually [-255..16380].  For 64-bit, the range is actually [-255..32760].  As a result,
    offlineasm emits code like this:
    ".loc 1 633\n"        "movn x16, WebKit#16383 \n"                // LowLevelInterpreter.asm:633
    ".loc 1 1518\n"       "and x3, x3, x16 \n"                 // LowLevelInterpreter.asm:1518
    ".loc 1 1519\n"       "movz x16, WebKit#16088 \n"                // LowLevelInterpreter.asm:1519
                          "add x17, x3, x16 \n"
                          "ldr x3, [x17] \n"

  ...  instead of this:
    ".loc 1 633\n"        "movn x17, WebKit#16383 \n"                // LowLevelInterpreter.asm:633
    ".loc 1 1518\n"       "and x3, x3, x17 \n"                 // LowLevelInterpreter.asm:1518
    ".loc 1 1519\n"       "ldr x3, [x3, WebKit#16088] \n"            // LowLevelInterpreter.asm:1519

   This patch fixes this for 64-bit and 32-bit load-stores.  16-bit load-stores also has a wider
   range, but for now, it will continue to use the conservative range.

   This patch also introduces an `isMalformedArm64LoadAStoreAddress` so that this range check can be
   done consistently in all the places that checks for it.

4. offlineasm is eagerly emitting no-op arguments in instructions, e.g. "lsl #0", and adding 0.
   As a result, offlineasm emits code like this:
    ".loc 3 220\n"        "movz x13, #51168, lsl #0 \n"        // LowLevelInterpreter64.asm:220
                          "add x17, x1, x13, lsl #0 \n"
                          "ldr w4, [x17, #0] \n"

  ...  instead of this:
    ".loc 3 220\n"        "movz x13, #51168 \n"                // LowLevelInterpreter64.asm:220
                          "add x17, x1, x13 \n"
                          "ldr w4, [x17] \n"

   This unnecessary arguments are actually very common throughout the emitted LLIntAssembly.h.

   This patch removes these unnecessary arguments, which makes the emitted LLInt code more human
   readable due to less clutter.

This patch has passed the testapi and JSC stress tests with a Release build on an M1 Mac.

I also manually verified that the emitARM64MoveImmediate code is working properly by
hacking up LowLevelInterpreter64.asm to emit moves of constants of different values in
the ranges, and for load-store instructions of different sizes, and visually inspecting
the emitted code.

* Source/JavaScriptCore/offlineasm/arm64.rb:

Canonical link: https://commits.webkit.org/251771@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
pulkomandy pushed a commit that referenced this pull request Jul 8, 2022
…ting layers

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

Reviewed by Simon Fraser.

addLayers stops (recursive) descending in the render tree soon after it finds a root (R) with layer.
It says that if a subtree root (R) has a layer then all layers in this subtree must have already been inserted into the layer tree at an earlier time.
(it simply assumes that any layer in the subtree is a child of (R), or some other layers in the subtree)

<div id=container>
  <div id=R>
    <div id=child>

The insertion is bottom to top; we attach
1, (child) to (R) first
2, followed by (R) to (container)
addLayers assumes that when (R) is being inserted (#2), we don't have to descend into (R)'s subtree since any renderer's layer that was inserted before (at #1) must have already been parented.

However toplayer/backdrop content is an exception where the parent layer may be outside of the subtree but still accessible. In such cases subsequent insertions (and the recursive nature of finding layer parents) could lead to double parenting where we try to insert the same layer into the layer tree multiple times.

* Source/WebCore/rendering/RenderElement.cpp:
(WebCore::addLayers):
(WebCore::RenderElement::insertedIntoTree):
(WebCore::RenderElement::addLayers): Deleted.
* Source/WebCore/rendering/RenderElement.h:

Canonical link: https://commits.webkit.org/251772@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
pulkomandy pushed a commit that referenced this pull request Jul 8, 2022
https://bugs.webkit.org/show_bug.cgi?id=242295

Reviewed by Michael Catanzaro.

We need to use adoptGRef when calling g_variant_get_data_as_bytes as
the return is already ref'd.

See:
https://github.com/GNOME/glib/blob/2.72.3/glib/gvariant-core.c#L975

Fixes:
==3126== 330 (120 direct, 210 indirect) bytes in 3 blocks are definitely lost in loss record 3,105 of 3,199
==3126==    at 0x48447ED: malloc (vg_replace_malloc.c:381)
==3126==    by 0xA87B2E8: g_malloc (gmem.c:106)
==3126==    by 0xA892E44: g_slice_alloc (gslice.c:1072)
==3126==    by 0xA84B005: g_bytes_new_with_free_func (gbytes.c:186)
==3126==    by 0xA84B067: g_bytes_new_take (gbytes.c:128)
==3126==    by 0xA8B934D: g_variant_ensure_serialised (gvariant-core.c:460)
==3126==    by 0xA8B958E: g_variant_get_data_as_bytes (gvariant-core.c:961)
==3126==    by 0x8765214: WebCore::KeyedEncoderGlib::finishEncoding() (KeyedEncoderGlib.cpp:139)
==3126==    by 0x53CF40E: WebKit::writeToDisk(std::unique_ptr<WebCore::KeyedEncoder, std::default_delete<WebCore::KeyedEncoder> >&&, WTF::String&&) (PersistencyUtils.cpp:53)
==3126==    by 0x545EF8C: operator() (DeviceIdHashSaltStorage.cpp:201)
==3126==    by 0x545EF8C: WTF::Detail::CallableWrapper<WebKit::DeviceIdHashSaltStorage::storeHashSaltToDisk(WebKit::DeviceIdHashSaltStorage::HashSaltForOrigin const&)::{lambda()#1}, void>::call() (Function.h:53)
==3126==    by 0x6E52DE9: operator() (Function.h:82)
==3126==    by 0x6E52DE9: operator() (WorkQueueGeneric.cpp:70)
==3126==    by 0x6E52DE9: WTF::Detail::CallableWrapper<WTF::WorkQueueBase::dispatch(WTF::Function<void ()>&&)::{lambda()#1}, void>::call() (Function.h:53)
==3126==    by 0x6DF490F: operator() (Function.h:82)
==3126==    by 0x6DF490F: WTF::RunLoop::performWork() (RunLoop.cpp:133)
==3126==    by 0x6E55171: WTF::RunLoop::RunLoop()::{lambda(void*)#1}::_FUN(void*) (RunLoopGLib.cpp:80)
==3126==    by 0x6E55D61: operator() (RunLoopGLib.cpp:53)
==3126==    by 0x6E55D61: WTF::RunLoop::{lambda(_GSource*, int (*)(void*), void*)#1}::_FUN(_GSource*, int (*)(void*), void*) (RunLoopGLib.cpp:56)
==3126==    by 0xA8723AB: g_main_dispatch (gmain.c:3381)
==3126==    by 0xA875839: g_main_context_dispatch (gmain.c:4099)
==3126==    by 0xA8759A7: g_main_context_iterate (gmain.c:4175)
==3126==    by 0xA875D41: g_main_loop_run (gmain.c:4373)
==3126==    by 0x6E5613C: WTF::RunLoop::run() (RunLoopGLib.cpp:108)
==3126==    by 0x6E52E14: operator() (WorkQueueGeneric.cpp:51)
==3126==    by 0x6E52E14: WTF::Detail::CallableWrapper<WTF::WorkQueueBase::platformInitialize(char const*, WTF::WorkQueueBase::Type, WTF::Thread::QOS)::{lambda()#1}, void>::call() (Function.h:53)
==3126==    by 0x6DF6FD7: operator() (Function.h:82)
==3126==    by 0x6DF6FD7: WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) (Threading.cpp:236)
==3126==    by 0x6E59A3F: WTF::wtfThreadEntryPoint(void*) (ThreadingPOSIX.cpp:242)
==3126==    by 0xA9D6DC2: start_thread (pthread_create.c:442)
==3126==    by 0xAA4FA0F: clone (clone.S:100)
==3126==

* Source/WebCore/platform/glib/KeyedEncoderGlib.cpp:
(WebCore::KeyedEncoderGlib::finishEncoding):

Canonical link: https://commits.webkit.org/252100@main
pulkomandy pushed a commit that referenced this pull request Jul 16, 2022
…e leak

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

Reviewed by Xabier Rodriguez-Calvar.

Refactor ref counting for GstContext in GLVideoSinkGStreamer to
prevent a resource leak.

Fixes:
==196== 401 (296 direct, 105 indirect) bytes in 1 blocks are definitely lost in loss record 58,280 of 62,411
==196==    at 0x4845A83: calloc (vg_replace_malloc.c:1328)
==196==    by 0x15F58780: g_malloc0 (gmem.c:136)
==196==    by 0x161C8CBB: gst_structure_new_id_empty_with_size (gststructure.c:281)
==196==    by 0x161C8CBB: gst_structure_new_id_empty (gststructure.c:312)
==196==    by 0x161716CF: gst_context_new (gstcontext.c:178)
==196==    by 0x1122BB85: requestGLContext(char const*) (GLVideoSinkGStreamer.cpp:154)
==196==    by 0x1122BD12: setGLContext(_GstElement*, char const*) (GLVideoSinkGStreamer.cpp:173)
==196==    by 0x1122BE39: webKitGLVideoSinkChangeState(_GstElement*, GstStateChange) (GLVideoSinkGStreamer.cpp:189)
==196==    by 0x1617FA11: gst_element_change_state (gstelement.c:3083)
==196==    by 0x16180154: gst_element_set_state_func (gstelement.c:3037)
==196==    by 0x40651CE6: activate_sink (gstplaybin3.c:3805)
==196==    by 0x40651CE6: activate_sink.constprop.0 (gstplaybin3.c:3780)
==196==    by 0x40652B3E: activate_group (gstplaybin3.c:4539)
==196==    by 0x40652B3E: setup_next_source (gstplaybin3.c:4801)
==196==    by 0x406542A7: gst_play_bin3_change_state (gstplaybin3.c:5031)
==196==    by 0x1617FA11: gst_element_change_state (gstelement.c:3083)
==196==    by 0x1617FA5A: gst_element_change_state (gstelement.c:3122)
==196==    by 0x16180154: gst_element_set_state_func (gstelement.c:3037)
==196==    by 0x11257BC9: WebCore::MediaPlayerPrivateGStreamer::changePipelineState(GstState) (MediaPlayerPrivateGStreamer.cpp:924)
==196==    by 0x11258D8B: WebCore::MediaPlayerPrivateGStreamer::commitLoad() (MediaPlayerPrivateGStreamer.cpp:1184)
==196==    by 0x1125420B: WebCore::MediaPlayerPrivateGStreamer::load(WTF::String const&) (MediaPlayerPrivateGStreamer.cpp:354)
==196==    by 0x112542F4: WebCore::MediaPlayerPrivateGStreamer::load(WebCore::MediaStreamPrivate&) (MediaPlayerPrivateGStreamer.cpp:370)
==196==    by 0x148CF508: WebCore::MediaPlayer::loadWithNextMediaEngine(WebCore::MediaPlayerFactory const*) (MediaPlayer.cpp:646)
==196==    by 0x148CED64: WebCore::MediaPlayer::load(WebCore::MediaStreamPrivate&) (MediaPlayer.cpp:549)
==196==    by 0x13CF7047: WebCore::HTMLMediaElement::loadResource(WTF::URL const&, WebCore::ContentType&, WTF::String const&) (HTMLMediaElement.cpp:1599)
==196==    by 0x13CF5D70: WebCore::HTMLMediaElement::selectMediaResource()::{lambda()#1}::operator()() const (HTMLMediaElement.cpp:1413)
==196==    by 0x13D291BD: WTF::Detail::CallableWrapper<WebCore::HTMLMediaElement::selectMediaResource()::{lambda()#1}, void>::call() (Function.h:53)
==196==    by 0xD99E63C: WTF::Function<void ()>::operator()() const (Function.h:82)
==196==    by 0x131C31E7: WTF::CancellableTask::operator()() (CancellableTask.h:86)
==196==    by 0x13D2D2DD: WebCore::ActiveDOMObject::queueCancellableTaskKeepingObjectAlive<WebCore::HTMLMediaElement>(WebCore::HTMLMediaElement&, WebCore::TaskSource, WTF::TaskCancellationGroup&, WTF::Function<void ()>&&)::{lambda()#1}::operator()() (ActiveDOMObject.h:119)
==196==    by 0x13D5C88F: WTF::Detail::CallableWrapper<WebCore::ActiveDOMObject::queueCancellableTaskKeepingObjectAlive<WebCore::HTMLMediaElement>(WebCore::HTMLMediaElement&, WebCore::TaskSource, WTF::TaskCancellationGroup&, WTF::Function<void ()>&&)::{lambda()#1}, void>::call() (Function.h:53)
==196==    by 0xD99E63C: WTF::Function<void ()>::operator()() const (Function.h:82)
==196==    by 0x1399229B: WebCore::EventLoopFunctionDispatchTask::execute() (EventLoop.cpp:159)
==196==    by 0x13987D3A: WebCore::EventLoop::run() (EventLoop.cpp:123)
==196==    by 0x13ABF15D: WebCore::WindowEventLoop::didReachTimeToRun() (WindowEventLoop.cpp:121)
==196==    by 0x13AD46FB: void std::__invoke_impl<void, void (WebCore::WindowEventLoop::*&)(), WebCore::WindowEventLoop*&>(std::__invoke_memfun_deref, void (WebCore::WindowEventLoop::*&)(), WebCore::WindowEventLoop*&) (invoke.h:74)
==196==    by 0x13AD4666: std::__invoke_result<void (WebCore::WindowEventLoop::*&)(), WebCore::WindowEventLoop*&>::type std::__invoke<void (WebCore::WindowEventLoop::*&)(), WebCore::WindowEventLoop*&>(void (WebCore::WindowEventLoop::*&)(), WebCore::WindowEventLoop*&) (invoke.h:96)
==196==    by 0x13AD45DC: void std::_Bind<void (WebCore::WindowEventLoop::*(WebCore::WindowEventLoop*))()>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) (functional:420)
==196==    by 0x13AD456E: void std::_Bind<void (WebCore::WindowEventLoop::*(WebCore::WindowEventLoop*))()>::operator()<, void>() (functional:503)
==196==    by 0x13AD4537: WTF::Detail::CallableWrapper<std::_Bind<void (WebCore::WindowEventLoop::*(WebCore::WindowEventLoop*))()>, void>::call() (Function.h:53)
==196==    by 0xD99E63C: WTF::Function<void ()>::operator()() const (Function.h:82)
==196==    by 0xE23D137: WebCore::Timer::fired() (Timer.h:135)
==196==    by 0x146E59EF: WebCore::ThreadTimers::sharedTimerFiredInternal() (ThreadTimers.cpp:127)
==196==    by 0x146E52E4: WebCore::ThreadTimers::setSharedTimer(WebCore::SharedTimer*)::{lambda()#1}::operator()() const (ThreadTimers.cpp:67)
==196==    by 0x146E8407: WTF::Detail::CallableWrapper<WebCore::ThreadTimers::setSharedTimer(WebCore::SharedTimer*)::{lambda()#1}, void>::call() (Function.h:53)
==196==    by 0xD99E63C: WTF::Function<void ()>::operator()() const (Function.h:82)
==196==    by 0x14698311: WebCore::MainThreadSharedTimer::fired() (MainThreadSharedTimer.cpp:83)
==196==    by 0x146A2E9D: void std::__invoke_impl<void, void (WebCore::MainThreadSharedTimer::*&)(), WebCore::MainThreadSharedTimer*&>(std::__invoke_memfun_deref, void (WebCore::MainThreadSharedTimer::*&)(), WebCore::MainThreadSharedTimer*&) (invoke.h:74)
==196==    by 0x146A2E16: std::__invoke_result<void (WebCore::MainThreadSharedTimer::*&)(), WebCore::MainThreadSharedTimer*&>::type std::__invoke<void (WebCore::MainThreadSharedTimer::*&)(), WebCore::MainThreadSharedTimer*&>(void (WebCore::MainThreadSharedTimer::*&)(), WebCore::MainThreadSharedTimer*&) (invoke.h:96)
==196==    by 0x146A2D8C: void std::_Bind<void (WebCore::MainThreadSharedTimer::*(WebCore::MainThreadSharedTimer*))()>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) (functional:420)
==196==    by 0x146A2D1E: void std::_Bind<void (WebCore::MainThreadSharedTimer::*(WebCore::MainThreadSharedTimer*))()>::operator()<, void>() (functional:503)
==196==    by 0x146A2CC7: WTF::Detail::CallableWrapper<std::_Bind<void (WebCore::MainThreadSharedTimer::*(WebCore::MainThreadSharedTimer*))()>, void>::call() (Function.h:53)
==196==    by 0xD99E63C: WTF::Function<void ()>::operator()() const (Function.h:82)
==196==    by 0x146A2CE7: WTF::RunLoop::Timer<WebCore::MainThreadSharedTimer>::fired() (RunLoop.h:188)
==196==    by 0x110196A8: WTF::RunLoop::TimerBase::TimerBase(WTF::RunLoop&)::{lambda(void*)#1}::operator()(void*) const (RunLoopGLib.cpp:177)
==196==    by 0x110196E8: WTF::RunLoop::TimerBase::TimerBase(WTF::RunLoop&)::{lambda(void*)#1}::_FUN(void*) (RunLoopGLib.cpp:181)
==196==    by 0x11018BFA: WTF::RunLoop::{lambda(_GSource*, int (*)(void*), void*)#1}::operator()(_GSource*, int (*)(void*), void*) const (RunLoopGLib.cpp:53)
==196==    by 0x11018C48: WTF::RunLoop::{lambda(_GSource*, int (*)(void*), void*)#1}::_FUN(_GSource*, int (*)(void*), void*) (RunLoopGLib.cpp:56)
==196==    by 0x15F52293: g_main_dispatch (gmain.c:3381)
==196==    by 0x15F52293: g_main_context_dispatch (gmain.c:4099)
==196==    by 0x15F52637: g_main_context_iterate.constprop.0 (gmain.c:4175)
==196==    by 0x15F52942: g_main_loop_run (gmain.c:4373)
==196==    by 0x110192B3: WTF::RunLoop::run() (RunLoopGLib.cpp:108)
==196==    by 0xEFB8674: WebKit::AuxiliaryProcessMainBase<WebKit::WebProcess, true>::run(int, char**) (AuxiliaryProcessMain.h:70)
==196==    by 0xEFB5D26: int WebKit::AuxiliaryProcessMain<WebKit::WebProcessMainWPE>(int, char**) (AuxiliaryProcessMain.h:96)
==196==    by 0xEFB227E: WebKit::WebProcessMain(int, char**) (WebProcessMainWPE.cpp:75)
==196==    by 0x109908: main (WebProcessMain.cpp:31)
==196==

==196== 403 (88 direct, 315 indirect) bytes in 1 blocks are definitely lost in loss record 58,282 of 62,411
==196==    at 0x4840899: malloc (vg_replace_malloc.c:381)
==196==    by 0x15F58728: g_malloc (gmem.c:106)
==196==    by 0x15F710B4: g_slice_alloc (gslice.c:1072)
==196==    by 0x16171683: gst_context_new (gstcontext.c:174)
==196==    by 0x1122BC0A: requestGLContext(char const*) (GLVideoSinkGStreamer.cpp:160)
==196==    by 0x1122BD12: setGLContext(_GstElement*, char const*) (GLVideoSinkGStreamer.cpp:173)
==196==    by 0x1122BE5D: webKitGLVideoSinkChangeState(_GstElement*, GstStateChange) (GLVideoSinkGStreamer.cpp:191)
==196==    by 0x1617FA11: gst_element_change_state (gstelement.c:3083)
==196==    by 0x16180154: gst_element_set_state_func (gstelement.c:3037)
==196==    by 0x40651CE6: activate_sink (gstplaybin3.c:3805)
==196==    by 0x40651CE6: activate_sink.constprop.0 (gstplaybin3.c:3780)
==196==    by 0x40652B3E: activate_group (gstplaybin3.c:4539)
==196==    by 0x40652B3E: setup_next_source (gstplaybin3.c:4801)
==196==    by 0x406542A7: gst_play_bin3_change_state (gstplaybin3.c:5031)
==196==    by 0x1617FA11: gst_element_change_state (gstelement.c:3083)
==196==    by 0x1617FA5A: gst_element_change_state (gstelement.c:3122)
==196==    by 0x16180154: gst_element_set_state_func (gstelement.c:3037)
==196==    by 0x11257BC9: WebCore::MediaPlayerPrivateGStreamer::changePipelineState(GstState) (MediaPlayerPrivateGStreamer.cpp:924)
==196==    by 0x11258D8B: WebCore::MediaPlayerPrivateGStreamer::commitLoad() (MediaPlayerPrivateGStreamer.cpp:1184)
==196==    by 0x1125420B: WebCore::MediaPlayerPrivateGStreamer::load(WTF::String const&) (MediaPlayerPrivateGStreamer.cpp:354)
==196==    by 0x112542F4: WebCore::MediaPlayerPrivateGStreamer::load(WebCore::MediaStreamPrivate&) (MediaPlayerPrivateGStreamer.cpp:370)
==196==    by 0x148CF508: WebCore::MediaPlayer::loadWithNextMediaEngine(WebCore::MediaPlayerFactory const*) (MediaPlayer.cpp:646)
==196==    by 0x148CED64: WebCore::MediaPlayer::load(WebCore::MediaStreamPrivate&) (MediaPlayer.cpp:549)
==196==    by 0x13CF7047: WebCore::HTMLMediaElement::loadResource(WTF::URL const&, WebCore::ContentType&, WTF::String const&) (HTMLMediaElement.cpp:1599)
==196==    by 0x13CF5D70: WebCore::HTMLMediaElement::selectMediaResource()::{lambda()#1}::operator()() const (HTMLMediaElement.cpp:1413)
==196==    by 0x13D291BD: WTF::Detail::CallableWrapper<WebCore::HTMLMediaElement::selectMediaResource()::{lambda()#1}, void>::call() (Function.h:53)
==196==    by 0xD99E63C: WTF::Function<void ()>::operator()() const (Function.h:82)
==196==    by 0x131C31E7: WTF::CancellableTask::operator()() (CancellableTask.h:86)
==196==    by 0x13D2D2DD: WebCore::ActiveDOMObject::queueCancellableTaskKeepingObjectAlive<WebCore::HTMLMediaElement>(WebCore::HTMLMediaElement&, WebCore::TaskSource, WTF::TaskCancellationGroup&, WTF::Function<void ()>&&)::{lambda()#1}::operator()() (ActiveDOMObject.h:119)
==196==    by 0x13D5C88F: WTF::Detail::CallableWrapper<WebCore::ActiveDOMObject::queueCancellableTaskKeepingObjectAlive<WebCore::HTMLMediaElement>(WebCore::HTMLMediaElement&, WebCore::TaskSource, WTF::TaskCancellationGroup&, WTF::Function<void ()>&&)::{lambda()#1}, void>::call() (Function.h:53)
==196==    by 0xD99E63C: WTF::Function<void ()>::operator()() const (Function.h:82)
==196==    by 0x1399229B: WebCore::EventLoopFunctionDispatchTask::execute() (EventLoop.cpp:159)
==196==    by 0x13987D3A: WebCore::EventLoop::run() (EventLoop.cpp:123)
==196==    by 0x13ABF15D: WebCore::WindowEventLoop::didReachTimeToRun() (WindowEventLoop.cpp:121)
==196==    by 0x13AD46FB: void std::__invoke_impl<void, void (WebCore::WindowEventLoop::*&)(), WebCore::WindowEventLoop*&>(std::__invoke_memfun_deref, void (WebCore::WindowEventLoop::*&)(), WebCore::WindowEventLoop*&) (invoke.h:74)
==196==    by 0x13AD4666: std::__invoke_result<void (WebCore::WindowEventLoop::*&)(), WebCore::WindowEventLoop*&>::type std::__invoke<void (WebCore::WindowEventLoop::*&)(), WebCore::WindowEventLoop*&>(void (WebCore::WindowEventLoop::*&)(), WebCore::WindowEventLoop*&) (invoke.h:96)
==196==    by 0x13AD45DC: void std::_Bind<void (WebCore::WindowEventLoop::*(WebCore::WindowEventLoop*))()>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) (functional:420)
==196==    by 0x13AD456E: void std::_Bind<void (WebCore::WindowEventLoop::*(WebCore::WindowEventLoop*))()>::operator()<, void>() (functional:503)
==196==    by 0x13AD4537: WTF::Detail::CallableWrapper<std::_Bind<void (WebCore::WindowEventLoop::*(WebCore::WindowEventLoop*))()>, void>::call() (Function.h:53)
==196==    by 0xD99E63C: WTF::Function<void ()>::operator()() const (Function.h:82)
==196==    by 0xE23D137: WebCore::Timer::fired() (Timer.h:135)
==196==    by 0x146E59EF: WebCore::ThreadTimers::sharedTimerFiredInternal() (ThreadTimers.cpp:127)
==196==    by 0x146E52E4: WebCore::ThreadTimers::setSharedTimer(WebCore::SharedTimer*)::{lambda()#1}::operator()() const (ThreadTimers.cpp:67)
==196==    by 0x146E8407: WTF::Detail::CallableWrapper<WebCore::ThreadTimers::setSharedTimer(WebCore::SharedTimer*)::{lambda()#1}, void>::call() (Function.h:53)
==196==    by 0xD99E63C: WTF::Function<void ()>::operator()() const (Function.h:82)
==196==    by 0x14698311: WebCore::MainThreadSharedTimer::fired() (MainThreadSharedTimer.cpp:83)
==196==    by 0x146A2E9D: void std::__invoke_impl<void, void (WebCore::MainThreadSharedTimer::*&)(), WebCore::MainThreadSharedTimer*&>(std::__invoke_memfun_deref, void (WebCore::MainThreadSharedTimer::*&)(), WebCore::MainThreadSharedTimer*&) (invoke.h:74)
==196==    by 0x146A2E16: std::__invoke_result<void (WebCore::MainThreadSharedTimer::*&)(), WebCore::MainThreadSharedTimer*&>::type std::__invoke<void (WebCore::MainThreadSharedTimer::*&)(), WebCore::MainThreadSharedTimer*&>(void (WebCore::MainThreadSharedTimer::*&)(), WebCore::MainThreadSharedTimer*&) (invoke.h:96)
==196==    by 0x146A2D8C: void std::_Bind<void (WebCore::MainThreadSharedTimer::*(WebCore::MainThreadSharedTimer*))()>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) (functional:420)
==196==    by 0x146A2D1E: void std::_Bind<void (WebCore::MainThreadSharedTimer::*(WebCore::MainThreadSharedTimer*))()>::operator()<, void>() (functional:503)
==196==    by 0x146A2CC7: WTF::Detail::CallableWrapper<std::_Bind<void (WebCore::MainThreadSharedTimer::*(WebCore::MainThreadSharedTimer*))()>, void>::call() (Function.h:53)
==196==    by 0xD99E63C: WTF::Function<void ()>::operator()() const (Function.h:82)
==196==    by 0x146A2CE7: WTF::RunLoop::Timer<WebCore::MainThreadSharedTimer>::fired() (RunLoop.h:188)
==196==    by 0x110196A8: WTF::RunLoop::TimerBase::TimerBase(WTF::RunLoop&)::{lambda(void*)#1}::operator()(void*) const (RunLoopGLib.cpp:177)
==196==    by 0x110196E8: WTF::RunLoop::TimerBase::TimerBase(WTF::RunLoop&)::{lambda(void*)#1}::_FUN(void*) (RunLoopGLib.cpp:181)
==196==    by 0x11018BFA: WTF::RunLoop::{lambda(_GSource*, int (*)(void*), void*)#1}::operator()(_GSource*, int (*)(void*), void*) const (RunLoopGLib.cpp:53)
==196==    by 0x11018C48: WTF::RunLoop::{lambda(_GSource*, int (*)(void*), void*)#1}::_FUN(_GSource*, int (*)(void*), void*) (RunLoopGLib.cpp:56)
==196==    by 0x15F52293: g_main_dispatch (gmain.c:3381)
==196==    by 0x15F52293: g_main_context_dispatch (gmain.c:4099)
==196==    by 0x15F52637: g_main_context_iterate.constprop.0 (gmain.c:4175)
==196==    by 0x15F52942: g_main_loop_run (gmain.c:4373)
==196==    by 0x110192B3: WTF::RunLoop::run() (RunLoopGLib.cpp:108)
==196==    by 0xEFB8674: WebKit::AuxiliaryProcessMainBase<WebKit::WebProcess, true>::run(int, char**) (AuxiliaryProcessMain.h:70)
==196==    by 0xEFB5D26: int WebKit::AuxiliaryProcessMain<WebKit::WebProcessMainWPE>(int, char**) (AuxiliaryProcessMain.h:96)
==196==    by 0xEFB227E: WebKit::WebProcessMain(int, char**) (WebProcessMainWPE.cpp:75)
==196==    by 0x109908: main (WebProcessMain.cpp:31)
==196==

* Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:
(requestGLContext):
(setGLContext):

Canonical link: https://commits.webkit.org/252340@main
pulkomandy pushed a commit that referenced this pull request Jul 16, 2022
…tureMapperFlags

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

Reviewed by Xabier Rodriguez-Calvar.

Fixes:
==195== Conditional jump or move depends on uninitialised value(s)
==195==    at 0x11429778: WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper(WebCore::TextureMapper&, WebCore::FloatRect const&, WebCore::TransformationMatrix const&, float) (TextureMapperPlatformLayerBuffer.cpp:112)
==195==    by 0x11403DDD: WebCore::TextureMapperLayer::paintSelf(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:202)
==195==    by 0x114042D4: WebCore::TextureMapperLayer::paintSelfAndChildren(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:255)
==195==    by 0x114049D4: WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:319)
==195==    by 0x1140683D: WebCore::TextureMapperLayer::paintSelfChildrenReplicaFilterAndMask(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:563)
==195==    by 0x11406903: WebCore::TextureMapperLayer::paintRecursive(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:576)
==195==    by 0x114046C9: WebCore::TextureMapperLayer::paintSelfAndChildren(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:283)
==195==    by 0x114049D4: WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:319)
==195==    by 0x1140683D: WebCore::TextureMapperLayer::paintSelfChildrenReplicaFilterAndMask(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:563)
==195==    by 0x11406903: WebCore::TextureMapperLayer::paintRecursive(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:576)
==195==    by 0x114046C9: WebCore::TextureMapperLayer::paintSelfAndChildren(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:283)
==195==    by 0x114049D4: WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:319)
==195==    by 0x1140683D: WebCore::TextureMapperLayer::paintSelfChildrenReplicaFilterAndMask(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:563)
==195==    by 0x11406903: WebCore::TextureMapperLayer::paintRecursive(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:576)
==195==    by 0x114046C9: WebCore::TextureMapperLayer::paintSelfAndChildren(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:283)
==195==    by 0x114049D4: WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:319)
==195==    by 0x1140683D: WebCore::TextureMapperLayer::paintSelfChildrenReplicaFilterAndMask(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:563)
==195==    by 0x11406903: WebCore::TextureMapperLayer::paintRecursive(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:576)
==195==    by 0x114046C9: WebCore::TextureMapperLayer::paintSelfAndChildren(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:283)
==195==    by 0x114049D4: WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:319)
==195==    by 0x1140683D: WebCore::TextureMapperLayer::paintSelfChildrenReplicaFilterAndMask(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:563)
==195==    by 0x11406903: WebCore::TextureMapperLayer::paintRecursive(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:576)
==195==    by 0x114046C9: WebCore::TextureMapperLayer::paintSelfAndChildren(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:283)
==195==    by 0x114049D4: WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:319)
==195==    by 0x1140683D: WebCore::TextureMapperLayer::paintSelfChildrenReplicaFilterAndMask(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:563)
==195==    by 0x11406903: WebCore::TextureMapperLayer::paintRecursive(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:576)
==195==    by 0x114046C9: WebCore::TextureMapperLayer::paintSelfAndChildren(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:283)
==195==    by 0x114049D4: WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:319)
==195==    by 0x1140683D: WebCore::TextureMapperLayer::paintSelfChildrenReplicaFilterAndMask(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:563)
==195==    by 0x11406903: WebCore::TextureMapperLayer::paintRecursive(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:576)
==195==    by 0x114046C9: WebCore::TextureMapperLayer::paintSelfAndChildren(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:283)
==195==    by 0x114049D4: WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:319)
==195==    by 0x1140683D: WebCore::TextureMapperLayer::paintSelfChildrenReplicaFilterAndMask(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:563)
==195==    by 0x11406903: WebCore::TextureMapperLayer::paintRecursive(WebCore::TextureMapperPaintOptions&) (TextureMapperLayer.cpp:576)
==195==    by 0x11403586: WebCore::TextureMapperLayer::paint(WebCore::TextureMapper&) (TextureMapperLayer.cpp:145)
==195==    by 0xE6C2F6B: WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext(WebCore::TransformationMatrix const&, WebCore::FloatRect const&, unsigned int) (CoordinatedGraphicsScene.cpp:78)
==195==    by 0xE6E47A2: WebKit::ThreadedCompositor::renderLayerTree() (ThreadedCompositor.cpp:240)
==195==    by 0xE6E3762: WebKit::ThreadedCompositor::ThreadedCompositor(WebKit::ThreadedCompositor::Client&, WebKit::ThreadedDisplayRefreshMonitor::Client&, unsigned int, WebCore::IntSize const&, float, unsigned int)::{lambda()#1}::operator()() const (ThreadedCompositor.cpp:58)
==195==    by 0xE6E83FD: WTF::Detail::CallableWrapper<WebKit::ThreadedCompositor::ThreadedCompositor(WebKit::ThreadedCompositor::Client&, WebKit::ThreadedDisplayRefreshMonitor::Client&, unsigned int, WebCore::IntSize const&, float, unsigned int)::{lambda()#1}, void>::call() (Function.h:53)
==195==    by 0xD9D7F1C: WTF::Function<void ()>::operator()() const (Function.h:82)
==195==    by 0xE6C660B: WebKit::CompositingRunLoop::updateTimerFired() (CompositingRunLoop.cpp:188)
==195==    by 0xE6E33EF: void std::__invoke_impl<void, void (WebKit::CompositingRunLoop::*&)(), WebKit::CompositingRunLoop*&>(std::__invoke_memfun_deref, void (WebKit::CompositingRunLoop::*&)(), WebKit::CompositingRunLoop*&) (invoke.h:74)
==195==    by 0xE6E3368: std::__invoke_result<void (WebKit::CompositingRunLoop::*&)(), WebKit::CompositingRunLoop*&>::type std::__invoke<void (WebKit::CompositingRunLoop::*&)(), WebKit::CompositingRunLoop*&>(void (WebKit::CompositingRunLoop::*&)(), WebKit::CompositingRunLoop*&) (invoke.h:96)
==195==    by 0xE6E32DE: void std::_Bind<void (WebKit::CompositingRunLoop::*(WebKit::CompositingRunLoop*))()>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) (functional:420)
==195==    by 0xE6E3270: void std::_Bind<void (WebKit::CompositingRunLoop::*(WebKit::CompositingRunLoop*))()>::operator()<, void>() (functional:503)
==195==    by 0xE6E3219: WTF::Detail::CallableWrapper<std::_Bind<void (WebKit::CompositingRunLoop::*(WebKit::CompositingRunLoop*))()>, void>::call() (Function.h:53)
==195==    by 0xD9D7F1C: WTF::Function<void ()>::operator()() const (Function.h:82)
==195==    by 0xE6E3239: WTF::RunLoop::Timer<WebKit::CompositingRunLoop>::fired() (RunLoop.h:188)
==195==    by 0x1108296A: WTF::RunLoop::TimerBase::TimerBase(WTF::RunLoop&)::{lambda(void*)#1}::operator()(void*) const (RunLoopGLib.cpp:177)
==195==    by 0x110829AA: WTF::RunLoop::TimerBase::TimerBase(WTF::RunLoop&)::{lambda(void*)#1}::_FUN(void*) (RunLoopGLib.cpp:181)
==195==    by 0x11081EBC: WTF::RunLoop::{lambda(_GSource*, int (*)(void*), void*)#1}::operator()(_GSource*, int (*)(void*), void*) const (RunLoopGLib.cpp:53)
==195==    by 0x11081F0A: WTF::RunLoop::{lambda(_GSource*, int (*)(void*), void*)#1}::_FUN(_GSource*, int (*)(void*), void*) (RunLoopGLib.cpp:56)
==195==    by 0x15FB8293: g_main_dispatch (gmain.c:3381)
==195==    by 0x15FB8293: g_main_context_dispatch (gmain.c:4099)
==195==    by 0x15FB8637: g_main_context_iterate.constprop.0 (gmain.c:4175)
==195==    by 0x15FB8942: g_main_loop_run (gmain.c:4373)
==195==    by 0x11082575: WTF::RunLoop::run() (RunLoopGLib.cpp:108)
==195==    by 0xE6C5CB2: WebKit::createRunLoop()::{lambda()#1}::operator()() const (CompositingRunLoop.cpp:49)
==195==    by 0xE6CADE5: WTF::Detail::CallableWrapper<WebKit::createRunLoop()::{lambda()#1}, void>::call() (Function.h:53)
==195==    by 0xD9D7F1C: WTF::Function<void ()>::operator()() const (Function.h:82)
==195==    by 0x10FDF034: WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) (Threading.cpp:236)
==195==    by 0x1108F1BC: WTF::wtfThreadEntryPoint(void*) (ThreadingPOSIX.cpp:242)
==195==    by 0x18A463B9: start_thread (pthread_create.c:481)
==195==    by 0x16782952: clone (clone.S:95)
==195==  Uninitialised value was created by a heap allocation
==195==    at 0x4840899: malloc (vg_replace_malloc.c:381)
==195==    by 0x10F92F47: WTF::fastMalloc(unsigned long) (FastMalloc.cpp:232)
==195==    by 0x112E0165: WebCore::MediaPlayerPrivateGStreamer::operator new(unsigned long) (MediaPlayerPrivateGStreamer.h:128)
==195==    by 0x112E5BB3: std::_MakeUniq<WebCore::MediaPlayerPrivateGStreamer>::__single_object std::make_unique<WebCore::MediaPlayerPrivateGStreamer, WebCore::MediaPlayer*&>(WebCore::MediaPlayer*&) (unique_ptr.h:962)
==195==    by 0x112E24B9: decltype(auto) WTF::makeUnique<WebCore::MediaPlayerPrivateGStreamer, WebCore::MediaPlayer*&>(WebCore::MediaPlayer*&) (StdLibExtras.h:540)
==195==    by 0x112E2509: WebCore::MediaPlayerFactoryGStreamer::createMediaEnginePlayer(WebCore::MediaPlayer*) const (MediaPlayerPrivateGStreamer.cpp:288)
==195==    by 0x149351A3: WebCore::MediaPlayer::loadWithNextMediaEngine(WebCore::MediaPlayerFactory const*) (MediaPlayer.cpp:625)
==195==    by 0x14934C7E: WebCore::MediaPlayer::load(WebCore::MediaStreamPrivate&) (MediaPlayer.cpp:549)
==195==    by 0x13D5FCA5: WebCore::HTMLMediaElement::loadResource(WTF::URL const&, WebCore::ContentType&, WTF::String const&) (HTMLMediaElement.cpp:1599)
==195==    by 0x13D5E9CE: WebCore::HTMLMediaElement::selectMediaResource()::{lambda()#1}::operator()() const (HTMLMediaElement.cpp:1413)
==195==    by 0x13D91E1B: WTF::Detail::CallableWrapper<WebCore::HTMLMediaElement::selectMediaResource()::{lambda()#1}, void>::call() (Function.h:53)
==195==    by 0xD9D7F1C: WTF::Function<void ()>::operator()() const (Function.h:82)
==195==    by 0x1322C265: WTF::CancellableTask::operator()() (CancellableTask.h:86)
==195==    by 0x13D95F3B: WebCore::ActiveDOMObject::queueCancellableTaskKeepingObjectAlive<WebCore::HTMLMediaElement>(WebCore::HTMLMediaElement&, WebCore::TaskSource, WTF::TaskCancellationGroup&, WTF::Function<void ()>&&)::{lambda()#1}::operator()() (ActiveDOMObject.h:119)
==195==    by 0x13DC54ED: WTF::Detail::CallableWrapper<WebCore::ActiveDOMObject::queueCancellableTaskKeepingObjectAlive<WebCore::HTMLMediaElement>(WebCore::HTMLMediaElement&, WebCore::TaskSource, WTF::TaskCancellationGroup&, WTF::Function<void ()>&&)::{lambda()#1}, void>::call() (Function.h:53)
==195==    by 0xD9D7F1C: WTF::Function<void ()>::operator()() const (Function.h:82)
==195==    by 0x139FB2B1: WebCore::EventLoopFunctionDispatchTask::execute() (EventLoop.cpp:159)
==195==    by 0x139F0D50: WebCore::EventLoop::run() (EventLoop.cpp:123)
==195==    by 0x13B2815F: WebCore::WindowEventLoop::didReachTimeToRun() (WindowEventLoop.cpp:121)
==195==    by 0x13B3D6FD: void std::__invoke_impl<void, void (WebCore::WindowEventLoop::*&)(), WebCore::WindowEventLoop*&>(std::__invoke_memfun_deref, void (WebCore::WindowEventLoop::*&)(), WebCore::WindowEventLoop*&) (invoke.h:74)
==195==    by 0x13B3D668: std::__invoke_result<void (WebCore::WindowEventLoop::*&)(), WebCore::WindowEventLoop*&>::type std::__invoke<void (WebCore::WindowEventLoop::*&)(), WebCore::WindowEventLoop*&>(void (WebCore::WindowEventLoop::*&)(), WebCore::WindowEventLoop*&) (invoke.h:96)
==195==    by 0x13B3D5DE: void std::_Bind<void (WebCore::WindowEventLoop::*(WebCore::WindowEventLoop*))()>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) (functional:420)
==195==    by 0x13B3D570: void std::_Bind<void (WebCore::WindowEventLoop::*(WebCore::WindowEventLoop*))()>::operator()<, void>() (functional:503)
==195==    by 0x13B3D539: WTF::Detail::CallableWrapper<std::_Bind<void (WebCore::WindowEventLoop::*(WebCore::WindowEventLoop*))()>, void>::call() (Function.h:53)
==195==    by 0xD9D7F1C: WTF::Function<void ()>::operator()() const (Function.h:82)
==195==    by 0xE2769FD: WebCore::Timer::fired() (Timer.h:135)
==195==    by 0x1474B909: WebCore::ThreadTimers::sharedTimerFiredInternal() (ThreadTimers.cpp:127)
==195==    by 0x1474B1FE: WebCore::ThreadTimers::setSharedTimer(WebCore::SharedTimer*)::{lambda()#1}::operator()() const (ThreadTimers.cpp:67)
==195==    by 0x1474E321: WTF::Detail::CallableWrapper<WebCore::ThreadTimers::setSharedTimer(WebCore::SharedTimer*)::{lambda()#1}, void>::call() (Function.h:53)
==195==    by 0xD9D7F1C: WTF::Function<void ()>::operator()() const (Function.h:82)
==195==    by 0x146FE25D: WebCore::MainThreadSharedTimer::fired() (MainThreadSharedTimer.cpp:83)
==195==    by 0x14708DE9: void std::__invoke_impl<void, void (WebCore::MainThreadSharedTimer::*&)(), WebCore::MainThreadSharedTimer*&>(std::__invoke_memfun_deref, void (WebCore::MainThreadSharedTimer::*&)(), WebCore::MainThreadSharedTimer*&) (invoke.h:74)
==195==    by 0x14708D62: std::__invoke_result<void (WebCore::MainThreadSharedTimer::*&)(), WebCore::MainThreadSharedTimer*&>::type std::__invoke<void (WebCore::MainThreadSharedTimer::*&)(), WebCore::MainThreadSharedTimer*&>(void (WebCore::MainThreadSharedTimer::*&)(), WebCore::MainThreadSharedTimer*&) (invoke.h:96)
==195==    by 0x14708CD8: void std::_Bind<void (WebCore::MainThreadSharedTimer::*(WebCore::MainThreadSharedTimer*))()>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) (functional:420)
==195==    by 0x14708C6A: void std::_Bind<void (WebCore::MainThreadSharedTimer::*(WebCore::MainThreadSharedTimer*))()>::operator()<, void>() (functional:503)
==195==    by 0x14708C13: WTF::Detail::CallableWrapper<std::_Bind<void (WebCore::MainThreadSharedTimer::*(WebCore::MainThreadSharedTimer*))()>, void>::call() (Function.h:53)
==195==    by 0xD9D7F1C: WTF::Function<void ()>::operator()() const (Function.h:82)
==195==    by 0x14708C33: WTF::RunLoop::Timer<WebCore::MainThreadSharedTimer>::fired() (RunLoop.h:188)
==195==    by 0x1108296A: WTF::RunLoop::TimerBase::TimerBase(WTF::RunLoop&)::{lambda(void*)#1}::operator()(void*) const (RunLoopGLib.cpp:177)
==195==    by 0x110829AA: WTF::RunLoop::TimerBase::TimerBase(WTF::RunLoop&)::{lambda(void*)#1}::_FUN(void*) (RunLoopGLib.cpp:181)
==195==    by 0x11081EBC: WTF::RunLoop::{lambda(_GSource*, int (*)(void*), void*)#1}::operator()(_GSource*, int (*)(void*), void*) const (RunLoopGLib.cpp:53)
==195==    by 0x11081F0A: WTF::RunLoop::{lambda(_GSource*, int (*)(void*), void*)#1}::_FUN(_GSource*, int (*)(void*), void*) (RunLoopGLib.cpp:56)
==195==    by 0x15FB8293: g_main_dispatch (gmain.c:3381)
==195==    by 0x15FB8293: g_main_context_dispatch (gmain.c:4099)
==195==    by 0x15FB8637: g_main_context_iterate.constprop.0 (gmain.c:4175)
==195==    by 0x15FB8942: g_main_loop_run (gmain.c:4373)
==195==    by 0x11082575: WTF::RunLoop::run() (RunLoopGLib.cpp:108)
==195==    by 0xF024098: WebKit::AuxiliaryProcessMainBase<WebKit::WebProcess, true>::run(int, char**) (AuxiliaryProcessMain.h:70)
==195==    by 0xF02174A: int WebKit::AuxiliaryProcessMain<WebKit::WebProcessMainWPE>(int, char**) (AuxiliaryProcessMain.h:96)
==195==    by 0xF01DCA2: WebKit::WebProcessMain(int, char**) (WebProcessMainWPE.cpp:75)
==195==    by 0x109918: main (WebProcessMain.cpp:31)
==195==

* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

Canonical link: https://commits.webkit.org/252393@main
pulkomandy pushed a commit that referenced this pull request Jul 16, 2022
…us wrapper

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

Reviewed by Antti Koivisto.

When the anonymous block wrapper for an inline level child is not needed anymore (sibling block is removed or became non-inflow), we
1. detach the inline level child (and its subtree)
2. destroy the anonymous wrapper
3. re-attach the inline level child under the new parent (most likely the parent of the destroyed anonymous wrapper)

We call this re-parenting activity an "internal move".
Certain properties (e.g fragmentation state) are not supposed to change during this type of move (we simply stop calling some "reset" functions when RenderObject::IsInternalMove::Yes)

This patch ensures that the internal move flag is set for both #1 and #3.

* Source/WebCore/rendering/RenderBlockFlow.cpp: drive-by fix to ensure no ruby content gets multi-column context.
(WebCore::RenderBlockFlow::willCreateColumns const):
* Source/WebCore/rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::removeAnonymousWrappersForInlineChildrenIfNeeded): Make sure both detach and attach are covered with the "internal move" flag as currently only the attach is covered. It means that whatever flags we reset at detach (not an internal move) we don't set back on attach (internal move).

Canonical link: https://commits.webkit.org/252456@main
pulkomandy pushed a commit that referenced this pull request Jul 16, 2022
https://bugs.webkit.org/show_bug.cgi?id=242517

Reviewed by Darin Adler.

We need to initialize processIdentifier as it is accessed by the
equality operator for GlobalWindowIdentifier.

Fixes the following valgrind error:
==137== Conditional jump or move depends on uninitialised value(s)
==137==    at 0x144770C4: WebCore::operator==(WebCore::GlobalWindowIdentifier const&, WebCore::GlobalWindowIdentifier const&) (GlobalWindowIdentifier.h:49)
==137==    by 0x1447715D: WTF::GlobalWindowIdentifierHash::equal(WebCore::GlobalWindowIdentifier const&, WebCore::GlobalWindowIdentifier const&) (GlobalWindowIdentifier.h:85)
==137==    by 0x1447ACBA: bool WTF::HashMapTranslator<WTF::HashMap<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*, WTF::DefaultHash<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::AbstractDOMWindow*>, WTF::HashTableTraits>::KeyValuePairTraits, WTF::DefaultHash<WebCore::GlobalWindowIdentifier> >::equal<WebCore::GlobalWindowIdentifier, WebCore::GlobalWindowIdentifier>(WebCore::GlobalWindowIdentifier const&, WebCore::GlobalWindowIdentifier const&) (HashMap.h:229)
==137==    by 0x1447AAEB: void WTF::HashTable<WebCore::GlobalWindowIdentifier, WTF::KeyValuePair<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*>, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*> >, WTF::DefaultHash<WebCore::GlobalWindowIdentifier>, WTF::HashMap<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*, WTF::DefaultHash<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::AbstractDOMWindow*>, WTF::HashTableTraits>::KeyValuePairTraits, WTF::HashTraits<WebCore::GlobalWindowIdentifier> >::checkKey<WTF::HashMapTranslator<WTF::HashMap<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*, WTF::DefaultHash<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::AbstractDOMWindow*>, WTF::HashTableTraits>::KeyValuePairTraits, WTF::DefaultHash<WebCore::GlobalWindowIdentifier> >, WebCore::GlobalWindowIdentifier>(WebCore::GlobalWindowIdentifier const&) (HashTable.h:664)
==137==    by 0x14479888: WTF::HashTableAddResult<WTF::HashTableIterator<WTF::HashTable<WebCore::GlobalWindowIdentifier, WTF::KeyValuePair<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*>, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*> >, WTF::DefaultHash<WebCore::GlobalWindowIdentifier>, WTF::HashMap<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*, WTF::DefaultHash<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::AbstractDOMWindow*>, WTF::HashTableTraits>::KeyValuePairTraits, WTF::HashTraits<WebCore::GlobalWindowIdentifier> >, WebCore::GlobalWindowIdentifier, WTF::KeyValuePair<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*>, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*> >, WTF::DefaultHash<WebCore::GlobalWindowIdentifier>, WTF::HashMap<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*, WTF::DefaultHash<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::AbstractDOMWindow*>, WTF::HashTableTraits>::KeyValuePairTraits, WTF::HashTraits<WebCore::GlobalWindowIdentifier> > > WTF::HashTable<WebCore::GlobalWindowIdentifier, WTF::KeyValuePair<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*>, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*> >, WTF::DefaultHash<WebCore::GlobalWindowIdentifier>, WTF::HashMap<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*, WTF::DefaultHash<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::AbstractDOMWindow*>, WTF::HashTableTraits>::KeyValuePairTraits, WTF::HashTraits<WebCore::GlobalWindowIdentifier> >::add<WTF::HashMapTranslator<WTF::HashMap<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*, WTF::DefaultHash<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::AbstractDOMWindow*>, WTF::HashTableTraits>::KeyValuePairTraits, WTF::DefaultHash<WebCore::GlobalWindowIdentifier> >, WebCore::GlobalWindowIdentifier const&, WebCore::AbstractDOMWindow*>(WebCore::GlobalWindowIdentifier const&, WebCore::AbstractDOMWindow*&&) (HashTable.h:932)
==137==    by 0x1447895D: WTF::HashTableAddResult<WTF::HashTableIterator<WTF::HashTable<WebCore::GlobalWindowIdentifier, WTF::KeyValuePair<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*>, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*> >, WTF::DefaultHash<WebCore::GlobalWindowIdentifier>, WTF::HashMap<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*, WTF::DefaultHash<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::AbstractDOMWindow*>, WTF::HashTableTraits>::KeyValuePairTraits, WTF::HashTraits<WebCore::GlobalWindowIdentifier> >, WebCore::GlobalWindowIdentifier, WTF::KeyValuePair<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*>, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*> >, WTF::DefaultHash<WebCore::GlobalWindowIdentifier>, WTF::HashMap<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*, WTF::DefaultHash<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::AbstractDOMWindow*>, WTF::HashTableTraits>::KeyValuePairTraits, WTF::HashTraits<WebCore::GlobalWindowIdentifier> > > WTF::HashMap<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*, WTF::DefaultHash<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::AbstractDOMWindow*>, WTF::HashTableTraits>::inlineAdd<WebCore::GlobalWindowIdentifier const&, WebCore::AbstractDOMWindow*>(WebCore::GlobalWindowIdentifier const&, WebCore::AbstractDOMWindow*&&) (HashMap.h:382)
==137==    by 0x1447795B: WTF::HashTableAddResult<WTF::HashTableIterator<WTF::HashTable<WebCore::GlobalWindowIdentifier, WTF::KeyValuePair<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*>, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*> >, WTF::DefaultHash<WebCore::GlobalWindowIdentifier>, WTF::HashMap<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*, WTF::DefaultHash<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::AbstractDOMWindow*>, WTF::HashTableTraits>::KeyValuePairTraits, WTF::HashTraits<WebCore::GlobalWindowIdentifier> >, WebCore::GlobalWindowIdentifier, WTF::KeyValuePair<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*>, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*> >, WTF::DefaultHash<WebCore::GlobalWindowIdentifier>, WTF::HashMap<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*, WTF::DefaultHash<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::AbstractDOMWindow*>, WTF::HashTableTraits>::KeyValuePairTraits, WTF::HashTraits<WebCore::GlobalWindowIdentifier> > > WTF::HashMap<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*, WTF::DefaultHash<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::AbstractDOMWindow*>, WTF::HashTableTraits>::add<WebCore::AbstractDOMWindow*>(WebCore::GlobalWindowIdentifier const&, WebCore::AbstractDOMWindow*&&) (HashMap.h:417)
==137==    by 0x144705B3: WebCore::AbstractDOMWindow::AbstractDOMWindow(WebCore::GlobalWindowIdentifier&&) (AbstractDOMWindow.cpp:48)
==137==    by 0x1448AA3C: WebCore::DOMWindow::DOMWindow(WebCore::Document&) (DOMWindow.cpp:405)
==137==    by 0x1392F767: WebCore::DOMWindow::create(WebCore::Document&) (DOMWindow.h:124)
==137==    by 0x139026F1: WebCore::Document::createDOMWindow() (Document.cpp:5119)
==137==    by 0x142DD1B7: WebCore::DocumentWriter::begin(WTF::URL const&, bool, WebCore::Document*, WebCore::ProcessQualified<WTF::UUID>)::{lambda()#1}::operator()() const (DocumentWriter.cpp:165)
==137==    by 0x142E61DB: WTF::Detail::CallableWrapper<WebCore::DocumentWriter::begin(WTF::URL const&, bool, WebCore::Document*, WebCore::ProcessQualified<WTF::UUID>)::{lambda()#1}, void>::call() (Function.h:53)
==137==    by 0xD9D5E94: WTF::Function<void ()>::operator()() const (Function.h:82)
==137==    by 0x1431A333: WebCore::FrameLoader::clear(WTF::RefPtr<WebCore::Document, WTF::RawPtrTraits<WebCore::Document>, WTF::DefaultRefDerefTraits<WebCore::Document> >&&, bool, bool, bool, WTF::Function<void ()>&&) (FrameLoader.cpp:646)
==137==    by 0x142DD5B1: WebCore::DocumentWriter::begin(WTF::URL const&, bool, WebCore::Document*, WebCore::ProcessQualified<WTF::UUID>) (DocumentWriter.cpp:168)
==137==    by 0x142D05BB: WebCore::DocumentLoader::commitData(WebCore::SharedBuffer const&) (DocumentLoader.cpp:1235)
==137==    by 0x142CAE8C: WebCore::DocumentLoader::finishedLoading() (DocumentLoader.cpp:493)
==137==    by 0x142D44AA: WebCore::DocumentLoader::maybeLoadEmpty() (DocumentLoader.cpp:2038)
==137==    by 0x142D4D93: WebCore::DocumentLoader::startLoadingMainResource() (DocumentLoader.cpp:2065)
==137==    by 0x143188E2: WebCore::FrameLoader::init() (FrameLoader.cpp:351)
==137==    by 0x144DB8BF: WebCore::Frame::init() (Frame.cpp:192)
==137==    by 0xEFD71C5: WebKit::WebFrame::initWithCoreMainFrame(WebKit::WebPage&, WebCore::Frame&) (WebFrame.cpp:115)
==137==    by 0xEF7CECD: WebKit::WebPage::WebPage(WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::WebPageCreationParameters&&) (WebPage.cpp:721)
==137==    by 0xEF7B307: WebKit::WebPage::create(WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::WebPageCreationParameters&&) (WebPage.cpp:461)
==137==    by 0xECA85C2: WebKit::WebProcess::createWebPage(WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::WebPageCreationParameters&&) (WebProcess.cpp:837)
==137==    by 0xDEB4991: void IPC::callMemberFunctionImpl<WebKit::WebProcess, void (WebKit::WebProcess::*)(WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::WebPageCreationParameters&&), std::tuple<WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::WebPageCreationParameters>, 0ul, 1ul>(WebKit::WebProcess*, void (WebKit::WebProcess::*)(WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::WebPageCreationParameters&&), std::tuple<WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::WebPageCreationParameters>&&, std::integer_sequence<unsigned long, 0ul, 1ul>) (HandleMessage.h:131)
==137==    by 0xDEB1B6F: void IPC::callMemberFunction<WebKit::WebProcess, void (WebKit::WebProcess::*)(WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::WebPageCreationParameters&&), std::tuple<WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::WebPageCreationParameters>, std::integer_sequence<unsigned long, 0ul, 1ul> >(std::tuple<WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::WebPageCreationParameters>&&, WebKit::WebProcess*, void (WebKit::WebProcess::*)(WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::WebPageCreationParameters&&)) (HandleMessage.h:137)
==137==    by 0xDEACC26: void IPC::handleMessage<Messages::WebProcess::CreateWebPage, WebKit::WebProcess, void (WebKit::WebProcess::*)(WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::WebPageCreationParameters&&)>(IPC::Connection&, IPC::Decoder&, WebKit::WebProcess*, void (WebKit::WebProcess::*)(WTF::ObjectIdentifier<WebCore::PageIdentifierType>, WebKit::WebPageCreationParameters&&)) (HandleMessage.h:259)
==137==    by 0xDEAA311: WebKit::WebProcess::didReceiveWebProcessMessage(IPC::Connection&, IPC::Decoder&) (WebProcessMessageReceiver.cpp:280)
==137==    by 0xECA8AA3: WebKit::WebProcess::didReceiveMessage(IPC::Connection&, IPC::Decoder&) (WebProcess.cpp:916)
==137==    by 0xE58AFE3: IPC::Connection::dispatchMessage(IPC::Decoder&) (Connection.cpp:1108)
==137==    by 0xE58B27A: IPC::Connection::dispatchMessage(std::unique_ptr<IPC::Decoder, std::default_delete<IPC::Decoder> >) (Connection.cpp:1153)
==137==    by 0xE58B821: IPC::Connection::dispatchOneIncomingMessage() (Connection.cpp:1222)
==137==    by 0xE58ACF3: IPC::Connection::enqueueIncomingMessage(std::unique_ptr<IPC::Decoder, std::default_delete<IPC::Decoder> >)::{lambda()#1}::operator()() (Connection.cpp:1072)
==137==    by 0xE591DD7: WTF::Detail::CallableWrapper<IPC::Connection::enqueueIncomingMessage(std::unique_ptr<IPC::Decoder, std::default_delete<IPC::Decoder> >)::{lambda()#1}, void>::call() (Function.h:53)
==137==    by 0xD9D5E94: WTF::Function<void ()>::operator()() const (Function.h:82)
==137==    by 0x10FD4BEE: WTF::RunLoop::performWork() (RunLoop.cpp:133)
==137==    by 0x110803FD: WTF::RunLoop::RunLoop()::{lambda(void*)#1}::operator()(void*) const (RunLoopGLib.cpp:80)
==137==    by 0x11080421: WTF::RunLoop::RunLoop()::{lambda(void*)#1}::_FUN(void*) (RunLoopGLib.cpp:82)
==137==    by 0x11080390: WTF::RunLoop::{lambda(_GSource*, int (*)(void*), void*)#1}::operator()(_GSource*, int (*)(void*), void*) const (RunLoopGLib.cpp:53)
==137==    by 0x110803DE: WTF::RunLoop::{lambda(_GSource*, int (*)(void*), void*)#1}::_FUN(_GSource*, int (*)(void*), void*) (RunLoopGLib.cpp:56)
==137==    by 0x15FB4293: g_main_dispatch (gmain.c:3381)
==137==    by 0x15FB4293: g_main_context_dispatch (gmain.c:4099)
==137==    by 0x15FB4637: g_main_context_iterate.constprop.0 (gmain.c:4175)
==137==    by 0x15FB4942: g_main_loop_run (gmain.c:4373)
==137==    by 0x11080A49: WTF::RunLoop::run() (RunLoopGLib.cpp:108)
==137==    by 0xF022010: WebKit::AuxiliaryProcessMainBase<WebKit::WebProcess, true>::run(int, char**) (AuxiliaryProcessMain.h:70)
==137==    by 0xF01F6C2: int WebKit::AuxiliaryProcessMain<WebKit::WebProcessMainWPE>(int, char**) (AuxiliaryProcessMain.h:96)
==137==    by 0xF01BC1A: WebKit::WebProcessMain(int, char**) (WebProcessMainWPE.cpp:75)
==137==    by 0x109918: main (WebProcessMain.cpp:31)
==137==  Uninitialised value was created by a stack allocation
==137==    at 0x1447AA1A: void WTF::HashTable<WebCore::GlobalWindowIdentifier, WTF::KeyValuePair<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*>, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*> >, WTF::DefaultHash<WebCore::GlobalWindowIdentifier>, WTF::HashMap<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*, WTF::DefaultHash<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::AbstractDOMWindow*>, WTF::HashTableTraits>::KeyValuePairTraits, WTF::HashTraits<WebCore::GlobalWindowIdentifier> >::checkKey<WTF::HashMapTranslator<WTF::HashMap<WebCore::GlobalWindowIdentifier, WebCore::AbstractDOMWindow*, WTF::DefaultHash<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::GlobalWindowIdentifier>, WTF::HashTraits<WebCore::AbstractDOMWindow*>, WTF::HashTableTraits>::KeyValuePairTraits, WTF::DefaultHash<WebCore::GlobalWindowIdentifier> >, WebCore::GlobalWindowIdentifier>(WebCore::GlobalWindowIdentifier const&) (HashTable.h:655)
==137==

* Source/WebCore/page/GlobalWindowIdentifier.h:
(WTF::HashTraits<WebCore::GlobalWindowIdentifier>::constructDeletedValue):

Canonical link: https://commits.webkit.org/252473@main
pulkomandy pushed a commit that referenced this pull request Aug 27, 2022
…ing-navigations-and-traversals/tentative/forward-to-pruned-entry.html is flaky

https://bugs.webkit.org/show_bug.cgi?id=243518
<rdar://98082718>

Reviewed by Geoffrey Garen.

The test calls `history.forward()` which determines that the next HistoryItem is #1
and schedules a navigation to #1. The test then does a synchronous fragment navigation,
which prunes the forward HistoryItem from the back/forward list. When the attempt to
navigate to HistoryItem #1 in the async task, it should no longer be part of the
back/forward and thus no navigation should happen.

The navigation to #1 was happening in WebKit however and this was causing the
test to be flaky (since the test checks on a timer to see if the navigation to #1
happened or not).

WebKit was trying to deal with this by checking BackForwardController::containsItem()
in ScheduledHistoryNavigation::fire() and aborting if the BackForwardController no
longer contains the HistoryItem. However, in the WebKit2 implementation, the Back /
Forward list lives in the UIProcess and WebBackForwardListProxy::containsItem() was
failing to ask the UIProcess. Instead, it was relying on the idToHistoryItemMap() map
on the WebProcess side. The issue with this is that the map only gets updated
asynchronously via IPC from the UIProcess. In the context of the test, we may not
have received this IPC from the UIProcess yet when the ScheduledHistoryNavigation
fires since the navigation that pruned the HistoryItem was a synchronous fragment
navigation.

To address the issue, I updated ebBackForwardListProxy::containsItem() to ask the
UIProcess instead of relying on idToHistoryItemMap(), for better reliability.

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::backForwardListContainsItem):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.messages.in:
* Source/WebKit/WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::containsItem const):

Canonical link: https://commits.webkit.org/253121@main
pulkomandy pushed a commit that referenced this pull request Nov 22, 2022
…a rejected promise

https://bugs.webkit.org/show_bug.cgi?id=247785
rdar://102325201

Reviewed by Yusuke Suzuki.

Rest parameter should be caught in async function. So, running this
JavaScript program should print "caught".
```
async function f(...[[]]) { }
f().catch(e => print("caught"));
```

V8 (used console.log)
```
$ node input.js
caught
```

GraalJS
```
$ js input.js
caught
```

https://tc39.es/ecma262/#sec-async-function-definitions
...
AsyncFunctionDeclaration[Yield, Await, Default] :
    async [no LineTerminator here] function BindingIdentifier[?Yield, ?Await] ( FormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
    [+Default] async [no LineTerminator here] function ( FormalParameters[~Yield, +Await] ) { AsyncFunctionBody }

AsyncFunctionExpression :
    async [no LineTerminator here] function BindingIdentifier[~Yield, +Await]opt ( FormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
...

According to the spec, it indicates `FormalParameters` is used for Async
Function, where `FormalParameters` can be converted to `FunctionRestParameter`.

https://tc39.es/ecma262/#sec-parameter-lists
...
FormalParameters[Yield, Await] :
    [empty]
    FunctionRestParameter[?Yield, ?Await]
    FormalParameterList[?Yield, ?Await]
    FormalParameterList[?Yield, ?Await] ,
    FormalParameterList[?Yield, ?Await] , FunctionRestParameter[?Yield, ?Await]
...

And based on RS: EvaluateAsyncFunctionBody, it will invoke the promise.reject
callback function with abrupt value ([[value]] of non-normal completion record).

https://tc39.es/ecma262/#sec-runtime-semantics-evaluateasyncfunctionbody
...
2. Let declResult be Completion(FunctionDeclarationInstantiation(functionObject, argumentsList)).
3. If declResult is an abrupt completion, then
    a. Perform ! Call(promiseCapability.[[Reject]], undefined, « declResult.[[Value]] »).
...

In that case, any non-normal results of evaluating rest parameters should be
caught and passed to the reject callback function.

To resolve this problem, we should allow the emitted RestParameterNode be wrapped
by the catch handler for promise. However, we should remove `m_restParameter` and
emit rest parameter byte code in `initializeDefaultParameterValuesAndSetupFunctionScopeStack`
if we can prove that change has no side effect. In that case, we can only use one
exception handler.

Current fix is to add another exception handler. And move the handler byte codes to
the bottom of code block in order to make other byte codes as much compact as possible.

Input:
```
async function f(arg0, ...[[]]) { }
f();
```

Dumped Byte Codes:
```
...

bb#2
Predecessors: [ #1 ]
[  20] mov                dst:loc9, src:<JSValue()>(const0)
...

bb#3
Predecessors: [ #2 ]
[  29] get_rest_length    dst:loc11, numParametersToSkip:1
...

bb#12
Predecessors: [ #8 #9 #10 ]
[ 138] new_func_exp       dst:loc10, scope:loc4, functionDecl:0
...

bb#13
Predecessors: [ ]
[ 170] catch              exception:loc10, thrownValue:loc8
[ 174] jmp                targetLabel:8(->182)
Successors: [ #15 ]

bb#14
Predecessors: [ #7 #11 ]
[ 176] catch              exception:loc10, thrownValue:loc8
[ 180] jmp                targetLabel:2(->182)
Successors: [ #15 ]

bb#15
Predecessors: [ #13 #14 ]
[ 182] mov                dst:loc12, src:Undefined(const1)
...

Exception Handlers:
	 1: { start: [  20] end: [  29] target: [ 170] } synthesized catch
	 2: { start: [  29] end: [ 138] target: [ 176] } synthesized catch
```

* JSTests/stress/catch-rest-parameter.js: Added.
(throwError):
(shouldThrow):
(async f):
(throwError.async f):
(throwError.async let):
(async let):
(x.async f):
(x):
(async shouldThrow):
* Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::initializeDefaultParameterValuesAndSetupFunctionScopeStack):
* Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:

Canonical link: https://commits.webkit.org/256864@main
pulkomandy pushed a commit that referenced this pull request Mar 5, 2023
https://bugs.webkit.org/show_bug.cgi?id=250196
rdar://98798050

Reviewed by Simon Fraser and Dean Jackson.

WebKit has long accidentally depended on the combination of two somewhat
unusual behavioral quirks in CGIOSurfaceContext:

1) (Source) If you make a CGImageRef from one CGIOSurfaceContext via
CGIOSurfaceContextCreateImage, and mutate the original IOSurface under the hood
(or in a different process) in a way that CGIOSurfaceContext does not know,
CGIOSurfaceContextCreateImage will return the same CGImageRef when called later.

2) (Destination) If you make a CGImageRef from one CGIOSurfaceContext via
CGIOSurfaceContextCreateImage, paint it into a different CGIOSurfaceContext,
then mutate the original IOSurface, and paint the same CGImageRef again,
the updated IOSurface contents will be used the second time.

The second quirk has never worked with unaccelerated CoreGraphics bitmap context
destinations. Instead, in the unaccelerated case, the CGImageRef acts as a
snapshot of the surface at the time it was created.

We've long had code to handle this, forcing CGIOSurfaceContextCreateImage to
re-create the CGImageRef each time we paint it (by drawing an empty rect into
the CGIOSurfaceContext), working around quirk #1 and thus bypassing quirk #2,
if we're painting into an unaccelerated backing store.

It turns out our CG display list backing store implementation behaves like a
CG bitmap context (without quirk #2), and so currently any IOSurfaces painted into
CG display list backing store from a CGImageRef created by CGIOSurfaceContextCreateImage
(but not -CreateImageReference) become stale if painted multiple times.

To avoid this, extend the workaround to apply to any destination context that
claims that it needs the workaround, and use it whenever painting an IOSurface
into anything other than a CGIOSurfaceContext.

* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp:
(WebCore::BifurcatedGraphicsContext::needsCachedNativeImageInvalidationWorkaround):
* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h:
Make BifurcatedGraphicsContext assume the more conservative mode of its two children.

* Source/WebCore/platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::needsCachedNativeImageInvalidationWorkaround):
Assume that by default, GraphicsContexts need the workaround.

* Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContextCG::needsCachedNativeImageInvalidationWorkaround):
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.h:
GraphicsContextCG needs the workaround, except in the IOSurface->IOSurface case.

* Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp:
(WebCore::ImageBufferIOSurfaceBackend::finalizeDrawIntoContext):
Confer with the GraphicsContext about its need for the workaround
instead of hardcoding the behavior here.

* Source/WebKit/Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.mm:
CG display list graphics contexts need the workaround.

Canonical link: https://commits.webkit.org/258586@main
pulkomandy pushed a commit that referenced this pull request Mar 5, 2023
https://bugs.webkit.org/show_bug.cgi?id=251063
rdar://104585575

Reviewed by Mark Lam and Justin Michaud.

This patch enhances CallFrame::dump to support wasm frames in btjs stacktrace.
The example is as follows.

    frame #0: 0x00000001035fca78 JavaScriptCore`JSC::functionBreakpoint(globalObject=0x000000012f410068, callFrame=0x000000016fdfa9d0) at JSDollarVM.cpp:2273:9 [opt]
    frame #1: 0x000000010ec44204 0x10eccc5dc
    frame #2: 0x000000010eccc5dc callback#Dwaxn6 [Baseline bc#50](Undefined)
    frame #3: 0x000000010ec4ca84 wasm-stub [WasmToJS](Wasm::Instance: 0x10d29da40)
    frame #4: 0x000000010ed0c060 <?>.wasm-function[1] [OMG](Wasm::Instance: 0x10d29da40)
    frame #5: 0x000000010ed100d0 jsToWasm#CWTx6k [FTL bc#22](Cell[JSModuleEnvironment]: 0x12f524540, Cell[WebAssemblyFunction]: 0x10d06a3a8, 1, 2, 3)
    frame #6: 0x000000010ec881b0 #D5ymZE [Baseline bc#733](Undefined, Cell[Generator]: 0x12f55c180, 1, Cell[Object]: 0x12f69dfc0, 0, Cell[JSLexicalEnvironment]: 0x12f52cee0)
    frame #7: 0x000000010ec3c008 asyncFunctionResume#A4ayYg [LLInt bc#49](Undefined, Cell[Generator]: 0x12f55c180, Cell[Object]: 0x12f69dfc0, 0)
    frame #8: 0x000000010ec3c008 promiseReactionJobWithoutPromise#D0yDF1 [LLInt bc#25](Undefined, Cell[Function]: 0x12f44f3c0, Cell[Object]: 0x12f69dfc0, Cell[Generator]: 0x12f55c180)
    frame #9: 0x000000010ec80ec0 promiseReactionJob#EdShZz [Baseline bc#74](Undefined, Undefined, Cell[Function]: 0x12f44f3c0, Cell[Object]: 0x12f69dfc0, Cell[Generator]: 0x12f55c180)
    frame #10: 0x000000010ec3c728
    frame #11: 0x0000000103137560 JavaScriptCore`JSC::Interpreter::executeCall(JSC::JSGlobalObject*, JSC::JSObject*, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) [inlined] JSC::JITCode::execute(this=<unavailable>, vm=<unavailable>, protoCallFrame=<unavailable>) at JITCodeInlines.h:42:38 [opt]
    frame #12: 0x0000000103137524 JavaScriptCore`JSC::Interpreter::executeCall(this=<unavailable>, lexicalGlobalObject=<unavailable>, function=<unavailable>, callData=<unavailable>, thisValue=<unavailable>, args=<unavailable>) at Interpreter.cpp:1093:27 [opt]
    frame #13: 0x000000010349d6d0 JavaScriptCore`JSC::runJSMicrotask(globalObject=0x000000012f410068, identifier=(m_identifier = 81), job=JSValue @ x22, argument0=JSValue @ x26, argument1=JSValue @ x25, argument2=<unavailable>, argument3=<unavailable>) at JSMicrotask.cpp:98:9 [opt]
    frame #14: 0x00000001039dfc54 JavaScriptCore`JSC::VM::drainMicrotasks() (.cold.1) at VM.cpp:0:9 [opt]
    frame #15: 0x00000001035e58a4 JavaScriptCore`JSC::VM::drainMicrotasks() [inlined] JSC::MicrotaskQueue::dequeue(this=<unavailable>) at VM.cpp:0:9 [opt]
    frame #16: 0x00000001035e5894 JavaScriptCore`JSC::VM::drainMicrotasks(this=0x000000012f000000) at VM.cpp:1255:46 [opt]
    ...

* Source/JavaScriptCore/interpreter/CallFrame.cpp:
(JSC::CallFrame::dump const):

Canonical link: https://commits.webkit.org/259262@main
pulkomandy pushed a commit that referenced this pull request Mar 7, 2023
https://bugs.webkit.org/show_bug.cgi?id=252379
<rdar://104303475>

Reviewed by Antti Koivisto.

While display boxes are positioned based on margin boxes, the left/right side of a display box
do not include these margins.

e.g.

[display box #1]<- 100px margin ->[display box #2]
   width: 50px                        width: 50px
  margin-right: 100px;

display box #1's right: 50px
display box #2's left: 150px

This patch makes sure when we place an out-of-flow box next to display box #1, we put it at 150px and not at 50px.

* LayoutTests/fast/inline/out-of-flow-inline-with-previous-next-margin-expected.html: Added.
* LayoutTests/fast/inline/out-of-flow-inline-with-previous-next-margin.html: Added.
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.cpp:
(WebCore::Layout::InlineFormattingGeometry::staticPositionForOutOfFlowInlineLevelBox const):

Canonical link: https://commits.webkit.org/260380@main
pulkomandy pushed a commit that referenced this pull request Jul 27, 2023
https://bugs.webkit.org/show_bug.cgi?id=255872
rdar://108738795

Reviewed by Darin Adler.

It turns out that JSON, HTTP, and XML all use the same whitespace
definition, so let's make them share it. Also correct an existing
comment for that function as \v is not part of isASCIIWhitespace(), but
\f is.

Furthermore, remove the "optimization" from these whitespace functions
per a comment from Chris Dumez at
WebKit#13080 (comment):

> Just verified out of curiosity and llvm does generate the same code
> with -O2 (tried both arm64 and x86_64):
>
> isXMLSpace1(char):                       // @isXMLSpace1(char)
>         mov     x8, WebKit#9728                       // =0x2600
>         and     w9, w0, #0xff
>         movk    x8, #1, lsl #32
>         cmp     w9, #33
>         cset    w9, lo
>         lsr     x8, x8, x0
>         and     w0, w9, w8
>         ret
> isXMLSpace2(char):                       // @isXMLSpace2(char)
>         mov     x8, WebKit#9728                       // =0x2600
>         and     w9, w0, #0xff
>         movk    x8, #1, lsl #32
>         cmp     w9, #33
>         cset    w9, lo
>         lsr     x8, x8, x0
>         and     w0, w9, w8
>         ret
>
> Ahmad-S792 Let's simplify the code then.

* Source/WTF/wtf/ASCIICType.h:
(WTF::isASCIIWhitespace):
(WTF::isJSONOrHTTPOrXMLWhitespace):
(WTF::isJSONOrHTTPWhitespace): Deleted.
* Source/WTF/wtf/JSONValues.cpp:
(WTF::JSONImpl::Value::parseJSON):
* Source/WTF/wtf/text/StringToIntegerConversion.h:
* Source/WebCore/Modules/cache/DOMCache.cpp:
(WebCore::hasResponseVaryStarHeaderValue):
* Source/WebCore/Modules/cache/DOMCacheEngine.cpp:
(WebCore::DOMCacheEngine::queryCacheMatch):
* Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp:
(WebCore::parseParameters):
(WebCore::parseMIMEType):
(WebCore::FetchBodyConsumer::packageFormData):
* Source/WebCore/Modules/fetch/FetchHeaders.cpp:
(WebCore::canWriteHeader):
(WebCore::appendToHeaderMap):
(WebCore::FetchHeaders::set):
(WebCore::FetchHeaders::filterAndFill):
* Source/WebCore/mathml/MathMLPresentationElement.cpp:
(WebCore::MathMLPresentationElement::parseMathMLLength):
* Source/WebCore/mathml/MathMLTokenElement.cpp:
(WebCore::MathMLTokenElement::convertToSingleCodePoint):
* Source/WebCore/page/csp/ContentSecurityPolicyDirectiveList.cpp:
(WebCore::ContentSecurityPolicyDirectiveList::parse):
* Source/WebCore/platform/ReferrerPolicy.cpp:
(WebCore::parseReferrerPolicy):
* Source/WebCore/platform/network/DataURLDecoder.cpp:
(WebCore::DataURLDecoder::DecodeTask::process):
* Source/WebCore/platform/network/HTTPParsers.cpp:
(WebCore::parseContentTypeOptionsHeader):
(WebCore::parseClearSiteDataHeader):
(WebCore::parseRange):
(WebCore::parseCrossOriginResourcePolicyHeader):
* Source/WebCore/platform/network/HTTPParsers.h:
(WebCore::addToAccessControlAllowList):
* Source/WebCore/platform/network/ParsedContentType.cpp:
(WebCore::skipSpaces):
(WebCore::parseToken):
(WebCore::ParsedContentType::create):
(WebCore::ParsedContentType::setContentType):
* Source/WebCore/platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::containsInvalidHTTPHeaders const):
* Source/WebCore/platform/network/TimingAllowOrigin.cpp:
(WebCore::passesTimingAllowOriginCheck):
* Source/WebCore/xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::setRequestHeader):
* Source/WebCore/xml/XPathFunctions.cpp:
(WebCore::XPath::FunNormalizeSpace::evaluate const):
* Source/WebCore/xml/XPathParser.cpp:
(WebCore::XPath::Parser::skipWS):
* Source/WebCore/xml/XPathUtil.cpp:
(WebCore::XPath::isXMLSpace): Deleted.
* Source/WebCore/xml/XPathUtil.h:
* Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp:
(WebKit::CacheStorage::updateVaryInformation):
* Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.cpp:
(WebKit::WebSocketTask::WebSocketTask):
* Source/WebKit/NetworkProcess/storage/CacheStorageRecord.h:
(WebKit::CacheStorageRecordInformation::updateVaryHeaders):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::shouldSkipDecidePolicyForResponse const):

Canonical link: https://commits.webkit.org/266253@main
pulkomandy pushed a commit that referenced this pull request Nov 3, 2023
https://bugs.webkit.org/show_bug.cgi?id=263269
<rdar://problem/117086061>

Reviewed by Ross Kirsling.

The spec has at least 8 occurrences of

> It is a Syntax Error if the LexicallyDeclaredNames of X contains any duplicate entries.

early error rules that preclude duplicate lexical declarations. For backwards-compatibility,
LexicallyDeclaredNames [1] skips top-level function declarations inside `ScriptBody : StatementList`
by invoking TopLevelLexicallyDeclaredNames [2], which returns an empty list for them [3].

However, the semantics of LexicallyDeclaredNames is entirely different for `ModuleItem`
(also please see note #1). The fact that top-level function declarations are lexical in module code
is also evident during binding initialization [4].

This change makes top-level function declarations in module code behave like `let` rather than `var`,
introducing early errors that come with it, like disallowing duplicates with `var` and `function`.

Since inside declareFunction() we can't rely neither on `m_scriptMode` (which is always `Module`,
even for nested functions that absolutely should not throw SyntaxError for duplicate declarations),
nor on `m_parseMode` (it's already the parse mode of the declared function itself), this change
introduces isModuleCode() [5], refactoring parse mode handling in Scope.

Also, this patch aligns declareFunctionAsLet() with declareVariable(), called for `let` declarations,
by adding `m_declaredVariables` check, which may fail only in module code. Removes now incorrect
(for module code only) ASSERT that isn't particularly useful given how simple declareFunction() now is.

Aligns JSC with V8 and SpiderMonkey.

[1]: https://tc39.es/ecma262/#sec-static-semantics-lexicallydeclarednames
[2]: https://tc39.es/ecma262/#sec-static-semantics-toplevellexicallydeclarednames
[3]: https://tc39.es/ecma262/#prod-HoistableDeclaration
[4]: https://tc39.es/ecma262/#sec-source-text-module-record-initialize-environment (step 24.iii)
[5]: https://tc39.es/ecma262/#sec-types-of-source-code

* JSTests/modules/async-function-export.js: Moved to JSTests/stress/modules-syntax-error.js.
* JSTests/stress/modules-syntax-error.js:
* JSTests/test262/expectations.yaml: Mark 8 tests as passing.
* Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* Source/JavaScriptCore/parser/Parser.cpp:
(JSC::Parser<LexerType>::Parser):
(JSC::Parser<LexerType>::parseFunctionInfo):
(JSC::Parser<LexerType>::parseMemberExpression):
* Source/JavaScriptCore/parser/Parser.h:
(JSC::Scope::setSourceParseMode):
(JSC::Scope::isGlobalCode const):
(JSC::Scope::isModuleCode const):
(JSC::Scope::declareFunctionAsLet):
(JSC::Scope::setIsGlobalCode):
(JSC::Scope::setIsModuleCode):
(JSC::Parser::declareFunction):
(JSC::Scope::setIsGlobalCodeScope): Deleted.
(JSC::Scope::isGlobalCodeScope const): Deleted.

Canonical link: https://commits.webkit.org/269485@main
pulkomandy pushed a commit that referenced this pull request Dec 23, 2023
https://bugs.webkit.org/show_bug.cgi?id=266153

Reviewed by Antti Koivisto.

This patch adds support for "ruby-align: space-around" on both bidi and non-bidi content.

"ruby-align: space-around" consists of 2 adjustments at run level.
- run spacing at justification opportunities (similar to text-align: justify)
- content offsetting to distribute one extra justification opportunity space before/after base content

In this patch we start computing the offset values at step #1 and pass them over to InlineContentBuilder where the final ruby processing happens (using visual order).
InlineContentAligner takes these offset values and adjusts (aligns) the display boxes accordingly.

What makes it a bit more verbose is the fact that while non-bidi base runs have the correct spacing (e.g. when annotation is wider than the base), we lose that information at
visual reordering (<- we essentially have a fast path for non-bidi content, where as we build the Line for line breaking we also compute horizontal content positions)
It simply means that while non-bidi content, offsetting means just moving content inside the base without pushing adjacent content/expanding enclosing inline boxes,
bidi content needs both (see AdjustContentOnlyInsideRubyBase).

* Source/WebCore/layout/formattingContexts/inline/InlineContentAligner.cpp:
(WebCore::Layout::shiftDisplayBox):
(WebCore::Layout::expandInlineBox):
(WebCore::Layout::alignmentOffset):
(WebCore::Layout::expandInlineBoxWithDescendants):
(WebCore::Layout::shiftRubyBaseContentByAlignmentOffset):
(WebCore::Layout::InlineContentAligner::applyRubyAlignSpaceAround):
(WebCore::Layout::InlineContentAligner::applyRubyBaseAlignmentOffset):
(WebCore::Layout::InlineContentAligner::applyRubyAlign): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineContentAligner.h:
* Source/WebCore/layout/formattingContexts/inline/InlineLine.h:
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::layoutInlineContent):
* Source/WebCore/layout/formattingContexts/inline/LineLayoutResult.h:
* Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.cpp:
(WebCore::Layout::TextOnlySimpleLineBuilder::layoutInlineContent):
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
(WebCore::Layout::InlineDisplayContentBuilder::build):
(WebCore::Layout::InlineDisplayContentBuilder::processRubyContent):
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.h:
* Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.cpp:
(WebCore::Layout::RubyFormattingContext::applyRubyAlignOnBaseContent):
(WebCore::Layout::RubyFormattingContext::applyRubyAlign):
(WebCore::Layout::RubyFormattingContext::applyAlignmentOffsetList):
(WebCore::Layout::applyRubyAlignOnBaseContent): Deleted.
* Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.h:

Canonical link: https://commits.webkit.org/271836@main
pulkomandy pushed a commit that referenced this pull request Feb 20, 2024
https://bugs.webkit.org/show_bug.cgi?id=268227

Reviewed by Antti Koivisto.

This is in preparation for being able to run a range of content through the simple line builder (where the range has text only content e.g. <div><span>this is text content</span></div>

1. Keep track of the number of inline boxes (m_inlineBoxCount)
2. m_isTextAndForcedLineBreakOnlyContent only tracks _content_ type of inline level boxes now (excluding inline boxes, see #1)
3. and it does not track if content needs bidi reordering anymore (we already track that information in m_contentRequiresVisualReordering)
4. Add InlineContentCache::InlineItems::ContentAttributes to hold all these bits.
5. Remove dedicated set functions and pass these bit through InlineContentCache::InlineItems::set/replace.

* Source/WebCore/layout/formattingContexts/inline/InlineContentCache.h:
(WebCore::Layout::InlineContentCache::InlineItems::requiresVisualReordering const):
(WebCore::Layout::InlineContentCache::InlineItems::hasTextAndLineBreakOnlyContent const):
(WebCore::Layout::InlineContentCache::InlineItems::hasInlineBoxes const):
(WebCore::Layout::InlineContentCache::InlineItems::inlineBoxCount const):
(WebCore::Layout::InlineContentCache::InlineItems::set):
(WebCore::Layout::InlineContentCache::InlineItems::replace):
(WebCore::Layout::InlineContentCache::InlineItems::append): Deleted.
(WebCore::Layout::InlineContentCache::InlineItems::clear): Deleted.
(WebCore::Layout::InlineContentCache::InlineItems::setRequiresVisualReordering): Deleted.
(WebCore::Layout::InlineContentCache::InlineItems::setIsNonBidiTextAndForcedLineBreakOnlyContent): Deleted.
(WebCore::Layout::InlineContentCache::InlineItems::isNonBidiTextAndForcedLineBreakOnlyContent const): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layout):
(WebCore::Layout::InlineFormattingContext::minimumMaximumContentSize):
(WebCore::Layout::InlineFormattingContext::minimumContentSize):
(WebCore::Layout::InlineFormattingContext::maximumContentSize):
* Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp:
(WebCore::Layout::InlineItemsBuilder::build):
(WebCore::Layout::InlineItemsBuilder::traverseUntilDamaged):
(WebCore::Layout::InlineItemsBuilder::collectInlineItems):
(WebCore::Layout::InlineItemsBuilder::handleTextContent):
(WebCore::Layout::InlineItemsBuilder::handleInlineBoxStart):
(WebCore::Layout::InlineItemsBuilder::handleInlineBoxEnd):
(WebCore::Layout::InlineItemsBuilder::handleInlineLevelBox):
* Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.h:
* Source/WebCore/layout/formattingContexts/inline/IntrinsicWidthHandler.cpp:
(WebCore::Layout::IntrinsicWidthHandler::IntrinsicWidthHandler):
(WebCore::Layout::IntrinsicWidthHandler::minimumContentSize):
(WebCore::Layout::IntrinsicWidthHandler::maximumContentSize):
(WebCore::Layout::IntrinsicWidthHandler::computedIntrinsicWidthForConstraint):
(WebCore::Layout::IntrinsicWidthHandler::simplifiedMaximumWidth):
* Source/WebCore/layout/formattingContexts/inline/IntrinsicWidthHandler.h:
(WebCore::Layout::IntrinsicWidthHandler::inlineItemList const):
* Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.cpp:
(WebCore::Layout::TextOnlySimpleLineBuilder::isEligibleForSimplifiedTextOnlyInlineLayout):
* Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.h:

Canonical link: https://commits.webkit.org/273632@main
pulkomandy pushed a commit that referenced this pull request Sep 4, 2024
https://bugs.webkit.org/show_bug.cgi?id=275019
<rdar://128067952>

Reviewed by Antti Koivisto.

1. Backdrop render is always anchored to the viewport regardless of where the
associated content renderer is
2. While destroying the content renderer we also remove the backdrop renderer

In order to let invalidateLineLayout kick in (see RenderTreeBuilder::detachFromRenderElement)
we have to make sure the content renderer is not considered as the "destroy root" of the backdrop (see #1).

* LayoutTests/fast/dynamic/backdrop-remove-crash-expected.txt: Added.
* LayoutTests/fast/dynamic/backdrop-remove-crash.html: Added.
* Source/WebCore/rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::tearDownRenderers):

Canonical link: https://commits.webkit.org/279651@main
pulkomandy pushed a commit that referenced this pull request Sep 4, 2024
…terpolate

https://bugs.webkit.org/show_bug.cgi?id=275993
rdar://130704075

Reviewed by Matt Woodrow.

We had three separate issues that would lead us to visually animate when one of the values in a given interval
is a non-invertible matrix:

1. The method that determines whether it's possible to interpolate between two `transform` values would only
account for `matrix()` values and not `matrix3d()`.

2. The `transform` property animation wrapper would not implement the `canInterpolate()` method and would thus
always indicate that two `transform` values could be interpolated. This caused CSS Transitions to run even when
the values would not a discrete interpolation.

3. Even if we correctly determined that two `transform` values should yield discrete interpolation, we would
delegate an accelerated animation to Core Animation and that animation's behavior would differ an visibly
interpolate.

In this patch, we fill all three issues.

First, we introduce a new `TransformOperations::containsNonInvertibleMatrix()` method which will check whether
a `matrix()` or `matrix3d()` value that is not invertible is contained in the list of transform operations. We
now use this function in `TransformOperations::shouldFallBackToDiscreteAnimation()` to address issue #1.

Then, we add a `canInterpolate()` implementation to `AcceleratedTransformOperationsPropertyWrapper` which calls
in the now-correct `TransformOperations::shouldFallBackToDiscreteAnimation()` to address issue #2.

Finally, we add a new flag on `BlendingKeyframes` to determine whether a keyframe contains a `transform` value
with a non-invertible matrix and we consult that flag in `KeyframeEffect::canBeAccelerated()` to determine whether
an animation should be delegated to Core Animation, addressing issue #3.

We add new WPT tests to check the correct interpolation behavior of `transform` when a non-invertible `matrix3d()`
value is used, that no CSS Transition can be started with such a value, and finally that no animation is visibly
run to catch the Core Animation case.

* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-007-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-007.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-non-invertible-discrete-interpolation-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-non-invertible-discrete-interpolation-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-non-invertible-discrete-interpolation.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-non-invertible-no-transition-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-non-invertible-no-transition.html: Added.
* Source/WebCore/animation/BlendingKeyframes.cpp:
(WebCore::BlendingKeyframes::analyzeKeyframe):
* Source/WebCore/animation/BlendingKeyframes.h:
(WebCore::BlendingKeyframes::hasDiscreteTransformInterval const):
* Source/WebCore/animation/CSSPropertyAnimation.cpp:
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::canBeAccelerated const):
* Source/WebCore/platform/graphics/transforms/TransformOperations.cpp:
(WebCore::TransformOperations::containsNonInvertibleMatrix const):
(WebCore::TransformOperations::shouldFallBackToDiscreteAnimation const):
* Source/WebCore/platform/graphics/transforms/TransformOperations.h:

Canonical link: https://commits.webkit.org/280466@main
pulkomandy pushed a commit that referenced this pull request Sep 4, 2024
…text run

https://bugs.webkit.org/show_bug.cgi?id=277716
rdar://133309470

Reviewed by Matthieu Dubet.

This patch implements the processing of text-autospace: ideogram-alpha
only within an element. We don't yet handle element boundaries here.

Although we pass SpacingState context from one ComplexTextController
to another, we do that here in a limited way, only for measuring text for
layout and for painting. There are other places in code which this will
be necessary, for example, for handling element boundaries.

1. During the construction of ComplexTextController, we call ::adjustGlyphsAndAdvances
which already iterates through glyphs and adjust spacing for other reasons.
Now we process each pair of characters related to these glyphs here, adding the
spacing necessary before the "current" character.  For that reason, the SpacingState
stores information about the previous character of a run. We also save the measured
spacing in a new parallel vector m_textAutoSpaceSpacings. At this phase we can
only manipulate a glyph advance, however, for adding space "before" a glyph,
we need to move the glyph to the logical right, which is done later on ::advance.

2. ComplexTextController::advance is called for both layout and painting, but during
painting it has access to a GlyphBuffer and it add glyphs into it. We are introducing
a new GlyphBuffer::add function that also takes the glyph's origin, so we can manipulate
the origin as necessary by adding the previous calculated spacing.

3. Doing #1 and #2 is already enough for painting the extra spacing between relevant characters
according to their classes. Howeverm the width measured during layout would be broken because
IFC splits text content into inlineTextItem(s) and measure the width of each item independently.
This means that we already have to handle SpacingState passing here, otherwise we are not able
to handle spacing between characters on the boundary of different InlineTextItem.

* LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-autospace/text-autospace-ideogram-alpha-001-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-autospace/text-autospace-ideogram-alpha-001-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-autospace/text-autospace-ideogram-alpha-001.html: Added.
* Source/WTF/wtf/text/CharacterProperties.h:
(WTF::isPunctuation):
(WTF::isOpeningPunctuation):
(WTF::isClosingPunctuation):
(WTF::isOfScriptType):
(WTF::eastAsianWidth):
(WTF::isEastAsianFullWidth):
(WTF::isCJKSymbolOrPunctuation):
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp:
(WebCore::Layout::InlineItemsBuilder::computeInlineTextItemWidths):
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:
(WebCore::Layout::TextUtil::width):
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.h:
(WebCore::Layout::TextUtil::width):
* Source/WebCore/platform/graphics/ComplexTextController.cpp:
(WebCore::ComplexTextController::ComplexTextController):
(WebCore::ComplexTextController::advance):
(WebCore::ComplexTextController::adjustGlyphsAndAdvances):
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
* Source/WebCore/platform/graphics/ComplexTextController.h:
(WebCore::ComplexTextController::ComplexTextRun::textAutospaceSize const):
* Source/WebCore/platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::width const):
(WebCore::FontCascade::codePath const):
* Source/WebCore/platform/graphics/GlyphBuffer.h:
(WebCore::GlyphBuffer::add):
* Source/WebCore/platform/graphics/TextRun.cpp:
* Source/WebCore/platform/graphics/TextRun.h:
* Source/WebCore/platform/graphics/WidthCache.h:
(WebCore::WidthCache::add):
(WebCore::WidthCache::invalidateCacheForTextSpacing):
* Source/WebCore/platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
* Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
* Source/WebCore/platform/graphics/skia/ComplexTextControllerSkia.cpp:
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
* Source/WebCore/platform/text/TextSpacing.cpp: Added.
(WebCore::TextAutospace::shouldApplySpacing const):
(WebCore::TextAutospace::textAutospaceSize):
(WebCore::TextSpacing::isIdeograph):
(WebCore::TextSpacing::isNonIdeographicNumeral):
(WebCore::TextSpacing::characterClass):
* Source/WebCore/platform/text/TextSpacing.h:
(WebCore::TextAutospace::hasIdeographAlpha const):
(WebCore::TextAutospace::hasIdeographNumeric const):

Canonical link: https://commits.webkit.org/282192@main
pulkomandy pushed a commit that referenced this pull request Sep 5, 2024
…text run

https://bugs.webkit.org/show_bug.cgi?id=277716
rdar://133309470

Reviewed by Matthieu Dubet.

We are relanding this patch as its first version was reverted due to performance
reasons. On the current iteration we are avoiding classifying characters when
not needed (text-autospace: no-autospace). We also won't keep the parralel
vector for the added spacing in such a case.

Original patch description:

This patch implements the processing of text-autospace: ideogram-alpha
only within an element. We don't yet handle element boundaries here.

Although we pass SpacingState context from one ComplexTextController
to another, we do that here in a limited way, only for measuring text for
layout and for painting. There are other places in code which this will
be necessary, for example, for handling element boundaries.

1. During the construction of ComplexTextController, we call ::adjustGlyphsAndAdvances
which already iterates through glyphs and adjust spacing for other reasons.
Now we process each pair of characters related to these glyphs here, adding the
spacing necessary before the "current" character.  For that reason, the SpacingState
stores information about the previous character of a run. We also save the measured
spacing in a new parallel vector m_textAutoSpaceSpacings. At this phase we can
only manipulate a glyph advance, however, for adding space "before" a glyph,
we need to move the glyph to the logical right, which is done later on ::advance.

2. ComplexTextController::advance is called for both layout and painting, but during
painting it has access to a GlyphBuffer and it add glyphs into it. We are introducing
a new GlyphBuffer::add function that also takes the glyph's origin, so we can manipulate
the origin as necessary by adding the previous calculated spacing.

3. Doing #1 and #2 is already enough for painting the extra spacing between relevant characters
according to their classes. Howeverm the width measured during layout would be broken because
IFC splits text content into inlineTextItem(s) and measure the width of each item independently.
This means that we already have to handle SpacingState passing here, otherwise we are not able
to handle spacing between characters on the boundary of different InlineTextItem.

* Source/WTF/wtf/text/CharacterProperties.h:
(WTF::isPunctuation):
(WTF::isOpeningPunctuation):
(WTF::isClosingPunctuation):
(WTF::isOfScriptType):
(WTF::eastAsianWidth):
(WTF::isEastAsianFullWidth):
(WTF::isCJKSymbolOrPunctuation):
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp:
(WebCore::Layout::InlineItemsBuilder::computeInlineTextItemWidths):
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:
(WebCore::Layout::TextUtil::width):
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.h:
(WebCore::Layout::TextUtil::width):
* Source/WebCore/platform/graphics/ComplexTextController.cpp:
(WebCore::ComplexTextController::ComplexTextController):
(WebCore::ComplexTextController::advance):
(WebCore::ComplexTextController::adjustGlyphsAndAdvances):
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
* Source/WebCore/platform/graphics/ComplexTextController.h:
(WebCore::ComplexTextController::ComplexTextRun::textAutospaceSize const):
* Source/WebCore/platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::width const):
(WebCore::FontCascade::codePath const):
* Source/WebCore/platform/graphics/GlyphBuffer.h:
(WebCore::GlyphBuffer::add):
* Source/WebCore/platform/graphics/TextRun.cpp:
* Source/WebCore/platform/graphics/TextRun.h:
* Source/WebCore/platform/graphics/WidthCache.h:
(WebCore::WidthCache::add):
(WebCore::WidthCache::invalidateCacheForTextSpacing):
* Source/WebCore/platform/graphics/coretext/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
* Source/WebCore/platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
* Source/WebCore/platform/graphics/skia/ComplexTextControllerSkia.cpp:
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
* Source/WebCore/platform/text/TextSpacing.cpp: Added.
(WebCore::TextAutospace::shouldApplySpacing const):
(WebCore::TextAutospace::textAutospaceSize):
(WebCore::TextSpacing::isIdeograph):
(WebCore::TextSpacing::isNonIdeographicNumeral):
(WebCore::TextSpacing::characterClass):
* Source/WebCore/platform/text/TextSpacing.h:
(WebCore::TextAutospace::hasIdeographAlpha const):
(WebCore::TextAutospace::hasIdeographNumeric const):

Canonical link: https://commits.webkit.org/282511@main
pulkomandy pushed a commit that referenced this pull request Sep 28, 2024
…r_ overflow

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

Reviewed by Antti Koivisto.

Let's call
1. lastHyphenPosition when we are dealing with the non-overflowing runs (this is when we can't break the overflowing part of the content
and try to break runs _before_ the overflowing point). Since these runs are not overflowing, we should simply pick the last hyphenation position.
2. firstHyphenPosition when even the first hyphenation would produce overflowing content (e.g. minimum-content with computation)
3. hyphenPositionBefore when dealing with normal overflowing breaking (neither #1 nor #2)

* LayoutTests/fast/inline/overflowing-content-with-hypens-expected.html: Added.
* LayoutTests/fast/inline/overflowing-content-with-hypens.html: Added.
* Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp:
(WebCore::Layout::firstTextRunIndex):
(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):
(WebCore::Layout::limitBeforeValue):
(WebCore::Layout::limitAfterValue):
(WebCore::Layout::hasEnoughContentForHyphenation):
(WebCore::Layout::firstHyphenPosition):
(WebCore::Layout::lastHyphenPosition):
(WebCore::Layout::hyphenPositionBefore):
(WebCore::Layout::InlineContentBreaker::tryBreakingTextRun const):
(WebCore::Layout::InlineContentBreaker::tryHyphenationAcrossOverflowingInlineTextItems const):
(WebCore::Layout::hyphenPosition): Deleted.

Canonical link: https://commits.webkit.org/283528@main
pulkomandy pushed a commit that referenced this pull request Sep 28, 2024
…ter follows to the same value

https://bugs.webkit.org/show_bug.cgi?id=279570
rdar://135851156

Reviewed by Keith Miller.

Let's consider the following FTL graph.

    BB#0
    @0 = NewObject()
    Jump #1

    BB#1
    PutByOffset(@0, 0, @x)
    Jump #2

    BB#2
    ...
    @z = ...
    @1 = GetByOffset(@x, 0)
    Branch(@1, #3, #4)

    BB#3
    PutByOffset(@0, 0, @z)
    Jump #5

    BB#4
    PutByOffset(@0, 0, @z)
    Jump #5

    BB#5
    Jump #2

Now, we would like to eliminate @0 object allocation. And we are
computing SSA for pointers of fields of the that object which gets
eliminated. Consider about @x's fields' SSA. PutByOffset becomes Def
and GetByOffset becomes Use. And the same field will get the same SSA
variable. So we first puts Defs and compute Phis based on that.

In ObjectAllocationSinking phase, we had a fast path when the both SSA
variable is following to the same value. Let's see BB#5. Because BB#3
and BB#4 defines Defs, dominance frontier BB#5 will need to introduce
Phi. But interestingly, both SSA variable is following to the same @z.
As a result, we were not inserting Phi for this case.

But this is wrong. Inserted Phi is a Def, and based on that, we will
further introduce Phis with that. If we omit inserting Phi in BB#5,
we will not insert Phi into BB#2 while BB#2 will merge BB#1's Def And
BB#5's Phi's Def. As a result, in BB#2, we think this variable is
following to BB#1's Def. But that's wrong and BB#5's Phi exists.

This patch removes this fast path to fix the issue.

* JSTests/stress/object-allocation-sinking-phi-insertion-for-pointers.js: Added.
(Queue):
(Queue.prototype.enqueue):
(Queue.prototype.dequeue):
(i.queue.dequeue):
* Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp:

Canonical link: https://commits.webkit.org/283558@main
pulkomandy pushed a commit that referenced this pull request Nov 25, 2024
https://bugs.webkit.org/show_bug.cgi?id=277122
<rdar://problem/132549134>

Reviewed by Antti Koivisto.

See w3c/csswg-drafts#10544 and the relevant Blink change https://chromium.googlesource.com/chromium/src/+/e28cd00c20c78b8fd11546d59fd6c82243ce7115

1. Drop layout containment
2. Make sure non-initial container-type establishes independent formatting context
3. Do not block container query evaluation on layout containment (see #1).

Credit goes to Karl Dubost and Tim Nguyen.

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-conditional/container-queries/no-layout-containment-scroll-expected.txt:
* Source/WebCore/rendering/RenderElement.cpp:
(WebCore::RenderElement::establishesIndependentFormattingContext const):
(WebCore::RenderElement::hasEligibleContainmentForSizeQuery const):
* Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::usedContain const):

Canonical link: https://commits.webkit.org/284730@main
pulkomandy pushed a commit that referenced this pull request Nov 26, 2024
https://bugs.webkit.org/show_bug.cgi?id=281219

Reviewed by Carlos Garcia Campos.

* Source/WebCore/platform/graphics/PlatformDisplay.h: Update changed include paths.
* Source/WebCore/platform/graphics/nicosia/NicosiaBuffer.cpp: Ditto.
* Source/WebCore/platform/graphics/skia/ImageBufferSkiaAcceleratedBackend.cpp: Ditto.
* Source/WebCore/platform/graphics/skia/PlatformDisplaySkia.cpp: Ditto.
* Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayerSkia.cpp: Ditto.
* Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferNativeImage.cpp: Ditto.

Contains upstream commits:
git log --oneline --pretty='%h %s' f77adcef7c1cd05cba6d3a21bc836a6a7733167c..0a9bfc90496ece62be6a8d9443321ae2dd9ba4c8
0a9bfc9049 Roll ANGLE from d0e2141a997c to ae5c3b969e66 (10 revisions)
796a7a43a0 Roll Skia Infra from 09baf58309a3 to bf6353777f11 (4 revisions)
6e4a2f266a Roll vulkan-deps from 458c840c3ccf to 4480c8e9e59c (6 revisions)
3a9e6b6a47 [graphite] Clean up legacy dstCopy from KeyContext
8c95b719bf Reland "Enable CrabbyAvif for Android framework"
cf9a558b3a Revert "Adding Fontations to FontConfig manager"
12bc549478 Adding Fontations to FontConfig manager
1349ddc074 [graphite] Reset fDstCopy in resetCommandBuffer()
cfdf619875 [Ganesh] Add support for VK_EXT_frame_boundary.
ac3efd1fd1 Punt CTS enforcement of VkProtectedContext_Xyz_Graphite tests to API 36
4d308d2216 [Ganesh] Add GrSubmitInfo struct to GrDirectContext::submit
80191e69c9 [pdf] Emit `/Tabs /S` on each page
d38148cdf9 DawnErrorChecker: Prepare for Dawn StringView callback change.
3b67bb1c60 Roll vulkan-deps from dbcb4e8a0f0c to 458c840c3ccf (1 revision)
3028f960cf [skjson] Non-recursive Json writer impl
e0bb55353b Roll ANGLE from 878e1c92af0b to d0e2141a997c (1 revision)
8aa79a2819 Roll Skia Infra from f00ae00fd775 to 09baf58309a3 (10 revisions)
82f414e3ed Roll Dawn from 2574827cf13b to 68d8508758f2 (8 revisions)
a077e78e53 Roll vulkan-deps from 657296f55449 to dbcb4e8a0f0c (2 revisions)
67f030795a Manual roll ANGLE from 0f7371ae347d to 878e1c92af0b (7 revisions)
cd2ed28f15 Manual roll Dawn from 4103ee393de2 to 2574827cf13b (10 revisions)
701b6e4b4b [ganesh] Disable stencilBuffers and MSAA for Protected GL Contexts
8a2fe88d31 [skif] Adjust test tolerances for some GPUs
192bdd1e79 Manual roll ANGLE from aacbf041f6cd to 0f7371ae347d (14 revisions)
3d283da104 [graphite] Migrate Vulkan pipeline to consulting immutable sampler descriptions populated at graphite level
45ffa0f682 Manual roll Dawn from b0d038d01ff9 to 4103ee393de2 (10 revisions)
77772b9967 [skif] Fix rescale bounds analysis, consolidate draw codepaths
bde0363c02 [graphite] Update PaintParams key generation and SkSL generation to use dstCopy intrinsics
85487bb10f [graphite] Fix VulkanCaps::fSupportsMemorylessAttachments init when fProtectedSupport
857248fe0a Manual roll Dawn from 90b955a8bf93 to b0d038d01ff9 (25 revisions)
8fe5949e36 Add SubIFD to exif data when using WriteExif.
308f6988f3 Replace/rename Gr* functions in SkMathPriv with Sk* naming convention
38e2598c48 Revert "Enable CrabbyAvif for Android framework"
1e9afcd7dd Roll vulkan-deps from a07eac9c2613 to 657296f55449 (3 revisions)
d639ed5e57 Roll Skia Infra from 73d05ecd42e4 to f00ae00fd775 (7 revisions)
cbca9656f1 Roll jsfiddle-base from 38bd0b71717f to 034839b9814b
aea58b0640 Roll skottie-base from b1e534c0b156 to 6a07fae851d7
e10a408054 Roll debugger-app-base from c48a419da832 to 931df19ec335
3866c52c4a Roll shaders-base from 50fae2cd87dc to 99b73d05cdae
aee8fbf37e Add tests for SkNextPow2
b5856c768d Roll vulkan-deps from dd729cf1f807 to a07eac9c2613 (7 revisions)
d0e49fde37 Enable CrabbyAvif for Android framework
df39f58957 [pdf] Spanify SkPDFTagNode::fChildren
e427497711 Migrate Debian 11 builders
573053913b Allow SkSpan<T> declarations with incomplete T
6afbd6253e Add compile-check for SkImage::RequiredProperties being a map key
294040c7c1 [graphite] Correct sort order when using analytic and shader clips.
89284b1d7e Roll ANGLE from cd7f294923c7 to aacbf041f6cd (18 revisions)
b91af1fc2a Roll Skia Infra from 015479b2afc8 to 73d05ecd42e4 (12 revisions)
282efddaad Roll Dawn from f8d389436d22 to 90b955a8bf93 (13 revisions)
52155a48ff Roll vulkan-deps from cfe779d31eee to dd729cf1f807 (3 revisions)
c3ff0dfeae Roll vulkan-deps from 63d60d4b27f3 to cfe779d31eee (1 revision)
6696c34a68 Roll vulkan-deps from 0f0002bea54e to 63d60d4b27f3 (1 revision)
702044e777 Roll vulkan-deps from 31bccb45ea33 to 0f0002bea54e (1 revision)
9145d1ef96 [graphite] Minor fixes to PaintParamsKey dumping/labels
485783860a Roll vulkan-deps from db76988ee4a3 to 31bccb45ea33 (9 revisions)
4aff960362 [graphite] Use Dawn limits for buffer alignment caps
59f512b47c Reland "Write test for platform image generators."
e59dd68285 Remove wgpu::FeatureName::SurfaceCapabilities
51c6b6393f Enforce IWYU on graphite's compute and render subdirectories
e8e0a8c463 WebGPU: Prepare for Dawn output struct WGPUStringView breaking change.
0dfa080b5d Roll ANGLE from 6024e9c05548 to cd7f294923c7 (2 revisions)
0f38a655fb Roll vulkan-deps from 88a2d3572b41 to db76988ee4a3 (4 revisions)
04f5fa261f Roll Skia Infra from 3bf46a600a54 to 015479b2afc8 (16 revisions)
16d9829a02 Roll SwiftShader from 72ca2005cd32 to 7a9a492a38b7 (2 revisions)
cef6e84233 Roll Dawn from 096f7148b5de to f8d389436d22 (7 revisions)
e732cdf455 Remove initializer_list use from SkZip.h
e85bb2b409 Manual roll ANGLE from 9edd74e2ff86 to 6024e9c05548 (7 revisions)
87ebaeadb1 [graphite] Bring minimum uniform buffer size back down to 2kb
4069b403ae Revert "Write test for platform image generators."
f84aacc93f Write test for platform image generators.
310dab4cd4 [Fontations-backend] Roll Fontations, Skrifa to 0.22.3
6d7b5973c0 [rust png] Hide stream from `SkCodec` parent class to prevent rewinding.
252432fd27 [graphite] Migrate dawn pipeline to consulting immutable sampler descriptions populated at graphite level
7e39844b7d Reland "[ganesh] Add GrGLANGLEBackend::kVulkan"
582045670a Roll vulkan-deps from d2712d5ff726 to 88a2d3572b41 (2 revisions)
0c5c4d622f [graphite] Avoid redundant de-duplication of uniform data
379139f0be [rust png] More idempotent tracking of frame's `fullyReceived` state.
b83dda24e6 [rust png] `DecodingState` field naming style fix: s/ dst / fDst /, etc.
fe3cd2adea [Fontations-backend] Roll Fontations, Skrifa to 0.22.2
68fea8aa58 Roll ANGLE from 7ff7775b2b83 to 9edd74e2ff86 (8 revisions)
f074e2bd0a Roll Skia Infra from a4dc29886e99 to 3bf46a600a54 (11 revisions)
df2e478e9f Roll Dawn from e5c5c65f60a7 to 096f7148b5de (9 revisions)
a1fccdd14b Roll vulkan-deps from 598d211b737c to d2712d5ff726 (10 revisions)
ba95ec201d [pdf] Reduce size of StructElem
eed291efd6 [pdf] Clean up SkPDFDocument initialization
f1e049ff12 [graphite] Dynamically size vertex buffers
03431ca9d3 Revert "[ganesh] Add GrGLANGLEBackend::kVulkan"
16722e4e9e Revert "Allow passing multiple node IDs per PDF structure node."
be6f28168f [skif] SaveLayerRec has configurable backdrop tile mode
155fb18c6c [graphite] Fix issue with YUVA premultiplied alpha.
40d51ebc76 Fix BigImageTest caps check
61bb59fcef avif: Add support for using CrabbyAvif in Android
e7d091f3f6 [graphite] Add logic to interpret ShaderNode sampler data into SamplerDescs
ce27189cef [ganesh] Add GrGLANGLEBackend::kVulkan
41dc260364 Roll vulkan-deps from 7aaa4e9a5b34 to 598d211b737c (1 revision)
38d4b4a8a7 [Fontations] Centralize computation of scale and remaining matrix
d063b5e450 Roll ANGLE from 572fd30ee239 to 7ff7775b2b83 (9 revisions)
af3aa03d19 Roll Skia Infra from ff7821c285f9 to a4dc29886e99 (9 revisions)
e2f38f2830 Roll SwiftShader from 8580e3a98e50 to 72ca2005cd32 (1 revision)
4eff6f49d9 Roll Dawn from caeda3b8046d to e5c5c65f60a7 (12 revisions)
014978fc48 Roll vulkan-deps from fb8f0127fca4 to 7aaa4e9a5b34 (9 revisions)
0411eaf35f [graphite] Use 32 bit integers for SSBO indices
7c61f88422 [rust png] Delete incorrect memory safety comments.
f7cb94e333 Add `Canvas.quickReject` to quickly tell if a Rect is within the clip
d50cbfd539 [rust png] Support converting `png::FrameControl` into Skia equivalent.
2e873e1aa0 [Fontations] Hold on to Path target arrays to avoid alloc churn
4d72af8474 [Fontations] Generate SkPath-compatible arrays on the Rust side
5fb36dd08a Optionally write the orientation when encoding a JPEG.
bfc6189f01 Reland "[graphite] Expand BlurMaskFilter Precompilation ..."
09a3c821f1 [Fontations] Use Skrifa's NullPen instead of custom pen
5218f67ec7 Emit StructElem ID only when referenced
73b62ac7b8 [Fontations-backend] Roll Fontations, Skrifa to 0.22.1
44d45ac4de Roll vulkan-deps from cb6007a9d31d to fb8f0127fca4 (1 revision)
5baca37308 Roll ANGLE from 7b0212b337ff to 572fd30ee239 (7 revisions)
03fa11bda8 Roll Skia Infra from a97dae4c20c1 to ff7821c285f9 (7 revisions)
db59fb03dd Roll Dawn from 690b037a7532 to caeda3b8046d (6 revisions)
6fc00ce224 Revert "[graphite] Expand BlurMaskFilter Precompilation ..."
b851101c84 [rust png] Initial `onGetFrameCount()` and `getFrameHolder()`.
d1d7deb68f Roll vulkan-deps from 223523f05dc0 to cb6007a9d31d (7 revisions)
534633fb4b [rust png] Support color transforms for (narrower) subframes.
a8e1b85c76 [graphite] Include intrinsic uniforms in the fragment shader
6c89706638 [graphite] Expand BlurMaskFilter Precompilation ...
2d2425a303 Avoid segfault in BigImageTest, rearrange skip rules
dfeeb199b2 Check for null child in SkWorkingFormatColorFilter
9ab06e4fe8 Add bungeman to public API owners
06721a7248 Roll vulkan-deps from 50ad0c468c61 to 223523f05dc0 (1 revision)
80d141cf32 Roll ANGLE from 0ec8a7f1b588 to 7b0212b337ff (6 revisions)
5f4740b998 Roll Skia Infra from 3ba9cd40c151 to a97dae4c20c1 (4 revisions)
333df70fbc Roll Dawn from cef41cc71c85 to 690b037a7532 (13 revisions)
2f1e716bbe Roll vulkan-deps from 1f1860958df1 to 50ad0c468c61 (1 revision)
f88a9ae4d9 Roll vulkan-deps from 180925851393 to 1f1860958df1 (1 revision)
11b29596e1 Roll vulkan-deps from 7bd80578336d to 180925851393 (8 revisions)
7efc11f2ea [infra] Add jobs for Pixel9
fcf60c5c5d [ganesh] Add GrGLCaps setting to control GL/ANGLE Protectedness handling
6fa7718752 Roll vulkan-deps from 64d149df26fd to 7bd80578336d (2 revisions)
39dfe3603c Suppress function UBSan on macOS
627608cd5f [Fontations] Optimize generateMetrics() color glyph search
41ee5da8f4 Roll ANGLE from 966739ac8b4c to 0ec8a7f1b588 (8 revisions)
e77818421e Roll Skia Infra from c13e7159cdd1 to 3ba9cd40c151 (4 revisions)
41d29a557f Roll Dawn from 3eee2be83d3f to cef41cc71c85 (6 revisions)
81cad57ecb Roll vulkan-deps from 8d76160610aa to 64d149df26fd (12 revisions)
fdce28bab4 Allow multiple equivalent "clang version"s
9ebb7c3640 Manual roll vulkan-deps from d9c62a3d49c7 to 8d76160610aa (7 revisions)
150f2275a9 Manual roll Dawn from fb8059bc3f80 to 3eee2be83d3f (8 revisions)
665fdd2e75 Allow two "clang versions".
e986bd33fb Command line flags for Android Viewer
5f6ea5ff84 Update Xcode 15.4 to 16.0
b2c5f640cb [canvaskit] Add OffscreenCanvas to some type definitions
5c9f28d05a Roll vulkan-deps from 6b4db5a6d55c to d9c62a3d49c7 (4 revisions)
612ac7d750 Roll ANGLE from eaffa034c7ff to 966739ac8b4c (9 revisions)
dcb270abc4 Roll Dawn from efd781b42ae5 to fb8059bc3f80 (6 revisions)
d804bdf62b Roll Skia Infra from 67cb227058fa to c13e7159cdd1 (7 revisions)
e5ce4ecbcf Roll vulkan-deps from 13d1d0b93ffd to 6b4db5a6d55c (3 revisions)
9f3b32b7b7 Remove some debugf from SkFontMgr_AndroidNDK
291f4b7c6d Manual roll Dawn from 876bb88cb063 to efd781b42ae5 (8 revisions)
e623a37de3 Manual roll vulkan-deps from 683d4c5faa30 to 13d1d0b93ffd (10 revisions)
9af762100c [graphite] Modify key methods and comment docs to be able to accept a SamplerDesc container ptr
c98431ac12 [bazel] Use filegroup for common_flags_config
79e652aad7 [graphite] Centralize SamplerDesc length variables used by Dawn, Vulkan
788233232d Roll vulkan-deps from 3368b0fc9442 to 683d4c5faa30 (4 revisions)
2c9708b689 Roll ANGLE from b563ede4e672 to eaffa034c7ff (9 revisions)
d00ad3e055 Roll Skia Infra from b6f29eefb704 to 67cb227058fa (5 revisions)
f90deca6ba Roll SwiftShader from 2afc8c97882a to 8580e3a98e50 (1 revision)
f6e95045c1 Roll Dawn from 77184aa49df6 to 876bb88cb063 (13 revisions)
3541cdf2fa [pdf] Give up on embedding CFF
2e92f0b443 Update BRD to support getAndroidGainmap
118914b760 Roll vulkan-deps from ab526a2539cd to 3368b0fc9442 (3 revisions)
cf28f9dd41 Manual roll Dawn from 4f0cdf482175 to 77184aa49df6 (8 revisions)
6e5ff92531 [graphite] Dynamically size buffer allocations
3cdb1850e2 Readd mipmap sharpening control to GrContextOptions
cffb3d7428 Roll ANGLE from 1e74ce33a56c to b563ede4e672 (5 revisions)
01ef0128dc [Fontations] Prune subtrees in COLRv1 bounds computation
f0dc876194 Roll vulkan-deps from 685cc1e1e3d5 to ab526a2539cd (5 revisions)
b4ffde52ab Roll skottie-base from 2814735474b8 to b1e534c0b156
b4d6ffd6c5 Roll Dawn from 803ff2bdaf8e to 4f0cdf482175 (7 revisions)
897ece7121 Roll shaders-base from 0417970a971e to 50fae2cd87dc
e457a245a8 Roll jsfiddle-base from dadc8978c6e9 to 38bd0b71717f
3dd057b613 Roll debugger-app-base from ebfa46371f66 to c48a419da832
80ea638c60 Roll Skia Infra from a2950260d0fb to b6f29eefb704 (5 revisions)
7b0669f89a Android NDK SkFontMgr
7174ab7a98 Manual roll Dawn from da2fa97fb603 to 803ff2bdaf8e (6 revisions)
8a7bdab2c1 Implement SkTypeface_fontconfig::onGetKerningPairAdjustments
33e1e6f685 Manual roll Dawn from c50de8d86157 to da2fa97fb603 (6 revisions)
dc1a7c7794 Revert "[graphite] Add updated purge() method to DrawAtlas."
3afab2cbac Roll vulkan-deps from 54e834b2bf55 to 685cc1e1e3d5 (3 revisions)
a06b0c55d7 Revert "[graphite] Increase delay before we purge plots in DrawAtlas."
acb93a9f24 [graphite] Adjust rrect clipping to better match Ganesh.
583ccf7253 Revert "[graphite] Bump purge flush count up to 8."
c20cce6273 Simplify SkRect from SkIRect construction in DW ScalerContext
a402d3c60c Roll ANGLE from b682d8102f5c to 1e74ce33a56c (15 revisions)
864aadba78 Roll Skia Infra from 2f8a3a248b77 to a2950260d0fb (6 revisions)
c81562f00e Roll Dawn from f4340f83b2e5 to c50de8d86157 (16 revisions)
ec0ed4afab Roll vulkan-deps from 23b34f5f0315 to 54e834b2bf55 (1 revision)
8c44a27b32 Roll vulkan-deps from a06f41a53062 to 23b34f5f0315 (1 revision)
1d03ec8816 Roll vulkan-deps from 7089471c2a65 to a06f41a53062 (1 revision)
c01f89da7c Roll vulkan-deps from 1fe9ca916873 to 7089471c2a65 (3 revisions)
1be7027570 Reland "Add isArc to SkPath"
ca5731228d [graphite] Logical viewport is (0,0), adjust intrinsic uniforms to match
bdbbdee1db Roll vulkan-deps from ccec2dffc262 to 1fe9ca916873 (2 revisions)
16f53694ec [graphite] Bump purge flush count up to 8.
cde3d60ab3 Manual roll Dawn from 20cc91312e16 to f4340f83b2e5 (12 revisions)
50711c2929 Delete include/gpu shim files
c79d632de0 Roll ANGLE from 44b6203c43db to b682d8102f5c (12 revisions)
c55d72f1bb Roll Dawn from a1fe8e600d77 to 20cc91312e16 (19 revisions)
95e832b297 Roll Skia Infra from 104350337eaa to 2f8a3a248b77 (10 revisions)
a1d882ec91 Roll vulkan-deps from e4d224c16ab4 to ccec2dffc262 (4 revisions)
fa43a5f015 [rust png] Add support for `SkCodec::Result::kIncompleteInput`.
195cc3e2c7 [graphite] Improve PaintParamsKeyTests' feedback re missing Pipelines
ca94a5369a Reland "Reland "Split FreeType & FontConfig, step #1""
a571758356 Roll vulkan-deps from e80717cdb17e to e4d224c16ab4 (1 revision)
9d16a74c86 [infra] Add Debian11 CPU test job
5e9aa3211d Roll ANGLE from 7bdd5f775df1 to 44b6203c43db (2 revisions)
2be350ecc2 Roll Skia Infra from e39719a1c0e7 to 104350337eaa (7 revisions)
7b13e511c1 Roll Dawn from d3e90db0af37 to a1fe8e600d77 (6 revisions)
202809f02e Roll vulkan-deps from 494b2918371c to e80717cdb17e (1 revision)
8a2f85d16b [skif] Check for resolve failure/int overflows
8858f081d1 Manual roll ANGLE from dbdc95515fb0 to 7bdd5f775df1 (12 revisions)
321d7750aa Manual roll Dawn from 31cb19d6c599 to d3e90db0af37 (16 revisions)
45bccf3393 [graphite] Immutable sampler data appending + processing fixes
a60a52a117 [graphite] Plumb RenderPassDesc more fully through Precompilation system
7eef016c12 Don't use the ImageGeneratorWIC when checking respect for origin.
760e37059f [graphite] Increase delay before we purge plots in DrawAtlas.
178a30c1ef Remove call to SkScalerContextRec::setPaintGamma
e60181fbd8 Roll vulkan-deps from e0d45239bb91 to 494b2918371c (1 revision)
ae4e7753fa Roll ANGLE from 1b4d6185c4de to dbdc95515fb0 (13 revisions)
01b7be60d3 [graphite] Add updated purge() method to DrawAtlas.
819f8f49ab Roll Skia Infra from df2251eb6f2a to e39719a1c0e7 (10 revisions)
76a7310f63 Roll Dawn from 6a3f737c33c7 to 31cb19d6c599 (11 revisions)
86abf23913 Manual roll Dawn from ef559d79bda9 to 6a3f737c33c7 (10 revisions)
b5cc234f22 Roll vulkan-deps from eb05ef4cb7a7 to e0d45239bb91 (11 revisions)
de3717fe55 Merge 8 release notes into RELEASE_NOTES.md
de290420ed Update Skia milestone to 131
3167a9ba96 Handle premultiplied alpha in PNG encoding of images using kBGRA_10101010_XR_SkColorType
64148dd7cf Roll ANGLE from f6d9b179eb83 to 1b4d6185c4de (14 revisions)
0429cfb042 Roll vulkan-deps from 114623e12d3f to eb05ef4cb7a7 (1 revision)
ad08229fd0 Roll Dawn from 2e8afd5a4962 to ef559d79bda9 (18 revisions)
be871a37a1 Roll Skia Infra from 656a4790c599 to df2251eb6f2a (8 revisions)
0409718f34 [graphite] Bind dstCopy texture in VulkanCommandBuffer
d78293574d Add additional link for ios development
5d10744255 Ensure CtsSkQPTestCases in Android Framework uses external Vk headers
68eeaa5e20 Make SkImageGeneratorWIC apply encoded origin.
87ba10cbfa Reland "MiraclePtr: Fetch partition_alloc."
09005d7ecd Roll shaders-base from 4a9e92f23d7f to 0417970a971e
f7ede4fdae Roll vulkan-deps from 4a69b8e2bcdd to 114623e12d3f (2 revisions)
a05e3280a4 Roll skottie-base from 20f5d28635bd to 2814735474b8
fe87fbfffe Create Bazel Toolchain for running iOS builds
ee5e413fe4 [Fontations] Round advances when hinting is requested
3ebf0a14bb [Fontations] Add suffix to comparison tests with none hint mode
8058310407 Roll ANGLE from e90de4b2873f to f6d9b179eb83 (11 revisions)
efd841820b Roll SwiftShader from 3239872f9c5f to 2afc8c97882a (1 revision)
b8daac6256 Roll Skia Infra from ac44b70a9831 to 656a4790c599 (6 revisions)
72eb21bcb5 Roll Dawn from 7c4fe83768b1 to 2e8afd5a4962 (16 revisions)
2d4c662c2c Roll vulkan-deps from 09504140f88a to 4a69b8e2bcdd (1 revision)
2238d45e67 Roll vulkan-deps from 3fb3d06f7a14 to 09504140f88a (1 revision)
175815a3fe Roll vulkan-deps from e08047d8cf54 to 3fb3d06f7a14 (3 revisions)
0ec9b089fa Roll vulkan-deps from b747b6f853ad to e08047d8cf54 (3 revisions)
2b8e33aa48 Roll vulkan-deps from 788001a1cbae to b747b6f853ad (4 revisions)
bdc5e73cb6 Revert "Reland "[graphite] Add purge() method to DrawAtlas.""
9877f45939 Rename our_vulkan_headers use_skia_vulkan_headers
a0309b3d17 [bazel] Initial dm support
a5a6d12b36 [Fontations] Activate usage of autohinting
2834847389 Remove brianosman references from OWNERS and TODO
86f18156ce [graphite] Append DawnCommandBuffer's dstCopy intrinsic to BindGroup
7cba76a077 Roll vulkan-deps from bc0954c735ac to 788001a1cbae (5 revisions)
abb4eeac59 Roll ANGLE from f0919be383d0 to e90de4b2873f (6 revisions)
297f3bf425 Roll Skia Infra from be2b58e20037 to ac44b70a9831 (3 revisions)
c8a493c589 Roll Dawn from 2f71cb364e4e to 7c4fe83768b1 (9 revisions)
515a23f3cb [rust png] Handling interlaced images in `onIncrementalDecode`.
6a6eb53bc4 Reland "[graphite] Add analytic clip support."
bcbc3038a8 Roll vulkan-deps from 5a507062e158 to bc0954c735ac (6 revisions)
50e42f9f47 Use implementation_deps to hide vulkan headers
266c3c52ad Add "git_revision:" to bin/fetch-sk desired_version
26b048c6a5 Reland "Move SkMSec out of public API"
acff7f24dd Re-enable PaintParamsKeyTest on all Graphite_Dawn jobs
2b40b50ea4 [ganesh] Avoid int overflow in DrawAtlasOpImpl
b750cbedc1 Roll ANGLE from 1a5fee1063fc to f0919be383d0 (1 revision)
b66a4c7f44 Roll vulkan-deps from 6526c75bbc69 to 5a507062e158 (3 revisions)
1dd44e41b0 Roll Skia Infra from 5354a104db7a to be2b58e20037 (9 revisions)
d53bab71f5 Roll Dawn from 611fbcfa6d73 to 2f71cb364e4e (4 revisions)
79ea64d7a7 Manual roll ANGLE from 501887159116 to 1a5fee1063fc (18 revisions)
dab5ab94b6 Revert "[graphite] Do a compact() step when we purge DrawAtlases."
e32486ebf7 Manual roll Dawn from ca2e3757ae7c to 611fbcfa6d73 (15 revisions)
0b776ce0b8 consolidate runtime effect builder logic to base class
082b2a7fb6 [graphite] Bind dst copy texture automatically in MtlCommandBuffer
4a443e8d59 Roll vulkan-deps from 49bb428cd451 to 6526c75bbc69 (1 revision)
c050337724 [graphite] Follow-up alignment fixes
d9d5af69be [graphite] Align parameter name with updated utility
034e6bf318 Speculative workaround for Bazel 7 and rules_docker issue on Louhi
3f3390a6e2 Remove Bazel option for trivial ABI
b6a6c75c29 [Fontations-backend] Roll Fontations, Skrifa to 0.22
fb0b2eb61b [graphite] SamplerDesc constructor is constexpr, has overloads
44b4a40178 [bazel] Move win_toolchain download into download_windows_amd64_toolchain
320dccf1a3 Roll Skia Infra from b96a50f0c8f0 to 5354a104db7a (13 revisions)
205f0e6bda Roll SwiftShader from 8dd40811c571 to 3239872f9c5f (2 revisions)
7a4bd062b1 Roll Dawn from bda245ad94ff to ca2e3757ae7c (10 revisions)
a7ddd4d2c6 Roll vulkan-deps from f0364692215e to 49bb428cd451 (2 revisions)
618beab475 Revert "[graphite] Add analytic clip support."
68f14f2f70 Update pinned version of Skia to get external configs from
1760de26fb Use implementation_deps in Bazel build
c41d38f196 [graphite] Store dstCopy texture and bounds on CommandBuffer
527515e28e [graphite] Do a compact() step when we purge DrawAtlases.
c0512ed287 [graphite] Add analytic clip support.
27acee9dbb Roll FreeType from f92c9655 to 83af801b (7 commits)
62bdc35857 Tests for fake embolden
19f61184cc [infra] Update fetch-sk to use infra_revision variable
5a6d85e4f1 Manual roll SwiftShader from 5561c71fa64e to 8dd40811c571 (3 revisions)
82d2e40333 Protected bug fix
2acd15d5e2 Manual roll ANGLE from 61c26fd6930a to 501887159116 (20 revisions)
69f5d3d5cd Roll HarfBuzz from b74a7ecc to a070f9eb (268 commits)
8e8c16c8fd Reland "Update to Bazel 7"
d211141c45 Roll Expat from 441f98d0 to 624da0f5 (120 commits)
863b4e194b Manual roll Dawn from b339ed4daf66 to bda245ad94ff (25 revisions)
b6092fb4f8 [bazel] Inline //bazel/external/win_toolchain/BUILD.bazel
2b60459339 Roll vulkan-deps from 145442b950ac to f0364692215e (16 revisions)
4815ec808a [bazel] Add missing newline in download_toolchains.bzl
f3344c8b66 Move SkFourByteTag to its own file
5dc067350a Revert "MiraclePtr: Fetch partition_alloc."
c62380453c MiraclePtr: Fetch partition_alloc.
9bea95918e Update assertion in SkParagraph JS test
b61e3cb05f [graphite] Clean up PaintParamsKey printing
451f5c5429 [graphite] Remember DstReadRequirement on GraphicsPipelines
7e659d5538 [bazel] Move win_toolchain dep into download_toolchains_for_skia
77e33e3997 Remove unneeded SK_GRAPHITE guards
7ad1252da1 Include the ellipsis when computing the width of the longest line
928d041eb3 SkFontMgr_android should not crash if no fonts
7c2ab74e6d Roll vulkan-deps from ae6e9c9c9202 to 145442b950ac (5 revisions)
8103f53635 Revert "Move SkMSec out of public API"
f7e4ddabb7 [skottie] Allow conincident keyframes
1fa3a29e66 Revert "Update to Bazel 7"
06cd203d06 Move SkMSec out of public API
f4736c042d Replace "exec_tools" with "tools"
4786936b4c Revert "[graphite] Swap shape inversion for ClipOps."
3239119410 Update to Bazel 7
85381f0532 [rust png] Implement `SkPngRustCodec::onGetRepetitionCount`.
93f9d70339 [graphite] Add replayTranslation and dstCopyOffset to intrinsic uniforms
f38ea0134d [graphite] Centralize handling of viewport/rtAdjust values
5dd16011e5 [Vulkan] Fix deletion of fences on failed submits.
d802a3feec [Vulkan] Add AHARDWAREBUFFER_FORMAT_R10G10B10A10_UNORM checks to switch statements.
22c963ccc8 [graphite] Move lingering Viewer flag handling to SetTestOptions
8f62a6a4a2 [graphite] Move SkSL compilation into MtlGraphics|ComputePipeline::Make
6ad117bd2e [graphite] Simplify Dawn bound uniform tracking
35237c8397 [graphite] Refactor Dawn intrinsic uniforms handling into helper class
b6bab0fde4 Add debugging to fiddler-backend Docker creation
788055cf3b Make skia-client-search more public friendly
de8bf5a2c5 Add release_tag script for fiddler image
a09312b70d Roll vulkan-deps from a0dffec9be81 to ae6e9c9c9202 (1 revision)
368f209ccc Roll ANGLE from 59eff3660f81 to 61c26fd6930a (3 revisions)
3c45672285 Roll Skia Infra from f982e0beb5db to b96a50f0c8f0 (11 revisions)
9b0dbca2aa Roll Dawn from d3b7a448690d to b339ed4daf66 (22 revisions)
aec11ae18b [graphite] Store dst copy texture and bounds on RenderPassTask
e2d07cee07 Roll vulkan-deps from 3763a16adf08 to a0dffec9be81 (3 revisions)
ddb6b4613d [graphite] Update viewer's flag handling
530ee6c3ea [graphite] Convert Uniform|TextureDataBlock to value types
76c36f3d49 [infra] Fix infra_revision in DEPS
0a49b7c460 Add Skia Client Search HTML source to repository
a36931c58e [graphite] Add disable_robustness toggle for viewer/dm/nanobench
eff8af3778 [graphite] TextureDataBlock holds span of texture proxies
1d07c843f0 [graphite] Add DrawAtlasTest.
132c9e886e Roll ANGLE from d1a4b0ff5b83 to 59eff3660f81 (5 revisions)
4e86ddc5f6 Roll vulkan-deps from 6256e7687963 to 3763a16adf08 (4 revisions)
2b53f9f414 Roll Dawn from c0bc4d075afe to d3b7a448690d (17 revisions)
20b42bf485 [graphite] Disable SSBOs for Dawn/Vulkan
f60608d53b [graphite] Move PipelineDataCache into PipelineData.h
bf84e5e19f Add SkArenaAlloc::makeArrayCopy()
150cb9e34c [bazel] Add BazelBuild job for //example/external_client:use_ganesh_gl
e34ba37826 add build clarification to getting started docs
079f12cb2c Roll vulkan-deps from 725499142cb6 to 6256e7687963 (2 revisions)
fbe6d85428 Add Dockerfile/script to build fiddler backend
26b373c900 Guard both divisions in luminosity blend mode
a151819187 [infra] Add explicit DEPS entry for infra repo
f92c91e190 [graphite] Add jobs for testing Tint IR
809f868ded [bazel] Fix Windows build of //example/external_client:use_ganesh_gl
655699edfc Update straggling legacy ganesh #include path
a1bd0a72a4 [graphite] Update DM's handling of FakeWGPU jobs
816effc03d Add infra jobs to capture more Android perf data
3f2fc0ed99 Manual roll Dawn from 79281094cb19 to c0bc4d075afe (5 revisions)
0b24a6d3c5 Rename all JUMPER macros to SKRP
d1121ff583 [rust png] Cover `experimental/rust_png` in `gn/codec.gni`.
dd985e9faf Roll ANGLE from cf9e7fa53258 to d1a4b0ff5b83 (8 revisions)
32ab535755 Roll SK Tool from 0457b8183fa6 to f982e0beb5db
494769b6e1 Roll vulkan-deps from 5e29f5c97fc4 to 725499142cb6 (5 revisions)
44c2e76089 Roll Skia Infra from 22f0ebaf6218 to 0457b8183fa6 (4 revisions)
eaf2e8b0f4 Roll SwiftShader from 3c4bdf66d81d to 5561c71fa64e (1 revision)
4345fb9514 Roll Dawn from 7abbf53a30e9 to 79281094cb19 (12 revisions)
04d973ac4f Manual roll Dawn from 7f303d9bf39b to 7abbf53a30e9 (16 revisions)
3b5ce64737 Enforce IWYU on modules/svg
4f67c81b50 Disable musstail for the Android framework version on WIN32
9f6220cc2b [graphite] Swap shape inversion for ClipOps.
f725a5ba8a guard ios test apps with skia_enable_tools
f53e13c844 [graphite] Fix nanobench handling of the Graphite Options
8884cb1822 [pdf] Reduce drawing glyphs as paths
b8d0f3f55c Revert "Reland "[graphite] Clean out unused Plot backing stores when purging DrawAtlas.""
c7fa1752c3 Revert "Indicate we are able to root on Pixel5 devices"
0d9333e72a [graphite] Add centralized app flag handling
818500cd9d Indicate we are able to root on Pixel5 devices
60a2e1b3b2 [graphite] Make circular_rrect_clip snippet output coverage instead.
43b4f389ba [graphite] Rename clip shader block to be more generic.
33342f41f9 Revert "Reland "Split FreeType & FontConfig, step #1""
7e9c73abe9 Roll vulkan-deps from aa237b66d8cc to 5e29f5c97fc4 (1 revision)
ade3669094 SkAndroidCodec: Add getAndroidGainmap that populates an SkAndroidCodec
74b82302d2 Apply some clang-tidy suggestions to graphite code
5515c08c2e [webgpu-headers] Add macro for dropping "descriptor"
9b3146d7c3 Reland "Split FreeType & FontConfig, step #1"
79ad95c658 [rust png] Minimal `onGetFrameInfo` to support non-animated images.
2d5a750276 [bazel] Add Windows BazelBuild job
b004a4fd8d [infra] Refactors for gen_tasks
42cf8c1ffc [infra] Add pre-built bazel_build task driver to DEPS, add deps package
ab2317b948 Roll SK Tool from 22f0ebaf6218 to 438bd94cb3d4
dd35b1c021 Roll Skia Infra from 688a6d46a781 to 22f0ebaf6218 (3 revisions)
51df429f99 Roll Dawn from 1445e2c840ad to 7f303d9bf39b (6 revisions)
041fd378d3 Roll vulkan-deps from d71ce49d3f20 to aa237b66d8cc (13 revisions)
49ea0f3837 Manual roll ANGLE from 8b6b1113b9f7 to cf9e7fa53258 (6 revisions)
3d0c9bf481 Roll vulkan-deps from c9475650ea41 to d71ce49d3f20 (1 revision)
03bdb5c603 Manual roll Dawn from adaa316da841 to 1445e2c840ad (6 revisions)
c873eb5f38 Roll SK Tool from 688a6d46a781 to 9868db9a0c77
514feab300 Roll Skia Infra from 3bd0a4a92866 to 688a6d46a781 (7 revisions)
15641c0df7 Manual roll Dawn from bbe1f2283382 to adaa316da841 (7 revisions)
80f2cd7064 Manual roll ANGLE from b43f888968df to 8b6b1113b9f7 (16 revisions)
5477dbb533 Manual roll Dawn from 91a753ae9ce1 to bbe1f2283382 (23 revisions)
95ef9caae4 Roll vulkan-deps from 3b60161f180b to c9475650ea41 (3 revisions)
9d0039785e Roll jsfiddle-base from 699f74900f78 to dadc8978c6e9
492c5bc20d Roll skottie-base from 345313f563b8 to 20f5d28635bd
39637996fc Roll debugger-app-base from 0b6aba4d3d73 to ebfa46371f66
c5e2455468 Roll shaders-base from cb3395657dd9 to 4a9e92f23d7f
0182585d38 Roll SK Tool from 3bd0a4a92866 to ab47717f5e28
2727e4e5d7 Remove SkColorFilter::filterColor
45dd565fe0 [Dawn] Add remaining changes to enable ycbcr sampling in Dawn
2b7c7af652 [rust png] Minimal `on[Start]IncrementalDecode` implementation.
f3811180e7 [Graphite] Fix Vulkan Protected in BackendTexture tests.
63895c7057 Roll vulkan-deps from 83affe9d7595 to 3b60161f180b (1 revision)
2b633f7626 Roll ANGLE from c094d4bc2343 to b43f888968df (8 revisions)
c23d19fdf1 Roll Skia Infra from e04dcb74a523 to 3bd0a4a92866 (7 revisions)
fe38bf07e8 Roll Dawn from 2d913200c831 to 91a753ae9ce1 (20 revisions)
9ce15f8b2c [rust png] Use public header of skcms.
1bb3aef812 Roll vulkan-deps from e5360151769c to 83affe9d7595 (4 revisions)
55f348053f Prevent overflow when growing an SkRegion's RunArray
46d8175e88 RemoteStrike should use typeface Id from StrikeSpec
82e12bf299 First commit to skia
4a3cc47cfa [mesh2d] Enable the origin trial for demo app
88e662bc52 [Graphite] Add finished procs to updateBackendTexture.
f78107a44a Update gpu version for Intel Iris Xe tasks
d6a05b169b Check for size overflow before allocating SkMask data
51881ee9b5 [Graphite] Allow Vulkan to run UpdateImageBAckendTextureTest.
1d16eab57a Roll SK Tool from e04dcb74a523 to 956883ecef1d
b5d31abb7b [infra] Tweaks for bazel_build task driver
7cf7a65483 [rust png] Reuse `applyXformRow` from `SkPngRustCodec`.
10e44e318a [rust png] Better encapsulation of `SkPngCodec::initializeXforms`.
20b3af58d4 Add moved mock Ganesh files to ganesh_mock target
8fca64527f GPU support for 101010x color type (RGB only) and fixed some tests.
31406e7414 Roll vulkan-deps from 804d105c7169 to e5360151769c (3 revisions)
c2b1d5897c Roll ANGLE from 851f949bc3a1 to c094d4bc2343 (10 revisions)
253b10915d Roll Skia Infra from fb93bdd85957 to e04dcb74a523 (5 revisions)
dac455fdf5 Roll Dawn from d90557b380fa to 2d913200c831 (22 revisions)
e37b6b1980 Revert "Split FreeType & FontConfig, step #1"
0d8d9d2974 Manual roll Dawn from 03b32d20940d to d90557b380fa (4 revisions)
f5f3648c25 Split FreeType & FontConfig, step #1
0e6a385dda Reland "GPU support for F16F16F16x SkColorType."
11ccd08cff Roll SK Tool from fb93bdd85957 to 8b35b106dd98
d55406ca32 Roll vulkan-deps from 23ed8d76c58a to 804d105c7169 (4 revisions)
80b2ba7f4a Fix viewer scaling when changing displays on Mac
e79621b8fd [ganesh] Fix NonAALatticeOp combine check
07fcb9a002 [ganesh] Avoid int overflow in PatternHelper
838d676d2a [pdf] extract_cff_data doesn't need ownership
f1b130c74c [graphite] Add example Chrome Precompilation
583dfe02b8 [rust png] Inline `SkPngCodec::fBitDepth` field.
8fa6d3fab7 [rust png] Use `this->` prefix for method calls (for consistent style).
33e4921c87 [rust png] Use `SkSpan` for `dst` manipulations in `onGetPixels`.
43666b08c1 [graphite] Set up the FakeWGPU job just like the other Graphite_Dawn jobs
cd3d3daafe Move remaining Ganesh files in include/gpu and add shims
ca108745b1 Roll ANGLE from 2177be94a5e5 to 851f949bc3a1 (13 revisions)
41cb13f65f Roll Skia Infra from b53c019191d9 to fb93bdd85957 (5 revisions)
73672a94d8 Roll Dawn from 8eb31304452a to 03b32d20940d (13 revisions)
259010335a Roll vulkan-deps from 3546344d39d2 to 23ed8d76c58a (3 revisions)
505fb55cd0 [rust png] Reuse `png_select_xform_format` from `SkPngRustCodec`.
84e4a69da3 Roll SK Tool from bd38c7e8de61 to cbe956ba1c0b
912e5395b0 [rust png] Create `ICCProfile` from `cHRM`, `gAMA`, `iCCP`, `sRGB`.
9098a35588 Fix IWYU on some Ganesh ops headers
77017d30a4 Avoid potential overflow when allocating 3D mask from emboss filter
31a170226c Reland "[pdf] Emit bare CFF instead of OpenType CFF"
2e1eea5380 fixes custom iOS simulator version builds
11606e9ef4 Roll vulkan-deps from 7efe15073686 to 3546344d39d2 (1 revision)
27cc25c996 Fix src/gpu/vk target
490944a970 Reland "[graphite] Clean out unused Plot backing stores when purging DrawAtlas."
a2e2eb2924 Move and rename GR_MAKE_BITFIELD_CLASS_OPS
857aff31da [graphite] Add RenderPassProperties SkSpan to Precompile API
7d9054c431 Roll ANGLE from acf63b9ead5c to 2177be94a5e5 (17 revisions)
9460a31366 Roll Skia Infra from 1e4466d51783 to b53c019191d9 (8 revisions)
0b34e54d82 Roll SwiftShader from dc27069e5d04 to 3c4bdf66d81d (1 revision)
56b353d167 Roll Dawn from b4c5e1b2a8d9 to 8eb31304452a (15 revisions)
78ebd463a9 Roll vulkan-deps from 38174d6926f6 to 7efe15073686 (6 revisions)
c9f157b2cc Reapply "[rust png] Extract minimal `SkPngCodecBase`."
f50cad96a9 Add shims for include/gpu/d3d, gl, mock, and vk headers
50378c58b6 Roll SK Tool from 1e4466d51783 to b53c019191d9
298a395976 Roll skottie-base from eba2fc680652 to 345313f563b8
09e0ddc032 [bazel] Use platform fontmgrs in font_tool_utils
5916c287ed [graphite] Split up universal blend shader snippet
493d5bd8d2 [graphite] Remove static initializer in MtlCaps
dcbb7f2096 [ganesh] Fix signature of GrGLMemoryBarrierFn
f921d07b66 [pdf] Avoid known image/profile channel mismatch
a05dbd2a60 Roll vulkan-deps from b1ee6973bca0 to 38174d6926f6 (1 revision)
402703d0fe Roll Skia Infra from 387d930f2e5e to 1e4466d51783 (4 revisions)
abfd3440c8 Roll Dawn from 3f25662c1140 to b4c5e1b2a8d9 (3 revisions)
ce0656c1d7 Manual roll ANGLE from 38d5b4d61d8a to acf63b9ead5c (6 revisions)
cec6e0af2b Manual roll Dawn from 704ba481c6b0 to 3f25662c1140 (10 revisions)
d59df6f6f4 Roll vulkan-deps from 05f092235902 to b1ee6973bca0 (3 revisions)
741972846f Roll vulkan-deps from d95811d4259d to 05f092235902 (4 revisions)
897c052092 Remove GR_GL_CUSTOM_SETUP_HEADER
36fe81ef6a Roll skcms from c830bf291754 to f96615e73170 (1 revision)
0086a17e0d Roll ANGLE from 790e0162111b to 38d5b4d61d8a (7 revisions)
bd650364bd Roll vulkan-deps from 2df89413855e to d95811d4259d (2 revisions)
7d96b8516e Roll Skia Infra from 82ebd6669b10 to 387d930f2e5e (7 revisions)
cefb38617a Roll SK Tool from 387d930f2e5e to 8db4baf70cfc
d51642bc37 Roll SwiftShader from 7216df70d311 to dc27069e5d04 (1 revision)
7ac7760725 Roll Dawn from 1ef4f29058bb to 704ba481c6b0 (11 revisions)
789f5cb0b9 [bazel] Add windows toolchain
b25553b2fb Manual roll Dawn from f1015ca7ba5b to 1ef4f29058bb (7 revisions)
adeaaa142d Roll vulkan-deps from 6b0c5a0f7e45 to 2df89413855e (1 revision)
10e9072dce Manual roll vulkan-deps from 20bd94932cd1 to 6b0c5a0f7e45 (5 revisions)
04ce2e2bfc [graphite] Move the Precompilation testing files into a precompile sub-directory
c42205eb6e Fix undefined SkData class build issue with GCC 13.2
7611984dc2 Fix G3 build of mac_utils and ganesh_vulkan
4c66b7e420 Remove unnecessary GL shim files
0429e894d3 Roll ANGLE from 36f7e03a3578 to 790e0162111b (7 revisions)
a9af6f4663 Roll SK Tool from 82ebd6669b10 to 504f49204b21
da19333542 Roll Skia Infra from 244b54c99d6e to 82ebd6669b10 (10 revisions)
ed202b1ee5 Roll Dawn from a38b02612272 to f1015ca7ba5b (4 revisions)
0775b6816c Roll vulkan-deps from 447c179b707d to 20bd94932cd1 (1 revision)
c341fdf4fc [graphite] Fix loop counter for Image_YUVA::textureSize().
34aa8ce13a Revert "[graphite] Clean out unused Plot backing stores when purging DrawAtlas."
500e6b737e Manual roll vulkan-deps from 4bf3eeb31636 to 447c179b707d (10 revisions)
a2329a9edf [graphite] Clean out unused Plot backing stores when purging DrawAtlas.
3cd00377ce Remove --with-fontations from GN build
369ef45e3d Manual roll Dawn from 7ee30f5d2f5a to a38b02612272 (7 revisions)
452a306052 Rename join -> joinpath in infra/bots directories
e4e8af427a Ignore more deleted test files on Android devices
a75f9d512d Replace 'python' call w/ 'python3' in infra/bots/recipe_modules
c022414adc Stop forcing debug symbol generation with skia_enable_optimize_size
e1518fdb31 [skottietool] Fix text rendering in worker threads
a71a3d9ca3 Fix builds after flag removal
69f4bd8590 [skottie] Fix Shift Channels effect coverage with FullOn alpha
d06dc084d3 Delete all filegroups that supported legacy (non-buffet) Bazel build
81adc84a80 Replace deprecated wgpu::SwapChain with wgpu::Surface
eeebcd8596 Move utils/SkTestCanvas -> tools/gpu/TestCanvas
9dacecec78 Manual roll ANGLE from 86508e2014f8 to 36f7e03a3578 (5 revisions)
249d3f07c4 Remove SkSL program size limit
77e2115c12 [graphite] Update createGraphicsPipeline trace slice to _ALWAYS variant
51ac9d9385 [graphite] Add inverse fill support to circular rrect clip.
efd38e98b2 [ganesh] Avoid int overflow when combining RegionOps
c31e2ca59b [graphite] Enable Vulkan dual-source blending when device supports it
717dfca8fb Roll vulkan-deps from b36cd71bb7c9 to 4bf3eeb31636 (2 revisions)
c00866df10 [bazel] More fixes for Windows build
39e5118034 Roll ANGLE from 1a191b1d5dc8 to 86508e2014f8 (7 revisions)
221ada80b1 Roll SK Tool from 244b54c99d6e to b4341e24cfa5
4fa13860e4 Roll Skia Infra from 87111746e4cc to 244b54c99d6e (5 revisions)
d576296091 Roll Dawn from 40d470c73393 to 7ee30f5d2f5a (10 revisions)
a3388794e0 Roll vulkan-deps from 3fa5bf77e2bf to b36cd71bb7c9 (4 revisions)
90671d1b34 Revert "Add [[nodiscard]] to Sk[I]Rect::intersect"
51d7e221fe Add [[nodiscard]] to Sk[I]Rect::intersect
facc4290b2 Reland "[graphite] Add purge() method to DrawAtlas."
b472cacb48 Manual roll Dawn from ae5dd592666e to 40d470c73393 (8 revisions)
a8160d8082 [Android] Don't evaluate trace arguments if using ATrace but !ATRACE_ENABLED()
0205c66d94 Roll FreeType from 73720c7c to f92c9655 (23 commits)
eb5f21e12e Revert "[rust png] Extract minimal `SkPngCodecBase`."
df5bc8139c [rust png] Extract minimal `SkPngCodecBase`.
c050181439 Merge 5 release notes into RELEASE_NOTES.md
e0e54728d6 Update Skia milestone to 130
6299c57443 Delete old GLFW interface
d6548fdb78 Roll vulkan-deps from b038f07b8faf to 3fa5bf77e2bf (1 revision)
cc9c81d7fc Roll ANGLE from 579a58552fa6 to 1a191b1d5dc8 (4 revisions)
ada9a367c5 Roll SK Tool from 87111746e4cc to c71e16037f25
61789ce6b0 Roll Skia Infra from da2e5cb8d546 to 87111746e4cc (5 revisions)
840a6e4e65 Roll SwiftShader from 65157d32945d to 7216df70d311 (1 revision)
ef46e72b81 Roll Dawn from db1fa936ad0a to ae5dd592666e (14 revisions)
30a00629e1 Reland "Guard division in luminosity blend against overflow"
87ac3ba21b Roll vulkan-deps from f8f75e8cc154 to b038f07b8faf (3 revisions)
3bf51f9811 Revert "Revert "Reland "Reduce size of linear SkMaskGamma LUT"""
e65e02c50d Revert "GPU support for F16F16F16x SkColorType."
63d2793355 [graphite] Break DrawTypeFlags::kText into finer grained draw types
b6224c9e66 GPU support for F16F16F16x SkColorType.
ebe7cb3e13 Revert "Guard division in luminosity blend against overflow"
318b7958f7 Apply clang-tidy suggestion to graphite files
3ea162e500 Add SK_USE_FREETYPE_EMBOLDEN to NativeFonts_FreeType
52f391e116 CPU support of F16F16F16x SkColorType.
82966c3b30 [bazel] Fix defines for freetype on Windows
d528658273 [bazel] Fix skshaper build for Windows
fd0b314f78 Guard division in luminosity blend against overflow
66485e4252 Remove unused gni file list
5491fe7b90 [bazel] Fix zlib defines for Windows
22ea02e371 [bazel] Fix global compile options for Windows
fdc8c2d593 [ganesh] Fix MeshOp index combination logic
ab4dec2e50 [graphite] Revise DrawTypeFlags
0cbdc42fb3 Update $color_burn_component  to single flow of control
63f9965fdb Reland "Avoid branches and early returns in $color_dodge_component"
d88bfe2939 [bazel] Fix copy and patch commands for Windows
e49cd5f3cf Roll vulkan-deps from 99bced033e05 to f8f75e8cc154 (1 revision)
3896447e35 Roll ANGLE from 83ca89e58cef to 579a58552fa6 (9 revisions)
5274def7cf Roll SK Tool from da2e5cb8d546 to db27834aff1f
9bb3245aea Roll Skia Infra from 521d0157ce62 to da2e5cb8d546 (3 revisions)
75bd296f97 Roll Dawn from 69433722b83b to db1fa936ad0a (23 revisions)
7025ec4bff Roll vulkan-deps from d8208b108762 to 99bced033e05 (2 revisions)
ac7149e315 Roll vulkan-deps from 0ff16cd9feaa to d8208b108762 (1 revision)
570b18e1af Revert "Avoid branches and early returns in $color_dodge_component"
219bd10327 Avoid branches and early returns in $color_dodge_component
7dd77fc75f Revert "[graphite] Add purge() method to DrawAtlas."
e789d82e7e Roll vulkan-deps from dad70915c62f to 0ff16cd9feaa (5 revisions)
d83ec34901 DropShadow image filters accept float colors and color spaces for the shadow color.
fc8769175d Apply buildifier to modules/audioplayer
b22c3e3b4d [bazel] Add Viewer resources
f6943e099d SkScalerContext implementation specific emboldening
ce31dfbb5c [graphite] Add purge() method to DrawAtlas.
8941ecefe7 Revert "[pdf] Emit bare CFF instead of OpenType CFF"
2d6eb7a97d Reapply "[bazel] Remove symlinks for external files"
0fd46cf3ca Delete `DECODE_PNG_FILES` from `src/codec/BUILD.bazel`
3b2bb423b3 Depend only on public PNG headers from `ico_decode` target.
0e0009bce6 Add GNI group for PNG and expand source list
7a52390f55 Roll vulkan-deps from 97855a7c330f to dad70915c62f (5 revisions)
56ae2524d8 Roll ANGLE from 2003e06230b1 to 83ca89e58cef (6 revisions)
e3c5d3a341 Roll Dawn from 2918c4247f20 to 69433722b83b (16 revisions)
a913cd8ae6 Roll Skia Infra from 936d3406908e to 521d0157ce62 (7 revisions)
985db07db2 [graphite] Make DrawAtlas::compact() more aggressive.
c1e14f6ec7 [graphite] Avoid one ref when dealing with subRunStorage.
af47068c44 Roll SK Tool from 936d3406908e to 521d0157ce62
efbee192fd Revert "[bazel] Remove symlinks for external files"
484d22d153 Revert "Reland "Reduce size of linear SkMaskGamma LUT""
6a02863967 Simplify Porter-Duff constant blend function
d9a9218241 Implement asAColorMode and asAColorMatrix for SkWorkingFormatColorFilter
9f271dd945 [bazel] Remove symlinks for external files
13647a4bd4 Reland "Reduce size of linear SkMaskGamma LUT"
9068430177 Roll vulkan-deps from 91058f2297c9 to 97855a7c330f (1 revision)
3e448a3814 [rust png] Avoiding newtype wrapper for `cxx::UniquePtr<ffi::ReadTrait>`
d6a555a1e5 [rust png] Expose `png::Reader` over the FFI boundary.
889dbfa25b [bazel] Enable SVG support in Viewer
ad70fcae39 Reland "[graphite] Add DawnCaps::extractGraphicsDescs"
96d3c4c7a2 [pdf] Emit bare CFF instead of OpenType CFF
491b5c668e [graphite] Don't run GMs that test automatic image tiling
5e5c9d026e Reland "Allow client arrays on ANGLE."
64e441ab35 [bazel] More viewer slides
79fe8c823e Remove all references to legacy //:skia_public and //:skia_internal
c30ba7bb38 Roll ANGLE from 087afc919eda to 2003e06230b1 (8 revisions)
f3b29fa1a5 Roll vulkan-deps from 0d313c52316c to 91058f2297c9 (3 revisions)
7943b497e9 Roll Skia Infra from 60f8f34ea424 to 936d3406908e (8 revisions)
9d08b4f9f5 Roll Dawn from 239f9139d016 to 2918c4247f20 (14 revisions)
609f57533f Roll SK Tool from 60f8f34ea424 to 936d3406908e
d50960eac8 Revert "[graphite] Add DawnCaps::extractGraphicsDescs"
60a679edbb Revert "[graphite] Fix static initializer problem wrt Caps Domains"
e06db12a67 [graphite] Fix static initializer problem wrt Caps Domains
2d3772ea4d [bazel] Enable Skottie support in Viewer
0b6326b89a Roll vulkan-deps from f084a55f96da to 0d313c52316c (1 revision)
81660bb6b7 Add SkJpegMetadataDecoder::Make that takes SkData
04ff2c904c Enforce IWYU on graphite/geom
eae6c1ba7f Apply clang-tidy suggestion to UploadTask
3d4d4d5c3d Fix Bazel build of viewer after GPU_TEST_UTILS landed
bd35174acd [graphite] Add DawnCaps::extractGraphicsDescs
5cd75725cf Roll ANGLE from 5b4517ec4a27 to 087afc919eda (10 revisions)
a9bf93fdee [Fontations] Do not assert on empty png size
3a8e3b8fc5 Roll Skia Infra from 5dfe34f67d5c to 60f8f34ea424 (6 revisions)
fe522d2c98 Roll Dawn from 1eca38fa5236 to 239f9139d016 (25 revisions)
eea0e46d35 Roll SK Tool from 7cdb9f62c381 to b3c1429e2e2e
9f679d3d2a Roll vulkan-deps from 9f4c74d5ee5f to f084a55f96da (2 revisions)
4dd38caf37 Move SkOSLibrary out of skia proper
258d936713 [PDF] Remove no longer needed SkClipOp checks. The additional ops were removed here: https://skia-review.googlesource.com/c/skia/+/436565
d1b243ba90 [SkSL:RP] Prevent overflow when computing slot allocation size
de92181f1c Roll vulkan-deps from 38c20f3a406b to 9f4c74d5ee5f (1 revision)
297b50d860 Combine GR_TEST_UTILS and GRAPHITE_TEST_UTILS into GPU_TEST_UTILS
7c0eeaf124 Add test and perf bots for Dawn on GLES
d11cdccf3f [bazel] Update viewer to be built on the modular Bazel rules
a12a1fc416 Roll ANGLE from 6e248bcb44bf to 5b4517ec4a27 (10 revisions)
899762bba6 Roll SK Tool from 5dfe34f67d5c to 7cdb9f62c381
e726525283 Roll Skia Infra from da60460a940c to 5dfe34f67d5c (4 revisions)
8dc4b2e927 Roll Dawn from 08335b848221 to 1eca38fa5236 (16 revisions)
d3cd0afd8f Revert "Reduce size of linear SkMaskGamma LUT"
d6f85d7fa2 [graphite] Consolidate one-time uploads to single task/blit encoder
cbd5898acb [rust png] Initial implementation of `SkPngRustCodec`.
8cb8136c05 Reduce size of linear SkMaskGamma LUT
7bed8fb6fa Roll vulkan-deps from c95d5ac066d8 to 38c20f3a406b (8 revisions)
24143b0d6a [pdf] Bounds check in skia_alloc_func
c9fd814b10 graphite: Make Metal memoryless textures be zero-sized
2f731912f9 TArray: Remove some redundant ASAN unpoisoning
54ac6609a2 graphite: Expose currentPurgeableBytes on Context and Recorder
e232752d04 Refactor //tools/window/ in preparation of Bazel use
c8cffe32e1 graphite: Do not skip memoryless textures in memory dumps
4dde57fc97 Add a comment explaining the DEPS file
ec7558d41b [examples] Update help text to match output file encoding

Canonical link: https://commits.webkit.org/285008@main
pulkomandy pushed a commit that referenced this pull request Nov 29, 2024
https://bugs.webkit.org/show_bug.cgi?id=282741
rdar://139412312

Reviewed by Youenn Fablet.

Pass colorspace information to the created CVPixelBuffer.
We add utility methods to construct the colorspace data from the vpcC box and VPx bytestream
should the information not be provided on construction.

We prefer colorspace information from this source order given colorspace > description data (vpcC) > inband bytestream.

Added tests verifying that black are pure black, and yellow are almost pure yellow with 601 videos and video range.
Technically they should be exactly pure (255, 255, 0), however, compression artifacts with the source makes it not so.

Fly-by #1: m_isClosed can be accessed concurrently on the decoder's or caller's workqueue. Make it atomic.
Fly-by #2: Make relevant members const and add annotation about where some members can be accessed from.

* LayoutTests/media/content/test-h264-601-videorange.mp4: Added.
* LayoutTests/media/content/test-vp8-601-videorange.webm: Added.
* LayoutTests/media/content/test-vp9-601-videorange.webm: Added.
* LayoutTests/media/media-source/media-source-vp8-hiddenframes.html: We can reduce the fuzz range now that both the VT decoder (mac) will return the same colours as VideoDecoder (ios family)
* LayoutTests/media/media-video-fullrange.html: Wait a maximum of 500ms for the promise to be resolved as the rVFC callback may not always be called.
* LayoutTests/media/media-video-videorange-expected.txt: Added.
* LayoutTests/media/media-video-videorange.html: Added.
* LayoutTests/media/media-vp8-hiddenframes.html: We can reduce the fuzz range now that both the VT decoder (mac) will return the same colours as VideoDecoder (ios family)
* LayoutTests/platform/mac-wk1/TestExpectations:
* LayoutTests/platform/wpe/TestExpectations:
* Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoder.cpp:
(WebCore::createVideoDecoderConfig):
* Source/WebCore/platform/VideoDecoder.h:
* Source/WebCore/platform/graphics/VP9Utilities.cpp:
(WebCore::vPCodecConfigurationRecordFromVPXByteStream):
(WebCore::convertToPlatformVideoColorPrimaries):
(WebCore::convertToPlatformVideoTransferCharacteristics):
(WebCore::convertToPlatformVideoMatrixCoefficients):
(WebCore::colorSpaceFromVPCodecConfigurationRecord):
(WebCore::vpcCFromVPXByteStream): Deleted.
* Source/WebCore/platform/graphics/VP9Utilities.h:
* Source/WebCore/platform/graphics/cocoa/CMUtilities.h:
* Source/WebCore/platform/graphics/cocoa/CMUtilities.mm:
(WebCore::convertToCMTransferFunction): Add transfer value for BT601 (smpte170m) which is the same as 709.2 transfer.
(WebCore::attachColorSpaceToPixelBuffer):
* Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm: Move methods to VP9Utilities.cpp
(WebCore::convertToMatrixCoefficients):
(WebCore::createVideoInfoFromVPCodecConfigurationRecord):
(WebCore::convertToPlatformVideoColorPrimaries): Deleted.
(WebCore::convertToPlatformVideoTransferCharacteristics): Deleted.
(WebCore::convertToPlatformVideoMatrixCoefficients): Deleted.
* Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.h:
* Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm:
(WebCore::WebCoreDecompressionSession::decodeSampleInternal): Retrieve colorspace from CMSampleBuffer and give it to the decoder initialization.
(WebCore::WebCoreDecompressionSession::enqueueDecodedSample): Fly-by: the last video frame in a webm doesn't have a duration. A logic
error would have caused to never notify the listener that the frame at currentTime had been decoded, leading to the play() promise to never be resolved (nor rVFC callback to be called)
(WebCore::WebCoreDecompressionSession::initializeVideoDecoder):
* Source/WebCore/platform/libwebrtc/LibWebRTCVPXVideoDecoder.cpp:
(WebCore::LibWebRTCVPXInternalVideoDecoder::decode):
(WebCore::LibWebRTCVPXInternalVideoDecoder::LibWebRTCVPXInternalVideoDecoder):
(WebCore::LibWebRTCVPXInternalVideoDecoder::createPixelBuffer):
(WebCore::LibWebRTCVPXInternalVideoDecoder::Decoded):

Canonical link: https://commits.webkit.org/286474@main
pulkomandy pushed a commit that referenced this pull request Nov 29, 2024
…layout dependent state

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

Reviewed by Antti Koivisto.

There are isSkippedContentRoot functions atm.

1. WebCore::isSkippedContentRoot(style, element)
2. and RenderObject::isSkippedContentRoot

(see ContentVisibilityForceLayoutScope, for cases when we need to look inside c-v subtrees for geometry)
and returns false when we are supposed to ignore content-visibility.
This is always scoped to a layout frame (as opposed to painting, hittesting etc)

The codebase is sprinkled with isSkippedContentRoot() calls, some of which exercise #1
while others call into #2 in a seemingly random fashion (e.g. even painting calls the "let's consult the ignore bit" variant).

This patch replaces these 2 functions with
1. LocalFrameViewLayoutContext::isSkippedContentRootForLayout()
2. WebCore::isSkippedContentRoot(renderer)

Where during layout we call layoutContext().isSkippedContentRootForLayout() (surprisingly small number) and the rest simply calls #2.

(Note, there's a highly specific, 3rd use case in StyleAdjuster, which should be moved out to a place where we could use the WebCore::isSkippedContentRoot(renderer) variant).

* Source/WebCore/dom/Document.cpp:
(WebCore::CallbackForContainIntrinsicSize):
(WebCore::Document::caretPositionFromPoint):
* Source/WebCore/editing/TextIterator.cpp:
(WebCore::TextIterator::advance):
* Source/WebCore/page/LocalFrameViewLayoutContext.cpp:
(WebCore::LocalFrameViewLayoutContext::isSkippedContentForLayout const):
(WebCore::LocalFrameViewLayoutContext::isSkippedContentRootForLayout const):
* Source/WebCore/page/LocalFrameViewLayoutContext.h:
* Source/WebCore/rendering/RenderBlock.cpp:
(WebCore::RenderBlock::simplifiedLayout):
(WebCore::RenderBlock::layoutPositionedObject):
(WebCore::RenderBlock::paintContents):
(WebCore::RenderBlock::adjustBorderBoxRectForPainting):
(WebCore::RenderBlock::paintRectToClipOutFromBorder):
(WebCore::RenderBlock::paintExcludedChildrenInBorder):
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChildren):
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::foregroundIsKnownToBeOpaqueInRect const):
(WebCore::RenderBox::explicitIntrinsicInnerWidth const):
(WebCore::RenderBox::explicitIntrinsicInnerHeight const):
* Source/WebCore/rendering/RenderElement.cpp:
(WebCore::RenderElement::styleWillChange):
(WebCore::RenderElement::layoutIfNeeded):
(WebCore::RenderElement::isSkippedContentRoot const): Deleted.
* Source/WebCore/rendering/RenderElement.h:
(WebCore::RenderObject::isSkippedContentRoot const): Deleted.
* Source/WebCore/rendering/RenderElementInlines.h:
(WebCore::RenderElement::shouldApplyInlineSizeContainment const):
(WebCore::RenderElement::shouldApplySizeContainment const):
(WebCore::RenderElement::shouldApplySizeOrInlineSizeContainment const):
(WebCore::isSkippedContentRoot):
* Source/WebCore/rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutPositionedObject):
* Source/WebCore/rendering/RenderObject.cpp:
(WebCore::RenderObject::isSkippedContentForLayout const): Deleted.
* Source/WebCore/rendering/RenderObject.h:
* Source/WebCore/rendering/RenderObjectInlines.h:
(WebCore::RenderObject::layoutContext const):
* Source/WebCore/rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::paint):
* Source/WebCore/rendering/RenderWidget.cpp:
(WebCore::RenderWidget::paint):
* Source/WebCore/rendering/style/RenderStyle.h:
* Source/WebCore/rendering/style/RenderStyleInlines.h:
(WebCore::doesSizeContainmentApplyByStyle):
(WebCore::isSkippedContentRoot): Deleted.
* Source/WebCore/rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::updateElementRenderer):
* Source/WebCore/style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::adjust const):

Canonical link: https://commits.webkit.org/286858@main
pulkomandy pushed a commit that referenced this pull request Feb 16, 2025
…pector

rdar://98891055
https://bugs.webkit.org/show_bug.cgi?id=283092

Reviewed by Ryosuke Niwa and BJ Burg.

There currently exists a message
WebInspectorUIProxy::OpenLocalInspectorFrontend, which the web process
sends to the UI process to show Web Inspector for the current web page.
This introduces security risks as a compromised website may find its way
to send arbitrary messages to the UI process, opening Web Inspector and
weakening the web content sandbox.

The reason this message exists is because there are useful ways the web
process needs to open Web Inspector with initiative. Normally, Web
Inspector is opened via one of the Develop menu's items, which is
controlled by the UI process. However, Web Inspector can also be opened
without being prompted by the UI process first, in these places:
   1. In a web page's context menu, the "Inspect Element" option
   2. Inside Web Inspector, if the Debug UI is enabled, on the top right
      corner, a button to open inspector^2
   3. In WebKitTestRunner, via the TestRunner::showWebInspector function

This patch makes it so that web process can no longer send a message to
a UI process to open Web Inspector. This means web process cannot open
Web Inspector at will -- it must be either due to the UI process's
demand, or it's in one of the above three cases. More details below.

I have tested that this change preserves the above three special cases
and does prevent the web page from opening Web Inspector at will.
   - Cases #1 and #2 can be tested from the UI.
   - Case #3 can be tested with a WebKit test involving Web Inspector.
     I ran the test LayoutTests/inspector/console/js-completions.html,
     where I saw the test crashing without special treatment for this
     case.
   - To verify that the web page can't open Web Inspector, I followed
     the reproduction steps from the Radar and saw Web Inspector no
     longer opens, and opening the external URL also failed as expected.

* Source/WebKit/UIProcess/Inspector/WebInspectorUIProxy.messages.in:
* Source/WebKit/UIProcess/Inspector/WebInspectorUIProxy.h:
* Source/WebKit/UIProcess/Inspector/WebInspectorUIProxy.cpp:
(WebKit::WebInspectorUIProxy::connect):
   - If the UI process wants to open Web Inspector, it sends a
     WebInspector::Show command to the web process. This patch makes
     that command take an async reply, so that the anticipated
     WebInspectorUIProxy::OpenLocalInspectorFrontend message from the
     web process can now be delivered through that async reply instead.
     This ensures that OpenLocalInspectorFrontend can only be done
     when initiated from the UI process (due to user interaction).

(WebKit::WebInspectorUIProxy::markAsUnderTest):
(WebKit::WebInspectorUIProxy::openLocalInspectorFrontend):
(WebKit::WebInspectorUIProxy::closeFrontendPageAndWindow):
   - To avoid relying on the web process for potentially sensitive
     parameters, I reworked and removed the canAttach and underTest
     arguments from openLocalInspectorFrontend. These two values
     are now stored and managed in the UI process instead, instead of
     being passed from the web process all the time.

      - For canAttach, I noticed that the
        WebInspectorUIProxyMac::platformCanAttach method already
        implements the same logic as the web process's
        WebInspector::canAttachWindow. I filed https://webkit.org/b/283435
        as a follow-up to clean up the webProcessCanAttach parameter,
        the canAttachWindow function in the web process, and potentially
        the m_attached field too, which all become obsolete due to
        this change.
           - I couldn't figure out what the `if (m_attached)` in
             canAttachWindow check does, and to me it had no effect, as
             this function is not called while inspector is open.

      - For underTest, I'm now letting the test runner directly set
        the flag on the WebInspectorUIProxy, as part of my fix to
        address case #3 from above.

(WebKit::WebInspectorUIProxy::showConsole):
(WebKit::WebInspectorUIProxy::showResources):
(WebKit::WebInspectorUIProxy::showMainResourceForFrame):
(WebKit::WebInspectorUIProxy::togglePageProfiling):
   - As the web process can longer call OpenLocalInspectorFrontend,
     call show/connect/openLocalInspectorFrontend here in the UI process
     instead.

(WebKit::WebInspectorUIProxy::requestOpenLocalInspectorFrontend):
   - To preserve the open inspector^2 button (case #2 from above), we
     still maintain this message, but we ignore it unless it's for
     opening inspector^2, thus renaming the message as a request.
     This is all assuming that the Web Inspector is not a compromised
     web process, so we allow that message from it to come through.

* Source/WebKit/WebProcess/Inspector/WebInspector.messages.in:
* Source/WebKit/WebProcess/Inspector/WebInspector.h:
* Source/WebKit/WebProcess/Inspector/WebInspector.cpp:
(WebKit::WebInspector::show):
   - The Show message now takes an async reply, which is used to replace
     sending WebInspectorUIProxy::OpenLocalInspectorFrontend later.

(WebKit::WebInspector::showConsole):
(WebKit::WebInspector::showResources):
(WebKit::WebInspector::showMainResourceForFrame):
(WebKit::WebInspector::startPageProfiling):
(WebKit::WebInspector::stopPageProfiling):
   - Calling inspectorController()->show() no longer does anything,
     since it's now the UI process's job to show Web Inspector first,
     for these functions to merely switch to the appropriate tabs.

* Source/WebKit/WebProcess/Inspector/WebInspector.cpp:
(WebKit::WebInspector::openLocalInspectorFrontend):
* Source/WebKit/WebProcess/Inspector/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::openLocalFrontend):
   - Adapt to the command's reworked version.
   - This is maintained to allow the opening of inspector^2 from the web
     process (case #2 from above). For opening inspector^1, this message
     will be ignored by the UI process.

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::contextMenuItemSelected):
   - When the "Inspect Element" context menu item is selected (case #1
     from above), since the web process may not be privileged to open
     Web Inspector, handle the showing of inspector here in UI process.

* Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::showWebInspector):
* Tools/WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
* Source/WebKit/UIProcess/API/C/WKPagePrivate.h:
* Source/WebKit/UIProcess/API/C/WKPage.cpp:
(WKPageShowWebInspectorForTesting):
   - Preserve letting the WebKitTestRunner open Web Inspector (case #3
     from above).
   - Adapt to the change that we now also let the UI process know about
     the underTest flag for case #3, rather than letting UI process
     rely on the value reported by the web process.

* Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageShowInspectorForTest): Deleted.
   - No longer used due to my special fix for case #3.

Originally-landed-as: 283286.537@safari-7620-branch (694a9b5). rdar://144667626
Canonical link: https://commits.webkit.org/290260@main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.