servo: Merge #18423 - More stale todos (from emilio:more-stale-todos); r=nox
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 08 Sep 2017 21:09:58 -0500
changeset 429336 fcbd8cdd83082eb65837432c372efbea0a177721
parent 429335 3352077c1e395a718b681461716823158fcf9282
child 429337 d2e927cb3a6302862690e95a6f480af268f0020a
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnox
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
servo: Merge #18423 - More stale todos (from emilio:more-stale-todos); r=nox Just removing or rewording stale stuff. Source-Repo: https://github.com/servo/servo Source-Revision: 8065eac0ebcadcdab0fd3649cf9e18c591d47ed6
servo/components/style/animation.rs
servo/components/style/bloom.rs
servo/components/style/invalidation/stylesheets.rs
--- a/servo/components/style/animation.rs
+++ b/servo/components/style/animation.rs
@@ -414,27 +414,25 @@ impl PropertyAnimation {
     pub fn has_the_same_end_value_as(&self, other: &Self) -> bool {
         self.property.has_the_same_end_value_as(&other.property)
     }
 }
 
 /// 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<Animation>,
-                                       opaque_node: OpaqueNode,
-                                       old_style: &ComputedValues,
-                                       new_style: &mut Arc<ComputedValues>,
-                                       timer: &Timer,
-                                       possibly_expired_animations: &[PropertyAnimation])
-                                       -> bool {
+pub fn start_transitions_if_applicable(
+    new_animations_sender: &Sender<Animation>,
+    opaque_node: OpaqueNode,
+    old_style: &ComputedValues,
+    new_style: &mut Arc<ComputedValues>,
+    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.
         let property_animations = PropertyAnimation::from_transition(i,
                                                                      old_style,
                                                                      Arc::make_mut(new_style));
         for property_animation in property_animations {
             // Set the property to the initial value.
--- a/servo/components/style/bloom.rs
+++ b/servo/components/style/bloom.rs
@@ -83,36 +83,33 @@ struct PushedElement<E: TElement> {
     /// The number of hashes pushed for the element.
     num_hashes: usize,
 }
 
 impl<E: TElement> PushedElement<E> {
     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<E, F>(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());
 
     if let Some(id) = element.get_id() {
         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())
     });
 }
 
 impl<E: TElement> Drop for StyleBloom<E> {
     fn drop(&mut self) {
         // Leave the reusable bloom filter in a zeroed state.
--- a/servo/components/style/invalidation/stylesheets.rs
+++ b/servo/components/style/invalidation/stylesheets.rs
@@ -48,18 +48,18 @@ 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.
     invalid_scopes: FnvHashSet<InvalidationScope>,
     /// Whether the whole document should be invalid.
     fully_invalid: bool,
 }