mirror of
https://github.com/servo/servo.git
synced 2025-08-11 08:25:32 +01:00
style: Move all the style sharing code outside matching.rs
This is just a code health change. I want to move it away to keep matching.rs as simple as possible.
This commit is contained in:
parent
d98abe1397
commit
311c403522
6 changed files with 585 additions and 499 deletions
|
@ -8,9 +8,10 @@ use atomic_refcell::{AtomicRefCell, AtomicRefMut};
|
|||
use context::{SharedStyleContext, StyleContext, ThreadLocalStyleContext};
|
||||
use data::{ElementData, ElementStyles, StoredRestyleHint};
|
||||
use dom::{DirtyDescendants, NodeInfo, OpaqueNode, TElement, TNode};
|
||||
use matching::{ChildCascadeRequirement, MatchMethods, StyleSharingBehavior};
|
||||
use matching::{ChildCascadeRequirement, MatchMethods};
|
||||
use restyle_hints::{HintComputationContext, RestyleHint};
|
||||
use selector_parser::RestyleDamage;
|
||||
use sharing::StyleSharingBehavior;
|
||||
#[cfg(feature = "servo")] use servo_config::opts;
|
||||
use std::borrow::BorrowMut;
|
||||
|
||||
|
@ -723,7 +724,7 @@ fn compute_style<E, D>(_traversal: &D,
|
|||
D: DomTraversal<E>,
|
||||
{
|
||||
use data::RestyleKind::*;
|
||||
use matching::StyleSharingResult::*;
|
||||
use sharing::StyleSharingResult::*;
|
||||
|
||||
context.thread_local.statistics.elements_styled += 1;
|
||||
let kind = data.restyle_kind();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue