Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Perspective should not be affected by transform-origin
https://bugs.webkit.org/show_bug.cgi?id=211787 <rdar://problem/63143806> Patch by Nikolas Zimmermann <nzimmermann@igalia.com> on 2022-05-21 Reviewed by Simon Fraser. Fix a number of issues related to perspective handling: - 'perspective-origin' always used the border-box as reference box, when resolving length percentages, ignoring the choice of 'transform-box'. Fix that. - Proper 'transform-box' awareness throghout RenderLayerBacking (few places with issue, e.g. perspectiveOrigin() affecting repaint & coverage rects) - The chosen perspective transformation was not invariant under 'transform-origin' / 'transform-box' changes of the element A, that defines the perspective. However the perspective set on element A should only affect the rendering of its descendants: the choice of the 'transform-origin' / 'transform-box' of element A should have no effect on the perspective established for the children. - Assure that 'transform-box' changes trigger GraphicLayer geometry updates: this fully fixes 'transform-box' support for composited elements, and brings its state on-par with non-composited elements (both support all kind of transform-box / transform-origin combinations on regular layers, clipped layers, scrolled layers). This fixes the (not yet upstreamed) test web-platform-tests/css/css-transforms/animation/transform-box-will-change-transform-layer.html. Prepared a new WPT test (see above) for upstreaming. * Source/WebCore/animation/KeyframeEffect.cpp: (WebCore::KeyframeEffect::computeTransformedExtentViaTransformList const): * Source/WebCore/rendering/RenderLayer.cpp: (WebCore::RenderLayer::perspectiveTransform const): (WebCore::RenderLayer::perspectiveOrigin const): * Source/WebCore/rendering/RenderLayer.h: * Source/WebCore/rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateTransform): (WebCore::RenderLayerBacking::updateChildrenTransformAndAnchorPoint): (WebCore::RenderLayerBacking::computeTransformOriginForPainting const): Deleted. * Source/WebCore/rendering/RenderLayerBacking.h: * Source/WebCore/rendering/RenderLayerCompositor.cpp: (WebCore::recompositeChangeRequiresGeometryUpdate): * Source/WebCore/rendering/RenderLayerModelObject.cpp: (WebCore::RenderLayerModelObject::applySVGTransform const): * Source/WebCore/rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::computePerspectiveOrigin const): (WebCore::RenderStyle::applyPerspective const): (WebCore::RenderStyle::computeTransformOrigin const): (WebCore::RenderStyle::applyTransformOrigin const): (WebCore::RenderStyle::unapplyTransformOrigin const): (WebCore::RenderStyle::applyTransform const): (WebCore::RenderStyle::applyMotionPathTransform const): * Source/WebCore/rendering/style/RenderStyle.h: * Source/WebCore/svg/SVGGraphicsElement.cpp: (WebCore::SVGGraphicsElement::animatedLocalTransform const): * LayoutTests/compositing/tiling/coverage-adjustment-secondary-quad-mapping-expected.txt: * LayoutTests/compositing/tiling/perspective-on-scroller-tile-coverage-expected.txt: * LayoutTests/platform/glib/TestExpectations: * LayoutTests/platform/ios-wk2/compositing/tiling/coverage-adjustment-secondary-quad-mapping-expected.txt: * LayoutTests/platform/ios/TestExpectations: * LayoutTests/platform/mac-wk1/compositing/tiling/perspective-on-scroller-tile-coverage-expected.txt: * LayoutTests/platform/mac/TestExpectations: * LayoutTests/platform/win/TestExpectations: Canonical link: https://commits.webkit.org/250841@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294615 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
9ebbc11
commit 0d63a642cb91f26934728bacf945d33a6eeb9ecf
Showing
18 changed files
with
130 additions
and
92 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.