Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(740)

Unified Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp

Issue 2131803002: Ensure SVG PaintOffset is reset at the HTML/SVG boundary [spv2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
index 65fa062fec1928cf21f29f08e7921510a16f5077..f3b52d559efd546235df4ad7ed619d5808e0e625 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
@@ -263,8 +263,12 @@ void PaintPropertyTreeBuilder::updateSvgLocalToBorderBoxTransform(const LayoutOb
return;
AffineTransform transformToBorderBox = SVGRootPainter(toLayoutSVGRoot(object)).transformToPixelSnappedBorderBox(context.paintOffset);
- if (transformToBorderBox.isIdentity())
+ if (transformToBorderBox.isIdentity()) {
chrishtr 2016/07/08 15:07:03 What does paintOffset being zero have to do with t
+ // SVG does not use paint offset internally so ensure it is set to zero. Pixel snapping can
+ // cause an identity |transformToBorderBox| even though |context.paintOffset| is non-zero.
+ context.paintOffset = LayoutPoint();
chrishtr 2016/07/08 17:40:21 How about just moving this line up above 266 then,
pdr. 2016/07/08 18:04:40 Sounds reasonable, done. PTAL
return;
+ }
RefPtr<TransformPaintPropertyNode> svgLocalToBorderBoxTransform = TransformPaintPropertyNode::create(
transformToBorderBox, FloatPoint3D(0, 0, 0), context.currentTransform);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698