OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/LayoutBox.h" | 5 #include "core/layout/LayoutBox.h" |
6 | 6 |
7 #include "core/html/HTMLElement.h" | 7 #include "core/html/HTMLElement.h" |
8 #include "core/layout/ImageQualityController.h" | 8 #include "core/layout/ImageQualityController.h" |
9 #include "core/layout/LayoutTestHelper.h" | 9 #include "core/layout/LayoutTestHelper.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 | 166 |
167 const LayoutBox* row1 = toLayoutBox(getLayoutObjectByElementId("row1")); | 167 const LayoutBox* row1 = toLayoutBox(getLayoutObjectByElementId("row1")); |
168 EXPECT_EQ(LayoutPoint(0, 0), row1->location()); | 168 EXPECT_EQ(LayoutPoint(0, 0), row1->location()); |
169 EXPECT_EQ(LayoutPoint(300, 0), row1->topLeftLocation()); | 169 EXPECT_EQ(LayoutPoint(300, 0), row1->topLeftLocation()); |
170 | 170 |
171 const LayoutBox* cell1 = toLayoutBox(getLayoutObjectByElementId("cell1")); | 171 const LayoutBox* cell1 = toLayoutBox(getLayoutObjectByElementId("cell1")); |
172 EXPECT_EQ(LayoutPoint(0, 0), cell1->location()); | 172 EXPECT_EQ(LayoutPoint(0, 0), cell1->location()); |
173 EXPECT_EQ(LayoutPoint(300, 0), cell1->topLeftLocation()); | 173 EXPECT_EQ(LayoutPoint(300, 0), cell1->topLeftLocation()); |
174 | 174 |
175 const LayoutBox* row2 = toLayoutBox(getLayoutObjectByElementId("row2")); | 175 const LayoutBox* row2 = toLayoutBox(getLayoutObjectByElementId("row2")); |
176 // TODO(crbug.com/652496): LayoutTableRow's location is in logical coordinates | 176 EXPECT_EQ(LayoutPoint(100, 0), row2->location()); |
177 // of the containing section, and topLeftLocation() is incorrect. | 177 EXPECT_EQ(LayoutPoint(0, 0), row2->topLeftLocation()); |
178 // This should be (100, 0). | |
179 EXPECT_EQ(LayoutPoint(0, 100), row2->location()); | |
180 // This should be (0, 0). | |
181 EXPECT_EQ(LayoutPoint(100, 100), row2->topLeftLocation()); | |
182 | 178 |
183 const LayoutBox* cell2 = toLayoutBox(getLayoutObjectByElementId("cell2")); | 179 const LayoutBox* cell2 = toLayoutBox(getLayoutObjectByElementId("cell2")); |
184 EXPECT_EQ(LayoutPoint(100, 0), cell2->location()); | 180 EXPECT_EQ(LayoutPoint(100, 0), cell2->location()); |
185 EXPECT_EQ(LayoutPoint(0, 0), cell2->topLeftLocation()); | 181 EXPECT_EQ(LayoutPoint(0, 0), cell2->topLeftLocation()); |
186 } | 182 } |
187 | 183 |
188 } // namespace blink | 184 } // namespace blink |
OLD | NEW |