mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 774968 - line-height percentage value not computed accurately. r=dbaron
--HG-- extra : rebase_source : 93885c1b2ef72d673a935c135f89cc06bc58136d
This commit is contained in:
parent
f46addfd2d
commit
e6e89e5e75
3
layout/reftests/text/lineheight-percentage-1-ref.html
Normal file
3
layout/reftests/text/lineheight-percentage-1-ref.html
Normal file
@ -0,0 +1,3 @@
|
||||
<!DOCTYPE html>
|
||||
<body style="font-size: 50px">
|
||||
<p style="line-height: 20.5px">20.5px
|
6
layout/reftests/text/lineheight-percentage-1.html
Normal file
6
layout/reftests/text/lineheight-percentage-1.html
Normal file
@ -0,0 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<body style="font-size: 50px">
|
||||
<p style="line-height: 41%">
|
||||
<script>
|
||||
document.write(window.getComputedStyle(document.getElementsByTagName("p")[0], "").lineHeight);
|
||||
</script>
|
@ -23,6 +23,7 @@ load ligature-with-space-1.html
|
||||
== line-editing-1d.html line-editing-1-ref.html
|
||||
== line-editing-1e.html line-editing-1-ref.html
|
||||
fails-if(cocoaWidget||winWidget) HTTP(..) == lineheight-metrics-1.html lineheight-metrics-1-ref.html # bug 657864
|
||||
== lineheight-percentage-1.html lineheight-percentage-1-ref.html
|
||||
== long-1.html long-ref.html
|
||||
== pre-line-1.html pre-line-1-ref.html
|
||||
== pre-line-2.html pre-line-2-ref.html
|
||||
|
@ -3634,8 +3634,8 @@ nsRuleNode::ComputeTextData(void* aStartStruct,
|
||||
canStoreInRuleTree = false;
|
||||
// Use |mFont.size| to pick up minimum font size.
|
||||
text->mLineHeight.SetCoordValue(
|
||||
nscoord(float(aContext->GetStyleFont()->mFont.size) *
|
||||
lineHeightValue->GetPercentValue()));
|
||||
NSToCoordRound(float(aContext->GetStyleFont()->mFont.size) *
|
||||
lineHeightValue->GetPercentValue()));
|
||||
}
|
||||
else if (eCSSUnit_Initial == lineHeightValue->GetUnit() ||
|
||||
eCSSUnit_System_Font == lineHeightValue->GetUnit()) {
|
||||
|
Loading…
Reference in New Issue
Block a user