mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
style: Do not reset font-weight/font-style when mathvariant is specified
In the past, mathvariant was cancelling the effect of legacy fontstyle/fontweight attributes by resetting the font-style/font-weight properties. These legacy attributes have been removed in bug 1783841, so remove this hack from Stylo and add corresponding WPT test. Differential Revision: https://phabricator.services.mozilla.com/D156174
This commit is contained in:
parent
d130831877
commit
2edb151782
1 changed files with 0 additions and 14 deletions
|
@ -361,19 +361,6 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// When mathvariant is not "none", font-weight and font-style are
|
|
||||||
/// both forced to "normal".
|
|
||||||
#[cfg(feature = "gecko")]
|
|
||||||
fn adjust_for_mathvariant(&mut self) {
|
|
||||||
use crate::properties::longhands::_moz_math_variant::computed_value::T as MozMathVariant;
|
|
||||||
use crate::values::computed::font::{FontWeight, FontStyle};
|
|
||||||
if self.style.get_font().clone__moz_math_variant() != MozMathVariant::None {
|
|
||||||
let font_style = self.style.mutate_font();
|
|
||||||
font_style.set_font_weight(FontWeight::NORMAL);
|
|
||||||
font_style.set_font_style(FontStyle::NORMAL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// This implements an out-of-date spec. The new spec moves the handling of
|
/// This implements an out-of-date spec. The new spec moves the handling of
|
||||||
/// this to layout, which Gecko implements but Servo doesn't.
|
/// this to layout, which Gecko implements but Servo doesn't.
|
||||||
///
|
///
|
||||||
|
@ -874,7 +861,6 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
{
|
{
|
||||||
self.adjust_for_table_text_align();
|
self.adjust_for_table_text_align();
|
||||||
self.adjust_for_mathvariant();
|
|
||||||
self.adjust_for_justify_items();
|
self.adjust_for_justify_items();
|
||||||
}
|
}
|
||||||
#[cfg(feature = "servo")]
|
#[cfg(feature = "servo")]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue