| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/layout/ScrollAnchor.h" | 5 #include "core/layout/ScrollAnchor.h" |
| 6 | 6 |
| 7 #include "core/dom/ClientRect.h" | |
| 8 #include "core/frame/VisualViewport.h" | 7 #include "core/frame/VisualViewport.h" |
| 8 #include "core/geometry/DOMRect.h" |
| 9 #include "core/layout/LayoutBox.h" | 9 #include "core/layout/LayoutBox.h" |
| 10 #include "core/layout/LayoutTestHelper.h" | 10 #include "core/layout/LayoutTestHelper.h" |
| 11 #include "core/page/PrintContext.h" | 11 #include "core/page/PrintContext.h" |
| 12 #include "core/paint/PaintLayerScrollableArea.h" | 12 #include "core/paint/PaintLayerScrollableArea.h" |
| 13 #include "platform/testing/HistogramTester.h" | 13 #include "platform/testing/HistogramTester.h" |
| 14 #include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h" | 14 #include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h" |
| 15 | 15 |
| 16 namespace blink { | 16 namespace blink { |
| 17 | 17 |
| 18 using Corner = ScrollAnchor::Corner; | 18 using Corner = ScrollAnchor::Corner; |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 ScrollLayoutViewport(ScrollOffset(0, 150)); | 429 ScrollLayoutViewport(ScrollOffset(0, 150)); |
| 430 | 430 |
| 431 // This will trigger printing and layout. | 431 // This will trigger printing and layout. |
| 432 PrintContext::NumberOfPages(GetDocument().GetFrame(), FloatSize(500, 500)); | 432 PrintContext::NumberOfPages(GetDocument().GetFrame(), FloatSize(500, 500)); |
| 433 | 433 |
| 434 EXPECT_EQ(150, viewport->ScrollOffsetInt().Height()); | 434 EXPECT_EQ(150, viewport->ScrollOffsetInt().Height()); |
| 435 EXPECT_EQ(nullptr, GetScrollAnchor(viewport).AnchorObject()); | 435 EXPECT_EQ(nullptr, GetScrollAnchor(viewport).AnchorObject()); |
| 436 } | 436 } |
| 437 | 437 |
| 438 } | 438 } |
| OLD | NEW |