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

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

Issue 2646133002: Add offset contributed to sticky position box rect by location containers (Closed)
Patch Set: Merge with master and use EXPECT_EQ for non-fatal checks. Created 3 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/LayoutObject.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 c01a0df309270ddbdd9ae6b626cc1acfe13f2ec5..72ad343d4d014e5d25750b325b04c006d1532f22 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp
@@ -1299,4 +1299,33 @@ TEST_P(CompositedLayerMappingTest, StickyPositionContentOffset) {
IntPoint(constraint2.parentRelativeStickyBoxOffset));
}
+TEST_P(CompositedLayerMappingTest, StickyPositionTableCellContentOffset) {
+ setBodyInnerHTML(
+ "<style>body {height: 2000px; width: 2000px;} "
+ "td, th { height: 50px; width: 50px; } "
+ "table {border: none; }"
+ "#scroller { overflow: auto; will-change: transform; height: 50px; }"
+ "#sticky { position: sticky; left: 0; will-change: transform; }"
+ "</style>"
+ "<div id='scroller'><table cellspacing='0' cellpadding='0'>"
+ " <thead><tr><td></td></tr></thead>"
+ " <tr><td id='sticky'></td></tr>"
+ "</table></div>");
+ document().view()->updateLifecycleToCompositingCleanPlusScrolling();
+
+ CompositedLayerMapping* sticky =
+ toLayoutBlock(getLayoutObjectByElementId("sticky"))
+ ->layer()
+ ->compositedLayerMapping();
+
+ ASSERT_TRUE(sticky);
+ WebLayerStickyPositionConstraint constraint =
+ sticky->mainGraphicsLayer()
+ ->contentLayer()
+ ->layer()
+ ->stickyPositionConstraint();
+ EXPECT_EQ(IntPoint(0, 50),
+ IntPoint(constraint.parentRelativeStickyBoxOffset));
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698