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
[LBSE] Outermost <svg> elements are not device-pixel aligned #4158
[LBSE] Outermost <svg> elements are not device-pixel aligned #4158
Conversation
EWS run on previous version of this PR (hash b777164) |
This depends on PR #4157. |
b777164
to
541e0ba
Compare
|
EWS run on previous version of this PR (hash 541e0ba) |
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.
LGTM.
mac-AS-debug-wk2 shows one test with 1px more in fuzziness 852 -> 853 pixels (it was already a range, so it's fine to raise). |
541e0ba
to
c983d0b
Compare
https://bugs.webkit.org/show_bug.cgi?id=244966 Reviewed by Rob Buis. RenderLayer::paintLayerByApplingTransform() already contains all the code necessary to place outer <svg> elements on device-pixel aligned boundaries. The subpixelOffset is applied as transformation once for the outermost <svg> and thus to all descendants, since the outermost <svg> establishes a stacking context. The subpixelOffset is not relevant below RenderSVGRoot, since the rest of the SVG render tree is not applying device-pixel alignment. This fixes a few rendering differences between LBSE / legacy, as indicated by the LBSE specific expected.png removal. Add two new tests covering inline SVG positioning non non-integer coordinates, probing the sub-pixel / device-pixel alignment is done correctly. A follow-up patch will revisit this topic, considering also composited elements, testing their behaviour with respect to sub-pixel positioning + SVG + overflow + 3D transforms... * LayoutTests/platform/mac-monterey-wk2-lbse-text/svg/custom/absolute-sized-svg-in-xhtml-expected.png: Removed. * LayoutTests/platform/mac-monterey-wk2-lbse-text/svg/custom/createImageElement2-expected.png: Removed. * LayoutTests/platform/mac-monterey-wk2-lbse-text/svg/custom/embedding-external-svgs-expected.png: Removed. * LayoutTests/platform/mac-monterey-wk2-lbse-text/svg/custom/image-parent-translation-expected.png: Removed. * LayoutTests/platform/mac-monterey-wk2-lbse-text/svg/custom/junk-data-expected.png: Removed. * LayoutTests/platform/mac-monterey-wk2-lbse-text/svg/custom/path-bad-data-expected.png: Removed. * LayoutTests/platform/mac-monterey-wk2-lbse-text/svg/custom/rootmost-svg-xy-attrs-expected.png: * LayoutTests/platform/mac-monterey-wk2-lbse-text/svg/hixie/error/012-expected.png: Removed. * LayoutTests/platform/mac-monterey-wk2-lbse-text/svg/transforms/animated-path-inside-transformed-html-expected.png: Added. * LayoutTests/platform/mac-monterey-wk2-lbse-text/svg/transforms/svg-css-transforms-expected.png: Removed. * LayoutTests/svg/compositing/outermost-svg-with-border-padding.html: Allow 1px more difference (seen by ews-mac-debug-wk2). * LayoutTests/svg/in-html/inline-svg-non-integer-position-display-block-expected.html: Added. * LayoutTests/svg/in-html/inline-svg-non-integer-position-display-block.html: Added. * LayoutTests/svg/in-html/inline-svg-non-integer-position-display-inline-expected.html: Added. * LayoutTests/svg/in-html/inline-svg-non-integer-position-display-inline.html: Added. * Source/WebCore/rendering/RenderLayerBacking.cpp: (WebCore::snappedGraphicsLayer): (WebCore::RenderLayerBacking::computeParentGraphicsLayerRect const): (WebCore::RenderLayerBacking::updateGeometry): (WebCore::RenderLayerBacking::adjustOverflowControlsPositionRelativeToAncestor): (WebCore::RenderLayerBacking::updateMaskingLayerGeometry): (WebCore::RenderLayerBacking::updateContentsRects): (WebCore::RenderLayerBacking::updateClippingStackLayerGeometry): (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect): * Source/WebCore/rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::paintingAffectedByExternalOffset const): (WebCore::RenderSVGRoot::updateFromStyle): * Source/WebCore/rendering/svg/RenderSVGRoot.h: Canonical link: https://commits.webkit.org/254558@main
c983d0b
to
de2323d
Compare
Committed 254558@main (de2323d): https://commits.webkit.org/254558@main Reviewed commits have been landed. Closing PR #4158 and removing active labels. |
de2323d
c983d0b
π mac-debugπ§ͺ mac-wk1π§ͺ mac-AS-debug-wk2