Bug 1328319 part 4 - Add binding for setting pair value of nsCSSValue. r=manishearth
authorXidorn Quan <me@upsuper.org>
Tue, 09 May 2017 22:36:03 +1000
changeset 358582 e1804542ca963914ccd30ecc3e11598959422106
parent 358581 3ce2bdd8e485bb9a092e2e1da2bd6e883966f8de
child 358583 04865ebdafccb13e2253880de076243130f13fb0
push id90353
push userryanvm@gmail.com
push dateWed, 17 May 2017 00:10:47 +0000
treeherdermozilla-inbound@41958333867b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmanishearth
bugs1328319
milestone55.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 1328319 part 4 - Add binding for setting pair value of nsCSSValue. r=manishearth MozReview-Commit-ID: 2bAH90Mh4GP
layout/style/ServoBindings.cpp
layout/style/ServoBindings.h
--- a/layout/style/ServoBindings.cpp
+++ b/layout/style/ServoBindings.cpp
@@ -1891,16 +1891,24 @@ Gecko_CSSValue_GetArrayItem(nsCSSValueBo
 }
 
 nsCSSValueBorrowed
 Gecko_CSSValue_GetArrayItemConst(nsCSSValueBorrowed aCSSValue, int32_t aIndex)
 {
   return &aCSSValue->GetArrayValue()->Item(aIndex);
 }
 
+void
+Gecko_CSSValue_SetPair(nsCSSValueBorrowedMut aCSSValue,
+                       nsCSSValueBorrowed aXValue, nsCSSValueBorrowed aYValue)
+{
+  MOZ_ASSERT(NS_IsMainThread());
+  aCSSValue->SetPairValue(*aXValue, *aYValue);
+}
+
 
 bool
 Gecko_PropertyId_IsPrefEnabled(nsCSSPropertyID id)
 {
   return nsCSSProps::IsEnabled(id);
 }
 
 void
--- a/layout/style/ServoBindings.h
+++ b/layout/style/ServoBindings.h
@@ -480,16 +480,18 @@ void Gecko_CSSValue_SetString(nsCSSValue
                               const uint8_t* string, uint32_t len, nsCSSUnit unit);
 void Gecko_CSSValue_SetStringFromAtom(nsCSSValueBorrowedMut css_value,
                                       nsIAtom* atom, nsCSSUnit unit);
 // Take an addrefed nsIAtom and set it to the nsCSSValue
 void Gecko_CSSValue_SetAtomIdent(nsCSSValueBorrowedMut css_value, nsIAtom* atom);
 void Gecko_CSSValue_SetArray(nsCSSValueBorrowedMut css_value, int32_t len);
 void Gecko_CSSValue_SetURL(nsCSSValueBorrowedMut css_value, ServoBundledURI uri);
 void Gecko_CSSValue_SetInt(nsCSSValueBorrowedMut css_value, int32_t integer, nsCSSUnit unit);
+void Gecko_CSSValue_SetPair(nsCSSValueBorrowedMut css_value,
+                            nsCSSValueBorrowed xvalue, nsCSSValueBorrowed yvalue);
 void Gecko_CSSValue_Drop(nsCSSValueBorrowedMut css_value);
 NS_DECL_THREADSAFE_FFI_REFCOUNTING(nsCSSValueSharedList, CSSValueSharedList);
 bool Gecko_PropertyId_IsPrefEnabled(nsCSSPropertyID id);
 
 void Gecko_nsStyleFont_SetLang(nsStyleFont* font, nsIAtom* atom);
 void Gecko_nsStyleFont_CopyLangFrom(nsStyleFont* aFont, const nsStyleFont* aSource);
 void Gecko_nsStyleFont_FixupNoneGeneric(nsStyleFont* font,
                                         RawGeckoPresContextBorrowed pres_context);