mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Make Layout 2013 style a superset of Layout 2020 style
This is the first step toward removing the compile-time difference in style between Layout 2020 and Layout 2013.
This commit is contained in:
parent
a725380db0
commit
d4b5fc1f65
97 changed files with 32 additions and 349 deletions
|
@ -73,6 +73,7 @@ use style::selector_parser::{PseudoElement, RestyleDamage};
|
|||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use style::values::computed::Image;
|
||||
use style::values::generics::counters::ContentItem;
|
||||
use style::LocalName;
|
||||
|
||||
/// The results of flow construction for a DOM node.
|
||||
#[derive(Clone)]
|
||||
|
@ -865,6 +866,15 @@ where
|
|||
Box::new(UnscannedTextFragmentInfo::new(string.into(), None));
|
||||
SpecificFragmentInfo::UnscannedText(info)
|
||||
},
|
||||
ContentItem::Attr(attr) => {
|
||||
let element = node.as_element().expect("Expected an element");
|
||||
let attr_val = element
|
||||
.get_attr(&attr.namespace_url, &LocalName::from(&*attr.attribute));
|
||||
let string = attr_val.map_or("".to_string(), |s| s.to_string());
|
||||
let info =
|
||||
Box::new(UnscannedTextFragmentInfo::new(string.into(), None));
|
||||
SpecificFragmentInfo::UnscannedText(info)
|
||||
},
|
||||
content_item => {
|
||||
let content_item =
|
||||
Box::new(GeneratedContentInfo::ContentItem(content_item));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue