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

Unified Diff: Source/core/paint/DeprecatedPaintLayerClipper.cpp

Issue 1278113003: Calculate correct clip foregroundBound and backgroundBound (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: only for offsetFromRoot is non-null Created 5 years, 4 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 | « Source/core/paint/DeprecatedPaintLayer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/DeprecatedPaintLayerClipper.cpp
diff --git a/Source/core/paint/DeprecatedPaintLayerClipper.cpp b/Source/core/paint/DeprecatedPaintLayerClipper.cpp
index 4545e9497330e06859daee4296b23cb88f085714..4c97a90c674b665c7729f3a85267b6660fe3fbbd 100644
--- a/Source/core/paint/DeprecatedPaintLayerClipper.cpp
+++ b/Source/core/paint/DeprecatedPaintLayerClipper.cpp
@@ -227,10 +227,13 @@ void DeprecatedPaintLayerClipper::calculateRects(const ClipRectsContext& context
outlineRect = backgroundRect;
LayoutPoint offset;
- if (offsetFromRoot)
+ if (offsetFromRoot) {
offset = *offsetFromRoot;
- else
+ foregroundRect.move(context.subPixelAccumulation);
pdr. 2015/08/07 23:20:31 Why don't we need to move backgroundRect too?
qiankun 2015/08/13 10:36:03 Thanks for review. backgroundRect also needs to mo
+ outlineRect.move(context.subPixelAccumulation);
+ } else {
m_layoutObject.layer()->convertToLayerCoords(context.rootLayer, offset);
+ }
layerBounds = LayoutRect(offset, LayoutSize(m_layoutObject.layer()->size()));
// Update the clip rects that will be passed to child layers.
« no previous file with comments | « Source/core/paint/DeprecatedPaintLayer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698