mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Auto merge of #5608 - pgonda:cmdline-disable-style-sharing, r=Ms2ger
Let me know if I should fix anything, or how I could implement a test if needed. I looked at some testing in servo/ports/command_line.rs but it did not seem to apply. Thanks!
This commit is contained in:
commit
875f07ff25
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