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

@ -91,7 +91,7 @@ where
// ThreadLocalStyleContext has not released its TLS borrow by that point,
// we'll panic on double-borrow.
let mut tls_slots = None;
let mut tlc = ThreadLocalStyleContext::new(traversal.shared_context());
let mut tlc = ThreadLocalStyleContext::new();
let mut context = StyleContext {
shared: traversal.shared_context(),
thread_local: &mut tlc,