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

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

Issue 1645583002: Display -webkit-filter objects in any column (instead of only in the first one). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/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
This is Rietveld 408576698