mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Fix ex computation with more than one operand.
This commit is contained in:
parent
826352ab4c
commit
90ee40f43f
4 changed files with 56 additions and 1 deletions
|
@ -372,7 +372,7 @@ impl CalcNode {
|
|||
ret.em = Some(ret.em.unwrap_or(0.) + em * factor);
|
||||
}
|
||||
FontRelativeLength::Ex(ex) => {
|
||||
ret.ex = Some(ret.em.unwrap_or(0.) + ex * factor);
|
||||
ret.ex = Some(ret.ex.unwrap_or(0.) + ex * factor);
|
||||
}
|
||||
FontRelativeLength::Ch(ch) => {
|
||||
ret.ch = Some(ret.ch.unwrap_or(0.) + ch * factor);
|
||||
|
|
|
@ -139305,6 +139305,18 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/css-values-3/ex-calc-expression-001.html": [
|
||||
[
|
||||
"/css/css-values-3/ex-calc-expression-001.html",
|
||||
[
|
||||
[
|
||||
"/css/css-values-3/ex-calc-expression-001-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-values-3/initial-background-color.html": [
|
||||
[
|
||||
"/css/css-values-3/initial-background-color.html",
|
||||
|
@ -245196,6 +245208,11 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/css-values-3/ex-calc-expression-001-ref.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-values-3/reference/200-200-green.html": [
|
||||
[
|
||||
{}
|
||||
|
@ -528644,6 +528661,14 @@
|
|||
"f9080ef8e6db6888e9d53b30c36e5a6234ecf0b1",
|
||||
"reftest"
|
||||
],
|
||||
"css/css-values-3/ex-calc-expression-001-ref.html": [
|
||||
"82d289ca9e58621c22249c5d5517933b3e5a2f82",
|
||||
"support"
|
||||
],
|
||||
"css/css-values-3/ex-calc-expression-001.html": [
|
||||
"86a53c6f9609456824c134d4c4834669adddae49",
|
||||
"reftest"
|
||||
],
|
||||
"css/css-values-3/iframe/vh-support-transform-origin-iframe.html": [
|
||||
"e295875de4bc58b51c45db9a87648749bdfc7e8d",
|
||||
"visual"
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<!doctype html>
|
||||
<title>CSS Test Reference</title>
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
<style>
|
||||
div {
|
||||
width: 2ex;
|
||||
height: 2ex;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<div></div>
|
|
@ -0,0 +1,19 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Test: Calc expression using multiple ex operands</title>
|
||||
<link rel="match" href="ex-calc-expression-001-ref.html">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-values/#funcdef-calc">
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
<style>
|
||||
/*
|
||||
This is a regression test for:
|
||||
https://github.com/servo/servo/pull/18807
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1407092
|
||||
*/
|
||||
div {
|
||||
width: calc(1ex + 1ex);
|
||||
height: calc(1ex + 1ex);
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<div></div>
|
Loading…
Add table
Add a link
Reference in a new issue