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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 return clipRect; 105 return clipRect;
106 } 106 }
107 107
108 void DeprecatedPaintLayerClipper::calculateRects(const ClipRectsContext& context , const LayoutRect& paintDirtyRect, LayoutRect& layerBounds, 108 void DeprecatedPaintLayerClipper::calculateRects(const ClipRectsContext& context , const LayoutRect& paintDirtyRect, LayoutRect& layerBounds,
109 ClipRect& backgroundRect, ClipRect& foregroundRect, ClipRect& outlineRect, c onst LayoutPoint* offsetFromRoot) const 109 ClipRect& backgroundRect, ClipRect& foregroundRect, ClipRect& outlineRect, c onst LayoutPoint* offsetFromRoot) const
110 { 110 {
111 bool isClippingRoot = m_layoutObject.layer() == context.rootLayer; 111 bool isClippingRoot = m_layoutObject.layer() == context.rootLayer;
112 112
113 if (!isClippingRoot && m_layoutObject.layer()->parent()) { 113 if (!isClippingRoot && m_layoutObject.layer()->parent()) {
114 backgroundRect = backgroundClipRect(context); 114 backgroundRect = backgroundClipRect(context);
115 backgroundRect.move(roundedIntSize(context.subPixelAccumulation)); 115 backgroundRect.move(context.subPixelAccumulation);
116 backgroundRect.intersect(paintDirtyRect); 116 backgroundRect.intersect(paintDirtyRect);
117 } else { 117 } else {
118 backgroundRect = paintDirtyRect; 118 backgroundRect = paintDirtyRect;
119 } 119 }
120 120
121 foregroundRect = backgroundRect; 121 foregroundRect = backgroundRect;
122 outlineRect = backgroundRect; 122 outlineRect = backgroundRect;
123 123
124 LayoutPoint offset; 124 LayoutPoint offset;
125 if (offsetFromRoot) 125 if (offsetFromRoot)
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 if (context.respectOverflowClip == IgnoreOverflowClip) 446 if (context.respectOverflowClip == IgnoreOverflowClip)
447 return false; 447 return false;
448 448
449 if (layer->isRootLayer() && context.respectOverflowClipForViewport == Ignore OverflowClip) 449 if (layer->isRootLayer() && context.respectOverflowClipForViewport == Ignore OverflowClip)
450 return false; 450 return false;
451 451
452 return true; 452 return true;
453 } 453 }
454 454
455 } // namespace blink 455 } // namespace blink
OLDNEW
« 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