-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Iframes with HDR images don't always become composited to show the HDR #47340
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
Merged
webkit-commit-queue
merged 1 commit into
WebKit:main
from
smfr:eng/NEW-TEST-296315-main-macOS-iOS-compositing-hdr-iframe-with-hdr-image-html-is-flaky-failure
Jun 30, 2025
Merged
+231
−31
Conversation
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
EWS run on previous version of this PR (hash 74d6f42) |
74d6f42
to
96e855d
Compare
mattwoodrow
approved these changes
Jun 29, 2025
96e855d
to
1e2e806
Compare
EWS run on previous version of this PR (hash 1e2e806) |
1e2e806
to
929de7c
Compare
EWS run on current version of this PR (hash 929de7c) |
https://bugs.webkit.org/show_bug.cgi?id=294873 rdar://154137509 Reviewed by Matt Woodrow. 296315@main wasn't quite complete; there's a race condition, revealed by `iframe-with-hdr-image.html`, where the iframe may not actually do a compositing update after we detect the HDR image. The new test, `iframe-gains-hdr-image.html`, targets this case. When `RenderElement::imageContentChanged()` is called, we may not have any compositing layers in the iframe yet, so we'd never hit `layer->contentChanged()`. We also need to explicitly trigger a compositing update for this image, via `invalidateStyleAndLayerComposition()`. There's no need to find the `enclosingCompositingLayer()` to call `contentChanged()` on; we can just call it on the enclosing RenderLayer. `ContentChangeType::HDRImage` is added since HDR images are specifically a compositing trigger which prevents us from needlessly triggering compositing updates for SDR images. * LayoutTests/compositing/hdr/iframe-gains-hdr-image-expected.txt: Added. * LayoutTests/compositing/hdr/iframe-gains-hdr-image.html: Added. * LayoutTests/compositing/hdr/iframe-with-hdr-image.html: * LayoutTests/compositing/hdr/layer-gains-hdr-image-expected.txt: Added. * LayoutTests/compositing/hdr/layer-gains-hdr-image.html: Copied from LayoutTests/compositing/hdr/iframe-with-hdr-image.html. * LayoutTests/platform/ios/TestExpectations: * LayoutTests/platform/mac-wk2/TestExpectations: * Source/WebCore/rendering/RenderBoxModelObject.h: * Source/WebCore/rendering/RenderElement.cpp: (WebCore::RenderElement::imageContentChanged): * Source/WebCore/rendering/RenderLayer.cpp: (WebCore::RenderLayer::contentChanged): Canonical link: https://commits.webkit.org/296835@main
929de7c
to
6f89b28
Compare
Committed 296835@main (6f89b28): https://commits.webkit.org/296835@main Reviewed commits have been landed. Closing PR #47340 and removing active labels. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
New Bugs
Unclassified bugs are placed in this component until the correct component can be determined.
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.
6f89b28
929de7c