mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #18017 - heycam:split-cascade, r=emilio
style: Move all origin-specific cascade data to PerOriginCascadeData <!-- Please describe your changes on the following line: --> This is a preliminary refactoring in preparation for only rebuilding cascade data for origins that have a change. https://bugzilla.mozilla.org/show_bug.cgi?id=1382925 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18017) <!-- Reviewable:end -->
This commit is contained in:
commit
ca14848711
7 changed files with 345 additions and 197 deletions
|
@ -388,16 +388,16 @@ impl TraversalStatistics {
|
|||
D: DomTraversal<E>,
|
||||
{
|
||||
let threshold = traversal.shared_context().options.style_statistics_threshold;
|
||||
let stylist = traversal.shared_context().stylist;
|
||||
|
||||
self.is_parallel = Some(traversal.is_parallel());
|
||||
self.is_large = Some(self.elements_traversed as usize >= threshold);
|
||||
self.traversal_time_ms = (time::precise_time_s() - start) * 1000.0;
|
||||
self.selectors = traversal.shared_context().stylist.num_selectors() as u32;
|
||||
self.revalidation_selectors = traversal.shared_context().stylist.num_revalidation_selectors() as u32;
|
||||
self.dependency_selectors =
|
||||
traversal.shared_context().stylist.invalidation_map().len() as u32;
|
||||
self.declarations = traversal.shared_context().stylist.num_declarations() as u32;
|
||||
self.stylist_rebuilds = traversal.shared_context().stylist.num_rebuilds() as u32;
|
||||
self.selectors = stylist.num_selectors() as u32;
|
||||
self.revalidation_selectors = stylist.num_revalidation_selectors() as u32;
|
||||
self.dependency_selectors = stylist.num_invalidations() as u32;
|
||||
self.declarations = stylist.num_declarations() as u32;
|
||||
self.stylist_rebuilds = stylist.num_rebuilds() as u32;
|
||||
}
|
||||
|
||||
/// Returns whether this traversal is 'large' in order to avoid console spam
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue