Chromium Code Reviews| Index: Source/core/paint/DeprecatedPaintLayerClipper.cpp |
| diff --git a/Source/core/paint/DeprecatedPaintLayerClipper.cpp b/Source/core/paint/DeprecatedPaintLayerClipper.cpp |
| index 441854efe3e3d20e384bd5b4fa181f3f8ad8644d..ed7694c46974e4bd520ddb56704cead2b9922220 100644 |
| --- a/Source/core/paint/DeprecatedPaintLayerClipper.cpp |
| +++ b/Source/core/paint/DeprecatedPaintLayerClipper.cpp |
| @@ -65,6 +65,7 @@ static void adjustClipRectsForChildren(const LayoutObject& layoutObject, ClipRec |
| clipRects.setOverflowClipRect(clipRects.posClipRect()); |
| } |
| } |
| + |
| static void applyClipRects(const ClipRectsContext& context, LayoutObject& layoutObject, LayoutPoint offset, ClipRects& clipRects) |
| { |
| ASSERT(layoutObject.hasOverflowClip() || layoutObject.hasClip()); |
| @@ -83,9 +84,22 @@ static void applyClipRects(const ClipRectsContext& context, LayoutObject& layout |
| } |
| if (layoutObject.hasClip()) { |
| LayoutRect newClip = toLayoutBox(layoutObject).clipRect(offset); |
| - clipRects.setPosClipRect(intersection(newClip, clipRects.posClipRect())); |
| - clipRects.setOverflowClipRect(intersection(newClip, clipRects.overflowClipRect())); |
| - clipRects.setFixedClipRect(intersection(newClip, clipRects.fixedClipRect())); |
| + { |
| + ClipRect rect = intersection(newClip, clipRects.posClipRect()); |
|
pdr.
2015/09/04 22:55:14
Please use some ampersands here.
chrishtr
2015/09/04 23:39:00
Done
|
| + rect.setIsClippedByClipCss(); |
| + clipRects.setPosClipRect(rect); |
| + } |
|
pdr.
2015/09/04 22:55:14
nit: newline
chrishtr
2015/09/04 23:39:00
Done
|
| + { |
| + ClipRect rect = intersection(newClip, clipRects.overflowClipRect()); |
| + rect.setIsClippedByClipCss(); |
| + clipRects.setOverflowClipRect(rect); |
| + } |
| + |
| + { |
| + ClipRect rect = intersection(newClip, clipRects.fixedClipRect()); |
| + rect.setIsClippedByClipCss(); |
| + clipRects.setFixedClipRect(rect); |
| + } |
| } |
| } |
| @@ -260,8 +274,11 @@ void DeprecatedPaintLayerClipper::calculateRects(const ClipRectsContext& context |
| // Clip applies to *us* as well, so go ahead and update the damageRect. |
| LayoutRect newPosClip = toLayoutBox(m_layoutObject).clipRect(offset); |
| backgroundRect.intersect(newPosClip); |
| + backgroundRect.setIsClippedByClipCss(); |
| foregroundRect.intersect(newPosClip); |
| + foregroundRect.setIsClippedByClipCss(); |
| outlineRect.intersect(newPosClip); |
| + outlineRect.setIsClippedByClipCss(); |
| } |
| } |