mirror of
https://github.com/servo/servo.git
synced 2025-07-30 18:50:36 +01:00
Adding cmdling argument for disabling style share cache, fix #5581
This commit is contained in:
parent
c1b7c0c74a
commit
881112d34e
2 changed files with 11 additions and 0 deletions
|
@ -32,6 +32,7 @@ use style::properties::{ComputedValues, cascade};
|
|||
use style::selector_matching::{Stylist, DeclarationBlock};
|
||||
use util::arc_ptr_eq;
|
||||
use util::cache::{LRUCache, SimpleHashCache};
|
||||
use util::opts;
|
||||
use util::smallvec::{SmallVec, SmallVec16};
|
||||
|
||||
pub struct ApplicableDeclarations {
|
||||
|
@ -564,6 +565,9 @@ impl<'ln> MatchMethods for LayoutNode<'ln> {
|
|||
&mut StyleSharingCandidateCache,
|
||||
parent: Option<LayoutNode>)
|
||||
-> StyleSharingResult {
|
||||
if opts::get().disable_share_style_cache {
|
||||
return StyleSharingResult::CannotShare(false)
|
||||
}
|
||||
if !self.is_element() {
|
||||
return StyleSharingResult::CannotShare(false)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue