mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00: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
|
@ -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