Bug 1265154 - Fix compile error in MSVC 2013 caused by ArrayLength; draft
authorCJKu <cku@mozilla.com>
Mon, 18 Apr 2016 11:31:24 +0800
changeset 352382 b7c973487c82a0f3e2a3a0b2f57a4bda0681f5c2
parent 352373 61de4a9de8a3cc5fe40da166d611a9c5b221dca6
child 518653 a09d4d83931bdaad947de61e96b156bc2c804f6c
push id15694
push usercku@mozilla.com
push dateMon, 18 Apr 2016 03:31:49 +0000
bugs1265154
milestone48.0a1
Bug 1265154 - Fix compile error in MSVC 2013 caused by ArrayLength; MozReview-Commit-ID: DvyCNwTRiI7
layout/style/nsCSSProps.cpp
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -905,18 +905,18 @@ KTableEntry nsCSSProps::kBackgroundClipK
   { eCSSKeyword_padding_box, NS_STYLE_IMAGELAYER_CLIP_PADDING },
   { eCSSKeyword_content_box, NS_STYLE_IMAGELAYER_CLIP_CONTENT },
   // The next entry is controlled by the layout.css.background-clip-text.enabled
   // pref.
   { eCSSKeyword_text, NS_STYLE_IMAGELAYER_CLIP_TEXT },
   { eCSSKeyword_UNKNOWN, -1 }
 };
 
-static_assert(ArrayLength(nsCSSProps::kImageLayerOriginKTable) ==
-              ArrayLength(nsCSSProps::kBackgroundClipKTable) - 1,
+static_assert(MOZ_ARRAY_LENGTH(nsCSSProps::kImageLayerOriginKTable) ==
+              MOZ_ARRAY_LENGTH(nsCSSProps::kBackgroundClipKTable) - 1,
               "background-clip has one extra value, which is text, compared"
               "to {background,mask}-origin");
 
 // Note: Don't change this table unless you update
 // ParseImageLayerPosition!
 
 const KTableEntry nsCSSProps::kImageLayerPositionKTable[] = {
   { eCSSKeyword_center, NS_STYLE_IMAGELAYER_POSITION_CENTER },