Simplify our setup for font metric queries from style

This is a backport of https://phabricator.services.mozilla.com/D157589,
by Emilio Cobos Álvarez, plus some additions so that Servo compiles,
and some parts from https://phabricator.services.mozilla.com/D144455.

Should have no change in behavior.
This commit is contained in:
Oriol Brufau 2023-05-10 03:34:29 +02:00
parent feaa66b597
commit ab2ba273e3
21 changed files with 172 additions and 322 deletions

View file

@ -25,7 +25,6 @@ use style::context::SharedStyleContext;
use style::data::ElementData;
use style::dom::OpaqueNode;
use style::dom::{LayoutIterator, NodeInfo, TElement, TNode};
use style::font_metrics::ServoMetricsProvider;
use style::properties::ComputedValues;
use style::selector_parser::{PseudoElement, PseudoElementCascadeType, SelectorImpl};
use style::stylist::RuleInclusion;
@ -439,7 +438,6 @@ pub trait ThreadSafeLayoutElement<'dom>:
&context.guards,
&style_pseudo,
Some(data.styles.primary()),
&ServoMetricsProvider,
),
PseudoElementCascadeType::Lazy => {
context
@ -451,7 +449,6 @@ pub trait ThreadSafeLayoutElement<'dom>:
RuleInclusion::All,
data.styles.primary(),
/* is_probe = */ false,
&ServoMetricsProvider,
/* matching_func = */ None,
)
.unwrap()