Bug 1099807 part 5 - Reftests for ruby intra-level whitespaces. r=dholbert
authorXidorn Quan <quanxunzhen@gmail.com>
Thu, 08 Jan 2015 18:28:09 +1100
changeset 222603 2238390e5de42b8fb3e0b1227882f6c2d9e52cdb
parent 222602 2cc185fba3dac89dbc9c83ff6be5c5235c3f152d
child 222604 b61a510edfb9aa4800e27e7d5d3803be212e5bcd
push id28068
push usercbook@mozilla.com
push dateThu, 08 Jan 2015 13:16:34 +0000
treeherdermozilla-central@2880e05d5e32 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1099807
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1099807 part 5 - Reftests for ruby intra-level whitespaces. r=dholbert
layout/reftests/css-ruby/intra-level-whitespace-1-ref.html
layout/reftests/css-ruby/intra-level-whitespace-1.html
layout/reftests/css-ruby/intra-level-whitespace-2-ref.html
layout/reftests/css-ruby/intra-level-whitespace-2.html
layout/reftests/css-ruby/intra-level-whitespace-3-ref.html
layout/reftests/css-ruby/intra-level-whitespace-3.html
layout/reftests/css-ruby/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-ruby/intra-level-whitespace-1-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <title>Bug 1099807 - Intra-level whitespace pairing</title>
+  <link rel="stylesheet" href="common.css">
+</head>
+<body>
+  <p><ruby>
+    <rb>a</rb><rb pseudo><span> </span></rb><rb>b</rb>
+    <rt>x</rt><rt pseudo><span> </span></rt><rt>y</rt>
+  </ruby></p>
+  <p><ruby>
+    <rb>a</rb><rb pseudo><span> </span></rb><rb>b</rb>
+    <rt>x</rt><rt pseudo></rt><rt>y</rt>
+  </ruby></p>
+  <p><ruby>
+    <rb>a</rb><rb pseudo></rb><rb>b</rb>
+    <rt>x</rt><rt pseudo><span> </span></rt><rt>y</rt>
+  </ruby></p>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-ruby/intra-level-whitespace-1.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <title>Bug 1099807 - Intra-level whitespace pairing</title>
+  <link rel="stylesheet" href="common.css">
+</head>
+<body>
+  <p><ruby>
+    <rb>a</rb> <rb>b</rb>
+    <rt>x</rt> <rt>y</rt>
+  </ruby></p>
+  <p><ruby>
+    <rb>a</rb> <rb>b</rb>
+    <rt>x</rt><rt>y</rt>
+  </ruby></p>
+  <p><ruby>
+    <rb>a</rb><rb>b</rb>
+    <rt>x</rt> <rt>y</rt>
+  </ruby></p>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-ruby/intra-level-whitespace-2-ref.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <title>Bug 1099807 - Intra-level whitespace pairing</title>
+  <link rel="stylesheet" href="common.css">
+  <style>
+    body { font-family: monospace; }
+    .container { border: 1px solid blue; margin: 20px; }
+  </style>
+  <style id="style"></style>
+</head>
+<body>
+  <span id="ref1">12345</span> <span id="ref2">12345 67890</span>
+  <div class="container"><ruby><rb>12345</rb> <rb>67890</rb><rt>09876</rt><rt>54321</rt></ruby></div>
+  <div class="container"><ruby><rb>12345</rb><rb>67890</rb><rt>09876</rt> <rt>54321</rt></ruby></div>
+  <div class="container"><ruby><rb>12345</rb> <rb>67890</rb><rt>09876</rt> <rt>54321</rt></ruby></div>
+  <script type="text/javascript">
+    var ref2 = document.getElementById('ref2');
+    var style = document.getElementById('style');
+    var width2 = ref2.getBoundingClientRect().width + 'px';
+    // This is the same as the script in the corresponding
+    // testcase, except that here we skip the intermediate
+    // size and jump straight to the final size.
+    style.textContent = '.container { width: ' + width2 + '; }';
+  </script>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-ruby/intra-level-whitespace-2.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <title>Bug 1099807 - Intra-level whitespace pairing</title>
+  <link rel="stylesheet" href="common.css">
+  <style>
+    body { font-family: monospace; }
+    .container { border: 1px solid blue; margin: 20px; }
+  </style>
+  <style id="style"></style>
+</head>
+<body>
+  <span id="ref1">12345</span> <span id="ref2">12345 67890</span>
+  <div class="container"><ruby><rb>12345</rb> <rb>67890</rb><rt>09876</rt><rt>54321</rt></ruby></div>
+  <div class="container"><ruby><rb>12345</rb><rb>67890</rb><rt>09876</rt> <rt>54321</rt></ruby></div>
+  <div class="container"><ruby><rb>12345</rb> <rb>67890</rb><rt>09876</rt> <rt>54321</rt></ruby></div>
+  <script type="text/javascript">
+    var ref1 = document.getElementById('ref1');
+    var ref2 = document.getElementById('ref2');
+    var style = document.getElementById('style');
+    var width1 = ref1.getBoundingClientRect().width + 'px';
+    var width2 = ref2.getBoundingClientRect().width + 'px';
+    // It changes the width of the containers to test incremental
+    // layout with intra-level whitespace columns being pushed and
+    // pulled up across a line-break.
+    style.textContent = '.container { width: ' + width1 + '; }';
+    document.body.offsetHeight;  // force reflow
+    style.textContent = '.container { width: ' + width2 + '; }';
+    document.body.offsetHeight;  // force reflow
+  </script>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-ruby/intra-level-whitespace-3-ref.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <title>Bug 1099807 - Intra-level whitespace pairing</title>
+  <link rel="stylesheet" href="common.css">
+</head>
+<body>
+  |<ruby>
+    <rbc><rb>before</rb><rb>base</rb><rb> </rb></rbc>
+    <rtc><rt> </rt><rt>text</rt><rt>after</rt></rtc>
+  </ruby>|
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-ruby/intra-level-whitespace-3.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <title>Bug 1099807 - Intra-level whitespace pairing</title>
+  <link rel="stylesheet" href="common.css">
+  <style>
+    rbc::before {
+      display: ruby-base;
+      content: "before";
+    }
+    rbc::after {
+      display: ruby-base;
+      content: " ";
+    }
+    rtc::before {
+      display: ruby-text;
+      content: " ";
+    }
+    rtc::after {
+      display: ruby-text;
+      content: "after";
+    }
+  </style>
+</head>
+<body>
+  <!-- This test ensures that we don't treat all-whitespace
+       ::before/::after content as intra-level whitespace -->
+  |<ruby>
+    <rbc><rb>base</rb></rbc>
+    <rtc><rt>text</rt></rtc>
+  </ruby>|
+</body>
+</html>
--- a/layout/reftests/css-ruby/reftest.list
+++ b/layout/reftests/css-ruby/reftest.list
@@ -15,16 +15,19 @@ fails == autohiding-3.html autohiding-3-
 == dynamic-removal-2.html dynamic-removal-2-ref.html
 fuzzy-if(winWidget,35,1) == dynamic-removal-3.html dynamic-removal-3-ref.html # bug 1111891
 == float-handling.html float-handling-ref.html
 == inlinize-blocks-1.html inlinize-blocks-1-ref.html
 == inlinize-blocks-2.html inlinize-blocks-2-ref.html
 == inlinize-blocks-3.html inlinize-blocks-3-ref.html
 == inlinize-blocks-4.html inlinize-blocks-4-ref.html
 == inlinize-blocks-5.html inlinize-blocks-5-ref.html
+== intra-level-whitespace-1.html intra-level-whitespace-1-ref.html
+== intra-level-whitespace-2.html intra-level-whitespace-2-ref.html
+== intra-level-whitespace-3.html intra-level-whitespace-3-ref.html
 == justification-1.html justification-1-ref.html
 == justification-2.html justification-2-ref.html
 == line-height-1.html line-height-1-ref.html
 == line-height-2.html line-height-2-ref.html
 == line-height-3.html line-height-3-ref.html
 == ruby-span-1.html ruby-span-1-ref.html
 == ruby-whitespace-1.html ruby-whitespace-1-ref.html
 == ruby-whitespace-2.html ruby-whitespace-2-ref.html