aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/css
diff options
context:
space:
mode:
authorPeter <ptrgonda@gmail.com>2015-04-09 21:42:41 -0400
committerPeter <ptrgonda@gmail.com>2015-04-09 21:42:41 -0400
commit881112d34e6bb95fefd256b17bd690b6e8290d74 (patch)
treef6b11588b1cc4fb947356a63a8a2ae21c69d8d9c /components/layout/css
parentc1b7c0c74a2f224a9c8cbf427e10b9591a693d84 (diff)
downloadservo-881112d34e6bb95fefd256b17bd690b6e8290d74.tar.gz
servo-881112d34e6bb95fefd256b17bd690b6e8290d74.zip
Adding cmdling argument for disabling style share cache, fix #5581
Diffstat (limited to 'components/layout/css')
-rw-r--r--components/layout/css/matching.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/components/layout/css/matching.rs b/components/layout/css/matching.rs
index 1c977c8081b..2331afc65b2 100644
--- a/components/layout/css/matching.rs
+++ b/components/layout/css/matching.rs
@@ -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)
}