mirror of
https://github.com/servo/servo.git
synced 2025-08-08 23:15:33 +01:00
stylo: Store font metrics provider in thread local style context
This commit is contained in:
parent
2ea8d61fbf
commit
e402c72d0e
19 changed files with 158 additions and 35 deletions
|
@ -12,6 +12,7 @@ use atomic_refcell::{AtomicRef, AtomicRefCell, AtomicRefMut};
|
|||
#[cfg(feature = "gecko")] use context::UpdateAnimationsTasks;
|
||||
use data::ElementData;
|
||||
use element_state::ElementState;
|
||||
use font_metrics::FontMetricsProvider;
|
||||
use properties::{ComputedValues, PropertyDeclarationBlock};
|
||||
use selector_parser::{ElementExt, PreExistingComputedValues, PseudoElement};
|
||||
use selectors::matching::ElementSelectorFlags;
|
||||
|
@ -278,6 +279,12 @@ pub trait TElement : PartialEq + Debug + Sized + Copy + Clone + ElementExt + Pre
|
|||
/// The concrete node type.
|
||||
type ConcreteNode: TNode<ConcreteElement = Self>;
|
||||
|
||||
/// Type of the font metrics provider
|
||||
///
|
||||
/// XXXManishearth It would be better to make this a type parameter on
|
||||
/// ThreadLocalStyleContext and StyleContext
|
||||
type FontMetricsProvider: FontMetricsProvider;
|
||||
|
||||
/// Get this element as a node.
|
||||
fn as_node(&self) -> Self::ConcreteNode;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue