mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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
|
@ -856,7 +856,7 @@ where
|
|||
if element.has_data() {
|
||||
node.to_threadsafe().as_element().unwrap().resolved_style()
|
||||
} else {
|
||||
let mut tlc = ThreadLocalStyleContext::new(&context.style_context);
|
||||
let mut tlc = ThreadLocalStyleContext::new();
|
||||
let mut context = StyleContext {
|
||||
shared: &context.style_context,
|
||||
thread_local: &mut tlc,
|
||||
|
@ -911,7 +911,7 @@ pub fn process_resolved_style_request<'dom>(
|
|||
return String::new();
|
||||
}
|
||||
|
||||
let mut tlc = ThreadLocalStyleContext::new(&context.style_context);
|
||||
let mut tlc = ThreadLocalStyleContext::new();
|
||||
let mut context = StyleContext {
|
||||
shared: &context.style_context,
|
||||
thread_local: &mut tlc,
|
||||
|
|
|
@ -46,7 +46,6 @@ impl<'a, 'dom, E> DomTraversal<E> for RecalcStyleAndConstructFlows<'a>
|
|||
where
|
||||
E: TElement,
|
||||
E::ConcreteNode: LayoutNode<'dom>,
|
||||
E::FontMetricsProvider: Send,
|
||||
{
|
||||
fn process_preorder<F>(
|
||||
&self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue