Bug 1596391 - Fix silly boolean logic mistake. r=bustage a=dluca
authorEmilio Cobos Álvarez <emilio@crisal.io>
Thu, 14 Nov 2019 15:16:18 +0100
changeset 501938 3af7f65785fe9e7ddd3d33afcede92f7ce21e111
parent 501937 a78842ddeb296e3093b51b4075a27cc617d42e4a
child 501939 5d7640ffbf2ad18d3bc99bac56b6500d80db987b
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage, dluca
bugs1596391
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1596391 - Fix silly boolean logic mistake. r=bustage a=dluca MANUAL PUSH: bustage
servo/components/style/gecko/wrapper.rs
--- a/servo/components/style/gecko/wrapper.rs
+++ b/servo/components/style/gecko/wrapper.rs
@@ -295,17 +295,20 @@ 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 crate::gecko_bindings::structs::*;
         let flags = self.flags();
-        if !self.is_in_shadow_tree() {
+
+        // FIXME(emilio): The shadow tree condition seems it shouldn't be needed
+        // anymore, if we check for slots.
+        if self.is_in_shadow_tree() {
             return false;
         }
 
         let parent = unsafe { self.0.mParent.as_ref() }.map(GeckoNode);
         let parent_el = parent.and_then(|p| p.as_element());
         if flags & (NODE_IS_NATIVE_ANONYMOUS_ROOT as u32) != 0 &&
             parent_el.map_or(false, |el| el.is_root())
         {