mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Update Stylo to 2023-10-16 (#31932)
* Update Stylo to 2023-10-16 * Fixup for https://phabricator.services.mozilla.com/D185154 * Fixup for https://phabricator.services.mozilla.com/D188216 * Fixup for https://phabricator.services.mozilla.com/D185677 * Fixup for https://phabricator.services.mozilla.com/D188566 * Fixup for https://phabricator.services.mozilla.com/D188727 * Fixup for https://phabricator.services.mozilla.com/D189475 * Fixup for https://phabricator.services.mozilla.com/D189521 * Fixup for https://phabricator.services.mozilla.com/D188812 * Fixup for https://phabricator.services.mozilla.com/D189484 * Update test expectations
This commit is contained in:
parent
a7ad92d9a3
commit
fff9ef87e6
48 changed files with 97 additions and 181 deletions
|
@ -1527,7 +1527,6 @@ where
|
|||
},
|
||||
// XXX: Non-None image types unimplemented.
|
||||
Image::ImageSet(..) |
|
||||
Image::Rect(..) |
|
||||
Image::Gradient(..) |
|
||||
Image::PaintWorklet(..) |
|
||||
Image::CrossFade(..) |
|
||||
|
|
|
@ -796,10 +796,6 @@ impl Fragment {
|
|||
Image::CrossFade(..) | Image::ImageSet(..) => {
|
||||
unreachable!("Shouldn't be parsed by Servo for now")
|
||||
},
|
||||
Image::Rect(ref rect) => {
|
||||
// This is a (boxed) empty enum on non-Gecko
|
||||
match **rect {}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -771,7 +771,7 @@ impl CollapsedBorder {
|
|||
CollapsedBorder {
|
||||
style: BorderStyle::None,
|
||||
width: Au(0),
|
||||
color: Color::TRANSPARENT,
|
||||
color: Color::TRANSPARENT_BLACK,
|
||||
provenance: CollapsedBorderFrom::Table,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ use style::computed_values::word_break::T as WordBreak;
|
|||
use style::logical_geometry::{LogicalSize, WritingMode};
|
||||
use style::properties::style_structs::Font as FontStyleStruct;
|
||||
use style::properties::ComputedValues;
|
||||
use style::values::generics::text::LineHeight;
|
||||
use style::values::generics::font::LineHeight;
|
||||
use style::values::specified::text::{TextTransform, TextTransformCase};
|
||||
use unicode_bidi as bidi;
|
||||
use unicode_script::Script;
|
||||
|
@ -550,8 +550,9 @@ pub fn font_metrics_for_style(
|
|||
|
||||
/// Returns the line block-size needed by the given computed style and font size.
|
||||
pub fn line_height_from_style(style: &ComputedValues, metrics: &FontMetrics) -> Au {
|
||||
let font_size = style.get_font().font_size.computed_size();
|
||||
match style.get_inherited_text().line_height {
|
||||
let font = style.get_font();
|
||||
let font_size = font.font_size.computed_size();
|
||||
match font.line_height {
|
||||
LineHeight::Normal => metrics.line_gap,
|
||||
LineHeight::Number(l) => Au::from(font_size * l.0),
|
||||
LineHeight::Length(l) => Au::from(l),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue