| Index: third_party/WebKit/Source/core/layout/ScrollAnchorTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/ScrollAnchorTest.cpp b/third_party/WebKit/Source/core/layout/ScrollAnchorTest.cpp
|
| index fe3148aac88e7df7fe9d197eb0dd207cb89f19ed..9035f2f6c664cf0abdae702a48052769609cef39 100644
|
| --- a/third_party/WebKit/Source/core/layout/ScrollAnchorTest.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/ScrollAnchorTest.cpp
|
| @@ -561,6 +561,37 @@ TEST_F(ScrollAnchorTest, DescendsIntoContainerWithFloat)
|
| scrollAnchor(viewport).anchorObject());
|
| }
|
|
|
| +TEST_F(ScrollAnchorTest, FlexboxDelayedClampingAlsoDelaysAdjustment)
|
| +{
|
| + setBodyInnerHTML(
|
| + "<style>"
|
| + " html { overflow: hidden; }"
|
| + " body {"
|
| + " position: absolute; display: flex;"
|
| + " top: 0; bottom: 0; margin: 0;"
|
| + " }"
|
| + " #scroller { overflow: auto; }"
|
| + " #spacer { width: 600px; height: 1200px; }"
|
| + " #before { height: 50px; }"
|
| + " #anchor {"
|
| + " width: 100px; height: 100px;"
|
| + " background-color: #8f8;"
|
| + " }"
|
| + "</style>"
|
| + "<div id='scroller'>"
|
| + " <div id='spacer'>"
|
| + " <div id='before'></div>"
|
| + " <div id='anchor'></div>"
|
| + " </div>"
|
| + "</div>");
|
| +
|
| + Element* scroller = document().getElementById("scroller");
|
| + scroller->setScrollTop(100);
|
| +
|
| + setHeight(document().getElementById("before"), 100);
|
| + EXPECT_EQ(150, scrollerForElement(scroller)->scrollPosition().y());
|
| +}
|
| +
|
| // Test then an element and its children are not selected as the anchor when
|
| // it has the overflow-anchor property set to none.
|
| TEST_F(ScrollAnchorTest, OptOutElement)
|
|
|