Bug 1360467 - Change nsChangeHint and nsRestyleHint to use a fixed integer type. r?heycam draft
authorXidorn Quan <me@upsuper.org>
Fri, 28 Apr 2017 15:47:23 +0800
changeset 569981 a784a4bdbbcc722ad03ad56bbc084c608a2546c7
parent 569980 4d64a42260e22698652c638f460287aaa2522988
child 626368 931b9b13e20e4742a1c45f032c003967991bb34c
push id56355
push userxquan@mozilla.com
push dateFri, 28 Apr 2017 07:53:14 +0000
reviewersheycam
bugs1360467
milestone55.0a1
Bug 1360467 - Change nsChangeHint and nsRestyleHint to use a fixed integer type. r?heycam MozReview-Commit-ID: I2lZW01ylhr
layout/base/nsChangeHint.h
--- a/layout/base/nsChangeHint.h
+++ b/layout/base/nsChangeHint.h
@@ -11,17 +11,17 @@
 #include "mozilla/Types.h"
 #include "nsDebug.h"
 #include "nsTArray.h"
 
 struct nsCSSSelector;
 
 // Defines for various style related constants
 
-enum nsChangeHint {
+enum nsChangeHint : uint32_t {
   nsChangeHint_Empty = 0,
 
   // change was visual only (e.g., COLOR=)
   // Invalidates all descendant frames (including following
   // placeholders to out-of-flow frames).
   nsChangeHint_RepaintFrame = 1 << 0,
 
   // For reflow, we want flags to give us arbitrary FrameNeedsReflow behavior.
@@ -467,17 +467,17 @@ NS_RemoveSubsumedHints(nsChangeHint aOur
  *
  * Similarly, eRestyle_ForceDescendants will cause the frame and all of its
  * descendants to be traversed and for the new style contexts that are created
  * to be set on the frames.
  *
  * NOTE: When adding new restyle hints, please also add them to
  * RestyleManager::RestyleHintToString.
  */
-enum nsRestyleHint {
+enum nsRestyleHint : uint32_t {
   // Rerun selector matching on the element.  If a new style context
   // results, update the style contexts of descendants.  (Irrelevant if
   // eRestyle_Subtree is also set, since that implies a superset of the
   // work.)
   eRestyle_Self = 1 << 0,
 
   // Rerun selector matching on descendants of the element that match
   // a given selector.