| Index: third_party/WebKit/Source/core/paint/PaintLayerScrollableAreaTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableAreaTest.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableAreaTest.cpp
|
| index 106cd217ab03aece83fae61ebf2fb64346a08c80..1210864ae0e93d3a52f5cfe9cf38577ded7948e9 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableAreaTest.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableAreaTest.cpp
|
| @@ -29,7 +29,7 @@ class MockChromeClient : public EmptyChromeClient {
|
| }
|
| };
|
|
|
| -} // namespace {
|
| +} // namespace
|
|
|
| class PaintLayerScrollableAreaTest : public RenderingTest {
|
| public:
|
| @@ -628,4 +628,30 @@ TEST_F(PaintLayerScrollableAreaTest, FloatOverflowInRtlContainer) {
|
| ASSERT_TRUE(scrollable_area);
|
| EXPECT_FALSE(scrollable_area->HasHorizontalScrollbar());
|
| }
|
| +
|
| +TEST_F(PaintLayerScrollableAreaTest,
|
| + StickyPositionConstraintsInvalidatedByLayout) {
|
| + SetBodyInnerHTML(
|
| + "<style>#scroller { overflow-y: scroll; height: 100px; }"
|
| + "#sticky { height: 25px; position: sticky; top: 0; }"
|
| + "#padding { height: 500px; }</style>"
|
| + "<div id='scroller'><div id='sticky'></div><div id='padding'></div>"
|
| + "</div>");
|
| +
|
| + LayoutBoxModelObject* scroller =
|
| + ToLayoutBoxModelObject(GetLayoutObjectByElementId("scroller"));
|
| + LayoutBoxModelObject* sticky =
|
| + ToLayoutBoxModelObject(GetLayoutObjectByElementId("sticky"));
|
| +
|
| + EXPECT_FALSE(sticky->Layer()->NeedsCompositingInputsUpdate());
|
| +
|
| + PaintLayerScrollableArea* scrollable_area = scroller->GetScrollableArea();
|
| + ASSERT_TRUE(scrollable_area);
|
| +
|
| + // Fake layout.
|
| + scrollable_area->UpdateAfterLayout();
|
| +
|
| + EXPECT_TRUE(sticky->Layer()->NeedsCompositingInputsUpdate());
|
| + EXPECT_EQ(0u, scrollable_area->GetStickyConstraintsMap().size());
|
| +}
|
| }
|
|
|