Bug 1290061 - stylo: Mark nsStyleUnion/Unit fields as unsafe and private for bindgen; r=bholley
authorManish Goregaokar <manishearth@gmail.com>
Thu, 28 Jul 2016 17:53:19 +0530
changeset 347076 c70e8c8d0a79ff6cb88d2fcffd165506a1fd388e
parent 347075 915257f0f74c8f124904cbcf8ca8204ada4370c7
child 347077 ddeb0295df692695b36295177d6790e5393e1f9a
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs1290061
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 1290061 - stylo: Mark nsStyleUnion/Unit fields as unsafe and private for bindgen; r=bholley MozReview-Commit-ID: 6K38Gvbn4vn
layout/style/nsStyleCoord.h
--- a/layout/style/nsStyleCoord.h
+++ b/layout/style/nsStyleCoord.h
@@ -67,16 +67,17 @@ typedef union {
 /**
  * Class that hold a single size specification used by the style
  * system.  The size specification consists of two parts -- a number
  * and a unit.  The number is an integer, a floating point value, an
  * nscoord, or undefined, and the unit is an nsStyleUnit.  Checking
  * the unit is a must before asking for the value in any particular
  * form.
  */
+ /** <div rustbindgen private accessor="unsafe"></div> */
 class nsStyleCoord {
 public:
   // Non-reference counted calc() value.  See nsStyleStruct.h for some uses
   // of this.
   struct CalcValue {
     // Every calc() expression evaluates to a length plus a percentage.
     nscoord mLength;
     float mPercent;
@@ -257,16 +258,17 @@ private:
   nsStyleUnion  mValue;
 };
 
 /**
  * Class that represents a set of top/right/bottom/left nsStyleCoords.
  * This is commonly used to hold the widths of the borders, margins,
  * or paddings of a box.
  */
+ /** <div rustbindgen private accessor="unsafe"></div> */
 class nsStyleSides {
 public:
   nsStyleSides();
   nsStyleSides(const nsStyleSides&);
   ~nsStyleSides();
 
   nsStyleSides&  operator=(const nsStyleSides& aCopy);
   bool           operator==(const nsStyleSides& aOther) const;
@@ -335,16 +337,17 @@ protected:
   nsStyleUnion  mValues[4];
 };
 
 /**
  * Class that represents a set of top-left/top-right/bottom-left/bottom-right
  * nsStyleCoord pairs.  This is used to hold the dimensions of the
  * corners of a box (for, e.g., border-radius and outline-radius).
  */
+ /** <div rustbindgen private accessor="unsafe"></div> */
 class nsStyleCorners {
 public:
   nsStyleCorners();
   nsStyleCorners(const nsStyleCorners&);
   ~nsStyleCorners();
 
   // use compiler's version
   nsStyleCorners& operator=(const nsStyleCorners& aCopy);