Bug 1372002 - Add bindings for servo-side setting of line name lists; r?xidorn draft
authorRavi Shankar <wafflespeanut@gmail.com>
Sun, 11 Jun 2017 19:47:55 +0530
changeset 592268 76821320d931c0cb48807d68486eda62ccf308f7
parent 592129 8a990794c2ee923ccd839750912d10ff3a690a2a
child 632757 e5aded94279c350928de2f702b4da040d0246ac6
push id63317
push userwafflespeanut@gmail.com
push dateSun, 11 Jun 2017 15:30:06 +0000
reviewersxidorn
bugs1372002
milestone55.0a1
Bug 1372002 - Add bindings for servo-side setting of line name lists; r?xidorn MozReview-Commit-ID: 9Gd4ijWK1z8
js/src/devtools/rootAnalysis/analyzeHeapWrites.js
layout/style/ServoBindings.cpp
layout/style/ServoBindings.h
--- a/js/src/devtools/rootAnalysis/analyzeHeapWrites.js
+++ b/js/src/devtools/rootAnalysis/analyzeHeapWrites.js
@@ -177,16 +177,17 @@ function treatAsSafeArgument(entry, varN
         ["Gecko_ResetFilters", "effects", null],
         ["Gecko_CopyFiltersFrom", "aDest", null],
         [/Gecko_CSSValue_Set/, "aCSSValue", null],
         ["Gecko_CSSValue_Drop", "aCSSValue", null],
         ["Gecko_CSSFontFaceRule_GetCssText", "aResult", null],
         ["Gecko_EnsureTArrayCapacity", "aArray", null],
         ["Gecko_ClearPODTArray", "aArray", null],
         ["Gecko_SetStyleGridTemplateArrayLengths", "aValue", null],
+        ["Gecko_SetGridTemplateLineNamesLength", "aValue", null],
         ["Gecko_ResizeTArrayForStrings", "aArray", null],
         ["Gecko_ClearAndResizeStyleContents", "aContent", null],
         [/Gecko_ClearAndResizeCounter/, "aContent", null],
         [/Gecko_CopyCounter.*?From/, "aContent", null],
         [/Gecko_SetContentDataImageValue/, "aList", null],
         [/Gecko_SetContentData/, "aContent", null],
         ["Gecko_SetCounterFunction", "aContent", null],
         [/Gecko_EnsureStyle.*?ArrayLength/, "aArray", null],
--- a/layout/style/ServoBindings.cpp
+++ b/layout/style/ServoBindings.cpp
@@ -1512,16 +1512,22 @@ Gecko_ClearPODTArray(void* aArray, size_
 void Gecko_SetStyleGridTemplateArrayLengths(nsStyleGridTemplate* aValue,
                                             uint32_t aTrackSizes)
 {
   aValue->mMinTrackSizingFunctions.SetLength(aTrackSizes);
   aValue->mMaxTrackSizingFunctions.SetLength(aTrackSizes);
   aValue->mLineNameLists.SetLength(aTrackSizes + 1);
 }
 
+void Gecko_SetGridTemplateLineNamesLength(nsStyleGridTemplate* aValue,
+                                          uint32_t aNames)
+{
+  aValue->mLineNameLists.SetLength(aNames);
+}
+
 void Gecko_ResizeTArrayForStrings(nsTArray<nsString>* aArray, uint32_t aLength)
 {
   aArray->SetLength(aLength);
 }
 
 void
 Gecko_CopyStyleGridTemplateValues(nsStyleGridTemplate* aGridTemplate,
                                   const nsStyleGridTemplate* aOther)
--- a/layout/style/ServoBindings.h
+++ b/layout/style/ServoBindings.h
@@ -370,16 +370,19 @@ void Gecko_EnsureTArrayCapacity(void* ar
 // otherwise. This is ensured with rust traits for the relevant structs.
 void Gecko_ClearPODTArray(void* array, size_t elem_size, size_t elem_align);
 
 void Gecko_ResizeTArrayForStrings(nsTArray<nsString>* array, uint32_t length);
 
 void Gecko_SetStyleGridTemplateArrayLengths(nsStyleGridTemplate* grid_template,
                                             uint32_t track_sizes);
 
+void Gecko_SetGridTemplateLineNamesLength(nsStyleGridTemplate* grid_template,
+                                          uint32_t track_sizes);
+
 void Gecko_CopyStyleGridTemplateValues(nsStyleGridTemplate* grid_template,
                                        const nsStyleGridTemplate* other);
 
 mozilla::css::GridTemplateAreasValue* Gecko_NewGridTemplateAreasValue(uint32_t areas,
                                                                       uint32_t templates,
                                                                       uint32_t columns);
 NS_DECL_THREADSAFE_FFI_REFCOUNTING(mozilla::css::GridTemplateAreasValue, GridTemplateAreasValue);