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

Unified Diff: third_party/WebKit/LayoutTests/fast/table/relayout-out-of-flow-with-border-spacing.html

Issue 2855853002: Don't update column position in StyleDidChange. (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/table/relayout-out-of-flow-with-border-spacing.html
diff --git a/third_party/WebKit/LayoutTests/fast/table/relayout-out-of-flow-with-border-spacing.html b/third_party/WebKit/LayoutTests/fast/table/relayout-out-of-flow-with-border-spacing.html
new file mode 100644
index 0000000000000000000000000000000000000000..6e328dcf44c86aa5f18fb354b434c9241d2d4ccc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/table/relayout-out-of-flow-with-border-spacing.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<style>
+ body { margin: 0 }
+ #ref { margin-left: 100px }
+ #table { border-spacing: 100px 0 }
+ #cell { position: relative }
+ #div { position: absolute }
+</style>
+<p>The two Xs below should be horizontally aligned</p>
+<div id="ref">X</div>
+<table id="table">
+ <td id="cell">
+ <div id="div">X</div>
+ </td>
+</table>
+<script>
+ test(() => {
+ // Force initial layout of the table.
+ table.offsetTop;
+ // Trigger StyleDidChange() on LayoutTable to cause crbug.com/716006
+ table.style.backgroundColor = "white";
+ table.offsetTop;
+ // Trigger a re-layout which does not update the column positions.
+ div.appendChild(document.createTextNode(' '));
+
+ assert_equals(cell.offsetLeft, 100, "Check that cell is offset by border-spacing.");
+ }, "Test a re-layout of out-of-flow children of a table cell with border-spacing.");
+</script>

Powered by Google App Engine
This is Rietveld 408576698