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> |