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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp

Issue 2280963002: Fix clip-path reference box/coordinate space setup for hit-testing (Closed)
Patch Set: Go through with test-cleanup... Created 4 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
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..af2389d5dce0d27d27b2be48b8094fb5fe412db2 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.computeReferenceBox());
referenceBox.moveBy(offsetFromRoot);
clipPathClipper.emplace(
context, *m_paintLayer.layoutObject(), FloatRect(referenceBox), FloatRect(rootRelativeBounds), FloatPoint(offsetFromRoot));

Powered by Google App Engine
This is Rietveld 408576698