aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/selector_impl.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/style/selector_impl.rs')
-rw-r--r--components/style/selector_impl.rs5
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
}