diff options
author | Bobby Holley <bobbyholley@gmail.com> | 2015-11-09 15:19:13 -0800 |
---|---|---|
committer | Bobby Holley <bobbyholley@gmail.com> | 2015-11-10 11:41:28 -0800 |
commit | 47744d95add56352ab5d0631d3dd5e054aad3849 (patch) | |
tree | a8d181dd1a2bde58092f9dae92184f055ddebb21 /components | |
parent | c9704992a9f378a682835fe86def542b9086ea1c (diff) | |
download | servo-47744d95add56352ab5d0631d3dd5e054aad3849.tar.gz servo-47744d95add56352ab5d0631d3dd5e054aad3849.zip |
Make RESTYLE_SELF imply RESTYLE_DESCENDANTS.
This is a temporary workaround for #8438.
Diffstat (limited to 'components')
-rw-r--r-- | components/layout/wrapper.rs | 7 |
1 files changed, 6 insertions, 1 deletions
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); } |