mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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
|
@ -67,6 +67,7 @@ use style::data::ElementData;
|
|||
use style::dom::{DescendantsBit, DirtyDescendants, LayoutIterator, NodeInfo, OpaqueNode};
|
||||
use style::dom::{PresentationalHintsSynthetizer, TElement, TNode, UnsafeNode};
|
||||
use style::element_state::*;
|
||||
use style::font_metrics::ServoMetricsProvider;
|
||||
use style::properties::{ComputedValues, PropertyDeclarationBlock};
|
||||
use style::selector_parser::{NonTSPseudoClass, PseudoElement, SelectorImpl};
|
||||
use style::shared_lock::{SharedRwLock as StyleSharedRwLock, Locked as StyleLocked};
|
||||
|
@ -373,6 +374,8 @@ impl<'le> PresentationalHintsSynthetizer for ServoLayoutElement<'le> {
|
|||
impl<'le> TElement for ServoLayoutElement<'le> {
|
||||
type ConcreteNode = ServoLayoutNode<'le>;
|
||||
|
||||
type FontMetricsProvider = ServoMetricsProvider;
|
||||
|
||||
fn as_node(&self) -> ServoLayoutNode<'le> {
|
||||
ServoLayoutNode::from_layout_js(self.element.upcast())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue