From caa83fc421bb45768ad80c38d7b6281ca528d44d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 8 Sep 2017 23:28:58 +0200 Subject: [PATCH 1/4] style: Remove another stale todo. This was fixed by me in 1e6999b02b3568d29e8397c84852a4a916644cf7. --- components/style/bloom.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/components/style/bloom.rs b/components/style/bloom.rs index a49f40e9bc3..dbcb75e645e 100644 --- a/components/style/bloom.rs +++ b/components/style/bloom.rs @@ -104,10 +104,6 @@ fn each_relevant_element_hash(element: E, mut f: F) f(id.get_hash()); } - // TODO: case-sensitivity depends on the document type and quirks mode. - // - // TODO(emilio): It's not clear whether that's relevant here though? - // Classes and ids should be normalized already I think. element.each_class(|class| { f(class.get_hash()) }); From 7f2a9478f0ea64e66aa40d80bfe8bcc2f7fede84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 8 Sep 2017 23:30:02 +0200 Subject: [PATCH 2/4] style: Minimal cleanup in bloom.rs --- components/style/bloom.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/style/bloom.rs b/components/style/bloom.rs index dbcb75e645e..5c7f753a6c8 100644 --- a/components/style/bloom.rs +++ b/components/style/bloom.rs @@ -88,14 +88,15 @@ impl PushedElement { fn new(el: E, num_hashes: usize) -> Self { PushedElement { element: unsafe { SendElement::new(el) }, - num_hashes: num_hashes, + num_hashes, } } } fn each_relevant_element_hash(element: E, mut f: F) - where E: TElement, - F: FnMut(u32), +where + E: TElement, + F: FnMut(u32), { f(element.get_local_name().get_hash()); f(element.get_namespace().get_hash()); From d5a24b79d9124236c8b81402a334b42ef6b3676d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 8 Sep 2017 23:30:44 +0200 Subject: [PATCH 3/4] style: Remove another stale todo in animation.rs There's no mutex anymore. --- components/style/animation.rs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/components/style/animation.rs b/components/style/animation.rs index c2e3f33b794..e76c9b7251c 100644 --- a/components/style/animation.rs +++ b/components/style/animation.rs @@ -419,17 +419,15 @@ impl PropertyAnimation { /// Inserts transitions into the queue of running animations as applicable for /// the given style difference. This is called from the layout worker threads. /// Returns true if any animations were kicked off and false otherwise. -// -// TODO(emilio): Take rid of this mutex splitting SharedLayoutContex into a -// cloneable part and a non-cloneable part.. #[cfg(feature = "servo")] -pub fn start_transitions_if_applicable(new_animations_sender: &Sender, - opaque_node: OpaqueNode, - old_style: &ComputedValues, - new_style: &mut Arc, - timer: &Timer, - possibly_expired_animations: &[PropertyAnimation]) - -> bool { +pub fn start_transitions_if_applicable( + new_animations_sender: &Sender, + opaque_node: OpaqueNode, + old_style: &ComputedValues, + new_style: &mut Arc, + timer: &Timer, + possibly_expired_animations: &[PropertyAnimation] +) -> bool { let mut had_animations = false; for i in 0..new_style.get_box().transition_property_count() { // Create any property animations, if applicable. From 56282f4fabd65a320db5b5364f3078b21bfbc004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sat, 9 Sep 2017 00:08:47 +0200 Subject: [PATCH 4/4] style: Reword a TODO in the stylesheet invalidation code. We already run that for removals. --- components/style/invalidation/stylesheets.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/style/invalidation/stylesheets.rs b/components/style/invalidation/stylesheets.rs index b351bdd12ee..5a2fa8c1e0a 100644 --- a/components/style/invalidation/stylesheets.rs +++ b/components/style/invalidation/stylesheets.rs @@ -53,8 +53,8 @@ impl InvalidationScope { /// A set of invalidations due to stylesheet additions. /// -/// TODO(emilio): We might be able to do the same analysis for removals and -/// media query changes too? +/// TODO(emilio): We might be able to do the same analysis for media query +/// changes too (or even selector changes?). #[cfg_attr(feature = "servo", derive(HeapSizeOf))] pub struct StylesheetInvalidationSet { /// The style scopes we know we have to restyle so far.