Bug 1055658 part 3 - Add reftests for ruby annotation relative positioning. r=dbaron
authorXidorn Quan <quanxunzhen@gmail.com>
Tue, 13 Jan 2015 20:04:41 +1100
changeset 223523 2297e3c1e021962aba3f396def424269d29c0ff3
parent 223522 9b55bacd570b863c518772bb47c247b6e5774315
child 223524 fbf523548a2558388fe9eee9b0333c5c3d3d1f42
push id28095
push usercbook@mozilla.com
push dateTue, 13 Jan 2015 13:24:48 +0000
treeherdermozilla-central@a5700bec72e1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1055658
milestone38.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 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
@@ -24,16 +24,18 @@ fuzzy-if(winWidget,35,1) == dynamic-remo
 == 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
 load nested-ruby-1.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>