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

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

Issue 2894843002: Revert of Remove cullRect() from PaintOpBuffer. (Closed)
Patch Set: rebase TestExpectations Created 3 years, 7 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/SVGInlineTextBoxPainterTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainterTest.cpp b/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainterTest.cpp
index 68362a9545c29a51205b5022dfbd77426d3476f1..b2ad3742e7811179450730c34c0cf439c544db8b 100644
--- a/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainterTest.cpp
+++ b/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainterTest.cpp
@@ -99,6 +99,11 @@ const static int kPixelDelta = 4;
<< ", expected: " << expected.Height(); \
} while (false)
+static IntRect CullRectFromDrawing(
+ const DrawingDisplayItem& drawing_display_item) {
+ return IntRect(drawing_display_item.GetPaintRecord()->cullRect());
+}
+
TEST_F(SVGInlineTextBoxPainterTest, TextCullRect_DefaultWritingMode) {
SetBodyInnerHTML(
"<svg width='400px' height='400px' font-family='Arial' font-size='30'>"
@@ -110,7 +115,7 @@ TEST_F(SVGInlineTextBoxPainterTest, TextCullRect_DefaultWritingMode) {
GetDrawingForSVGTextById("target");
AssertTextDrawingEquals(drawing_display_item, "x");
EXPECT_RECT_EQ(IntRect(50, 3, 15, 33),
- drawing_display_item->GetPaintRecordBounds());
+ CullRectFromDrawing(*drawing_display_item));
SelectAllText();
GetDocument().View()->UpdateAllLifecyclePhases();
@@ -118,7 +123,7 @@ TEST_F(SVGInlineTextBoxPainterTest, TextCullRect_DefaultWritingMode) {
drawing_display_item = GetDrawingForSVGTextById("target");
AssertTextDrawingEquals(drawing_display_item, "x");
EXPECT_RECT_EQ(IntRect(50, 3, 15, 33),
- drawing_display_item->GetPaintRecordBounds());
+ CullRectFromDrawing(*drawing_display_item));
}
TEST_F(SVGInlineTextBoxPainterTest, TextCullRect_WritingModeTopToBottom) {
@@ -132,7 +137,7 @@ TEST_F(SVGInlineTextBoxPainterTest, TextCullRect_WritingModeTopToBottom) {
GetDrawingForSVGTextById("target");
AssertTextDrawingEquals(drawing_display_item, "x");
EXPECT_RECT_EQ(IntRect(33, 30, 34, 15),
- drawing_display_item->GetPaintRecordBounds());
+ CullRectFromDrawing(*drawing_display_item));
SelectAllText();
GetDocument().View()->UpdateAllLifecyclePhases();
@@ -143,7 +148,7 @@ TEST_F(SVGInlineTextBoxPainterTest, TextCullRect_WritingModeTopToBottom) {
drawing_display_item = GetDrawingForSVGTextById("target");
AssertTextDrawingEquals(drawing_display_item, "x");
EXPECT_RECT_EQ(IntRect(33, 30, 34, 16),
- drawing_display_item->GetPaintRecordBounds());
+ CullRectFromDrawing(*drawing_display_item));
}
TEST_F(SVGInlineTextBoxPainterTest, TextCullRect_TextShadow) {
@@ -158,7 +163,7 @@ TEST_F(SVGInlineTextBoxPainterTest, TextCullRect_TextShadow) {
GetDrawingForSVGTextById("target");
AssertTextDrawingEquals(drawing_display_item, "x");
EXPECT_RECT_EQ(IntRect(50, 3, 220, 238),
- drawing_display_item->GetPaintRecordBounds());
+ CullRectFromDrawing(*drawing_display_item));
}
} // namespace
« no previous file with comments | « third_party/WebKit/Source/core/paint/SVGFilterPainter.cpp ('k') | third_party/WebKit/Source/core/svg/graphics/SVGImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698