Bug 1276085: followup: Remove Gecko_SetGradientStop now we have nsTArray bindings draft
authorEmilio Cobos Álvarez <ecoal95@gmail.com>
Thu, 02 Jun 2016 20:27:17 +0200
changeset 374519 6ae245a26497c01d51eb6d420c5f140906fc1b38
parent 374456 92e0c73391e71a400e2c6674bca5ca70804ab081
child 522661 bccbdac4577954424dd91c17eea95ab89c1e447a
push id20052
push userbmo:ecoal95@gmail.com
push dateThu, 02 Jun 2016 18:30:24 +0000
bugs1276085, 11456
milestone49.0a1
Bug 1276085: followup: Remove Gecko_SetGradientStop now we have nsTArray bindings See https://github.com/servo/servo/pull/11456, when they where added. MozReview-Commit-ID: FsHMk9FjOo1
layout/style/ServoBindings.cpp
layout/style/ServoBindings.h
--- a/layout/style/ServoBindings.cpp
+++ b/layout/style/ServoBindings.cpp
@@ -384,32 +384,16 @@ Gecko_CreateGradient(uint8_t aShape,
 
   for (uint32_t i = 0; i < aStopCount; i++) {
     result->mStops.AppendElement(dummyStop);
   }
 
   return result;
 }
 
-void
-Gecko_SetGradientStop(nsStyleGradient* aGradient,
-                      uint32_t aIndex,
-                      const nsStyleCoord* aLocation,
-                      nscolor aColor,
-                      bool aIsInterpolationHint)
-{
-  MOZ_ASSERT(aGradient);
-  MOZ_ASSERT(aLocation);
-  MOZ_ASSERT(aIndex < aGradient->mStops.Length());
-
-  aGradient->mStops[aIndex].mColor = aColor;
-  aGradient->mStops[aIndex].mLocation = *aLocation;
-  aGradient->mStops[aIndex].mIsInterpolationHint = aIsInterpolationHint;
-}
-
 #define STYLE_STRUCT(name, checkdata_cb)                                      \
                                                                               \
 void                                                                          \
 Gecko_Construct_nsStyle##name(nsStyle##name* ptr)                             \
 {                                                                             \
   new (ptr) nsStyle##name(StyleStructContext::ServoContext());                \
 }                                                                             \
                                                                               \
--- a/layout/style/ServoBindings.h
+++ b/layout/style/ServoBindings.h
@@ -132,22 +132,16 @@ void Gecko_SetGradientImageValue(nsStyle
 void Gecko_CopyImageValueFrom(nsStyleImage* image, const nsStyleImage* other);
 
 nsStyleGradient* Gecko_CreateGradient(uint8_t shape,
                                       uint8_t size,
                                       bool repeating,
                                       bool legacy_syntax,
                                       uint32_t stops);
 
-void Gecko_SetGradientStop(nsStyleGradient* gradient,
-                           uint32_t index,
-                           const nsStyleCoord* location,
-                           nscolor color,
-                           bool is_interpolation_hint);
-
 // Object refcounting.
 NS_DECL_HOLDER_FFI_REFCOUNTING(nsIPrincipal, Principal)
 NS_DECL_HOLDER_FFI_REFCOUNTING(nsIURI, URI)
 
 // Display style.
 void Gecko_SetMozBinding(nsStyleDisplay* style_struct,
                          const uint8_t* string_bytes, uint32_t string_length,
                          ThreadSafeURIHolder* base_uri,