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

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

Issue 2297213003: Fix CSS reference filters with negative transformed children. (Closed)
Patch Set: Created 4 years, 4 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/BoxReflectionUtils.cpp
diff --git a/third_party/WebKit/Source/core/paint/BoxReflectionUtils.cpp b/third_party/WebKit/Source/core/paint/BoxReflectionUtils.cpp
index 7cf5f548775d36513141ae3290255c4490b8ddb1..a3fc5d14b3238e67cd6f65f58e3813d5ac8e768b 100644
--- a/third_party/WebKit/Source/core/paint/BoxReflectionUtils.cpp
+++ b/third_party/WebKit/Source/core/paint/BoxReflectionUtils.cpp
@@ -44,20 +44,10 @@ BoxReflection boxReflectionForPaintLayer(const PaintLayer& layer, const Computed
break;
}
- // Since the filter origin is the corner of the input bounds, which may
- // include visual overflow (e.g. due to box-shadow), we must adjust the
- // offset to also account for this offset (this is equivalent to using
- // SkLocalMatrixImageFilter, but simpler).
- // The rect used here should match the one used in FilterPainter.
- LayoutRect filterInputBounds = layer.physicalBoundingBoxIncludingReflectionAndStackingChildren(LayoutPoint());
- offset -= 2 * (direction == BoxReflection::VerticalReflection ? filterInputBounds.y() : filterInputBounds.x()).toFloat();
-
RefPtr<SkPicture> mask;
const NinePieceImage& maskNinePiece = reflectStyle->mask();
if (maskNinePiece.hasImage()) {
LayoutRect maskRect(LayoutPoint(), frameLayoutRect.size());
- maskRect.moveBy(-filterInputBounds.location());
-
LayoutRect maskBoundingRect(maskRect);
maskBoundingRect.expand(style.imageOutsets(maskNinePiece));
FloatRect maskBoundingFloatRect(maskBoundingRect);

Powered by Google App Engine
This is Rietveld 408576698