Bug 859018 - Remove the MSVC exemption for FAIL_ON_WARNINGS in layout. r=dbaron
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Sun, 28 Apr 2013 19:02:35 +0900
changeset 141138 70ada7d7a92e36906f846d775083f4e445083ccc
parent 141137 dc6bd7ea66f62a20583c4c9d09fc0c1441ee65df
child 141139 c9af815f4a9f8e14eded0dc03d5fb0616fa4eb25
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs859018
milestone23.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 859018 - Remove the MSVC exemption for FAIL_ON_WARNINGS in layout. r=dbaron
layout/base/FrameLayerBuilder.cpp
layout/base/Makefile.in
layout/base/RestyleTracker.h
layout/base/nsCSSFrameConstructor.cpp
layout/generic/nsBlockReflowContext.cpp
layout/generic/nsFrame.cpp
layout/generic/nsGfxScrollFrame.cpp
layout/generic/nsTextFrameThebes.cpp
layout/mathml/Makefile.in
layout/mathml/nsMathMLChar.cpp
layout/mathml/nsMathMLmoFrame.cpp
layout/style/Makefile.in
layout/style/nsCSSParser.cpp
layout/style/nsStyleStruct.cpp
layout/tables/Makefile.in
layout/tables/nsTableFrame.cpp
layout/tables/nsTableFrame.h
--- a/layout/base/FrameLayerBuilder.cpp
+++ b/layout/base/FrameLayerBuilder.cpp
@@ -1307,18 +1307,18 @@ ContainerState::CreateOrRecycleThebesLay
     // This gets called on recycled ThebesLayers that are going to be in the
     // final layer tree, so it's a convenient time to invalidate the
     // content that changed where we don't know what ThebesLayer it belonged
     // to, or if we need to invalidate the entire layer, we can do that.
     // This needs to be done before we update the ThebesLayer to its new
     // transform. See nsGfxScrollFrame::InvalidateInternal, where
     // we ensure that mInvalidThebesContent is updated according to the
     // scroll position as of the most recent paint.
