Stop setting the now-removed nsStyleContentData::mImageTracked. r?Manishearth draft
authorCameron McCormack <cam@mcc.id.au>
Fri, 04 Nov 2016 11:03:42 +0800
changeset 433597 0a5a33547ec3852bea15b7b0028924398162c1a2
parent 433596 b6955cabfdade95f166740214c14751525cbcbfb
child 535932 2231790106e3ff8dfd9717a04e602a5e91a50b7c
push id34625
push userbmo:cam@mcc.id.au
push dateFri, 04 Nov 2016 03:04:28 +0000
reviewersManishearth
milestone52.0a1
Stop setting the now-removed nsStyleContentData::mImageTracked. r?Manishearth MozReview-Commit-ID: 2XOIEGhePVu
servo/components/style/properties/gecko.mako.rs
--- a/servo/components/style/properties/gecko.mako.rs
+++ b/servo/components/style/properties/gecko.mako.rs
@@ -2205,58 +2205,44 @@ clip-path
     ${impl_simple_copy('column_count', 'mColumnCount')}
 </%self:impl_trait>
 
 <%self:impl_trait style_struct_name="Counters"
                   skip_longhands="content">
     pub fn set_content(&mut self, v: longhands::content::computed_value::T) {
         use properties::longhands::content::computed_value::T;
         use properties::longhands::content::computed_value::ContentItem;
-        use gecko_bindings::structs::nsStyleContentData;
         use gecko_bindings::structs::nsStyleContentType::*;
         use gecko_bindings::bindings::Gecko_ClearStyleContents;
 
         // Converts a string as utf16, and returns an owned, zero-terminated raw buffer.
         fn as_utf16_and_forget(s: &str) -> *mut u16 {
             use std::mem;
             let mut vec = s.encode_utf16().collect::<Vec<_>>();
             vec.push(0u16);
             let ptr = vec.as_mut_ptr();
             mem::forget(vec);
             ptr
         }
 
-        #[inline(always)]
-        #[cfg(debug_assertions)]
-        fn set_image_tracked(contents: &mut nsStyleContentData, val: bool) {
-            contents.mImageTracked = val;
-        }
-
-        #[inline(always)]
-        #[cfg(not(debug_assertions))]
-        fn set_image_tracked(_contents: &mut nsStyleContentData, _val: bool) {}
-
         // Ensure destructors run, otherwise we could leak.
         if !self.gecko.mContents.is_empty() {
             unsafe {
                 Gecko_ClearStyleContents(&mut self.gecko);
             }
         }
 
         match v {
             T::none |
             T::normal => {}, // Do nothing, already cleared.
             T::Content(items) => {
                 // NB: set_len also reserves the appropriate space.
                 unsafe { self.gecko.mContents.set_len(items.len() as u32) }
                 for (i, item) in items.into_iter().enumerate() {
-                    // TODO: Servo lacks support for attr(), and URIs,
-                    // We don't support images, but need to remember to
-                    // explicitly initialize mImageTracked in debug builds.
-                    set_image_tracked(&mut self.gecko.mContents[i], false);
+                    // TODO: Servo lacks support for attr(), and URIs.
                     // NB: Gecko compares the mString value if type is not image
                     // or URI independently of whatever gets there. In the quote
                     // cases, they set it to null, so do the same here.
                     unsafe {
                         *self.gecko.mContents[i].mContent.mString.as_mut() = ptr::null_mut();
                     }
                     match item {
                         ContentItem::String(value) => {