Commit 8df84f77 authored by Rune Lillesveen's avatar Rune Lillesveen Committed by Chromium LUCI CQ

Add MathML UA style features to the global ruleset

We were missing features for correctly invalidating style on MathML
elements for changes affected by UA rules.

Bug: 1167169
Change-Id: Idb6c95dbf3526b5f293f7e4b593f403a34721253
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2632949
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: default avatarFrédéric Wang <fwang@igalia.com>
Cr-Commit-Position: refs/heads/master@{#845197}
parent 5894544c
......@@ -355,6 +355,8 @@ void CSSDefaultStyleSheets::CollectFeaturesTo(const Document& document,
features.Add(DefaultStyle()->Features());
if (DefaultMediaControlsStyle())
features.Add(DefaultMediaControlsStyle()->Features());
if (DefaultMathMLStyle())
features.Add(DefaultMathMLStyle()->Features());
if (document.IsViewSource() && DefaultViewSourceStyle())
features.Add(DefaultViewSourceStyle()->Features());
}
......
<!doctype html>
<title>MathML Reference</title>
<p>The 1's below should have the same size</p>
<math>
<mover accent="true">
<mn>1</mn>
<mn>1</mn>
</mover>
</math>
<!doctype html>
<title>MathML: Dynamically change accent on mover</title>
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#displaystyle-and-scriptlevel-in-scripts">
<link rel="match" href="mover-accent-dynamic-change-ref.html">
<meta name="assert" content="Test that setting the accent attribute on mover takes effect">
<p>The 1's below should have the same size</p>
<math>
<mover id="m">
<mn>1</mn>
<mn>1</mn>
</mover>
</math>
<script>
document.body.offsetTop;
m.setAttribute("accent", "true");
</script>
......@@ -89,8 +89,8 @@
element.removeAttribute("accent");
element.setAttribute("accentunder", "TrUe");
assert_approx_equals(fontSize(element.children[0]), fontSizeAtScriptLevelZero, epsilon, "base");
assert_approx_equals(fontSize(element.children[1]), fontSizeAtScriptLevelZero * .71, epsilon, "over");
assert_approx_equals(fontSize(element.children[2]), fontSizeAtScriptLevelZero, epsilon, "under");
assert_approx_equals(fontSize(element.children[1]), fontSizeAtScriptLevelZero, epsilon, "under");
assert_approx_equals(fontSize(element.children[2]), fontSizeAtScriptLevelZero * .71, epsilon, "over");
}, "checking dynamic/case-insensitive accent/accentunder");
done();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment