mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
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:
parent
feaa66b597
commit
ab2ba273e3
21 changed files with 172 additions and 322 deletions
|
@ -33,7 +33,6 @@ use style::context::SharedStyleContext;
|
|||
use style::data::ElementData;
|
||||
use style::dom::{DomChildren, LayoutIterator, TDocument, TElement, TNode, TShadowRoot};
|
||||
use style::element_state::*;
|
||||
use style::font_metrics::ServoMetricsProvider;
|
||||
use style::properties::PropertyDeclarationBlock;
|
||||
use style::selector_parser::{
|
||||
extended_filtering, AttrValue as SelectorAttrValue, Lang, NonTSPseudoClass, PseudoElement,
|
||||
|
@ -169,8 +168,6 @@ impl<'dom, LayoutDataType: LayoutDataTrait> style::dom::TElement
|
|||
type ConcreteNode = ServoLayoutNode<'dom, LayoutDataType>;
|
||||
type TraversalChildrenIterator = DomChildren<Self::ConcreteNode>;
|
||||
|
||||
type FontMetricsProvider = ServoMetricsProvider;
|
||||
|
||||
fn as_node(&self) -> ServoLayoutNode<'dom, LayoutDataType> {
|
||||
ServoLayoutNode::from_layout_js(self.element.upcast())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue