mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Stop special-casing a few attributes for style sharing, and use a visitor to track dependencies.
Also, simplify all the pre-snapshot attribute hacks in the script and style code. MozReview-Commit-ID: 6c9ipeb7Tnr Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
parent
1748150497
commit
0ea58d1ffa
9 changed files with 161 additions and 312 deletions
|
@ -100,7 +100,6 @@ use std::sync::Arc;
|
|||
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
|
||||
use style::context::{QuirksMode, ReflowGoal};
|
||||
use style::element_state::*;
|
||||
use style::matching::{common_style_affecting_attributes, rare_style_affecting_attributes};
|
||||
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;
|
||||
|
@ -2236,14 +2235,6 @@ impl VirtualMethods for Element {
|
|||
}
|
||||
}
|
||||
},
|
||||
_ if attr.namespace() == &ns!() => {
|
||||
if fragment_affecting_attributes().iter().any(|a| a == attr.local_name()) ||
|
||||
common_style_affecting_attributes().iter().any(|a| &a.attr_name == attr.local_name()) ||
|
||||
rare_style_affecting_attributes().iter().any(|a| a == attr.local_name())
|
||||
{
|
||||
node.dirty(NodeDamage::OtherNodeDamage);
|
||||
}
|
||||
},
|
||||
_ => {},
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue