mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Refactor RestyleHint to be a struct.
Later PRs will add additional data to it that is not so easy to represent using bitflags.
This commit is contained in:
parent
c13be5cd13
commit
a397590838
9 changed files with 294 additions and 111 deletions
|
@ -102,7 +102,7 @@ use style::context::{QuirksMode, ReflowGoal};
|
|||
use style::element_state::*;
|
||||
use style::properties::{Importance, PropertyDeclaration, PropertyDeclarationBlock, parse_style_attribute};
|
||||
use style::properties::longhands::{self, background_image, border_spacing, font_family, font_size, overflow_x};
|
||||
use style::restyle_hints::RESTYLE_SELF;
|
||||
use style::restyle_hints::RestyleHint;
|
||||
use style::rule_tree::CascadeLevel;
|
||||
use style::selector_parser::{NonTSPseudoClass, PseudoElement, RestyleDamage, SelectorImpl, SelectorParser};
|
||||
use style::shared_lock::{SharedRwLock, Locked};
|
||||
|
@ -245,7 +245,7 @@ impl Element {
|
|||
|
||||
// FIXME(bholley): I think we should probably only do this for
|
||||
// NodeStyleDamaged, but I'm preserving existing behavior.
|
||||
restyle.hint |= RESTYLE_SELF;
|
||||
restyle.hint.insert(RestyleHint::for_self());
|
||||
|
||||
if damage == NodeDamage::OtherNodeDamage {
|
||||
restyle.damage = RestyleDamage::rebuild_and_reflow();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue