mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Create a new infrastructure for presentational hints.
This commit is contained in:
parent
852d973a70
commit
582ee1c2b3
5 changed files with 41 additions and 3 deletions
|
@ -108,6 +108,14 @@ impl PresentationalHintSynthesis for Stylist {
|
|||
N::Element: TElementAttributes,
|
||||
V: VecLike<DeclarationBlock<Vec<PropertyDeclaration>>> {
|
||||
let element = node.as_element();
|
||||
|
||||
let length = matching_rules_list.vec_len();
|
||||
element.synthesize_presentational_hints_for_legacy_attributes(matching_rules_list);
|
||||
if matching_rules_list.vec_len() != length {
|
||||
// Never share style for elements with preshints
|
||||
*shareable = false;
|
||||
}
|
||||
|
||||
match element.get_local_name() {
|
||||
name if *name == atom!("td") => {
|
||||
match element.get_length_attribute(LengthAttribute::Width) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue