style: Inline some things that should never ever appear in a profile.

This commit is contained in:
Emilio Cobos Álvarez 2017-12-01 20:01:25 +01:00
parent 9da7663e29
commit 2bbeda97d3
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
3 changed files with 13 additions and 5 deletions

View file

@ -211,6 +211,7 @@ impl<'ln> GeckoNode<'ln> {
/// WARNING: This logic is duplicated in Gecko's FlattenedTreeParentIsParent.
/// Make sure to mirror any modifications in both places.
#[inline]
fn flattened_tree_parent_is_parent(&self) -> bool {
use gecko_bindings::structs::*;
let flags = self.flags();
@ -236,6 +237,7 @@ impl<'ln> GeckoNode<'ln> {
true
}
#[inline]
fn flattened_tree_parent(&self) -> Option<Self> {
let fast_path = self.flattened_tree_parent_is_parent();
debug_assert!(fast_path == unsafe { bindings::Gecko_FlattenedTreeParentIsParent(self.0) });
@ -246,6 +248,7 @@ impl<'ln> GeckoNode<'ln> {
}
}
#[inline]
fn contains_non_whitespace_content(&self) -> bool {
unsafe { Gecko_IsSignificantChild(self.0, true, false) }
}