Test from bug 34875 does not work on chromium/mac
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 May 2012 18:15:57 +0000 (18:15 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 May 2012 18:15:57 +0000 (18:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=85913

Patch by Shezan Baig <shezbaig.wk@gmail.com> on 2012-05-10
Reviewed by Julien Chaffraix.

* fast/block/positioning/offsetLeft-offsetTop-multicolumn-expected.html: Added.
* fast/block/positioning/offsetLeft-offsetTop-multicolumn-expected.txt: Removed.
* fast/block/positioning/offsetLeft-offsetTop-multicolumn.html:
Turned the test back into a ref-test as keeping the test cross-platform and
dumpAsText is proving cumbersome. Apart from that, it also make the test work
cross-browser.

* platform/chromium/test_expectations.txt:
* platform/mac/Skipped:
* platform/qt-mac/Skipped:
Re-enabled the test.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@116663 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/block/positioning/offsetLeft-offsetTop-multicolumn-expected.html [new file with mode: 0644]
LayoutTests/fast/block/positioning/offsetLeft-offsetTop-multicolumn-expected.txt [deleted file]
LayoutTests/fast/block/positioning/offsetLeft-offsetTop-multicolumn.html
LayoutTests/platform/chromium/test_expectations.txt
LayoutTests/platform/mac/Skipped
LayoutTests/platform/qt-mac/Skipped

index 41b8f23..b4ce712 100644 (file)
@@ -1,3 +1,22 @@
+2012-05-10  Shezan Baig <shezbaig.wk@gmail.com>
+
+        Test from bug 34875 does not work on chromium/mac
+        https://bugs.webkit.org/show_bug.cgi?id=85913
+
+        Reviewed by Julien Chaffraix.
+
+        * fast/block/positioning/offsetLeft-offsetTop-multicolumn-expected.html: Added.
+        * fast/block/positioning/offsetLeft-offsetTop-multicolumn-expected.txt: Removed.
+        * fast/block/positioning/offsetLeft-offsetTop-multicolumn.html:
+        Turned the test back into a ref-test as keeping the test cross-platform and
+        dumpAsText is proving cumbersome. Apart from that, it also make the test work
+        cross-browser.
+
+        * platform/chromium/test_expectations.txt:
+        * platform/mac/Skipped:
+        * platform/qt-mac/Skipped:
+        Re-enabled the test.
+
 2012-05-10  Dominik Röttsches  <dominik.rottsches@intel.com>
 
         [EFL] Gardening away IETC crash for now
diff --git a/LayoutTests/fast/block/positioning/offsetLeft-offsetTop-multicolumn-expected.html b/LayoutTests/fast/block/positioning/offsetLeft-offsetTop-multicolumn-expected.html
new file mode 100644 (file)
index 0000000..de4f64a
--- /dev/null
@@ -0,0 +1,119 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+    #multicol {
+        -webkit-column-width: 100px;
+        -moz-column-width: 100px;
+        column-width: 100px;
+        height: 200px;
+    }
+
+    span {
+        display: inline-block;
+        height: 20px;
+        background: green;
+        padding: 2px;
+    }
+
+    .size1 {
+        width: 10px;
+    }
+    .size2 {
+        width: 20px;
+    }
+    .size3 {
+        width: 40px;
+    }
+</style>
+</head>
+<body>
+<p> Bug <a href="http://webkit.org/b/34875">34875</a>: offsetLeft broken within CSS3 columns </p>
+<p>There should not be any red spans visible.</p>
+<p>
+This test checks that offsetLeft and offsetTop return correct values when used
+on elements contained in multiple columns. We put a number of red spans (of
+arbitrary size) in a multi-column div. The script at the end creates an
+identically sized green span for each of the red spans, and places it at the
+offsetLeft and offsetTop of the red span, using absolute position. This ensures
+that the green span completely covers the red span.
+</p>
+<!--
+Note: This is the test reference file. Therefore, there is no script and
+      all the spans are set to green in the css.
+-->
+<div id="multicol">
+    <div>
+        <span class="size1"></span>
+        <span class="size2"></span>
+        <span class="size2"></span>
+        <span class="size3"></span>
+        <span class="size2"></span>
+        <span class="size1"></span>
+    </div>
+    <div>
+        <span class="size2"></span>
+        <span class="size1"></span>
+        <span class="size3"></span>
+        <span class="size3"></span>
+        <span class="size2"></span>
+        <span class="size3"></span>
+        <span class="size1"></span>
+        <span class="size2"></span>
+        <span class="size2"></span>
+        <span class="size2"></span>
+        <span class="size3"></span>
+        <span class="size2"></span>
+        <span class="size3"></span>
+        <span class="size1"></span>
+        <span class="size3"></span>
+        <span class="size3"></span>
+        <span class="size3"></span>
+        <span class="size2"></span>
+        <span class="size3"></span>
+    </div>
+    <div>
+        <span class="size3"></span>
+        <span class="size2"></span>
+        <span class="size1"></span>
+        <span class="size1"></span>
+        <span class="size2"></span>
+        <span class="size2"></span>
+        <div>
+            <span class="size2"></span>
+            <span class="size1"></span>
+            <span class="size3"></span>
+            <span class="size3"></span>
+            <span class="size1"></span>
+            <span class="size3"></span>
+            <span class="size3"></span>
+            <span class="size2"></span>
+            <div>
+                <span class="size2"></span>
+                <span class="size3"></span>
+                <span class="size1"></span>
+                <span class="size3"></span>
+                <span class="size3"></span>
+                <span class="size2"></span>
+                <span class="size1"></span>
+                <span class="size1"></span>
+                <span class="size2"></span>
+                <span class="size2"></span>
+                <span class="size2"></span>
+                <span class="size1"></span>
+                <span class="size3"></span>
+            </div>
+            <span class="size3"></span>
+            <span class="size1"></span>
+            <span class="size3"></span>
+            <span class="size3"></span>
+            <span class="size2"></span>
+            <span class="size2"></span>
+        </div>
+        <span class="size3"></span>
+        <span class="size1"></span>
+        <span class="size3"></span>
+    </div>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/fast/block/positioning/offsetLeft-offsetTop-multicolumn-expected.txt b/LayoutTests/fast/block/positioning/offsetLeft-offsetTop-multicolumn-expected.txt
deleted file mode 100644 (file)
index 2eb06a4..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-This test checks that offsetLeft and offsetTop return correct values when used on elements contained in multiple columns. We put a number of spans (of arbitrary size) in a multi-column div. The script at the end verifies the offsetLeft and offsetTop result of each span against pre-calculated values.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS multicol.offsetParent.id is offsetParent.id
-PASS spans[0].offsetLeft is 0
-PASS spans[0].offsetTop is 0
-PASS spans[1].offsetLeft is 14
-PASS spans[1].offsetTop is 0
-PASS spans[2].offsetLeft is 38
-PASS spans[2].offsetTop is 0
-PASS spans[3].offsetLeft is 62
-PASS spans[3].offsetTop is 0
-PASS spans[4].offsetLeft is 0
-PASS spans[4].offsetTop is 23
-PASS spans[5].offsetLeft is 24
-PASS spans[5].offsetTop is 23
-PASS spans[6].offsetLeft is 0
-PASS spans[6].offsetTop is 46
-PASS spans[7].offsetLeft is 24
-PASS spans[7].offsetTop is 46
-PASS spans[8].offsetLeft is 38
-PASS spans[8].offsetTop is 46
-PASS spans[9].offsetLeft is 0
-PASS spans[9].offsetTop is 69
-PASS spans[10].offsetLeft is 44
-PASS spans[10].offsetTop is 69
-PASS spans[11].offsetLeft is 0
-PASS spans[11].offsetTop is 92
-PASS spans[12].offsetLeft is 44
-PASS spans[12].offsetTop is 92
-PASS spans[13].offsetLeft is 58
-PASS spans[13].offsetTop is 92
-PASS spans[14].offsetLeft is 82
-PASS spans[14].offsetTop is 92
-PASS spans[15].offsetLeft is 0
-PASS spans[15].offsetTop is 115
-PASS spans[16].offsetLeft is 24
-PASS spans[16].offsetTop is 115
-PASS spans[17].offsetLeft is 68
-PASS spans[17].offsetTop is 115
-PASS spans[18].offsetLeft is 0
-PASS spans[18].offsetTop is 138
-PASS spans[19].offsetLeft is 44
-PASS spans[19].offsetTop is 138
-PASS spans[20].offsetLeft is 58
-PASS spans[20].offsetTop is 138
-PASS spans[21].offsetLeft is 0
-PASS spans[21].offsetTop is 161
-PASS spans[22].offsetLeft is 44
-PASS spans[22].offsetTop is 161
-PASS spans[23].offsetLeft is 123
-PASS spans[23].offsetTop is 0
-PASS spans[24].offsetLeft is 147
-PASS spans[24].offsetTop is 0
-PASS spans[25].offsetLeft is 123
-PASS spans[25].offsetTop is 23
-PASS spans[26].offsetLeft is 167
-PASS spans[26].offsetTop is 23
-PASS spans[27].offsetLeft is 191
-PASS spans[27].offsetTop is 23
-PASS spans[28].offsetLeft is 205
-PASS spans[28].offsetTop is 23
-PASS spans[29].offsetLeft is 123
-PASS spans[29].offsetTop is 46
-PASS spans[30].offsetLeft is 147
-PASS spans[30].offsetTop is 46
-PASS spans[31].offsetLeft is 123
-PASS spans[31].offsetTop is 69
-PASS spans[32].offsetLeft is 147
-PASS spans[32].offsetTop is 69
-PASS spans[33].offsetLeft is 161
-PASS spans[33].offsetTop is 69
-PASS spans[34].offsetLeft is 123
-PASS spans[34].offsetTop is 92
-PASS spans[35].offsetLeft is 167
-PASS spans[35].offsetTop is 92
-PASS spans[36].offsetLeft is 181
-PASS spans[36].offsetTop is 92
-PASS spans[37].offsetLeft is 123
-PASS spans[37].offsetTop is 115
-PASS spans[38].offsetLeft is 167
-PASS spans[38].offsetTop is 115
-PASS spans[39].offsetLeft is 123
-PASS spans[39].offsetTop is 138
-PASS spans[40].offsetLeft is 147
-PASS spans[40].offsetTop is 138
-PASS spans[41].offsetLeft is 191
-PASS spans[41].offsetTop is 138
-PASS spans[42].offsetLeft is 123
-PASS spans[42].offsetTop is 161
-PASS spans[43].offsetLeft is 167
-PASS spans[43].offsetTop is 161
-PASS spans[44].offsetLeft is 246
-PASS spans[44].offsetTop is 0
-PASS spans[45].offsetLeft is 270
-PASS spans[45].offsetTop is 0
-PASS spans[46].offsetLeft is 284
-PASS spans[46].offsetTop is 0
-PASS spans[47].offsetLeft is 298
-PASS spans[47].offsetTop is 0
-PASS spans[48].offsetLeft is 322
-PASS spans[48].offsetTop is 0
-PASS spans[49].offsetLeft is 246
-PASS spans[49].offsetTop is 23
-PASS spans[50].offsetLeft is 270
-PASS spans[50].offsetTop is 23
-PASS spans[51].offsetLeft is 284
-PASS spans[51].offsetTop is 23
-PASS spans[52].offsetLeft is 246
-PASS spans[52].offsetTop is 46
-PASS spans[53].offsetLeft is 290
-PASS spans[53].offsetTop is 46
-PASS spans[54].offsetLeft is 304
-PASS spans[54].offsetTop is 46
-PASS spans[55].offsetLeft is 246
-PASS spans[55].offsetTop is 69
-PASS spans[56].offsetLeft is 290
-PASS spans[56].offsetTop is 69
-PASS spans[57].offsetLeft is 314
-PASS spans[57].offsetTop is 69
-PASS spans[58].offsetLeft is 246
-PASS spans[58].offsetTop is 92
-PASS spans[59].offsetLeft is 290
-PASS spans[59].offsetTop is 92
-PASS spans[60].offsetLeft is 304
-PASS spans[60].offsetTop is 92
-PASS successfullyParsed is true
-
-TEST COMPLETE
-    
-            
-    
-     
-         
-    
-  
index c232c40..dffe311 100644 (file)
@@ -1,39 +1,19 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script src="../../js/resources/js-test-pre.js"></script>
-<script>
-    description("This test checks that offsetLeft and offsetTop return " +
-                "correct values when used on elements contained in multiple " +
-                "columns. We put a number of spans (of arbitrary size) in a " +
-                "multi-column div. The script at the end verifies the " +
-                "offsetLeft and offsetTop result of each span against " +
-                "pre-calculated values.");
-
-    if (window.layoutTestController)
-        layoutTestController.dumpAsText();
-</script>
 <style>
-    body {
-        font: Ahem;
-    }
-
-    #parent {
-        position: absolute;
-    }
-
     #multicol {
         -webkit-column-width: 100px;
         -moz-column-width: 100px;
         column-width: 100px;
         height: 200px;
