Make RESTYLE_SELF imply RESTYLE_DESCENDANTS.

This is a temporary workaround for #8438.
This commit is contained in:
Bobby Holley 2015-11-09 15:19:13 -08:00
parent c9704992a9
commit 47744d95ad

View file

@ -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); }