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/LayoutBlockFlow.h" | 5 #include "core/layout/LayoutBlockFlow.h" |
6 #include "core/layout/LayoutMultiColumnFlowThread.h" | 6 #include "core/layout/LayoutMultiColumnFlowThread.h" |
7 | 7 |
8 #include "core/layout/LayoutTestHelper.h" | 8 #include "core/layout/LayoutTestHelper.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 { | 138 { |
139 setBodyInnerHTML( | 139 setBodyInnerHTML( |
140 "<div style='overflow:-webkit-paged-y; height:200px; line-height:150px;'
>" | 140 "<div style='overflow:-webkit-paged-y; height:200px; line-height:150px;'
>" |
141 " <div id='block1'>line1</div>" | 141 " <div id='block1'>line1</div>" |
142 " <div id='block2' style='padding-top:2px;'>" | 142 " <div id='block2' style='padding-top:2px;'>" |
143 " <div id='innerBlock' style='padding-top:2px; break-before:page;
'>line2</div>" | 143 " <div id='innerBlock' style='padding-top:2px; break-before:page;
'>line2</div>" |
144 " </div>" | 144 " </div>" |
145 "</div>"); | 145 "</div>"); |
146 EXPECT_EQ(0, strutForBox("block1")); | 146 EXPECT_EQ(0, strutForBox("block1")); |
147 EXPECT_EQ(0, strutForLine("block1", 0)); | 147 EXPECT_EQ(0, strutForLine("block1", 0)); |
148 EXPECT_EQ(0, strutForBox("block2")); | 148 // There's no class A break point before #innerBlock (they only exist *betwe
en* siblings), so |
149 EXPECT_EQ(48, strutForBox("innerBlock")); | 149 // the break is propagated and applied before #block2. |
| 150 EXPECT_EQ(50, strutForBox("block2")); |
| 151 EXPECT_EQ(0, strutForBox("innerBlock")); |
150 EXPECT_EQ(0, strutForLine("innerBlock", 0)); | 152 EXPECT_EQ(0, strutForLine("innerBlock", 0)); |
151 } | 153 } |
152 | 154 |
153 } // namespace blink | 155 } // namespace blink |
OLD | NEW |