зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1069519 part 3 - Add reftests for ruby line height calculation. r=dholbert
--HG-- extra : source : 728da9f1603aea283356de9f69f678667514cc70
This commit is contained in:
Родитель
bfb0d2cc6e
Коммит
364fe61104
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
function makeHeightMatchInlineBox(block, inline) {
|
||||
var height = inline.getBoundingClientRect().height + 'px';
|
||||
block.style.height = height;
|
||||
block.style.lineHeight = height;
|
||||
}
|
Загрузка…
Ссылка в новой задаче