Bug 1039017 - Reftests for ruby whitespace handling. r=dholbert

This commit is contained in:
Susanna Bowen 2014-08-15 10:34:20 -07:00
Родитель 779f8cef59
Коммит aca0a15a6a
6 изменённых файлов: 125 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,4 @@
default-preferences pref(layout.css.ruby.enabled,true)
asserts(1) == ruby-whitespace-1.html ruby-whitespace-1-ref.html # bug 1052145
== ruby-whitespace-2.html ruby-whitespace-2-ref.html

Просмотреть файл

@ -0,0 +1,35 @@
<html>
<meta charset="UTF-8">
<head>
<style>
ruby { display: ruby; }
rb { display: ruby-base; white-space: nowrap; }
rp { display: none; }
rt { display: ruby-text; white-space: nowrap; font-size: 50%; }
rbc { display: ruby-base-container; }
rtc { display: ruby-text-container; }
ruby, rb, rt, rbc, rtc { unicode-bidi: isolate; }
</style>
</head>
<body>
<!-- It's unclear what should happen to the whitespace between the </rtc> and
the <rbc>. A literal application of the spec suggests: it gets converted to
its own ruby segment, since it is "inter-segment" white space. But then
it's a segment containing only trailing whitespace, which gets removed.
This results in an empty segment with no whitespace, which doesn't seem
correct. //-->
<ruby><rbc><rb><span> </span></rb><rb><span> </span></rb><rb
>Base three</rb></rbc><rtc><rt></rt><rt>Text two</rt></rtc><rtc
><rt></rt></rtc><rbc><span> </span></rbc><rbc><rb
>Segment two</rb></rbc><rtc><rt></rt></rtc></ruby>
<ruby><rbc><rb><span> </span></rb>Base two<rb><span> </span></rb><rb></rb
></rbc><rtc><rt><span> </span></rt>Text two<rt><span> </span></rt><rt
></rt></rtc></ruby>
<ruby><rbc><rb><span> </span></rb><rb>Base two</rb></rbc><rtc><rt> </rt></rtc
></ruby>
</body>
</html>

Просмотреть файл

@ -0,0 +1,28 @@
<html>
<meta charset="UTF-8">
<head>
<style>
ruby { display: ruby; }
rb { display: ruby-base; white-space: nowrap; }
rp { display: none; }
rt { display: ruby-text; white-space: nowrap; font-size: 50%; }
rbc { display: ruby-base-container; }
rtc { display: ruby-text-container; }
ruby, rb, rt, rbc, rtc { unicode-bidi: isolate; }
</style>
</head>
<body>
<ruby>
<rbc> <rb> </rb> <rb>Base three</rb> </rbc>
<rtc> <rt> </rt> <rt>Text two</rt> </rtc> <rtc><rt></rt></rtc>
<rbc><rb>Segment two</rb></rbc><rtc><rt></rt></rtc>
</ruby>
<rbc> <rb> </rb> <rb>Base two</rb> </rbc> <rtc><rt> </rt> <rt
>Text two</rt></rtc>
<rb></rb> <rb>Base two</rb> <rt> </rt>
</body>
</html>

Просмотреть файл

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<head>
<style>
ruby { display: ruby; }
rb { display: ruby-base; white-space: nowrap; }
rp { display: none; }
rt { display: ruby-text; white-space: nowrap; font-size: 50%; }
rbc { display: ruby-base-container; }
rtc { display: ruby-text-container; }
ruby, rb, rt, rbc, rtc { unicode-bidi: isolate; }
</style>
</head>
<body>
<!-- Unclear how this should render. See http://lists.w3.org/Archives/Public/www-style/2014Jul/0620.html //-->
abcd<ruby><rbc><rb><span> BASE</span></rb></rbc><rtc><rt>TEXT</rt></rtc></ruby>
abcd<ruby><rbc><rb><span>BASE</span></rb></rbc><rtc><rt>TEXT</rt></rtc></ruby>
abcd<ruby><rbc><rb><span> BASE</span></rb></rbc><rtc><rt>TEXT</rt></rtc></ruby>
<ruby><rbc></rbc></ruby>
</body>
</html>

Просмотреть файл

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<head>
<style>
ruby { display: ruby; }
rb { display: ruby-base; white-space: nowrap; }
rp { display: none; }
rt { display: ruby-text; white-space: nowrap; font-size: 50%; }
rbc { display: ruby-base-container; }
rtc { display: ruby-text-container; }
ruby, rb, rt, rbc, rtc { unicode-bidi: isolate; }
</style>
</head>
<body>
abcd<rbc> BASE</rbc><rt>TEXT</rt>
abcd<rbc> <span>BASE</span></rbc><rt>TEXT</rt>
abcd<rbc><span> BASE</span></rbc><rt>TEXT</rt>
<rbc> </rbc>
</body>
</html>

Просмотреть файл

@ -90,6 +90,9 @@ include css-parsing/reftest.list
# css placeholder
include css-placeholder/reftest.list
# css ruby
include css-ruby/reftest.list
# css required
include css-required/reftest.list