Index: third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp |
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp |
index cfb707c2443930419b14e492edf54350532008ca..d5d2ada34acdaf02030d9a5807a9c7320d153e04 100644 |
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp |
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp |
@@ -181,14 +181,6 @@ static bool shouldRepaintSubsequence(PaintLayer& paintLayer, const PaintLayerPai |
return needsRepaint; |
} |
-static LayoutRect computeReferenceBox(const LayoutBoxModelObject& boxModelObject) |
-{ |
- if (boxModelObject.isLayoutInline()) |
- return toLayoutInline(boxModelObject).linesBoundingBox(); |
- SECURITY_DCHECK(boxModelObject.isBox()); |
- return toLayoutBox(boxModelObject).borderBoxRect(); |
-} |
- |
PaintLayerPainter::PaintResult PaintLayerPainter::paintLayerContents(GraphicsContext& context, const PaintLayerPaintingInfo& paintingInfoArg, PaintLayerFlags paintFlags, FragmentPolicy fragmentPolicy) |
{ |
ASSERT(m_paintLayer.isSelfPaintingLayer() || m_paintLayer.hasSelfPaintingLayerDescendant()); |
@@ -262,7 +254,8 @@ PaintLayerPainter::PaintResult PaintLayerPainter::paintLayerContents(GraphicsCon |
rootRelativeBoundsComputed = true; |
} |
paintingInfo.ancestorHasClipPathClipping = true; |
- LayoutRect referenceBox(computeReferenceBox(*m_paintLayer.layoutObject())); |
+ |
+ LayoutRect referenceBox(m_paintLayer.boxForClipPath()); |
referenceBox.moveBy(offsetFromRoot); |
clipPathClipper.emplace( |
context, *m_paintLayer.layoutObject(), FloatRect(referenceBox), FloatRect(rootRelativeBounds), FloatPoint(offsetFromRoot)); |