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

Unified Diff: third_party/WebKit/LayoutTests/fragmentation/border-spacing-break-before-unbreakable-row.html

Issue 2803383002: The first table row is pushed down by border-spacing. (Closed)
Patch Set: break-inside:avoid on a row shouldn't prevent breaking inside adjacent border spacing Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fragmentation/border-spacing-break-before-unbreakable-row.html
diff --git a/third_party/WebKit/LayoutTests/fragmentation/border-spacing-break-before-unbreakable-row.html b/third_party/WebKit/LayoutTests/fragmentation/border-spacing-break-before-unbreakable-row.html
new file mode 100644
index 0000000000000000000000000000000000000000..2a576168ef01df473ffb085a621b1bd58470d691
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fragmentation/border-spacing-break-before-unbreakable-row.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<style>
+ #multicol { position:relative; columns:4; column-gap:0; column-fill:auto; width:20px; height:50px; line-height:20px; }
+ table { width:100%; border-spacing:0 20px; }
+ tr { break-inside:avoid; }
+ td { padding:0; }
+ td > div { height:20px; box-sizing:border-box; }
+ .squarepart { position:relative; background:blue; }
+</style>
+<p>There should be a blue square below.</p>
+<div id="multicol">
+ <!-- All table rows are 20px tall, potentially with some overflow past the
+ bottom (which isn't enough to affect fragmentation). -->
+ <table>
+ <tr>
+ <td>
+ <div>
+ <div class="squarepart"><br></div>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <div style="padding-top:10px;">
+ <div class="squarepart"><br></div>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <div style="padding-top:20px;">
+ <div class="squarepart"><br></div>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <div style="padding-top:20px;">
+ <div class="squarepart"><br></div>
+ </div>
+ </td>
+ </tr>
+ </table>
+</div>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script>
+test(() => {
+ var squareparts = document.getElementsByClassName("squarepart");
+ assert_equals(squareparts.length, 4);
+ assert_equals(squareparts[0].offsetTop, 20);
+ assert_equals(squareparts[1].offsetTop, 20);
+ assert_equals(squareparts[2].offsetTop, 20);
+ assert_equals(squareparts[3].offsetTop, 20);
+}, "It's okay to break inside border spacing");
+</script>

Powered by Google App Engine
This is Rietveld 408576698