mirror of
https://github.com/servo/servo.git
synced 2025-07-30 18:50:36 +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
|
@ -27,7 +27,7 @@ use std::slice::Iter;
|
|||
use std::sync::Arc;
|
||||
use std::sync::mpsc::Sender;
|
||||
use string_cache::{Atom, Namespace};
|
||||
use style::node::{TElement, TNode};
|
||||
use style::node::{TElement, TElementAttributes, TNode};
|
||||
use style::properties::{ComputedValues, cascade};
|
||||
use style::selector_matching::{Stylist, DeclarationBlock};
|
||||
use util::arc_ptr_eq;
|
||||
|
@ -289,6 +289,12 @@ impl StyleSharingCandidate {
|
|||
return false
|
||||
}
|
||||
|
||||
let mut matching_rules = vec![];
|
||||
element.synthesize_presentational_hints_for_legacy_attributes(&mut matching_rules);
|
||||
if !matching_rules.is_empty() {
|
||||
return false;
|
||||
}
|
||||
|
||||
// FIXME(pcwalton): It's probably faster to iterate over all the element's attributes and
|
||||
// use the {common, rare}-style-affecting-attributes tables as lookup tables.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue