Bug 34198 - Ruby text should not inherit line-height

(https://bugs.webkit.org/show_bug.cgi?id=34198)
        
Reviewed by Adele Peterson.

Resetting line-height to 'normal' in the default UA style sheet.
Adding layout-test to check for this.

WebCore: 

Test: fast/ruby/ruby-line-height.html

* css/html.css:

LayoutTests: 

* fast/ruby/script-tests: Added.
* fast/ruby/script-tests/ruby-line-height.js: Added.
* fast/ruby/ruby-line-height-expected.txt: Added.
* fast/ruby/ruby-line-height.html: Added.



git-svn-id: svn://svn.chromium.org/blink/trunk@54273 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 5d5d715b
2010-02-02 Roland Steiner <rolandsteiner@chromium.org>
Reviewed by Adele Peterson.
Bug 34198 - Ruby text should not inherit line-height
(https://bugs.webkit.org/show_bug.cgi?id=34198)
Resetting line-height to 'normal' in the default UA style sheet.
Adding layout-test to check for this.
* fast/ruby/script-tests: Added.
* fast/ruby/script-tests/ruby-line-height.js: Added.
* fast/ruby/ruby-line-height-expected.txt: Added.
* fast/ruby/ruby-line-height.html: Added.
2010-02-02 Kent Tamura <tkent@chromium.org>
Reviewed by Darin Adler.
......
Test that the CSS property 'line-height' is not applied to ruby base and annotation texts.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS [object HTMLParagraphElement] is non-null.
PASS getLineHeight('p') is "48px"
PASS [object HTMLElement] is non-null.
PASS getLineHeight('r') is "normal"
PASS [object HTMLElement] is non-null.
PASS getLineHeight('t') is "normal"
PASS successfullyParsed is true
TEST COMPLETE
The line height of this is three times normal
"line-height: 48px;"
, but the ruby should have 'line-height: normal'.
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<link rel="stylesheet" href="../js/resources/js-test-style.css">
<script src="../js/resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script src="script-tests/ruby-line-height.js"></script>
<script src="../js/resources/js-test-post.js"></script>
</body>
</html>
description("Test that the CSS property 'line-height' is not applied to ruby base and annotation texts.");
function getLineHeight(id)
{
var element = document.getElementById(id);
shouldBeNonNull(element);
var lineHeight = window.getComputedStyle(element, null).getPropertyValue("line-height");
return lineHeight;
}
var div = document.createElement("div");
div.innerHTML = "<p style='line-height: 300%' id='p'>The line height of this is <ruby id='r'>three times normal<rt id='t'>&quot;line-height: 48px;&quot;</rt></ruby>, but the ruby should have 'line-height: normal'.</p>";
document.body.appendChild(div);
shouldBeEqualToString("getLineHeight('p')", "48px");
shouldBeEqualToString("getLineHeight('r')", "normal");
shouldBeEqualToString("getLineHeight('t')", "normal");
var successfullyParsed = true;
2010-02-02 Roland Steiner <rolandsteiner@chromium.org>
Reviewed by Adele Peterson.
Bug 34198 - Ruby text should not inherit line-height
(https://bugs.webkit.org/show_bug.cgi?id=34198)
Resetting line-height to 'normal' in the default UA style sheet.
Adding layout-test to check for this.
Test: fast/ruby/ruby-line-height.html
* css/html.css:
2010-02-02 James Robinson <jamesr@chromium.org>
Reviewed by Dmitry Titov.
......
......@@ -621,7 +621,8 @@ a:-webkit-any-link:active {
/* HTML5 ruby elements */
ruby, rt {
text-indent: 0; /* blocks used for ruby rendering should not trigger this */
text-indent: 0; /* blocks used for ruby rendering should not trigger this */
line-height: normal;
}
ruby > rt {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment