Bug 1055658 part 3 - Add reftests for ruby annotation relative positioning. r=dbaron
☠☠ backed out by b684185c1c54 ☠ ☠
authorXidorn Quan <quanxunzhen@gmail.com>
Mon, 12 Jan 2015 14:31:55 +1100
changeset 223245 99e071295c420e0eb237b287be1546975148ba73
parent 223244 55119d19e4c5f127b19b28c930c12a8ab4dc3e5b
child 223246 3cbd9323c8963df4f15b83a19e6efa7a74a2c23e
push id10769
push usercbook@mozilla.com
push dateMon, 12 Jan 2015 14:15:52 +0000
treeherderfx-team@0e9765732906 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1055658
milestone37.0a1
Bug 1055658 part 3 - Add reftests for ruby annotation relative positioning. r=dbaron
layout/reftests/css-ruby/reftest.list
layout/reftests/css-ruby/relative-positioning-1-ref.html
layout/reftests/css-ruby/relative-positioning-1.html
layout/reftests/css-ruby/relative-positioning-2-ref.html
layout/reftests/css-ruby/relative-positioning-2.html
--- a/layout/reftests/css-ruby/reftest.list
+++ b/layout/reftests/css-ruby/reftest.list
@@ -23,16 +23,18 @@ fuzzy-if(winWidget,35,1) == dynamic-remo
 == 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
+fails-if(cocoaWidget) == relative-positioning-1.html relative-positioning-1-ref.html # bug 1120280
+== relative-positioning-2.html relative-positioning-2-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
 == ruby-position-horizontal.html ruby-position-horizontal-ref.html
 pref(layout.css.vertical-text.enabled,true) fails == ruby-position-vertical-lr.html ruby-position-vertical-lr-ref.html # bug 1112474
 pref(layout.css.vertical-text.enabled,true) fails == ruby-position-vertical-rl.html ruby-position-vertical-rl-ref.html # bug 1112474
 != ruby-reflow-1-opaqueruby.html ruby-reflow-1-noruby.html
 == ruby-reflow-1-transparentruby.html ruby-reflow-1-noruby.html
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-ruby/relative-positioning-1-ref.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <title>Bug 1055658 - Relative positioning for ruby</title>
+  <style>
+    .wrapper {
+      width: 50px;
+      text-align: center;
+    }
+    .annotation, .annotation > div {
+      position: absolute;
+      line-height: 1;
+    }
+  </style>
+</head>
+<body>
+  <div style="height: 80px; line-height: 80px;">
+    <div class="wrapper" style="display: inline-block; line-height: normal; position: relative;">
+      <div class="annotation" style="top: 0;">
+        <div class="wrapper" style="top: -100%;">a<span style="position: relative; top: -10px;">b</span>c</div>
+        &nbsp; <!-- to give container a nonzero size for
+                    percent values to resolve against -->
+      </div>
+      base
+    </div>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-ruby/relative-positioning-1.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <title>Bug 1055658 - Relative positioning for ruby</title>
+  <link rel="stylesheet" href="common.css">
+  <style>
+    body {
+      line-height: 80px;
+    }
+    rtc, rt {
+      font-size: 100% !important;
+      line-height: 1 !important;
+    }
+  </style>
+</head>
+<body>
+  <ruby style="position: relative;">
+    <rb>base</rb>
+    <rtc><rt>a<span style="position: relative; top: -10px;">b</span>c</rt></rtc>
+    <rtc><div style="width: 50px; height: 0;"></div></rtc>
+  </ruby>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-ruby/relative-positioning-2-ref.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <title>Bug 1055658 - Relative positioning for ruby</title>
+  <style>
+    body {
+      font-family: monospace;
+    }
+    .annotation, .annotation > div {
+      position: absolute;
+      line-height: 1;
+    }
+  </style>
+</head>
+<body>
+  <div style="height: 80px; line-height: 80px;">
+    before
+    <div style="display: inline-block; line-height: normal; position: relative; top: 20px;">
+      <div class="annotation" style="top: 0; width: 100%;">
+        <div style="top: -100%;">
+          text1
+          <span style="position: relative; top: -20px;">text2</span>
+          <span style="position: relative; right: 10px;">text3</span>
+        </div>
+        &nbsp; <!-- to give container a nonzero size for
+                    percent values to resolve against -->
+      </div>
+      base1
+      <span style="position: relative; left: 10px;">base2</span>
+      <span style="position: relative; bottom: -20px;">base3</span>
+    </div>
+    after
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-ruby/relative-positioning-2.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <title>Bug 1055658 - Relative positioning for ruby</title>
+  <link rel="stylesheet" href="common.css">
+  <style>
+    body {
+      font-family: monospace;
+      line-height: 80px;
+    }
+    rtc, rt {
+      font-size: 100% !important;
+      line-height: 1 !important;
+    }
+  </style>
+</head>
+<body>
+  before
+  <ruby style="position: relative; top: 20px;">
+    <rb>base1</rb>
+    <rtc>text1</rtc>
+    <rb style="position: relative; left: 10px;">base2</rb>
+    <rtc style="position: relative; top: -20px;">text2</rtc>
+    <rbc style="position: relative; bottom: -20px;"><rb>base3</rb></rbc>
+    <rtc><rt style="position: relative; right: 10px;">text3</rt></rtc>
+  </ruby>
+  after
+</body>
+</html>