mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Move all *MatchMethods to TElement.
MozReview-Commit-ID: 3V6JIlOVVhw
This commit is contained in:
parent
1090abae87
commit
2fce2fbb0c
7 changed files with 98 additions and 163 deletions
|
@ -631,14 +631,14 @@ pub fn process_resolved_style_request<'a, N, C>(requested_node: N,
|
|||
where N: LayoutNode,
|
||||
C: StyleContext<'a>
|
||||
{
|
||||
use style::traversal::ensure_node_styled;
|
||||
use style::traversal::ensure_element_styled;
|
||||
|
||||
// This node might have display: none, or it's style might be not up to
|
||||
// date, so we might need to do style recalc.
|
||||
//
|
||||
// FIXME(emilio): Is a bit shame we have to do this instead of in style.
|
||||
ensure_node_data_initialized(&requested_node);
|
||||
ensure_node_styled(requested_node, style_context);
|
||||
ensure_element_styled(requested_node.as_element().unwrap(), style_context);
|
||||
|
||||
let layout_node = requested_node.to_threadsafe();
|
||||
let layout_node = match *pseudo {
|
||||
|
|
|
@ -99,8 +99,7 @@ impl<'lc, N> DomTraversalContext<N> for RecalcStyleAndConstructFlows<'lc>
|
|||
//
|
||||
// The bloom filter stuff is all going to be rewritten, so we just hackily duplicate
|
||||
// the bloom filter manipulation from recalc_style_at to maintain invariants.
|
||||
let parent = node.parent_node();
|
||||
debug_assert!(parent.unwrap().is_element());
|
||||
let parent = node.parent_node().unwrap().as_element();
|
||||
let bf = take_thread_local_bloom_filter(parent, self.root, self.context.shared_context());
|
||||
put_thread_local_bloom_filter(bf, &node.to_unsafe(), self.context.shared_context());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue