Bug 1134206 part 2 - Reset zeroEffectiveSpanBox when ruby adjust the line spacing. r=roc

--HG--
extra : source : 62abc49c38c25c3b0e00558b5eacc46c32470487
This commit is contained in:
Xidorn Quan 2015-02-19 22:39:19 +13:00
parent 5b4a640a88
commit 3ae70c4475
4 changed files with 26 additions and 0 deletions

View File

@ -1880,6 +1880,9 @@ nsLineLayout::VerticalAlignFrames(PerSpanData* psd)
psd->mBEndLeading = endLeading;
}
psd->mLogicalBSize += deltaLeading;
// We have adjusted the leadings, it is no longer a zero
// effective span box.
zeroEffectiveSpanBox = false;
}
}

View File

@ -0,0 +1,15 @@
<title>Bug 1134206 - Ruby line spacing adjustment on quirks mode</title>
<script type="text/javascript" src="utils.js"></script>
<div id="base">
<span id="inline">base</span>
<span id="text1" style="font-size: 80%; color: transparent">text</span>
<span id="text2" style="font-size: 50%; color: transparent">text</span>
</div>
next line
<script>
// Simulate the behavior of ruby layout.
var base = document.getElementById('base');
makeHeightMatchInlineBox(base, document.getElementById('inline'));
base.style.paddingTop = getHeight(document.getElementById('text1'));
base.style.paddingBottom = getHeight(document.getElementById('text2'));
</script>

View File

@ -0,0 +1,7 @@
<title>Bug 1134206 - Ruby line spacing adjustment on quirks mode</title>
<ruby>
<rb>base</rb>
<rtc style="ruby-position: over; font-size: 80%;"><rt style="color: transparent">text</rt></rtc>
<rtc style="ruby-position: under; font-size: 50%;"><rt style="color: transparent">text</rt></rtc>
</ruby><br>
next line

View File

@ -33,6 +33,7 @@ default-preferences pref(layout.css.ruby.enabled,true)
== 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
== line-height-4.html line-height-4-ref.html
load nested-ruby-1.html
== no-transform.html no-transform-ref.html
== relative-positioning-1.html relative-positioning-1-ref.html