Chromium Code Reviews

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

Issue 1656213002: Display -webkit-filter objects in any column (instead of only in the first one). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2623
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: third_party/WebKit/Source/core/paint/FilterPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/FilterPainter.cpp b/third_party/WebKit/Source/core/paint/FilterPainter.cpp
index bd78e6791ad977b9ab4428b03da7df82469c4db0..f3dfb3e0bc870e90e474dfc52898bd8c417bd162 100644
--- a/third_party/WebKit/Source/core/paint/FilterPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/FilterPainter.cpp
@@ -69,7 +69,13 @@ FilterPainter::FilterPainter(PaintLayer& layer, GraphicsContext& context, const
// the layer's filter. See crbug.com/502026.
if (webFilterOperations->isEmpty())
return;
- context.paintController().createAndAppend<BeginFilterDisplayItem>(*m_layoutObject, imageFilter, FloatRect(rootRelativeBounds), webFilterOperations.release());
+ LayoutRect visualBounds(rootRelativeBounds);
+ if (layer.enclosingPaginationLayer()) {
+ // Filters are set up before pagination, so we need to make the bounding box visual on our own.
+ visualBounds.moveBy(-offsetFromRoot);
+ layer.convertFromFlowThreadToVisualBoundingBoxInAncestor(paintingInfo.rootLayer, visualBounds);
+ }
+ context.paintController().createAndAppend<BeginFilterDisplayItem>(*m_layoutObject, imageFilter, FloatRect(visualBounds), webFilterOperations.release());
}
m_filterInProgress = true;

Powered by Google App Engine