Closed Bug 1367301 Opened 7 years ago Closed 7 years ago

stylo: -moz-math-variant needs to override font-weight and font-style

Categories

(Core :: CSS Parsing and Computation, enhancement)

53 Branch
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

nsRuleNode::SetFont has:

  if (aFont->mMathVariant != NS_MATHML_MATHVARIANT_NONE) {
    // -moz-math-variant overrides font-style
    aFont->mFont.style = NS_FONT_STYLE_NORMAL;
  } else {
    // normal font-style computation
  }

and

  if (aFont->mMathVariant != NS_MATHML_MATHVARIANT_NONE) {
    // -moz-math-variant overrides font-weight
    aFont->mFont.weight = NS_FONT_WEIGHT_NORMAL;
  } else if (eCSSUnit_Enumerated == weightValue->GetUnit()) {
    // normal font-weight computation
  }

but we don't seem to have a servo equivalent.  This is causing the layout/reftests/mathml/mathvariant-3.html test failure.
I guess we either need to put -moz-math-variant in the "computed early" properties that hang off the Context via its StyleBuilder, or we need to do some sort of after-the-fact fixup, right?
This feels like an after the fact fixup. Emilio added a framework for these
https://hg.mozilla.org/integration/autoland/rev/93c49ebdbc5554d2eaeaf56e6926a218b78994fe
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Blocks: 1788645
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: