From ad602a0fa8ec0b9942f3f0947a6f92148b05a79a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sat, 18 Apr 2020 04:32:33 +0200 Subject: [PATCH] style: Export a size to fix a test that was trying to use a now-private type. --- components/style/rule_tree/core.rs | 3 +++ components/style/rule_tree/mod.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/components/style/rule_tree/core.rs b/components/style/rule_tree/core.rs index d1c8bda5379..ae1ba7bed94 100644 --- a/components/style/rule_tree/core.rs +++ b/components/style/rule_tree/core.rs @@ -202,6 +202,9 @@ impl RuleTree { /// where it likely did not result from a rigorous performance analysis.) const RULE_TREE_GC_INTERVAL: usize = 300; +/// Used for some size assertions. +pub const RULE_NODE_SIZE: usize = std::mem::size_of::(); + /// A node in the rule tree. struct RuleNode { /// The root node. Only the root has no root pointer, for obvious reasons. diff --git a/components/style/rule_tree/mod.rs b/components/style/rule_tree/mod.rs index ab5273db781..e50382255ca 100644 --- a/components/style/rule_tree/mod.rs +++ b/components/style/rule_tree/mod.rs @@ -19,7 +19,7 @@ mod map; mod source; mod unsafe_box; -pub use self::core::{RuleTree, StrongRuleNode}; +pub use self::core::{RuleTree, StrongRuleNode, RULE_NODE_SIZE}; pub use self::level::{CascadeLevel, ShadowCascadeOrder}; pub use self::source::StyleSource;