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

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

Issue 2624383002: Apply SVG viewport clips in PaintLayer; paint background of replaced like boxes. (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/PaintLayerClipper.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp b/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp
index c0e23e008dd6561734af682900b476095c003583..7f5ee0603bddc1e2d0e6ecd9d09976dbda872af1 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp
@@ -412,9 +412,7 @@ void PaintLayerClipper::calculateClipRects(const ClipRectsContext& context,
adjustClipRectsForChildren(layoutObject, clipRects);
- if (shouldClipOverflow(context) || layoutObject.hasClip() ||
- (layoutObject.isSVGRoot() &&
- toLayoutSVGRoot(&layoutObject)->shouldApplyViewportClip())) {
+ if (shouldClipOverflow(context) || layoutObject.hasClip()) {
// This offset cannot use convertToLayerCoords, because sometimes our
// rootLayer may be across some transformed layer boundary, for example, in
// the PaintLayerCompositor overlapMap, where clipRects are needed in view
@@ -546,8 +544,11 @@ void PaintLayerClipper::getOrCalculateClipRects(const ClipRectsContext& context,
bool PaintLayerClipper::shouldClipOverflow(
const ClipRectsContext& context) const {
- return (m_layer.layoutObject()->hasOverflowClip() ||
- m_layer.layoutObject()->styleRef().containsPaint()) &&
+ LayoutObject* layoutObject = m_layer.layoutObject();
+ return (layoutObject->hasOverflowClip() ||
+ layoutObject->styleRef().containsPaint() ||
+ (layoutObject->isSVGRoot() &&
+ toLayoutSVGRoot(layoutObject)->shouldApplyViewportClip())) &&
shouldRespectOverflowClip(context);
}
« no previous file with comments | « third_party/WebKit/Source/core/paint/BoxClipper.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayerClipperTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698