mirror of
https://github.com/servo/servo.git
synced 2025-06-17 21:04:28 +00:00
Auto merge of #12924 - servo:selectors-ser, r=nox
Update selectors to 0.10, with ToCss serialization. <!-- Please describe your changes on the following line: --> r? @emilio --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12924) <!-- Reviewable:end -->
This commit is contained in:
commit
07b217368f
22 changed files with 203 additions and 69 deletions
|
@ -62,7 +62,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