mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Use more CascadeData and less Stylist for XBL stuff.
Just some more uses of Stylist in XBL that can be converted right away. I'm trying to make XBL not use a Stylist, slowly...
This commit is contained in:
parent
4913d9c900
commit
1bb6ce2c88
3 changed files with 23 additions and 35 deletions
|
@ -1268,8 +1268,8 @@ impl Stylist {
|
|||
}
|
||||
|
||||
for slot in slots.iter().rev() {
|
||||
slot.each_xbl_stylist(|stylist| {
|
||||
if let Some(map) = stylist.cascade_data.author.slotted_rules(pseudo_element) {
|
||||
slot.each_xbl_cascade_data(|cascade_data, _quirks_mode| {
|
||||
if let Some(map) = cascade_data.slotted_rules(pseudo_element) {
|
||||
map.get_all_matching_rules(
|
||||
element,
|
||||
rule_hash_target,
|
||||
|
@ -1287,8 +1287,8 @@ impl Stylist {
|
|||
// even for getDefaultComputedStyle!
|
||||
//
|
||||
// Also, this doesn't account for the author_styles_enabled stuff.
|
||||
let cut_off_inheritance = element.each_xbl_stylist(|stylist| {
|
||||
if let Some(map) = stylist.cascade_data.author.normal_rules(pseudo_element) {
|
||||
let cut_off_inheritance = element.each_xbl_cascade_data(|cascade_data, quirks_mode| {
|
||||
if let Some(map) = cascade_data.normal_rules(pseudo_element) {
|
||||
// NOTE(emilio): This is needed because the XBL stylist may
|
||||
// think it has a different quirks mode than the document.
|
||||
//
|
||||
|
@ -1299,7 +1299,7 @@ impl Stylist {
|
|||
context.matching_mode(),
|
||||
context.bloom_filter,
|
||||
context.nth_index_cache.as_mut().map(|s| &mut **s),
|
||||
stylist.quirks_mode,
|
||||
quirks_mode,
|
||||
);
|
||||
matching_context.pseudo_element_matching_fn = context.pseudo_element_matching_fn;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue