Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 28420 - Implement HTML5 <ruby> rendering
(https://bugs.webkit.org/show_bug.cgi?id=28420) Reviewed by Dave Hyatt. First rudimentary implementation of HTML5 ruby rendering support - layout tests. New layout tests: basic rendering: * fast/ruby/ruby-empty-rt.html: Added. * fast/ruby/ruby-length.html: Added. * fast/ruby/ruby-run-break.html: Added. * fast/ruby/ruby-runs-spans.html: Added. * fast/ruby/ruby-runs.html: Added. * fast/ruby/ruby-simple-rp.html: Added. * fast/ruby/ruby-simple.html: Added. * fast/ruby/ruby-trailing.html: Added. New layout tests: DOM manipulation within <ruby> * fast/ruby/rubyDOM-insert-rt.html: Added. * fast/ruby/rubyDOM-insert-text1.html: Added. * fast/ruby/rubyDOM-insert-text2.html: Added. * fast/ruby/rubyDOM-insert-text3.html: Added. * fast/ruby/rubyDOM-remove-rt1.html: Added. * fast/ruby/rubyDOM-remove-rt2.html: Added. * fast/ruby/rubyDOM-remove-text1.html: Added. * fast/ruby/rubyDOM-remove-text2.html: Added. New layout tests results: * platform/mac/fast/ruby: Added. * platform/mac/fast/ruby/ruby-empty-rt-expected.checksum: Added. * platform/mac/fast/ruby/ruby-empty-rt-expected.png: Added. * platform/mac/fast/ruby/ruby-empty-rt-expected.txt: Added. * platform/mac/fast/ruby/ruby-length-expected.checksum: Added. * platform/mac/fast/ruby/ruby-length-expected.png: Added. * platform/mac/fast/ruby/ruby-length-expected.txt: Added. * platform/mac/fast/ruby/ruby-run-break-expected.checksum: Added. * platform/mac/fast/ruby/ruby-run-break-expected.png: Added. * platform/mac/fast/ruby/ruby-run-break-expected.txt: Added. * platform/mac/fast/ruby/ruby-runs-expected.checksum: Added. * platform/mac/fast/ruby/ruby-runs-expected.png: Added. * platform/mac/fast/ruby/ruby-runs-expected.txt: Added. * platform/mac/fast/ruby/ruby-runs-spans-expected.checksum: Added. * platform/mac/fast/ruby/ruby-runs-spans-expected.png: Added. * platform/mac/fast/ruby/ruby-runs-spans-expected.txt: Added. * platform/mac/fast/ruby/ruby-simple-expected.checksum: Added. * platform/mac/fast/ruby/ruby-simple-expected.png: Added. * platform/mac/fast/ruby/ruby-simple-expected.txt: Added. * platform/mac/fast/ruby/ruby-simple-rp-expected.checksum: Added. * platform/mac/fast/ruby/ruby-simple-rp-expected.png: Added. * platform/mac/fast/ruby/ruby-simple-rp-expected.txt: Added. * platform/mac/fast/ruby/ruby-trailing-expected.checksum: Added. * platform/mac/fast/ruby/ruby-trailing-expected.png: Added. * platform/mac/fast/ruby/ruby-trailing-expected.txt: Added. * platform/mac/fast/ruby/rubyDOM-insert-rt-expected.checksum: Added. * platform/mac/fast/ruby/rubyDOM-insert-rt-expected.png: Added. * platform/mac/fast/ruby/rubyDOM-insert-rt-expected.txt: Added. * platform/mac/fast/ruby/rubyDOM-insert-text1-expected.checksum: Added. * platform/mac/fast/ruby/rubyDOM-insert-text1-expected.png: Added. * platform/mac/fast/ruby/rubyDOM-insert-text1-expected.txt: Added. * platform/mac/fast/ruby/rubyDOM-insert-text2-expected.checksum: Added. * platform/mac/fast/ruby/rubyDOM-insert-text2-expected.png: Added. * platform/mac/fast/ruby/rubyDOM-insert-text2-expected.txt: Added. * platform/mac/fast/ruby/rubyDOM-insert-text3-expected.checksum: Added. * platform/mac/fast/ruby/rubyDOM-insert-text3-expected.png: Added. * platform/mac/fast/ruby/rubyDOM-insert-text3-expected.txt: Added. * platform/mac/fast/ruby/rubyDOM-remove-rt1-expected.checksum: Added. * platform/mac/fast/ruby/rubyDOM-remove-rt1-expected.png: Added. * platform/mac/fast/ruby/rubyDOM-remove-rt1-expected.txt: Added. * platform/mac/fast/ruby/rubyDOM-remove-rt2-expected.checksum: Added. * platform/mac/fast/ruby/rubyDOM-remove-rt2-expected.png: Added. * platform/mac/fast/ruby/rubyDOM-remove-rt2-expected.txt: Added. * platform/mac/fast/ruby/rubyDOM-remove-text1-expected.checksum: Added. * platform/mac/fast/ruby/rubyDOM-remove-text1-expected.png: Added. * platform/mac/fast/ruby/rubyDOM-remove-text1-expected.txt: Added. * platform/mac/fast/ruby/rubyDOM-remove-text2-expected.checksum: Added. * platform/mac/fast/ruby/rubyDOM-remove-text2-expected.png: Added. * platform/mac/fast/ruby/rubyDOM-remove-text2-expected.txt: Added. Canonical link: https://commits.webkit.org/41925@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@50495 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Roland Steiner
committed
Nov 4, 2009
1 parent
07d9a76
commit d3e9fa0
Showing
65 changed files
with
1,028 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
</head> | ||
<body> | ||
<p>The following is a test for having a <rt> immediately following another.</p> | ||
<br> | ||
<br> | ||
<p>準太郎は<ruby>東京<rt>とうきょう</rt>工業大学<rt>こうぎょう</rt><rt>だいがく</rt></ruby>から卒業しました。 | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<head> | ||
<style> | ||
</style> | ||
</head> | ||
<body> | ||
This is a initial test for simple ruby. | ||
There should be 2 ruby annotations on below line, one with a ruby text shorter than the base, | ||
and one with a ruby text longer than the base. | ||
<br> | ||
<br> | ||
CSS3/HTML5のルビは<ruby>日本語<rt>Japanese Langauge</rt></ruby>によく<ruby>使われて<rt>used</rt></ruby>います。 | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<head> | ||
</head> | ||
<body> | ||
This is a test for multiple ruby runs and line breaks. | ||
There is a div with a blue border and 10px padding. This contains a single <ruby> markup in the text contained in the block, broken across 2 lines. | ||
Part of it should be on the first line, the rest on the other line. | ||
<br> | ||
<br> | ||
<div style="border: 2px solid blue; padding: 10px; width:260px;"> | ||
CSS3/HTML5のルビは<ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>によく使われています。 | ||
</div> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
</head> | ||
<body> | ||
<p>The following is a test for having non-text inline elements as base in a <ruby>.</p> | ||
<p>準太郎は<ruby><span id="T">東京</span><rt>とうきょう</rt><span id="K">工業</span><span id="D">大学</span><rt>こうぎょうだいがく</rt></ruby>から卒業しました。 | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<head> | ||
<style> | ||
</style> | ||
</head> | ||
<body> | ||
This is a test for multiple ruby runs. | ||
<br> | ||
<br> | ||
CSS3/HTML5のルビは<ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>によく使われています。 | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<head> | ||
<style> | ||
</style> | ||
</head> | ||
<body> | ||
This is a test for simple ruby that contains <rp> tags. | ||
Contents of the <rp> tags (opening and closing brackets) should not show when ruby is suppoorted. | ||
<br> | ||
<br> | ||
CSS3/HTML5のルビは<ruby>日本語<rp>(</rp><rt>にほんご</rt><rp>)</rp></ruby>によく使われています。 | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<head> | ||
<style> | ||
</style> | ||
</head> | ||
<body> | ||
This is a initial test for simple ruby. | ||
<br> | ||
<br> | ||
CSS3/HTML5のルビは<ruby>日本語<rt>にほんご</rt></ruby>によく使われています。 | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
</head> | ||
<body> | ||
<p>The following is a test for having a trailing base within a <ruby> with no associated ruby text.</p> | ||
<br> | ||
<br> | ||
<p>準太郎は<ruby>東京<rt>とうきょう</rt>工業<rt>こうぎょう</rt>大学</ruby>から卒業しました。 | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<script> | ||
function test() | ||
{ | ||
var ruby = document.getElementById('R'); | ||
var span = document.getElementById('D'); | ||
var newRT = document.createElement('rt'); | ||
var newRTText = document.createTextNode('こうぎょう'); | ||
newRT.appendChild(newRTText); | ||
ruby.insertBefore(newRT, span); | ||
} | ||
</script> | ||
</head> | ||
<body onload="test()"> | ||
<p>The following is a test for DOM manipulation within <ruby>: Inserting a new <rt> element</p> | ||
<p>Both lines should look identical (the first line is the one manipulated).</p> | ||
<br> | ||
<br> | ||
<p>準太郎は<ruby id="R"><span id="T">東京</span><rt>とうきょう</rt><span id="K">工業</span><span id="D">大学</span><rt>だいがく</rt></ruby>から卒業しました。</p> | ||
<p>準太郎は<ruby><span>東京</span><rt>とうきょう</rt><span>工業</span><rt>こうぎょう</rt><span>大学</span><rt>だいがく</rt></ruby>から卒業しました。</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<script> | ||
function test() | ||
{ | ||
var ruby = document.getElementById('r'); | ||
var rt = document.getElementById('rt'); | ||
var newText = document.createTextNode('工業'); | ||
ruby.insertBefore(newText, rt); | ||
} | ||
</script> | ||
</head> | ||
<body onload="test()"> | ||
<p>The following is a test for DOM manipulation within <ruby>: Inserting a new text before a <rt> element</p> | ||
<p>Both lines should look identical (the first line is the one manipulated).</p> | ||
<br> | ||
<br> | ||
<p>準太郎は<ruby id="r"><span>東京</span><rt>とうきょう</rt><rt id="rt">こうぎょう</rt><span>大学</span><rt>だいがく</rt></ruby>から卒業しました。</p> | ||
<p>準太郎は<ruby><span>東京</span><rt>とうきょう</rt>工業<rt>こうぎょう</rt><span>大学</span><rt>だいがく</rt></ruby>から卒業しました。</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<script> | ||
function test() | ||
{ | ||
var ruby = document.getElementById('r'); | ||
var rt = document.getElementById('rt'); | ||
var newText = document.createTextNode('大学'); | ||
ruby.insertBefore(newText, rt); | ||
} | ||
</script> | ||
</head> | ||
<body onload="test()"> | ||
<p>The following is a test for DOM manipulation within <ruby>: Inserting a new text before a <rt> element that already contains text.</p> | ||
<p>Both lines should look identical (the first line is the one manipulated).</p> | ||
<br> | ||
<br> | ||
<p>準太郎は<ruby id="r"><span>工業</span><rt id="rt">こうぎょうだいがく</rt></ruby>から卒業しました。</p> | ||
<p>準太郎は<ruby><span>工業</span>大学<rt>こうぎょうだいがく</rt></ruby>から卒業しました。</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<script> | ||
function test() | ||
{ | ||
var ruby = document.getElementById('r'); | ||
var text = document.getElementById('t'); | ||
var newText = document.createTextNode('工業'); | ||
ruby.insertBefore(newText, t); | ||
} | ||
</script> | ||
</head> | ||
<body onload="test()"> | ||
<p>The following is a test for DOM manipulation within <ruby>: Inserting a new text before another text of a ruby base.</p> | ||
<p>Both lines should look identical (the first line is the one manipulated).</p> | ||
<br> | ||
<br> | ||
<p>準太郎は<ruby id="r"><span id="t">大学</span><rt>こうぎょうだいがく</rt></ruby>から卒業しました。</p> | ||
<p>準太郎は<ruby>工業<span>大学</span><rt>こうぎょうだいがく</rt></ruby>から卒業しました。</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<script> | ||
function test() | ||
{ | ||
var ruby = document.getElementById('r'); | ||
var k = document.getElementById('rt'); | ||
ruby.removeChild(rt); | ||
} | ||
</script> | ||
</head> | ||
<body onload="test()"> | ||
<p>The following is a test for DOM manipulation within <ruby>: Removing the last <rt>, leaving the base without ruby text.</p> | ||
<p>Both lines should look identical (the first line is the one manipulated).</p> | ||
<br> | ||
<br> | ||
<p>準太郎は<ruby id="r">工業<rt>こうぎょう</rt>大学<rt id="rt">Shouldn't show</rt></ruby>から卒業しました。</p> | ||
<p>準太郎は<ruby>工業<rt>こうぎょう</rt>大学</ruby>から卒業しました。</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<script> | ||
function test() | ||
{ | ||
var ruby = document.getElementById('r'); | ||
var k = document.getElementById('rt'); | ||
ruby.removeChild(rt); | ||
} | ||
</script> | ||
</head> | ||
<body onload="test()"> | ||
<p>The following is a test for DOM manipulation within <ruby>: Removing the last <rt>, forcing a merge with the right neighbour run</p> | ||
<p>Both lines should look identical (the first line is the one manipulated).</p> | ||
<br> | ||
<br> | ||
<p>準太郎は<ruby id="r">工業<rt id="rt">Shouldn't show</rt>大学<rt>こうぎょうだいがく</rt></ruby>から卒業しました。</p> | ||
<p>準太郎は<ruby>工業大学<rt>こうぎょうだいがく</rt></ruby>から卒業しました。</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<script> | ||
function test() | ||
{ | ||
var ruby = document.getElementById('r'); | ||
var k = document.getElementById('k'); | ||
ruby.removeChild(k); | ||
} | ||
</script> | ||
</head> | ||
<body onload="test()"> | ||
<p>The following is a test for DOM manipulation within <ruby>: Removing a ruby base object, leaving the base non-empty.</p> | ||
<p>Both lines should look identical (the first line is the one manipulated).</p> | ||
<br> | ||
<br> | ||
<p>準太郎は<ruby id="r"><span id="k">工業</span><span>大学</span><rt>だいがく</rt></ruby>から卒業しました。</p> | ||
<p>準太郎は<ruby><span>大学</span><rt>だいがく</rt></ruby>から卒業しました。</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<script> | ||
function test() | ||
{ | ||
var ruby = document.getElementById('r'); | ||
var k = document.getElementById('k'); | ||
ruby.removeChild(k); | ||
} | ||
</script> | ||
</head> | ||
<body onload="test()"> | ||
<p>The following is a test for DOM manipulation within <ruby>: Removing a ruby base object, leaving the base empty.</p> | ||
<p>Both lines should look identical (the first line is the one manipulated).</p> | ||
<br> | ||
<br> | ||
<p>準太郎は<ruby id="r"><span id="k">工業</span><rt>だいがく</rt></ruby>から卒業しました。</p> | ||
<p>準太郎は<ruby><rt>だいがく</rt></ruby>から卒業しました。</p> | ||
</body> | ||
</html> |
1 change: 1 addition & 0 deletions
1
LayoutTests/platform/mac/fast/ruby/ruby-empty-rt-expected.checksum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
a492ba3222a57c03f379905ccc3412a3 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.