diff --git a/components/layout/wrapper.rs b/components/layout/wrapper.rs index ae8462426e8..ad745d2d091 100644 --- a/components/layout/wrapper.rs +++ b/components/layout/wrapper.rs @@ -413,7 +413,7 @@ impl<'le> LayoutElement<'le> { } /// Properly marks nodes as dirty in response to restyle hints. - pub fn note_restyle_hint(&self, hint: RestyleHint) { + pub fn note_restyle_hint(&self, mut hint: RestyleHint) { // Bail early if there's no restyling to do. if hint.is_empty() { return; @@ -446,6 +446,11 @@ impl<'le> LayoutElement<'le> { // Process hints. if hint.contains(RESTYLE_SELF) { dirty_node(&node); + + // FIXME(bholley, #8438): We currently need to RESTYLE_DESCENDANTS in the + // RESTYLE_SELF case in order to make sure "inherit" style structs propagate + // properly. See the explanation in the github issue. + hint.insert(RESTYLE_DESCENDANTS); } if hint.contains(RESTYLE_DESCENDANTS) { unsafe { node.set_dirty_descendants(true); }