Bug 1276085: followup: Remove Gecko_SetGradientStop now we have nsTArray bindings r=heycam
authorEmilio Cobos Álvarez <ecoal95@gmail.com>
Thu, 02 Jun 2016 20:27:17 +0200
changeset 301259 0560b158bb22366202b489a95d78cb66605d456e
parent 301258 cc2a9daf2bb65c6e23311c747aae2dfe1c1c2c2b
child 301260 2b077be047c0bb50e8c72e9922a5fa0b7ec4df87
push id78269
push userecoal95@gmail.com
push dateThu, 09 Jun 2016 11:34:21 +0000
treeherdermozilla-inbound@0560b158bb22 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1276085, 11456
milestone50.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
Bug 1276085: followup: Remove Gecko_SetGradientStop now we have nsTArray bindings r=heycam 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
@@ -412,32 +412,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
@@ -145,22 +145,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,