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..9295d4fc1fcaffb652696f024932e3f11c4a7073 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,23 @@ 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())); |
| + { |
| + const ClipRect& rect& = intersection(newClip, clipRects.posClipRect()); |
|
pdr.
2015/09/05 00:07:48
One too many ampersands!
chrishtr
2015/09/05 00:21:16
Fixed.
|
| + rect.setIsClippedByClipCss(); |
| + clipRects.setPosClipRect(rect); |
| + } |
| + |
| + { |
| + const ClipRect& rect = intersection(newClip, clipRects.overflowClipRect()); |
| + rect.setIsClippedByClipCss(); |
| + clipRects.setOverflowClipRect(rect); |
| + } |
| + |
| + { |
| + const ClipRect& rect = intersection(newClip, clipRects.fixedClipRect()); |
| + rect.setIsClippedByClipCss(); |
| + clipRects.setFixedClipRect(rect); |
| + } |
| } |
| } |
| @@ -260,8 +275,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(); |
| } |
| } |