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

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: add layout test and fix background 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') | Source/core/paint/DeprecatedPaintLayerPainter.cpp » ('j') | 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..aebd5df81860a32cce8a6456dc3795f73cae5c7c 100644
--- a/Source/core/paint/DeprecatedPaintLayerClipper.cpp
+++ b/Source/core/paint/DeprecatedPaintLayerClipper.cpp
@@ -217,22 +217,23 @@ void DeprecatedPaintLayerClipper::calculateRects(const ClipRectsContext& context
if (!isClippingRoot && m_layoutObject.layer()->parent()) {
backgroundRect = backgroundClipRect(context);
- backgroundRect.move(roundedIntSize(context.subPixelAccumulation));
pdr. 2015/08/17 21:17:53 We used roundedIntSize before, but don't now. Was
qiankun 2015/08/19 09:14:19 It's intentional. The layout test which was added
backgroundRect.intersect(paintDirtyRect);
pdr. 2015/08/17 21:17:53 This seems wrong... we're intersecting with the pa
qiankun 2015/08/19 09:14:19 Both backgroundRect and paintDirtyRect should move
pdr. 2015/08/20 05:55:13 I'm just worried about the order these are being d
qiankun 2015/08/20 06:08:43 Current implementation is wrong here. I think we s
} else {
backgroundRect = paintDirtyRect;
}
- foregroundRect = backgroundRect;
- outlineRect = backgroundRect;
-
LayoutPoint offset;
- if (offsetFromRoot)
+ if (offsetFromRoot) {
offset = *offsetFromRoot;
- else
+ backgroundRect.move(context.subPixelAccumulation);
+ } else {
m_layoutObject.layer()->convertToLayerCoords(context.rootLayer, offset);
+ }
layerBounds = LayoutRect(offset, LayoutSize(m_layoutObject.layer()->size()));
+ foregroundRect = backgroundRect;
+ outlineRect = backgroundRect;
+
// Update the clip rects that will be passed to child layers.
if (m_layoutObject.hasOverflowClip()) {
// This layer establishes a clip of some kind.
« no previous file with comments | « Source/core/paint/DeprecatedPaintLayer.cpp ('k') | Source/core/paint/DeprecatedPaintLayerPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698