mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Make RESTYLE_SELF imply RESTYLE_DESCENDANTS.
This is a temporary workaround for #8438.
This commit is contained in:
parent
c9704992a9
commit
47744d95ad
1 changed files with 6 additions and 1 deletions
|
@ -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); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue