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

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

Issue 2642193011: Unify all types of overflow-related clips for paint and hit testing. (Closed)
Patch Set: none Created 3 years, 11 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/BoxClipper.cpp
diff --git a/third_party/WebKit/Source/core/paint/BoxClipper.cpp b/third_party/WebKit/Source/core/paint/BoxClipper.cpp
index 87d52245a69d070fe95773947dfb44ac4b85f427..9d0bd2da3186d02859f61855f2d7cecf87c31455 100644
--- a/third_party/WebKit/Source/core/paint/BoxClipper.cpp
+++ b/third_party/WebKit/Source/core/paint/BoxClipper.cpp
@@ -26,10 +26,7 @@ namespace blink {
static bool boxNeedsClip(const LayoutBox& box) {
if (box.hasLayer() && box.layer()->isSelfPaintingLayer())
return false;
- if (box.isSVGRoot() && toLayoutSVGRoot(box).shouldApplyViewportClip())
- return true;
- return box.hasOverflowClip() || box.styleRef().containsPaint() ||
- box.hasControlClip();
+ return box.shouldClipOverflow();
}
DISABLE_CFI_PERF
@@ -62,9 +59,7 @@ BoxClipper::BoxClipper(const LayoutBox& box,
if (!boxNeedsClip(m_box))
return;
- LayoutRect clipRect = m_box.hasControlClip()
- ? m_box.controlClipRect(accumulatedOffset)
- : m_box.overflowClipRect(accumulatedOffset);
+ LayoutRect clipRect = m_box.overflowClipRect(accumulatedOffset);
FloatRoundedRect clipRoundedRect(0, 0, 0, 0);
bool hasBorderRadius = m_box.style()->hasBorderRadius();
if (hasBorderRadius)
« no previous file with comments | « third_party/WebKit/Source/core/paint/BlockPainter.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698