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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2098683003: Use enclosingIntRect when computing paint invalidations across transforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: none Created 4 years, 6 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 | « third_party/WebKit/LayoutTests/paint/invalidation/invalidation-with-scale-transform-expected.txt ('k') | 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/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 8cc5859cdb74d683fcf2beeddef15f128a77e7ba..5a67a96d661ebf8b22efa0669535b77ca7ee773e 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -2077,7 +2077,10 @@ bool LayoutBox::mapToVisualRectInAncestorSpace(const LayoutBoxModelObject* ances
// We are now in our parent container's coordinate space. Apply our transform to obtain a bounding box
// in the parent's coordinate space that encloses us.
if (hasLayer() && layer()->transform()) {
- rect = LayoutRect(layer()->transform()->mapRect(pixelSnappedIntRect(rect)));
+ // Use enclosingIntRect because we cannot properly compute pixel snapping for painted elements within
+ // the transform since we don't know the desired subpixel accumulation at this point, and the transform may
+ // include a scale.
+ rect = LayoutRect(layer()->transform()->mapRect(enclosingIntRect(rect)));
topLeft = rect.location();
topLeft.move(locationOffset());
}
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/invalidation/invalidation-with-scale-transform-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698