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

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

Issue 2279823002: Use LayoutSVGResourceClipper::resourceBoundingBox() in ClipPathClipper (Closed)
Patch Set: Rebase Created 4 years, 3 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/FilterPainter.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 aae71e637ac5b4c8b0362ab5349f2952b4a915fe..ab6ce18ad9bd90cc2f17a77a8922975afdf6b020 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
@@ -233,9 +233,6 @@ PaintLayerPainter::PaintResult PaintLayerPainter::paintLayerContents(GraphicsCon
if (!paintingInfo.paintDirtyRect.contains(bounds))
result = MayBeClippedByPaintDirtyRect;
- LayoutRect rootRelativeBounds;
- bool rootRelativeBoundsComputed = false;
-
if (paintingInfo.ancestorHasClipPathClipping && m_paintLayer.layoutObject()->isPositioned())
UseCounter::count(m_paintLayer.layoutObject()->document(), UseCounter::ClipPathOfPositionedElement);
@@ -246,16 +243,12 @@ PaintLayerPainter::PaintResult PaintLayerPainter::paintLayerContents(GraphicsCon
// It must, however, still be applied to the mask layer, so that the compositor can properly mask the
// scrolling contents and scrollbars.
if (m_paintLayer.layoutObject()->hasClipPath() && (!m_paintLayer.needsCompositedScrolling() || (paintFlags & PaintLayerPaintingChildClippingMaskPhase))) {
- if (!rootRelativeBoundsComputed) {
- rootRelativeBounds = m_paintLayer.physicalBoundingBoxIncludingReflectionAndStackingChildren(offsetFromRoot);
- rootRelativeBoundsComputed = true;
- }
paintingInfo.ancestorHasClipPathClipping = true;
LayoutRect referenceBox(m_paintLayer.boxForClipPath());
referenceBox.moveBy(offsetFromRoot);
clipPathClipper.emplace(
- context, *m_paintLayer.layoutObject(), FloatRect(referenceBox), FloatRect(rootRelativeBounds), FloatPoint(offsetFromRoot));
+ context, *m_paintLayer.layoutObject(), FloatRect(referenceBox), FloatPoint(offsetFromRoot));
}
Optional<CompositingRecorder> compositingRecorder;
@@ -304,8 +297,7 @@ PaintLayerPainter::PaintResult PaintLayerPainter::paintLayerContents(GraphicsCon
bool selectionOnly = localPaintingInfo.getGlobalPaintFlags() & GlobalPaintSelectionOnly;
{ // Begin block for the lifetime of any filter.
- FilterPainter filterPainter(m_paintLayer, context, offsetFromRoot, layerFragments.isEmpty() ? ClipRect() : layerFragments[0].backgroundRect, localPaintingInfo, paintFlags,
- rootRelativeBounds, rootRelativeBoundsComputed);
+ FilterPainter filterPainter(m_paintLayer, context, offsetFromRoot, layerFragments.isEmpty() ? ClipRect() : layerFragments[0].backgroundRect, localPaintingInfo, paintFlags);
Optional<ScopedPaintChunkProperties> scopedPaintChunkProperties;
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
« no previous file with comments | « third_party/WebKit/Source/core/paint/FilterPainter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698