-        line-height: 18px;
     }
 
-    #multicol span {
+    span {
         display: inline-block;
         height: 20px;
-        background: #000;
+        padding: 2px;
+        background: red;
     }
 
     .size1 {
     .size2 {
         width: 20px;
     }
-
     .size3 {
         width: 40px;
     }
 </style>
 </head>
 <body>
-<div id="parent">
-    <div id="multicol">
-        <div>
-            <span class="size1"></span>
-            <span class="size2"></span>
-            <span class="size2"></span>
-            <span class="size3"></span>
-            <span class="size2"></span>
-            <span class="size1"></span>
-        </div>
+<p> Bug <a href="http://webkit.org/b/34875">34875</a>: offsetLeft broken within CSS3 columns </p>
+<p>There should not be any red spans visible.</p>
+<p>
+This test checks that offsetLeft and offsetTop return correct values when used
+on elements contained in multiple columns. We put a number of red spans (of
+arbitrary size) in a multi-column div. The script at the end creates an
+identically sized green span for each of the red spans, and places it at the
+offsetLeft and offsetTop of the red span, using absolute position. This ensures
+that the green span completely covers the red span.
+</p>
+<div id="multicol">
+    <div>
+        <span class="size1"></span>
+        <span class="size2"></span>
+        <span class="size2"></span>
+        <span class="size3"></span>
+        <span class="size2"></span>
+        <span class="size1"></span>
+    </div>
+    <div>
+        <span class="size2"></span>
+        <span class="size1"></span>
+        <span class="size3"></span>
+        <span class="size3"></span>
+        <span class="size2"></span>
+        <span class="size3"></span>
+        <span class="size1"></span>
+        <span class="size2"></span>
+        <span class="size2"></span>
+        <span class="size2"></span>
+        <span class="size3"></span>
+        <span class="size2"></span>
+        <span class="size3"></span>
+        <span class="size1"></span>
+        <span class="size3"></span>
+        <span class="size3"></span>
+        <span class="size3"></span>
+        <span class="size2"></span>
+        <span class="size3"></span>
+    </div>
+    <div>
+        <span class="size3"></span>
+        <span class="size2"></span>
+        <span class="size1"></span>
+        <span class="size1"></span>
+        <span class="size2"></span>
+        <span class="size2"></span>
         <div>
             <span class="size2"></span>
             <span class="size1"></span>
             <span class="size3"></span>
             <span class="size3"></span>
-            <span class="size2"></span>
-            <span class="size3"></span>
-            <span class="size1"></span>
-            <span class="size2"></span>
-            <span class="size2"></span>
-            <span class="size2"></span>
-            <span class="size3"></span>
-            <span class="size2"></span>
-            <span class="size3"></span>
             <span class="size1"></span>
             <span class="size3"></span>
             <span class="size3"></span>
-            <span class="size3"></span>
-            <span class="size2"></span>
-            <span class="size3"></span>
-        </div>
-        <div>
-            <span class="size3"></span>
-            <span class="size2"></span>
-            <span class="size1"></span>
-            <span class="size1"></span>
-            <span class="size2"></span>
             <span class="size2"></span>
             <div>
                 <span class="size2"></span>
-                <span class="size1"></span>
-                <span class="size3"></span>
                 <span class="size3"></span>
                 <span class="size1"></span>
                 <span class="size3"></span>
                 <span class="size3"></span>
                 <span class="size2"></span>
-                <div>
-                    <span class="size2"></span>
-                    <span class="size3"></span>
-                    <span class="size1"></span>
-                    <span class="size3"></span>
-                    <span class="size3"></span>
-                    <span class="size2"></span>
-                    <span class="size1"></span>
-                    <span class="size1"></span>
-                    <span class="size2"></span>
-                    <span class="size2"></span>
-                    <span class="size2"></span>
-                    <span class="size1"></span>
-                    <span class="size3"></span>
-                </div>
-                <span class="size3"></span>
                 <span class="size1"></span>
-                <span class="size3"></span>
-                <span class="size3"></span>
+                <span class="size1"></span>
+                <span class="size2"></span>
                 <span class="size2"></span>
                 <span class="size2"></span>
+                <span class="size1"></span>
+                <span class="size3"></span>
             </div>
             <span class="size3"></span>
             <span class="size1"></span>
             <span class="size3"></span>
+            <span class="size3"></span>
+            <span class="size2"></span>
+            <span class="size2"></span>
         </div>
+        <span class="size3"></span>
+        <span class="size1"></span>
+        <span class="size3"></span>
     </div>
 </div>
 <script>
     var body = document.getElementsByTagName("body")[0];
     var multicol = document.getElementById("multicol");
-    var offsetParent = document.getElementById("parent");
     var spans = multicol.getElementsByTagName("span");
-
-    shouldBe("multicol.offsetParent.id", "offsetParent.id");
-
-    var expectedResults = [
-        [0,0],[14,0],[38,0],[62,0],[0,23],[24,23],[0,46],[24,46],[38,46],
-        [0,69],[44,69],[0,92],[44,92],[58,92],[82,92],[0,115],[24,115],
-        [68,115],[0,138],[44,138],[58,138],[0,161],[44,161],[123,0],[147,0],
-        [123,23],[167,23],[191,23],[205,23],[123,46],[147,46],[123,69],[147,69],
-        [161,69],[123,92],[167,92],[181,92],[123,115],[167,115],[123,138],[147,138],
-        [191,138],[123,161],[167,161],[246,0],[270,0],[284,0],[298,0],[322,0],
-        [246,23],[270,23],[284,23],[246,46],[290,46],[304,46],[246,69],[290,69],
-        [314,69],[246,92],[290,92],[304,92],
-    ];
-
     for (var i = 0; i < spans.length; ++i) {
-        var expected = expectedResults[i];
-        shouldBe("spans[" + i + "].offsetLeft", expected[0].toString());
-        shouldBe("spans[" + i + "].offsetTop", expected[1].toString());
+        var item = spans[i];
+        var cover = document.createElement("span");
+        cover.setAttribute("class", item.getAttribute("class"));
+        cover.setAttribute("style", "background: green; " +
+                                    "z-index: 10; " +
+                                    "position: absolute; " +
+                                    "left: " + item.offsetLeft + "px; " +
+                                    "top: " + item.offsetTop + "px;");
+        body.appendChild(cover);
     }
 </script>
 </body>
-<script src="../../js/resources/js-test-post.js"></script>
 </html>
-
index 01ce332..40ef89e 100644 (file)
@@ -4029,8 +4029,6 @@ BUGWK85689 SKIP : fast/animation/request-animation-frame-disabled.html = TEXT
 // Skip it because it seems its frame loading notifications leak to the next test.
 BUGWK85949 SKIP : http/tests/loading/post-in-iframe-with-back-navigation.html = TEXT
 
-BUGWK85913 MAC : fast/block/positioning/offsetLeft-offsetTop-multicolumn.html = TEXT
-
 BUGWK85951 WIN DEBUG : fast/css/hover-update.html = TEXT PASS
 
 // Requires ENABLE(MEDIA_CAPTURE)
index 7cb6e83..e311566 100644 (file)
@@ -834,9 +834,6 @@ media/video-played-reset.html
 # https://bugs.webkit.org/show_bug.cgi?id=85666
 ietestcenter/css3/flexbox/
 
-# https://bugs.webkit.org/show_bug.cgi?id=85913
-fast/block/positioning/offsetLeft-offsetTop-multicolumn.html
-
 # https://bugs.webkit.org/show_bug.cgi?id=85969
 http/tests/loading/post-in-iframe-with-back-navigation.html
 
index 541cfaf..bc6662f 100644 (file)
@@ -5657,7 +5657,6 @@ fast/block/float/editable-text-overlapping-float.html
 fast/block/float/multiple-float-positioning.html
 fast/block/margin-collapse/103.html
 fast/block/positioning/auto/006.html
-fast/block/positioning/offsetLeft-offsetTop-multicolumn.html
 fast/css/color-correction-backgrounds-and-text.html
 fast/css/first-letter-nested-positioned.htm
 fast/css/first-letter-quotes-no-content-before-after.html