aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom
diff options
context:
space:
mode:
authorbors-servo <release+servo@mozilla.com>2013-10-02 12:21:53 -0700
committerbors-servo <release+servo@mozilla.com>2013-10-02 12:21:53 -0700
commitd6d2534b562d9e95ce02ede5920b679d53734dcf (patch)
tree7210b825ad7543f720f1016ad1a0036a0b900aa8 /src/components/script/dom
parent096af85834e25d86487e82851331d93374782eac (diff)
parent284770aa02803c2659e3c82712a313907c72dc2b (diff)
downloadservo-d6d2534b562d9e95ce02ede5920b679d53734dcf.tar.gz
servo-d6d2534b562d9e95ce02ede5920b679d53734dcf.zip
auto merge of #1001 : SimonSapin/servo/newnewcss, r=kmcallister
Add selector matching, style structs, cascading. The matching is quite naive and has many low hanging fruits for optimization. No pseudo-class (except `:not()`) is implemented yet, but those are easy to add as needed. Next step is to update the layout code to use this and drop netsurf-css. (Most of the +7066 lines stat is for bootstrap.css, added as a test.)
Diffstat (limited to 'src/components/script/dom')
-rw-r--r--src/components/script/dom/element.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/components/script/dom/element.rs b/src/components/script/dom/element.rs
index 32b5e8e9207..3b29913fe2e 100644
--- a/src/components/script/dom/element.rs
+++ b/src/components/script/dom/element.rs
@@ -131,7 +131,8 @@ impl<'self> Element {
pub fn get_attr(&'self self, name: &str) -> Option<&'self str> {
// FIXME: Need an each() that links lifetimes in Rust.
for attr in self.attrs.iter() {
- if eq_slice(attr.name, name) {
+ // FIXME: only case-insensitive in the HTML namespace (as opposed to SVG, etc.)
+ if attr.name.eq_ignore_ascii_case(name) {
let val: &str = attr.value;
return Some(val);
}