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
CSS perspective should only affect direct DOM children. #5278
Closed
Conversation
This file contains 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
mattwoodrow
added
528+ (Nightly build)
CSS
Cascading Style Sheets implementation
labels
Oct 12, 2022
EWS run on previous version of this PR (hash a037d68) |
weinig
reviewed
Oct 12, 2022
bool layerChanged = false; | ||
if (needsPerspectiveLayer) { | ||
if (!m_perspectiveLayer) { | ||
String layerName = m_owningLayer.name() + " (perspective)"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should use makeString(m_owningLayer.name(), " (perspective)")
mattwoodrow
force-pushed
the
eng/perpsective-transforms
branch
from
October 12, 2022 19:31
a037d68
to
e91fb2e
Compare
EWS run on previous version of this PR (hash e91fb2e) |
webkit-ews-buildbot
added
the
merging-blocked
Applied to prevent a change from being merged
label
Oct 12, 2022
https://bugs.webkit.org/show_bug.cgi?id=73268 <rdar://problem/100834757> Reviewed by NOBODY (OOPS!). CSS perspective should only be combined into the transform of direct DOM children, and shouldn't result in any intersections in 3d coordinate space. We currently create a GraphicsLayer for the RenderLayer with perspective, which applies the perspective to all RenderLayer children (even if they belong to a descendant that isn't a child), and enables intersections. This change instead creates a wrapper GraphicsLayer for each transformed RenderLayer which should inherit perspective from its parent. This ensures that we only apply perspective when correct, and no intersections can happens since the perspective wrapper only has a single child. The downside is that we create extra GraphicsLayers, but there's no other way to get the desired CSS behaviour with the current API. The perspective layer is sized the same as the parent layer, since the computed perspective transform gets applied relative to the anchor point of the layer, and it's expected to be in the middle of the layer, so we need them to be the same size. * LayoutTests/TestExpectations: * LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/3d-rendering-context-behavior-expected.txt: * Source/WebCore/rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::destroyGraphicsLayers): (WebCore::RenderLayerBacking::updateChildrenTransformAndAnchorPoint): (WebCore::RenderLayerBacking::updateConfiguration): (WebCore::RenderLayerBacking::updateInternalHierarchy): (WebCore::RenderLayerBacking::updatePerspectiveLayer): (WebCore::RenderLayerBacking::childForSuperlayers const): * Source/WebCore/rendering/RenderLayerBacking.h: * Source/WebCore/rendering/RenderLayerCompositor.cpp: (WebCore::recompositeChangeRequiresGeometryUpdate): (WebCore::recompositeChangeRequiresChildrenGeometryUpdate): (WebCore::RenderLayerCompositor::layerStyleChanged): * Source/WebCore/rendering/RenderObject.cpp: (WebCore::RenderObject::getTransformFromContainer const):
mattwoodrow
removed
the
merging-blocked
Applied to prevent a change from being merged
label
Oct 12, 2022
webkit-ews-buildbot
added
the
merging-blocked
Applied to prevent a change from being merged
label
Oct 12, 2022
mattwoodrow
force-pushed
the
eng/perpsective-transforms
branch
from
October 12, 2022 19:38
e91fb2e
to
1f51474
Compare
EWS run on current version of this PR (hash 1f51474) |
I couple of thoughts before I do a full review.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CSS
Cascading Style Sheets implementation
merging-blocked
Applied to prevent a change from being merged
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.
1f51474
1f51474