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

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

Issue 2701523003: Don't pixel-snap overflow clips in clip paint property nodes. (Closed)
Patch Set: Merge branch 'master' into fixclipping Created 3 years, 10 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/PaintLayerClipperTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerClipperTest.cpp b/third_party/WebKit/Source/core/paint/PaintLayerClipperTest.cpp
index b612cff633b683266528cffacaf1944d7c7b9a04..4e63d42aada33764a4e78120c18ac53e8f213c8f 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerClipperTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerClipperTest.cpp
@@ -52,7 +52,9 @@ TEST_P(PaintLayerClipperTest, LayoutSVGRoot) {
Element* target = document().getElementById("target");
PaintLayer* targetPaintLayer =
toLayoutBoxModelObject(target->layoutObject())->layer();
- ClipRectsContext context(document().layoutView()->layer(), UncachedClipRects);
+ ClipRectsContext context(document().layoutView()->layer(), UncachedClipRects,
+ IgnoreOverlayScrollbarSize,
+ LayoutSize(FloatSize(0.25, 0.35)));
// When RLS is enabled, the LayoutView will have a composited scrolling layer,
// so don't apply an overflow clip.
if (RuntimeEnabledFeatures::rootLayerScrollingEnabled())
@@ -66,8 +68,8 @@ TEST_P(PaintLayerClipperTest, LayoutSVGRoot) {
targetPaintLayer->clipper(option).calculateRects(
context, LayoutRect(LayoutRect::infiniteIntRect()), layerBounds,
backgroundRect, foregroundRect);
- EXPECT_EQ(LayoutRect(8, 8, 200, 300), backgroundRect.rect());
- EXPECT_EQ(LayoutRect(8, 8, 200, 300), foregroundRect.rect());
+ EXPECT_EQ(LayoutRect(FloatRect(8.25, 8.35, 200, 300)), backgroundRect.rect());
+ EXPECT_EQ(LayoutRect(FloatRect(8.25, 8.35, 200, 300)), foregroundRect.rect());
EXPECT_EQ(LayoutRect(8, 8, 200, 300), layerBounds);
}

Powered by Google App Engine
This is Rietveld 408576698