mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 1069519 part 3 - Add reftests for ruby line height calculation. r=dholbert
--HG-- extra : source : 728da9f1603aea283356de9f69f678667514cc70
This commit is contained in:
parent
bfb0d2cc6e
commit
364fe61104
17
layout/reftests/css-ruby/line-height-1-ref.html
Normal file
17
layout/reftests/css-ruby/line-height-1-ref.html
Normal file
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Bug 1069519 - Ruby line height calculation</title>
|
||||
<link rel="stylesheet" href="common.css">
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
</head>
|
||||
<body style="line-height: 1">
|
||||
<div id="base" style="padding-top: .5em"><span id="inline">base</span></div>
|
||||
<script>
|
||||
// Simulate the behavior of ruby layout.
|
||||
makeHeightMatchInlineBox(document.getElementById('base'),
|
||||
document.getElementById('inline'));
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
14
layout/reftests/css-ruby/line-height-1.html
Normal file
14
layout/reftests/css-ruby/line-height-1.html
Normal file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Bug 1069519 - Ruby line height calculation</title>
|
||||
<link rel="stylesheet" href="common.css">
|
||||
</head>
|
||||
<body style="line-height: 1">
|
||||
<ruby>
|
||||
<rb>base</rb>
|
||||
<rtc><rt style="color: transparent">text</rt></rtc>
|
||||
</ruby>
|
||||
</body>
|
||||
</html>
|
18
layout/reftests/css-ruby/line-height-2-ref.html
Normal file
18
layout/reftests/css-ruby/line-height-2-ref.html
Normal file
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Bug 1069519 - Ruby line height calculation</title>
|
||||
<link rel="stylesheet" href="common.css">
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
</head>
|
||||
<body style="line-height: 1">
|
||||
<div id="base" style="padding-bottom: .5em"><span id="inline">base</span></div>
|
||||
next line
|
||||
<script>
|
||||
// Simulate the behavior of ruby layout.
|
||||
makeHeightMatchInlineBox(document.getElementById('base'),
|
||||
document.getElementById('inline'));
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
15
layout/reftests/css-ruby/line-height-2.html
Normal file
15
layout/reftests/css-ruby/line-height-2.html
Normal file
@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Bug 1069519 - Ruby line height calculation</title>
|
||||
<link rel="stylesheet" href="common.css">
|
||||
</head>
|
||||
<body style="line-height: 1">
|
||||
<ruby>
|
||||
<rb>base</rb>
|
||||
<rtc style="ruby-position: under left;"><rt style="color: transparent">text</rt></rtc>
|
||||
</ruby><br>
|
||||
next line
|
||||
</body>
|
||||
</html>
|
18
layout/reftests/css-ruby/line-height-3-ref.html
Normal file
18
layout/reftests/css-ruby/line-height-3-ref.html
Normal file
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Bug 1069519 - Ruby line height calculation</title>
|
||||
<link rel="stylesheet" href="common.css">
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
</head>
|
||||
<body style="line-height: 1">
|
||||
<div id="base" style="padding: .8em 0 .5em"><span id="inline">base</span></div>
|
||||
next line
|
||||
<script>
|
||||
// Simulate the behavior of ruby layout.
|
||||
makeHeightMatchInlineBox(document.getElementById('base'),
|
||||
document.getElementById('inline'));
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
16
layout/reftests/css-ruby/line-height-3.html
Normal file
16
layout/reftests/css-ruby/line-height-3.html
Normal file
@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Bug 1069519 - Ruby line height calculation</title>
|
||||
<link rel="stylesheet" href="common.css">
|
||||
</head>
|
||||
<body style="line-height: 1">
|
||||
<ruby>
|
||||
<rb>base</rb>
|
||||
<rtc style="ruby-position: over left; font-size: 80%;"><rt style="color: transparent">text</rt></rtc>
|
||||
<rtc style="ruby-position: under left; font-size: 50%;"><rt style="color: transparent">text</rt></rtc>
|
||||
</ruby><br>
|
||||
next line
|
||||
</body>
|
||||
</html>
|
@ -22,6 +22,9 @@ fuzzy-if(winWidget,35,1) == dynamic-removal-3.html dynamic-removal-3-ref.html #
|
||||
== inlinize-blocks-5.html inlinize-blocks-5-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
|
||||
== 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
|
||||
|
5
layout/reftests/css-ruby/utils.js
Normal file
5
layout/reftests/css-ruby/utils.js
Normal file
@ -0,0 +1,5 @@
|
||||
function makeHeightMatchInlineBox(block, inline) {
|
||||
var height = inline.getBoundingClientRect().height + 'px';
|
||||
block.style.height = height;
|
||||
block.style.lineHeight = height;
|
||||
}
|
Loading…
Reference in New Issue
Block a user