aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/gecko/snapshot_helpers.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2019-06-11 17:42:49 +0000
committerEmilio Cobos Álvarez <emilio@crisal.io>2019-06-25 13:11:29 +0200
commite272bfed70819d25911285bebf9fb3397bb3dbae (patch)
treeb33c37c6e5264e0b40f875ac9a393bab6f9d4fdc /components/style/gecko/snapshot_helpers.rs
parent7139a4185a583f190cab1e9e8fb056cd6149a815 (diff)
downloadservo-e272bfed70819d25911285bebf9fb3397bb3dbae.tar.gz
servo-e272bfed70819d25911285bebf9fb3397bb3dbae.zip
style: Implement GeckoElement::each_part.
This should make all the pieces come together. Note that we don't need to look at the snapshot for ::part() for now (other than when selector-matching normally) because I decided to just restyle the element for now when the part attribute changes. ::part() can't affect descendants anyway (as long as we don't do the forwarding stuff), and eager pseudo-elements are handled during the normal element restyle, so it seems to me that adding all the complexity that we have for classes to part may not be worth it at least yet. Differential Revision: https://phabricator.services.mozilla.com/D32648
Diffstat (limited to 'components/style/gecko/snapshot_helpers.rs')
-rw-r--r--components/style/gecko/snapshot_helpers.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/style/gecko/snapshot_helpers.rs b/components/style/gecko/snapshot_helpers.rs
index aaa2254dbd7..b8b31bc87dd 100644
--- a/components/style/gecko/snapshot_helpers.rs
+++ b/components/style/gecko/snapshot_helpers.rs
@@ -107,9 +107,9 @@ pub fn has_class_or_part(
}
/// Given an item, a callback, and a getter, execute `callback` for each class
-/// this `item` has.
+/// or part name this `item` has.
#[inline(always)]
-pub fn each_class<F>(attr: &structs::nsAttrValue, mut callback: F)
+pub fn each_class_or_part<F>(attr: &structs::nsAttrValue, mut callback: F)
where
F: FnMut(&Atom),
{