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/LayoutObject.h" | 5 #include "core/layout/LayoutObject.h" |
6 | 6 |
7 #include "core/layout/LayoutTestHelper.h" | 7 #include "core/layout/LayoutTestHelper.h" |
8 #include "core/layout/LayoutView.h" | 8 #include "core/layout/LayoutView.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 "</div>"); | 115 "</div>"); |
116 LayoutBlock* container = toLayoutBlock(document().getElementById("container"
)->layoutObject()); | 116 LayoutBlock* container = toLayoutBlock(document().getElementById("container"
)->layoutObject()); |
117 LayoutText* text = toLayoutText(container->lastChild()); | 117 LayoutText* text = toLayoutText(container->lastChild()); |
118 | 118 |
119 container->setScrollTop(50); | 119 container->setScrollTop(50); |
120 LayoutRect rect(0, 60, 20, 20); | 120 LayoutRect rect(0, 60, 20, 20); |
121 text->mapToVisibleRectInAncestorSpace(container, rect, nullptr); | 121 text->mapToVisibleRectInAncestorSpace(container, rect, nullptr); |
122 EXPECT_TRUE(rect == LayoutRect(0, 10, 20, 20)); | 122 EXPECT_TRUE(rect == LayoutRect(0, 10, 20, 20)); |
123 } | 123 } |
124 | 124 |
125 } | 125 } // namespace blink |
126 | |
OLD | NEW |