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

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: DCHECK rootLayer; rename computeReferenceBox to boxForClipPath 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
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698