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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp

Issue 1640363003: Account for writing-mode flip of the composited element for interest rects. (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
« no previous file with comments | « third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp
diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp
index ac9d883896129954fcf8b21402c88a937aac7e7d..0f0381956e4cf58d1ca5d621a61ff616d9cc8334 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp
@@ -109,6 +109,23 @@ TEST_F(CompositedLayerMappingTest, TallLayerWholeDocumentInterestRect)
EXPECT_RECT_EQ(IntRect(0, 0, 200, 10000), computeInterestRect(paintLayer->compositedLayerMapping(), paintLayer->graphicsLayerBacking(), IntRect()));
}
+TEST_F(CompositedLayerMappingTest, VerticalRightLeftWritingModeDocument)
+{
+ setBodyInnerHTML("<style>html,body { margin: 0px } html { -webkit-writing-mode: vertical-rl}</style> <div id='target' style='width: 10000px; height: 200px;'></div>");
+
+ document().settings()->setMainFrameClipsContent(false);
+
+ document().view()->updateAllLifecyclePhases();
+ document().view()->scrollTo(DoublePoint(-5000, 0));
+ document().view()->updateAllLifecyclePhases();
+
+ PaintLayer* paintLayer = document().layoutView()->layer();
+ ASSERT_TRUE(paintLayer->graphicsLayerBacking());
+ ASSERT_TRUE(paintLayer->compositedLayerMapping());
+ // A scroll by -5000px is equivalent to a scroll by (10000 - 5000 - 800)px = 4200px in non-RTL mode. Expanding
+ // the resulting rect by 4000px in each direction yields this result.
+ EXPECT_RECT_EQ(IntRect(200, 0, 8800, 600), recomputeInterestRect(paintLayer->graphicsLayerBacking()));
+}
TEST_F(CompositedLayerMappingTest, RotatedInterestRect)
{
« no previous file with comments | « third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698