mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update selectors to 0.10, with ToCss serialization.
This commit is contained in:
parent
4e7c689a81
commit
d690bd2382
20 changed files with 186 additions and 62 deletions
|
@ -65,7 +65,7 @@ regex = "0.1.43"
|
|||
rustc-serialize = "0.3"
|
||||
script_layout_interface = {path = "../script_layout_interface"}
|
||||
script_traits = {path = "../script_traits"}
|
||||
selectors = {version = "0.9", features = ["heap_size"]}
|
||||
selectors = {version = "0.10", features = ["heap_size"]}
|
||||
serde = "0.8"
|
||||
smallvec = "0.1"
|
||||
string_cache = {version = "0.2.23", features = ["heap_size", "unstable"]}
|
||||
|
|
|
@ -2250,7 +2250,7 @@ impl<'a> ::selectors::MatchAttrGeneric for Root<Element> {
|
|||
};
|
||||
match attr.namespace {
|
||||
NamespaceConstraint::Specific(ref ns) => {
|
||||
self.get_attribute(ns, local_name)
|
||||
self.get_attribute(&ns.url, local_name)
|
||||
.map_or(false, |attr| {
|
||||
test(&attr.value())
|
||||
})
|
||||
|
|
|
@ -483,7 +483,7 @@ impl<'le> ::selectors::MatchAttrGeneric for ServoLayoutElement<'le> {
|
|||
};
|
||||
match attr.namespace {
|
||||
NamespaceConstraint::Specific(ref ns) => {
|
||||
self.get_attr(ns, name).map_or(false, |attr| test(attr))
|
||||
self.get_attr(&ns.url, name).map_or(false, |attr| test(attr))
|
||||
},
|
||||
NamespaceConstraint::Any => {
|
||||
let attrs = unsafe {
|
||||
|
@ -970,7 +970,7 @@ impl<'le> ::selectors::MatchAttrGeneric for ServoThreadSafeLayoutElement<'le> {
|
|||
where F: Fn(&str) -> bool {
|
||||
match attr.namespace {
|
||||
NamespaceConstraint::Specific(ref ns) => {
|
||||
self.get_attr(ns, &attr.name).map_or(false, |attr| test(attr))
|
||||
self.get_attr(&ns.url, &attr.name).map_or(false, |attr| test(attr))
|
||||
},
|
||||
NamespaceConstraint::Any => {
|
||||
unsafe {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue