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

Unified Diff: LayoutTests/fast/table/table-toggle-paragraph-padding.html

Issue 22589002: Margins on children of display:table-cell elements get stuck at highest value. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 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
« no previous file with comments | « no previous file | LayoutTests/platform/linux/fast/table/table-toggle-paragraph-padding-expected.png » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/table/table-toggle-paragraph-padding.html
diff --git a/LayoutTests/fast/table/table-toggle-paragraph-padding.html b/LayoutTests/fast/table/table-toggle-paragraph-padding.html
new file mode 100644
index 0000000000000000000000000000000000000000..2c37c5565f21f2e38cb7b12b8d1985ba97ab84fd
--- /dev/null
+++ b/LayoutTests/fast/table/table-toggle-paragraph-padding.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title></title>
+ <script>
+ function main()
+ {
+ if (window.testRunner) {
+ testRunner.waitUntilDone();
+ }
+ setTimeout(funRemoveClass, 0);
ojan 2013/08/07 23:03:12 I think you can do this without a setTimeout. See
a.suchit 2013/08/08 10:19:29 Change into Ref Test.
+ }
+ /*function buttonClick()
ojan 2013/08/07 23:03:12 Please remove dead code.
+ {
+ var interval = setInterval(function () {document.getElementById("myButtonId").click(); clearInterval(interval);}, 0);
+ }*/
+ function funRemoveClass()
+ {
+ document.getElementById("removeClass").className = "";
+ document.getElementById("sibling").className = "";
+ document.getElementById("nextSibling").className = "";
+ //alert("class removed.");
+ setTimeout("testRunner.notifyDone()", 0);
+ }
+ </script>
+ <style>
+ #sibling { outline: 1px solid red; }
+ .cell { outline: 1px solid blue; }
+ .cell p { outline:1px solid green; }
+
+ .table { display:table; }
+ .cell { display:table-cell; }
+
+ #myButtonId { visibility:hidden; }
+
+ p { margin:0; }
+ p.margin { margin: 40px 0; }
+ </style>
+</head>
+<body onload="main()">
+ <h3>Test for chromium bug : <a href="https://code.google.com/p/chromium/issues/detail?id=241331">241331</a>. Margins on children of display:table-cell elements get stuck at highest value.</h3>
+ <h4>Row's before margin was not reseting back to 0 when margin of the cell's child is changed from 40px to 0.</h4>
+ <!--button id="myButtonId" onclick="funRemoveClass()">Toggle paragraph padding</button-->
+ <p id="sibling" class="margin">Paragraph1 : None of the paragraphs have any margins.</p>
+
+ <div class="table">
+ <div class="cell">other cell, no paragraph</div>
+ <div class="cell"><p id="removeClass" class="margin">Paragraph2 : I am in a table cell</p></div>
+ </div>
+ <p id="nextSibling" class="margin">Paragraph3 : text after</p>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/platform/linux/fast/table/table-toggle-paragraph-padding-expected.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698