mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Remove cached thread local context from LayoutContext
Remove cached thread local context from LayoutContext, use LayoutContext for assign_inline_sizes(), and simplify the parallel flow traversal code.
This commit is contained in:
parent
f07bfaa974
commit
336aa795b4
24 changed files with 331 additions and 428 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
use app_units::Au;
|
||||
use construct::ConstructionResult;
|
||||
use context::SharedLayoutContext;
|
||||
use context::LayoutContext;
|
||||
use euclid::point::Point2D;
|
||||
use euclid::rect::Rect;
|
||||
use euclid::size::Size2D;
|
||||
|
@ -696,7 +696,7 @@ pub fn process_node_scroll_area_request< N: LayoutNode>(requested_node: N, layou
|
|||
|
||||
/// Return the resolved value of property for a given (pseudo)element.
|
||||
/// https://drafts.csswg.org/cssom/#resolved-value
|
||||
pub fn process_resolved_style_request<'a, N>(shared: &SharedLayoutContext,
|
||||
pub fn process_resolved_style_request<'a, N>(context: &LayoutContext,
|
||||
node: N,
|
||||
pseudo: &Option<PseudoElement>,
|
||||
property: &PropertyId,
|
||||
|
@ -715,9 +715,9 @@ pub fn process_resolved_style_request<'a, N>(shared: &SharedLayoutContext,
|
|||
// However, the element may be in a display:none subtree. The style system
|
||||
// has a mechanism to give us that within a defined scope (after which point
|
||||
// it's cleared to maintained style system invariants).
|
||||
let mut tlc = ThreadLocalStyleContext::new(&shared.style_context);
|
||||
let mut tlc = ThreadLocalStyleContext::new(&context.style_context);
|
||||
let context = StyleContext {
|
||||
shared: &shared.style_context,
|
||||
shared: &context.style_context,
|
||||
thread_local: &mut tlc,
|
||||
};
|
||||
let mut result = None;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue