Bug 1354775 - Gecko_CopyStyleGridTemplateValues function for Servo-side copying; r=bholley,heycam
authorRavi Shankar <wafflespeanut@gmail.com>
Sat, 08 Apr 2017 12:47:34 +0530
changeset 559348 a89729a1910cfe514e53c20a9137d25e01359a03
parent 559347 b06bd43117138b783ca95017f57e3c7dd0621311
child 559349 f51bf8ee1e7b5be7442ae5fa57dd3f09699032ae
child 559406 e45787ba3550a52f1dd58559328f093c430bb36e
child 559430 762ce69145f0e60dd6bf446be4b679e2f0927fdb
child 559535 12e14577ce978437ed3e67d080254b48c3a99163
child 560105 34d73ecfaf974e761e834fb086f19049b189a87d
push id53058
push userarchaeopteryx@coole-files.de
push dateSun, 09 Apr 2017 21:36:26 +0000
reviewersbholley, heycam
bugs1354775
milestone55.0a1
Bug 1354775 - Gecko_CopyStyleGridTemplateValues function for Servo-side copying; r=bholley,heycam MozReview-Commit-ID: 4Hz82MWZlB0 Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
layout/style/ServoBindings.cpp
layout/style/ServoBindings.h
--- a/layout/style/ServoBindings.cpp
+++ b/layout/style/ServoBindings.cpp
@@ -1105,16 +1105,23 @@ Gecko_ClearPODTArray(void* aArray, size_
     reinterpret_cast<nsTArray_base<nsTArrayInfallibleAllocator,
                                    nsTArray_CopyWithMemutils>*>(aArray);
 
   base->template ShiftData<nsTArrayInfallibleAllocator>(0, base->Length(), 0,
                                                         aElementSize, aElementAlign);
 }
 
 void
+Gecko_CopyStyleGridTemplateValues(nsStyleGridTemplate* aGridTemplate,
+                                  const nsStyleGridTemplate* aOther)
+{
+  *aGridTemplate = *aOther;
+}
+
+void
 Gecko_ClearAndResizeStyleContents(nsStyleContent* aContent, uint32_t aHowMany)
 {
   aContent->AllocateContents(aHowMany);
 }
 
 void
 Gecko_CopyStyleContentsFrom(nsStyleContent* aContent, const nsStyleContent* aOther)
 {
--- a/layout/style/ServoBindings.h
+++ b/layout/style/ServoBindings.h
@@ -279,16 +279,19 @@ void Gecko_DropElementSnapshot(ServoElem
 void Gecko_EnsureTArrayCapacity(void* array, size_t capacity, size_t elem_size);
 
 // Same here, `array` must be an nsTArray<T>, for some T.
 //
 // Important note: Only valid for POD types, since destructors won't be run
 // 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_CopyStyleGridTemplateValues(nsStyleGridTemplate* grid_template,
+                                       const nsStyleGridTemplate* other);
+
 // Clear the mContents, mCounterIncrements, or mCounterResets field in nsStyleContent. This is
 // needed to run the destructors, otherwise we'd leak the images, strings, and whatnot.
 void Gecko_ClearAndResizeStyleContents(nsStyleContent* content,
                                        uint32_t how_many);
 void Gecko_ClearAndResizeCounterIncrements(nsStyleContent* content,
                                            uint32_t how_many);
 void Gecko_ClearAndResizeCounterResets(nsStyleContent* content,
                                        uint32_t how_many);