Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: third_party/WebKit/Source/core/layout/PaginationTest.cpp

Issue 1856373002: Only allow forced fragmentainer breaks at class A break points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Woho! LayoutTests/printing/css2.1/page-break-after-003.html now passes. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698