diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2016-10-30 19:27:43 +0100 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2016-11-03 16:23:05 +0100 |
commit | 53b638c0e29ba78448d07695343b7ddfa36c5141 (patch) | |
tree | 52647391f6184df815a1d9ce85ad4a84e51f0ffe /components/style/selector_impl.rs | |
parent | 9fcc9d9d3f59428bf19f950bd79ab257d59e3d16 (diff) | |
download | servo-53b638c0e29ba78448d07695343b7ddfa36c5141.tar.gz servo-53b638c0e29ba78448d07695343b7ddfa36c5141.zip |
Update to string-cache 0.3
Diffstat (limited to 'components/style/selector_impl.rs')
-rw-r--r-- | components/style/selector_impl.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/style/selector_impl.rs b/components/style/selector_impl.rs index 6facc88fec0..3d1d7813bd2 100644 --- a/components/style/selector_impl.rs +++ b/components/style/selector_impl.rs @@ -104,7 +104,7 @@ pub fn attr_exists_selector_is_shareable(attr_selector: &AttrSelector<TheSelecto // NB(pcwalton): If you update this, remember to update the corresponding list in // `can_share_style_with()` as well. common_style_affecting_attributes().iter().any(|common_attr_info| { - common_attr_info.atom == attr_selector.name && match common_attr_info.mode { + common_attr_info.attr_name == attr_selector.name && match common_attr_info.mode { CommonStyleAffectingAttributeMode::IsPresent(_) => true, CommonStyleAffectingAttributeMode::IsEqual(..) => false, } @@ -115,9 +115,10 @@ pub fn attr_equals_selector_is_shareable(attr_selector: &AttrSelector<TheSelecto value: &AttrValue) -> bool { // FIXME(pcwalton): Remove once we start actually supporting RTL text. This is in // here because the UA style otherwise disables all style sharing completely. + // FIXME(SimonSapin): should this be the attribute *name* rather than value? atom!("dir") == *value || common_style_affecting_attributes().iter().any(|common_attr_info| { - common_attr_info.atom == attr_selector.name && match common_attr_info.mode { + common_attr_info.attr_name == attr_selector.name && match common_attr_info.mode { CommonStyleAffectingAttributeMode::IsEqual(ref target_value, _) => { *target_value == *value } |