Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: Fix ex computation with more than one operand. #18807

Merged
merged 1 commit into from Oct 10, 2017
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

style: Fix ex computation with more than one operand.

  • Loading branch information
emilio committed Oct 10, 2017
commit 90ee40f43f1a640e02235ffc76f5c8ec42e3ca8a
@@ -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);
{}
]
],
"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",
{}
]
],
"css/css-values-3/ex-calc-expression-001-ref.html": [
[
{}
]
],
"css/css-values-3/reference/200-200-green.html": [
[
{}
"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>
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.