-    if (!FuzzyEqual(data->mXScale, mParameters.mXScale, 0.00001) ||
-        !FuzzyEqual(data->mYScale, mParameters.mYScale, 0.00001) ||
+    if (!FuzzyEqual(data->mXScale, mParameters.mXScale, 0.00001f) ||
+        !FuzzyEqual(data->mYScale, mParameters.mYScale, 0.00001f) ||
         data->mAppUnitsPerDevPixel != mAppUnitsPerDevPixel) {
       InvalidateEntireThebesLayer(layer, aActiveScrolledRoot);
 #ifndef MOZ_ANDROID_OMTC
       didResetScrollPositionForLayerPixelAlignment = true;
 #endif
     }
     if (!data->mRegionToInvalidate.IsEmpty()) {
 #ifdef DEBUG_INVALIDATIONS
--- a/layout/base/Makefile.in
+++ b/layout/base/Makefile.in
@@ -7,19 +7,17 @@ DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBRARY_NAME	= gkbase_s
 LIBXUL_LIBRARY	= 1
-ifndef _MSC_VER
 FAIL_ON_WARNINGS = 1
-endif # !_MSC_VER
 
 
 
 CPPSRCS		= \
 		DisplayItemClip.cpp \
 		DisplayListClipState.cpp \
 		FrameLayerBuilder.cpp \
 		FramePropertyTable.cpp \
--- a/layout/base/RestyleTracker.h
+++ b/layout/base/RestyleTracker.h
@@ -168,36 +168,36 @@ private:
   /* A list of frames to process, sorted by their depth in the frame tree */
   SplayTree<Entry, Entry> mEntryList;
 };
 
 class RestyleTracker {
 public:
   typedef mozilla::dom::Element Element;
 
-  RestyleTracker(uint32_t aRestyleBits,
-                 nsCSSFrameConstructor* aFrameConstructor) :
-    mRestyleBits(aRestyleBits), mFrameConstructor(aFrameConstructor),
+  RestyleTracker(uint32_t aRestyleBits) :
+    mRestyleBits(aRestyleBits),
     mHaveLaterSiblingRestyles(false)
   {
     NS_PRECONDITION((mRestyleBits & ~ELEMENT_ALL_RESTYLE_FLAGS) == 0,
                     "Why do we have these bits set?");
     NS_PRECONDITION((mRestyleBits & ELEMENT_PENDING_RESTYLE_FLAGS) != 0,
                     "Must have a restyle flag");
     NS_PRECONDITION((mRestyleBits & ELEMENT_PENDING_RESTYLE_FLAGS) !=
                       ELEMENT_PENDING_RESTYLE_FLAGS,
                     "Shouldn't have both restyle flags set");
     NS_PRECONDITION((mRestyleBits & ~ELEMENT_PENDING_RESTYLE_FLAGS) != 0,
                     "Must have root flag");
     NS_PRECONDITION((mRestyleBits & ~ELEMENT_PENDING_RESTYLE_FLAGS) !=
                     (ELEMENT_ALL_RESTYLE_FLAGS & ~ELEMENT_PENDING_RESTYLE_FLAGS),
                     "Shouldn't have both root flags");
   }
 
-  void Init() {
+  void Init(nsCSSFrameConstructor* aFrameConstructor) {
+    mFrameConstructor = aFrameConstructor;
     mPendingRestyles.Init();
   }
 
   uint32_t Count() const {
     return mPendingRestyles.Count();
   }
 
   /**
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -1424,23 +1424,22 @@ nsCSSFrameConstructor::nsCSSFrameConstru
   , mRebuildAllStyleData(false)
   , mHasRootAbsPosContainingBlock(false)
   , mObservingRefreshDriver(false)
   , mInStyleRefresh(false)
   , mHoverGeneration(0)
   , mRebuildAllExtraHint(nsChangeHint(0))
   , mAnimationGeneration(0)
   , mPendingRestyles(ELEMENT_HAS_PENDING_RESTYLE |
-                     ELEMENT_IS_POTENTIAL_RESTYLE_ROOT, this)
+                     ELEMENT_IS_POTENTIAL_RESTYLE_ROOT)
   , mPendingAnimationRestyles(ELEMENT_HAS_PENDING_ANIMATION_RESTYLE |
-                              ELEMENT_IS_POTENTIAL_ANIMATION_RESTYLE_ROOT, this)
-{
-  // XXXbz this should be in Init() or something!
-  mPendingRestyles.Init();
-  mPendingAnimationRestyles.Init();
+                              ELEMENT_IS_POTENTIAL_ANIMATION_RESTYLE_ROOT)
+{
+  mPendingRestyles.Init(this);
+  mPendingAnimationRestyles.Init(this);
 
 #ifdef DEBUG
   static bool gFirstTime = true;
   if (gFirstTime) {
     gFirstTime = false;
     char* flags = PR_GetEnv("GECKO_FRAMECTOR_DEBUG_FLAGS");
     if (flags) {
       bool error = false;
--- a/layout/generic/nsBlockReflowContext.cpp
+++ b/layout/generic/nsBlockReflowContext.cpp
@@ -87,17 +87,17 @@ nsBlockReflowContext::ComputeCollapsedTo
 
   // iterate not just through the lines of 'block' but also its
   // overflow lines and the normal and overflow lines of its next in
   // flows. Note that this will traverse some frames more than once:
   // for example, if A contains B and A->nextinflow contains
   // B->nextinflow, we'll traverse B->nextinflow twice. But this is
   // OK because our traversal is idempotent.
   for ( ;block; block = static_cast<nsBlockFrame*>(block->GetNextInFlow())) {
-    for (int overflowLines = false; overflowLines <= true; ++overflowLines) {
+    for (int overflowLines = 0; overflowLines <= 1; ++overflowLines) {
       nsBlockFrame::line_iterator line;
       nsBlockFrame::line_iterator line_end;
       bool anyLines = true;
       if (overflowLines) {
         nsBlockFrame::FrameLines* frames = block->GetOverflowLines();
         nsLineList* lines = frames ? &frames->mLines : nullptr;
         if (!lines) {
           anyLines = false;
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -4858,17 +4858,17 @@ nsIFrame::TryUpdateTransformOnly()
   gfxMatrix transform, previousTransform;
   // FIXME/bug 796690 and 796705: in general, changes to 3D
   // transforms, or transform changes to properties other than
   // translation, may lead us to choose a different rendering
   // resolution for our layer.  So if the transform is 3D or has a
   // non-translation change, bail and schedule an invalidating paint.
   // (We can often do better than this, for example for scale-down
   // changes.)
- static const gfx::Float kError = 0.0001;
+ static const gfx::Float kError = 0.0001f;
   if (!transform3d.Is2D(&transform) ||
       !layer->GetBaseTransform().Is2D(&previousTransform) ||
       !gfx::FuzzyEqual(transform.xx, previousTransform.xx, kError) ||
       !gfx::FuzzyEqual(transform.yy, previousTransform.yy, kError) ||
       !gfx::FuzzyEqual(transform.xy, previousTransform.xy, kError) ||
       !gfx::FuzzyEqual(transform.yx, previousTransform.yx, kError)) {
     return false;
   }
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -1,15 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* rendering object to wrap rendering objects that should be scrollable */
 
+#include "base/compiler_specific.h"
 #include "nsCOMPtr.h"
 #include "nsHTMLParts.h"
 #include "nsPresContext.h"
 #include "nsIServiceManager.h"
 #include "nsView.h"
 #include "nsIScrollable.h"
 #include "nsViewManager.h"
 #include "nsContainerFrame.h"
@@ -69,17 +70,17 @@ NS_NewHTMLScrollFrame(nsIPresShell* aPre
 {
   return new (aPresShell) nsHTMLScrollFrame(aPresShell, aContext, aIsRoot);
 }
 
 NS_IMPL_FRAMEARENA_HELPERS(nsHTMLScrollFrame)
 
 nsHTMLScrollFrame::nsHTMLScrollFrame(nsIPresShell* aShell, nsStyleContext* aContext, bool aIsRoot)
   : nsContainerFrame(aContext),
-    mInner(this, aIsRoot)
+    mInner(ALLOW_THIS_IN_INITIALIZER_LIST(this), aIsRoot)
 {
 }
 
 nsresult
 nsHTMLScrollFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
 {
   return mInner.CreateAnonymousContent(aElements);
 }
@@ -878,17 +879,17 @@ NS_NewXULScrollFrame(nsIPresShell* aPres
 {
   return new (aPresShell) nsXULScrollFrame(aPresShell, aContext, aIsRoot);
 }
 
 NS_IMPL_FRAMEARENA_HELPERS(nsXULScrollFrame)
 
 nsXULScrollFrame::nsXULScrollFrame(nsIPresShell* aShell, nsStyleContext* aContext, bool aIsRoot)
   : nsBoxFrame(aShell, aContext, aIsRoot),
-    mInner(this, aIsRoot)
+    mInner(ALLOW_THIS_IN_INITIALIZER_LIST(this), aIsRoot)
 {
   SetLayoutManager(nullptr);
 }
 
 nsMargin
 nsGfxScrollFrameInner::GetDesiredScrollbarSizes(nsBoxLayoutState* aState)
 {
   NS_ASSERTION(aState && aState->GetRenderingContext(),
@@ -2336,33 +2337,33 @@ nsGfxScrollFrameInner::ScrollBy(nsIntPoi
   switch (aUnit) {
   case nsIScrollableFrame::DEVICE_PIXELS: {
     nscoord appUnitsPerDevPixel =
       mOuter->PresContext()->AppUnitsPerDevPixel();
     deltaMultiplier = nsSize(appUnitsPerDevPixel, appUnitsPerDevPixel);
     if (isGenericOrigin){
       aOrigin = nsGkAtoms::pixels;
     }
-    negativeTolerance = positiveTolerance = 0.5;
+    negativeTolerance = positiveTolerance = 0.5f;
     break;
   }
   case nsIScrollableFrame::LINES: {
     deltaMultiplier = GetLineScrollAmount();
     if (isGenericOrigin){
       aOrigin = nsGkAtoms::lines;
     }
-    negativeTolerance = positiveTolerance = 0.1;
+    negativeTolerance = positiveTolerance = 0.1f;
     break;
   }
   case nsIScrollableFrame::PAGES: {
     deltaMultiplier = GetPageScrollAmount();
     if (isGenericOrigin){
       aOrigin = nsGkAtoms::pages;
     }
-    negativeTolerance = 0.05;
+    negativeTolerance = 0.05f;
     positiveTolerance = 0;
     break;
   }
   case nsIScrollableFrame::WHOLE: {
     nsPoint pos = GetScrollPosition();
     AdjustForWholeDelta(aDelta.x, &pos.x);
     AdjustForWholeDelta(aDelta.y, &pos.y);
     ScrollTo(pos, aMode);
--- a/layout/generic/nsTextFrameThebes.cpp
+++ b/layout/generic/nsTextFrameThebes.cpp
@@ -1877,43 +1877,44 @@ BuildTextRunsScanner::BuildTextRunForFra
     uint32_t analysisFlags;
     if (frag->Is2b()) {
       NS_ASSERTION(mDoubleByteText, "Wrong buffer char size!");
       PRUnichar* bufStart = static_cast<PRUnichar*>(aTextBuffer);
       PRUnichar* bufEnd = nsTextFrameUtils::TransformText(
           frag->Get2b() + contentStart, contentLength, bufStart,
           compression, &mNextRunContextInfo, &builder, &analysisFlags);
       aTextBuffer = bufEnd;
+      currentTransformedTextOffset = bufEnd - static_cast<const PRUnichar*>(textPtr);
     } else {
       if (mDoubleByteText) {
         // Need to expand the text. First transform it into a temporary buffer,
         // then expand.
         AutoFallibleTArray<uint8_t,BIG_TEXT_NODE_SIZE> tempBuf;
         uint8_t* bufStart = tempBuf.AppendElements(contentLength);
         if (!bufStart) {
           DestroyUserData(userDataToDestroy);
           return nullptr;
         }
         uint8_t* end = nsTextFrameUtils::TransformText(
             reinterpret_cast<const uint8_t*>(frag->Get1b()) + contentStart, contentLength,
             bufStart, compression, &mNextRunContextInfo, &builder, &analysisFlags);
         aTextBuffer = ExpandBuffer(static_cast<PRUnichar*>(aTextBuffer),
                                    tempBuf.Elements(), end - tempBuf.Elements());
+        currentTransformedTextOffset =
+          static_cast<PRUnichar*>(aTextBuffer) - static_cast<const PRUnichar*>(textPtr);
       } else {
         uint8_t* bufStart = static_cast<uint8_t*>(aTextBuffer);
         uint8_t* end = nsTextFrameUtils::TransformText(
             reinterpret_cast<const uint8_t*>(frag->Get1b()) + contentStart, contentLength,
             bufStart, compression, &mNextRunContextInfo, &builder, &analysisFlags);
         aTextBuffer = end;
+        currentTransformedTextOffset = end - static_cast<const uint8_t*>(textPtr);
       }
     }
     textFlags |= analysisFlags;
-
-    currentTransformedTextOffset =
-      (static_cast<const uint8_t*>(aTextBuffer) - static_cast<const uint8_t*>(textPtr)) >> mDoubleByteText;
   }
 
   // Check for out-of-memory in gfxSkipCharsBuilder
   if (!builder.IsOK()) {
     DestroyUserData(userDataToDestroy);
     return nullptr;
   }
 
--- a/layout/mathml/Makefile.in
+++ b/layout/mathml/Makefile.in
@@ -8,19 +8,17 @@ DEPTH=@DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBRARY_NAME = gkmathml_s
 LIBXUL_LIBRARY	= 1
-ifndef _MSC_VER
 FAIL_ON_WARNINGS = 1
-endif # !_MSC_VER
 
 
 LOCAL_INCLUDES = \
 	-I$(srcdir)/../style \
 	-I$(srcdir)/../base \
 	-I$(srcdir)/../generic \
 	-I$(srcdir)/../tables \
 	-I$(topsrcdir)/content/base/src \
--- a/layout/mathml/nsMathMLChar.cpp
+++ b/layout/mathml/nsMathMLChar.cpp
@@ -1498,17 +1498,17 @@ nsMathMLChar::StretchInternal(nsPresCont
       }
     }
   }
 
   // We do not have a char variant for this largeop in display mode, so we
   // apply a scale transform to the base char.
   if (!glyphFound && largeop) {
     float scale;
-    float largeopFactor = M_SQRT2;
+    float largeopFactor = float(M_SQRT2);
 
     // increase the width if it is not largeopFactor times larger
     // than the initial one.
     if ((aDesiredStretchSize.rightBearing - aDesiredStretchSize.leftBearing) <
         largeopFactor * (initialSize.rightBearing - initialSize.leftBearing)) {
       scale = (largeopFactor *
                (initialSize.rightBearing - initialSize.leftBearing)) /
         (aDesiredStretchSize.rightBearing - aDesiredStretchSize.leftBearing);
--- a/layout/mathml/nsMathMLmoFrame.cpp
+++ b/layout/mathml/nsMathMLmoFrame.cpp
@@ -336,23 +336,23 @@ nsMathMLmoFrame::ProcessOperatorData()
         form = NS_MATHML_OPERATOR_FORM_POSTFIX;
     }
     mFlags &= ~NS_MATHML_OPERATOR_FORM; // clear the old form bits
     mFlags |= form;
 
     // Use the default value suggested by the MathML REC.
     // http://www.w3.org/TR/MathML/chapter3.html#presm.mo.attrs
     // thickmathspace = 5/18em
-    float lspace = 5.0/18.0;
-    float rspace = 5.0/18.0;
+    float lspace = 5.0f/18.0f;
+    float rspace = 5.0f/18.0f;
     if (NS_MATHML_OPERATOR_IS_INVISIBLE(mFlags)) {
       // mMathMLChar has been reset in ProcessTextData so we can not find it
       // in the operator dictionary. The operator dictionary always uses
       // lspace = rspace = 0 for invisible operators.
-      lspace = rspace = 0.0;
+      lspace = rspace = 0;
     } else {
       // lookup the operator dictionary
       nsAutoString data;
       mMathMLChar.GetData(data);
       nsMathMLOperators::LookupOperator(data, form, &mFlags, &lspace, &rspace);
     }
     if (lspace || rspace) {
       // Cache the default values of lspace and rspace.
@@ -503,17 +503,17 @@ nsMathMLmoFrame::ProcessOperatorData()
   // values: length
   // default: set by dictionary (1em)
   //
   // We don't allow negative values.
   // Note: Contrary to other "length" values, unitless and percentage do not
   // give a multiple of the defaut value but a multiple of the operator at
   // normal size.
   //
-  mMinSize = 0.0;
+  mMinSize = 0;
   GetAttribute(mContent, mPresentationData.mstyle, nsGkAtoms::minsize_,
                value);
   if (!value.IsEmpty()) {
     nsCSSValue cssValue;
     if (nsMathMLElement::ParseNumericValue(value, cssValue,
                                            nsMathMLElement::
                                            PARSE_ALLOW_UNITLESS,
                                            mContent->OwnerDoc())) {
--- a/layout/style/Makefile.in
+++ b/layout/style/Makefile.in
@@ -6,19 +6,17 @@ DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBRARY_NAME	= gkstyle_s
 LIBXUL_LIBRARY	= 1
-ifndef _MSC_VER
 FAIL_ON_WARNINGS = 1
-endif # !_MSC_VER
 
 ifdef GNU_CC
 OS_CFLAGS := $(OS_CFLAGS) -Wshadow
 OS_CXXFLAGS := $(OS_CXXFLAGS) -Wshadow
 endif
 
 CPPSRCS		= \
 		AnimationCommon.cpp \
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -1141,16 +1141,18 @@ CSSParserImpl::ParseRule(const nsAString
 
   ReleaseScanner();
   return rv;
 }
 
 // See Bug 723197
 #ifdef _MSC_VER
 #pragma optimize( "", off )
+#pragma warning( push )
+#pragma warning( disable : 4748 )
 #endif
 nsresult
 CSSParserImpl::ParseProperty(const nsCSSProperty aPropID,
                              const nsAString& aPropValue,
                              nsIURI* aSheetURI,
                              nsIURI* aBaseURI,
                              nsIPrincipal* aSheetPrincipal,
                              css::Declaration* aDeclaration,
@@ -1217,16 +1219,17 @@ CSSParserImpl::ParseProperty(const nsCSS
   }
 
   mTempData.AssertInitialState();
 
   ReleaseScanner();
   return NS_OK;
 }
 #ifdef _MSC_VER
+#pragma warning( pop )
 #pragma optimize( "", on )
 #endif
 
 nsresult
 CSSParserImpl::ParseMediaList(const nsSubstring& aBuffer,
                               nsIURI* aURI, // for error reporting
                               uint32_t aLineNumber, // for error reporting
                               nsMediaList* aMediaList,
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -1987,21 +1987,21 @@ void nsTimingFunction::AssignFromKeyword
   MOZ_STATIC_ASSERT(NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE == 0 &&
                     NS_STYLE_TRANSITION_TIMING_FUNCTION_LINEAR == 1 &&
                     NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE_IN == 2 &&
                     NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE_OUT == 3 &&
                     NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE_IN_OUT == 4,
                     "transition timing function constants not as expected");
 
   static const float timingFunctionValues[5][4] = {
-    { 0.25, 0.10, 0.25, 1.00 }, // ease
-    { 0.00, 0.00, 1.00, 1.00 }, // linear
-    { 0.42, 0.00, 1.00, 1.00 }, // ease-in
-    { 0.00, 0.00, 0.58, 1.00 }, // ease-out
-    { 0.42, 0.00, 0.58, 1.00 }  // ease-in-out
+    { 0.25f, 0.10f, 0.25f, 1.00f }, // ease
+    { 0.00f, 0.00f, 1.00f, 1.00f }, // linear
+    { 0.42f, 0.00f, 1.00f, 1.00f }, // ease-in
+    { 0.00f, 0.00f, 0.58f, 1.00f }, // ease-out
+    { 0.42f, 0.00f, 0.58f, 1.00f }  // ease-in-out
   };
 
   NS_ABORT_IF_FALSE(0 <= aTimingFunctionType && aTimingFunctionType < 5,
                     "keyword out of range");
   mFunc.mX1 = timingFunctionValues[aTimingFunctionType][0];
   mFunc.mY1 = timingFunctionValues[aTimingFunctionType][1];
   mFunc.mX2 = timingFunctionValues[aTimingFunctionType][2];
   mFunc.mY2 = timingFunctionValues[aTimingFunctionType][3];
--- a/layout/tables/Makefile.in
+++ b/layout/tables/Makefile.in
@@ -7,19 +7,17 @@ DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBRARY_NAME	= gktable_s
 LIBXUL_LIBRARY	= 1
-ifndef _MSC_VER
 FAIL_ON_WARNINGS = 1
-endif # !_MSC_VER
 
 
 
 CPPSRCS		= \
 		BasicTableLayoutStrategy.cpp \
 		FixedTableLayoutStrategy.cpp \
 		SpanningCellSorter.cpp \
 		nsCellMap.cpp \
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -155,19 +155,16 @@ nsTableFrame::GetType() const
 nsTableFrame::nsTableFrame(nsStyleContext* aContext)
   : nsContainerFrame(aContext),
     mCellMap(nullptr),
     mTableLayoutStrategy(nullptr)
 {
   memset(&mBits, 0, sizeof(mBits));
 }
 
-NS_QUERYFRAME_HEAD(nsTableFrame)
-NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
-
 void
 nsTableFrame::Init(nsIContent*      aContent,
                    nsIFrame*        aParent,
                    nsIFrame*        aPrevInFlow)
 {
   NS_PRECONDITION(!mCellMap, "Init called twice");
   NS_PRECONDITION(!aPrevInFlow ||
                   aPrevInFlow->GetType() == nsGkAtoms::tableFrame,
@@ -2796,17 +2793,17 @@ nsTableFrame::ReflowChildren(nsTableRefl
                                        kidFrame, kidAvailSize,
                                        -1, -1, false);
       InitChildReflowState(kidReflowState);
 
       // If this isn't the first row group, and the previous row group has a
       // nonzero YMost, then we can't be at the top of the page.
       // We ignore a repeated head row group in this check to avoid causing
       // infinite loops in some circumstances - see bug 344883.
-      if (childX > ((thead && IsRepeatedFrame(thead)) ? 1 : 0) &&
+      if (childX > ((thead && IsRepeatedFrame(thead)) ? 1u : 0u) &&
           (rowGroups[childX - 1]->GetRect().YMost() > 0)) {
         kidReflowState.mFlags.mIsTopOfPage = false;
       }
       aReflowState.y += cellSpacingY;
       if (NS_UNCONSTRAINEDSIZE != aReflowState.availSize.height) {
         aReflowState.availSize.height -= cellSpacingY;
       }
       // record the presence of a next in flow, it might get destroyed so we
--- a/layout/tables/nsTableFrame.h
+++ b/layout/tables/nsTableFrame.h
@@ -103,17 +103,16 @@ private:
   * stand-alone as the top-level frame.
   *
   * The principal child list contains row group frames. There is also an
   * additional child list, kColGroupList, which contains the col group frames.
   */
 class nsTableFrame : public nsContainerFrame
 {
 public:
-  NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
 
   /** nsTableOuterFrame has intimate knowledge of the inner table frame */
   friend class nsTableOuterFrame;
 
   /** instantiate a new instance of nsTableRowFrame.
     * @param aPresShell the pres shell for this frame
     *