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

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

Issue 2128903002: Use enclosingIntRect for the cull rect of DrawingDisplayItems. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rtree
Patch Set: none Created 4 years, 5 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 | « no previous file | third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/LayoutObjectDrawingRecorderTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/LayoutObjectDrawingRecorderTest.cpp b/third_party/WebKit/Source/core/paint/LayoutObjectDrawingRecorderTest.cpp
index 5bd3b814d9b253e1e3e03289ec605731cdbe02de..c0eb0e53b90b99020ea44b39526b2500a82b8ce2 100644
--- a/third_party/WebKit/Source/core/paint/LayoutObjectDrawingRecorderTest.cpp
+++ b/third_party/WebKit/Source/core/paint/LayoutObjectDrawingRecorderTest.cpp
@@ -112,9 +112,11 @@ TEST_F(LayoutObjectDrawingRecorderTest, CullRectMatchesProvidedClip)
// the opposite direction to enclosing, and in the y direction, the edges
// are exactly on a half-pixel boundary. The numbers chosen map nicely to
// both float and LayoutUnit, to make equality checking reliable.
+ //
+ // The final cull rect should be the enclosing int rect of this rect.
FloatRect rect(20.75, -5.5, 5.375, 10);
- EXPECT_EQ(rect, drawAndGetCullRect(rootPaintController(), layoutView(), rect));
- EXPECT_EQ(rect, drawAndGetCullRect(rootPaintController(), layoutView(), LayoutRect(rect)));
+ EXPECT_EQ(enclosingIntRect(rect), drawAndGetCullRect(rootPaintController(), layoutView(), rect));
+ EXPECT_EQ(enclosingIntRect(rect), drawAndGetCullRect(rootPaintController(), layoutView(), LayoutRect(rect)));
}
#if 0 // TODO(wangxianzhu): Rewrite this test for slimmingPaintInvalidation.
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698