Sometimes the contents of a visibility:hidden iframe become visible#27306
Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom Apr 18, 2024
Conversation
Collaborator
|
EWS run on previous version of this PR (hash 3bcca51) Details |
3bcca51 to
ea4bda8
Compare
Collaborator
|
EWS run on current version of this PR (hash ea4bda8) Details |
mattwoodrow
approved these changes
Apr 16, 2024
https://bugs.webkit.org/show_bug.cgi?id=272727 rdar://126178201 Reviewed by Matt Woodrow. A normal composited but `visibility:hidden` layer uses `setContentsVisible(false)` to hide its contents (by clearing the layer's `contents` property), and this works within a document because `visibility` is inherited, and allows a visible child inside a hidden ancestor. For plugin or iframe layers we try to avoid making them composited when they are `visibility:hidden`. However, if they are composited for other reasons (e.g. `position:fixed`) then we hide their layer contents, but we fail to hide their descendant layers, which GraphicsLayer parented via `attachWidgetContentLayers()`. Fix this by not parenting the widget's content layers in `RenderLayerCompositor::attachWidgetContentLayersIfNecessary()`, and enhancing the return value to distinguish between "widget has contents via child layers", and "mutated the layer hierarchy" since the two callers were using the return value in two different ways. Enhance an existing test to exercise this case. * LayoutTests/compositing/visibility/iframe-visibility-hidden-expected.html: * LayoutTests/compositing/visibility/iframe-visibility-hidden.html: * Source/WebCore/rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateConfiguration): * Source/WebCore/rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateBackingAndHierarchy): (WebCore::RenderLayerCompositor::attachWidgetContentLayersIfNecessary): (WebCore::RenderLayerCompositor::attachWidgetContentLayers): Deleted. * Source/WebCore/rendering/RenderLayerCompositor.h: Canonical link: https://commits.webkit.org/277643@main
ea4bda8 to
d927d70
Compare
Collaborator
|
Committed 277643@main (d927d70): https://commits.webkit.org/277643@main Reviewed commits have been landed. Closing PR #27306 and removing active labels. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
d927d70
ea4bda8
🧪 wpe-wk2🧪 gtk-wk2