Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1bbc9d4d1dba7ff67be8c337fe0bde218c887024
https://github.com/WebKit/WebKit/commit/1bbc9d4d1dba7ff67be8c337fe0bde218c887024
Author: Wenson Hsieh <[email protected]>
Date: 2025-06-13 (Fri, 13 Jun 2025)
Changed paths:
A
LayoutTests/editing/selection/ios/select-text-in-container-with-backdrop-filter-expected.txt
A
LayoutTests/editing/selection/ios/select-text-in-container-with-backdrop-filter.html
M Source/WebCore/editing/Editing.cpp
M Source/WebCore/platform/graphics/GraphicsLayer.h
M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
Log Message:
-----------
[iOS] [SelectionHonorsOverflowScrolling] youtube.com: selection doesn’t show
up in search field
https://bugs.webkit.org/show_bug.cgi?id=294486
rdar://153309873
Reviewed by Abrar Rahman Protyasha.
When selecting text inside of an element with a backdrop filter on iOS 26,
native selection views
are currently inserted *behind* the selected web content rather than above it,
causing the actual
selection UI to be partly (or fully) obscured.
This happens because the corresponding `RenderLayerBacking` (corresponding to
an element with a
backdrop filter) requires an additional structural graphics layer as the
ancestor of the underlying
layer that draws the content (and contains any composited children). We
currently use
`primaryLayerID` to compute the identifier of the layer where the selection
views will be inserted,
but this ends up being the identifier for this structural layer rather than the
`m_layer`.
As a result, selection views are inserted under the structural layer in the
back-most position (with
the intention of being obscured by any composited children). This causes the
layer contents to cover
the selection views entirely.
To fix this, we switch from using `primaryLayerID` to a new
`layerIDIgnoringStructuralLayer`, which
(on Cocoa platforms) skips this structural layer and returns the inner content
layer, allowing the
selection views to be parented above the layer's contents (but behind any
composited children that
may cover it).
*
LayoutTests/editing/selection/ios/select-text-in-container-with-backdrop-filter-expected.txt:
Added.
*
LayoutTests/editing/selection/ios/select-text-in-container-with-backdrop-filter.html:
Added.
Add a new layout test to verify the bug fix. This test selects text inside of a
container with a
backdrop filter, and verifies that the native selection view is frontmost
(relative to the
compositing view).
* Source/WebCore/editing/Editing.cpp:
(WebCore::computeEnclosingLayer):
Use `layerIDIgnoringStructuralLayer` here instead of `primaryLayerID`; see
above for more details.
* Source/WebCore/platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::layerIDIgnoringStructuralLayer const):
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::layerIDIgnoringStructuralLayer const):
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h:
Canonical link: https://commits.webkit.org/296221@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes