mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Implement the math-style property.
This patch renames the internal -moz-math-display to math-style and exposes it under the layout.css.math-style.enabled preference. The initial value becomes "normal" but that does not affect the default MathML behavior since the UA style sheet sets the math-style property explicitly on <math> tags. WPT tests are updated to use the syntax approved by the CSSWG. Intent to prototype: https://groups.google.com/forum/#!msg/mozilla.dev.platform/1hQQ7ISudGo/_yLEckEeBQAJ Differential Revision: https://phabricator.services.mozilla.com/D90731
This commit is contained in:
parent
74a46d96eb
commit
ca03f4df6d
2 changed files with 9 additions and 9 deletions
|
@ -819,14 +819,14 @@ impl ToComputedValue for specified::MozScriptLevel {
|
|||
type ComputedValue = MozScriptLevel;
|
||||
|
||||
fn to_computed_value(&self, cx: &Context) -> i8 {
|
||||
use crate::properties::longhands::_moz_math_display::SpecifiedValue as DisplayValue;
|
||||
use crate::properties::longhands::math_style::SpecifiedValue as MathStyleValue;
|
||||
use std::{cmp, i8};
|
||||
|
||||
let int = match *self {
|
||||
specified::MozScriptLevel::Auto => {
|
||||
let parent = cx.builder.get_parent_font().clone__moz_script_level() as i32;
|
||||
let display = cx.builder.get_parent_font().clone__moz_math_display();
|
||||
if display == DisplayValue::Inline {
|
||||
let style = cx.builder.get_parent_font().clone_math_style();
|
||||
if style == MathStyleValue::Compact {
|
||||
parent + 1
|
||||
} else {
|
||||
parent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue