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

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

Issue 2379753003: [SPInvalidation] Fix paint offset issue of descendants of composited svg root (Closed)
Patch Set: Update comment Created 4 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
index c250cac23558cf24e557f35ddb5115e285b29ca3..43afc0033f6d4dd54ad2d7c3a69b49f198daf6e2 100644
--- a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
@@ -78,7 +78,11 @@ static LayoutRect mapLocalRectToPaintInvalidationBacking(GeometryMapper& geometr
bool success = false;
result = LayoutRect(geometryMapper.mapToVisualRectInDestinationSpace(rect, currentTreeState, containerTreeState, success));
DCHECK(success);
- result.moveBy(-containerPaintProperties->localBorderBoxProperties()->paintOffset);
+
+ // Exclude container's paint offset from the result to get it in container's local coordinates,
pdr. 2016/09/29 21:00:54 If possible I'd like to avoid having to do this ki
Xianzhu 2016/09/29 22:18:06 We do zero out the paint offset in PaintPropertyTr
pdr. 2016/09/29 23:31:54 Your latest patch does make this much clearer but
Xianzhu 2016/09/30 00:20:24 I think the root cause of the concept "paintOffset
pdr. 2016/09/30 04:06:00 Aha! I think I understand it now. In other words,
Xianzhu 2016/09/30 04:10:24 The design looks great! Thanks!
+ // except for svgLocalToBorderBoxTransform which is applied after the container's paint offset.
+ if (containerTreeState.transform != containerPaintProperties->svgLocalToBorderBoxTransform())
+ result.moveBy(-containerPaintProperties->localBorderBoxProperties()->paintOffset);
}
if (context.paintInvalidationContainer->layer()->groupedMapping())
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698