From 4085f74a3fb3a9ea6b4247ee902e21d8409e3382 Mon Sep 17 00:00:00 2001 From: David Zbarsky Date: Wed, 10 Oct 2012 01:00:05 -0400 Subject: [PATCH] [Bug 799407] Fix build warnings in layout r=roc --- layout/base/FrameLayerBuilder.cpp | 14 ++++---- layout/base/nsBidiPresUtils.cpp | 1 - layout/base/nsCSSRendering.cpp | 4 ++- layout/base/nsFrameManager.cpp | 4 +-- layout/build/Makefile.in | 1 + layout/forms/Makefile.in | 1 + layout/forms/nsIListControlFrame.h | 2 +- layout/forms/nsListControlFrame.cpp | 36 ++++++++++---------- layout/forms/nsListControlFrame.h | 2 +- layout/forms/nsTextControlFrame.cpp | 2 +- layout/generic/Makefile.in | 1 - layout/generic/nsAbsoluteContainingBlock.cpp | 8 +---- layout/generic/nsBlockFrame.cpp | 16 ++++----- layout/generic/nsBlockReflowState.cpp | 4 +-- layout/generic/nsCanvasFrame.cpp | 1 - layout/generic/nsGfxScrollFrame.cpp | 7 ++-- layout/generic/nsObjectFrame.cpp | 4 +-- layout/generic/nsSimplePageSequence.cpp | 4 +-- layout/generic/nsTextFrameUtils.cpp | 4 +-- layout/generic/nsViewportFrame.cpp | 5 ++- layout/inspector/src/Makefile.in | 1 + layout/mathml/Makefile.in | 1 + layout/mathml/nsMathMLChar.cpp | 13 +++---- layout/printing/Makefile.in | 2 +- layout/style/nsComputedDOMStyle.cpp | 2 +- layout/xul/base/src/Makefile.in | 2 +- 26 files changed, 68 insertions(+), 74 deletions(-) diff --git a/layout/base/FrameLayerBuilder.cpp b/layout/base/FrameLayerBuilder.cpp index 8853848081b2..9c2c657d3def 100644 --- a/layout/base/FrameLayerBuilder.cpp +++ b/layout/base/FrameLayerBuilder.cpp @@ -1479,6 +1479,7 @@ ContainerState::CreateOrRecycleThebesLayer(const nsIFrame* aActiveScrolledRoot, return layer.forget(); } +#ifdef DEBUG /** * Returns the appunits per dev pixel for the item's frame. The item must * have a frame because only nsDisplayClip items don't have a frame, @@ -1496,6 +1497,7 @@ AppUnitsPerDevPixel(nsDisplayItem* aItem) } return aItem->GetUnderlyingFrame()->PresContext()->AppUnitsPerDevPixel(); } +#endif /** * Restrict the visible region of aLayer to the region that is actually visible. @@ -2216,10 +2218,10 @@ ContainerState::InvalidateForLayerChange(nsDisplayItem* aItem, const FrameLayerBuilder::Clip& aClip, const nsPoint& aTopLeft) { - nsIFrame* f = aItem->GetUnderlyingFrame(); - NS_ASSERTION(f, "Display items that render using Thebes must have a frame"); - uint32_t key = aItem->GetPerFrameKey(); - NS_ASSERTION(key, "Display items that render using Thebes must have a key"); + NS_ASSERTION(aItem->GetUnderlyingFrame(), + "Display items that render using Thebes must have a frame"); + NS_ASSERTION(aItem->GetPerFrameKey(), + "Display items that render using Thebes must have a key"); nsDisplayItemGeometry *oldGeometry = NULL; FrameLayerBuilder::Clip* oldClip = NULL; nsAutoPtr geometry(aItem->AllocateGeometry(mBuilder)); @@ -2908,8 +2910,8 @@ Layer* FrameLayerBuilder::GetLeafLayerFor(nsDisplayListBuilder* aBuilder, nsDisplayItem* aItem) { - nsIFrame* f = aItem->GetUnderlyingFrame(); - NS_ASSERTION(f, "Can only call GetLeafLayerFor on items that have a frame"); + NS_ASSERTION(aItem->GetUnderlyingFrame(), + "Can only call GetLeafLayerFor on items that have a frame"); Layer* layer = GetOldLayerFor(aItem); if (!layer) return nullptr; diff --git a/layout/base/nsBidiPresUtils.cpp b/layout/base/nsBidiPresUtils.cpp index 809c6f586770..0aac7055f571 100644 --- a/layout/base/nsBidiPresUtils.cpp +++ b/layout/base/nsBidiPresUtils.cpp @@ -2010,7 +2010,6 @@ private: nsPoint mPt; const PRUnichar* mText; int32_t mLength; - nsBidiDirection mDirection; }; nsresult nsBidiPresUtils::ProcessTextForRenderingContext(const PRUnichar* aText, diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp index c6ef7d6b3765..d489f2dc8eab 100644 --- a/layout/base/nsCSSRendering.cpp +++ b/layout/base/nsCSSRendering.cpp @@ -1955,6 +1955,7 @@ ComputeRadialGradientLine(nsPresContext* aPresContext, break; } default: + radiusX = radiusY = 0; NS_ABORT_IF_FALSE(false, "unknown radial gradient sizing method"); } *aRadiusX = radiusX; @@ -2403,7 +2404,8 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext, // If we're not drawing the back-most layer, we don't want to draw the // background color. const nsStyleBackground *bg = aBackgroundSC->GetStyleBackground(); - if (drawBackgroundColor && aLayer >= 0 && aLayer != bg->mImageCount - 1) { + if (drawBackgroundColor && aLayer >= 0 && + static_cast(aLayer) != bg->mImageCount - 1) { drawBackgroundColor = false; } diff --git a/layout/base/nsFrameManager.cpp b/layout/base/nsFrameManager.cpp index d631227826e1..06939f1ccf84 100644 --- a/layout/base/nsFrameManager.cpp +++ b/layout/base/nsFrameManager.cpp @@ -452,8 +452,8 @@ nsFrameManager::InsertFrames(nsIFrame* aParentFrame, nsFrameList& aFrameList) { NS_PRECONDITION(!aPrevFrame || (!aPrevFrame->GetNextContinuation() - || (aPrevFrame->GetNextContinuation()->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER)) - && !(aPrevFrame->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER), + || ((aPrevFrame->GetNextContinuation()->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER)) + && !(aPrevFrame->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER)), "aPrevFrame must be the last continuation in its chain!"); if (aParentFrame->IsAbsoluteContainer() && diff --git a/layout/build/Makefile.in b/layout/build/Makefile.in index e65822c1070c..dff8073ceb2e 100644 --- a/layout/build/Makefile.in +++ b/layout/build/Makefile.in @@ -22,6 +22,7 @@ IS_COMPONENT = 1 MODULE_NAME = nsLayoutModule GRE_MODULE = 1 LIBXUL_LIBRARY = 1 +FAIL_ON_WARNINGS = 1 CPPSRCS = \ diff --git a/layout/forms/Makefile.in b/layout/forms/Makefile.in index c2bf02fcee7c..935a14f80b91 100644 --- a/layout/forms/Makefile.in +++ b/layout/forms/Makefile.in @@ -18,6 +18,7 @@ MODULE = layout XPIDL_MODULE = layout_forms LIBRARY_NAME = gkforms_s LIBXUL_LIBRARY = 1 +FAIL_ON_WARNINGS = 1 XPIDLSRCS = nsICapturePicker.idl diff --git a/layout/forms/nsIListControlFrame.h b/layout/forms/nsIListControlFrame.h index 71cb6d94b8ed..654c71eccf04 100644 --- a/layout/forms/nsIListControlFrame.h +++ b/layout/forms/nsIListControlFrame.h @@ -59,7 +59,7 @@ public: * Returns the number of options in the listbox */ - virtual int32_t GetNumberOfOptions() = 0; + virtual uint32_t GetNumberOfOptions() = 0; /** * Called by combobox when it's about to drop down diff --git a/layout/forms/nsListControlFrame.cpp b/layout/forms/nsListControlFrame.cpp index 799f736c5449..ec13d5671485 100644 --- a/layout/forms/nsListControlFrame.cpp +++ b/layout/forms/nsListControlFrame.cpp @@ -52,7 +52,7 @@ using namespace mozilla; // Constants -const int32_t kMaxDropDownRows = 20; // This matches the setting for 4.x browsers +const uint32_t kMaxDropDownRows = 20; // This matches the setting for 4.x browsers const int32_t kNothingSelected = -1; // Static members @@ -577,11 +577,11 @@ nsListControlFrame::ReflowAsDropdown(nsPresContext* aPresContext, nscoord bp = aReflowState.mComputedBorderPadding.TopBottom(); nscoord availableHeight = NS_MAX(above, below) - bp; nscoord newHeight; - int32_t rows; + uint32_t rows; if (visibleHeight <= availableHeight) { // The dropdown fits in the available height. rows = GetNumberOfOptions(); - mNumDisplayRows = clamped(rows, 1, kMaxDropDownRows); + mNumDisplayRows = clamped(rows, 1, kMaxDropDownRows); if (mNumDisplayRows == rows) { newHeight = visibleHeight; // use the exact height } else { @@ -589,7 +589,7 @@ nsListControlFrame::ReflowAsDropdown(nsPresContext* aPresContext, } } else { rows = availableHeight / heightOfARow; - mNumDisplayRows = clamped(rows, 1, kMaxDropDownRows); + mNumDisplayRows = clamped(rows, 1, kMaxDropDownRows); newHeight = mNumDisplayRows * heightOfARow; // approximate } state.SetComputedHeight(newHeight); @@ -1265,21 +1265,21 @@ nsListControlFrame::IsInDropDownMode() const return (mComboboxFrame != nullptr); } -int32_t +uint32_t nsListControlFrame::GetNumberOfOptions() { - if (mContent != nullptr) { - nsCOMPtr options = GetOptions(mContent); - - if (!options) { - return 0; - } else { - uint32_t length = 0; - options->GetLength(&length); - return (int32_t)length; - } + if (!mContent) { + return 0; } - return 0; + + nsCOMPtr options = GetOptions(mContent); + if (!options) { + return 0; + } + + uint32_t length = 0; + options->GetLength(&length); + return length; } //---------------------------------------------------------------------- @@ -1332,10 +1332,10 @@ nsListControlFrame::AddOption(int32_t aIndex) mIsAllFramesHere = false; mHasBeenInitialized = false; } else { - mIsAllFramesHere = (aIndex == GetNumberOfOptions()-1); + mIsAllFramesHere = (aIndex == static_cast(GetNumberOfOptions()-1)); } } - + // Make sure we scroll to the selected option as needed mNeedToReset = true; diff --git a/layout/forms/nsListControlFrame.h b/layout/forms/nsListControlFrame.h index 9f17ec950950..c6a47c343066 100644 --- a/layout/forms/nsListControlFrame.h +++ b/layout/forms/nsListControlFrame.h @@ -126,7 +126,7 @@ public: virtual void CaptureMouseEvents(bool aGrabMouseEvents) MOZ_OVERRIDE; virtual nscoord GetHeightOfARow() MOZ_OVERRIDE; - virtual int32_t GetNumberOfOptions() MOZ_OVERRIDE; + virtual uint32_t GetNumberOfOptions() MOZ_OVERRIDE; virtual void AboutToDropDown() MOZ_OVERRIDE; /** diff --git a/layout/forms/nsTextControlFrame.cpp b/layout/forms/nsTextControlFrame.cpp index b31402be8ca1..9d534649a35e 100644 --- a/layout/forms/nsTextControlFrame.cpp +++ b/layout/forms/nsTextControlFrame.cpp @@ -444,7 +444,7 @@ nsTextControlFrame::AppendAnonymousContentTo(nsBaseContentList& aElements, nscoord nsTextControlFrame::GetPrefWidth(nsRenderingContext* aRenderingContext) { - nscoord result = 0; + DebugOnly result = 0; DISPLAY_PREF_WIDTH(this, result); float inflation = nsLayoutUtils::FontSizeInflationFor(this); diff --git a/layout/generic/Makefile.in b/layout/generic/Makefile.in index b92ea75b2941..ec15b39890fd 100644 --- a/layout/generic/Makefile.in +++ b/layout/generic/Makefile.in @@ -16,7 +16,6 @@ LIBRARY_NAME = gkgeneric_s LIBXUL_LIBRARY = 1 - EXPORTS = \ nsQueryFrame.h \ nsFrameIdList.h \ diff --git a/layout/generic/nsAbsoluteContainingBlock.cpp b/layout/generic/nsAbsoluteContainingBlock.cpp index da83579ef33d..d45dc03c7338 100644 --- a/layout/generic/nsAbsoluteContainingBlock.cpp +++ b/layout/generic/nsAbsoluteContainingBlock.cpp @@ -364,12 +364,6 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat AutoNoisyIndenter indent(nsBlockFrame::gNoisy); #endif // DEBUG - // Store position and overflow rect so taht we can invalidate the correct - // area if the position changes - nsRect oldOverflowRect(aKidFrame->GetVisualOverflowRect() + - aKidFrame->GetPosition()); - nsRect oldRect = aKidFrame->GetRect(); - nsresult rv; // Get the border values const nsMargin& border = aReflowState.mStyleBorder->GetComputedBorder(); @@ -381,7 +375,7 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat availWidth = aReflowState.ComputedWidth() + aReflowState.mComputedPadding.LeftRight(); } - + nsHTMLReflowMetrics kidDesiredSize; nsHTMLReflowState kidReflowState(aPresContext, aReflowState, aKidFrame, nsSize(availWidth, NS_UNCONSTRAINEDSIZE), diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index d3ebc8aff9ad..71f37f237a0a 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -1553,13 +1553,13 @@ IsAlignedLeft(uint8_t aAlignment, uint8_t aUnicodeBidi, nsIFrame* aFrame) { - return (aFrame->IsSVGText() || - NS_STYLE_TEXT_ALIGN_LEFT == aAlignment || - ((NS_STYLE_TEXT_ALIGN_DEFAULT == aAlignment && - NS_STYLE_DIRECTION_LTR == aDirection) || - (NS_STYLE_TEXT_ALIGN_END == aAlignment && - NS_STYLE_DIRECTION_RTL == aDirection)) && - !(NS_STYLE_UNICODE_BIDI_PLAINTEXT & aUnicodeBidi)); + return aFrame->IsSVGText() || + NS_STYLE_TEXT_ALIGN_LEFT == aAlignment || + (((NS_STYLE_TEXT_ALIGN_DEFAULT == aAlignment && + NS_STYLE_DIRECTION_LTR == aDirection) || + (NS_STYLE_TEXT_ALIGN_END == aAlignment && + NS_STYLE_DIRECTION_RTL == aDirection)) && + !(NS_STYLE_UNICODE_BIDI_PLAINTEXT & aUnicodeBidi)); } nsresult @@ -5408,8 +5408,8 @@ nsBlockFrame::DoRemoveFrame(nsIFrame* aDeletedFrame, uint32_t aFlags) // XXX We need to do this if we're removing a frame as a result of // a call to RemoveFrame(), but we may not need to do this in all // cases... - nsRect visOverflow(cur->GetVisualOverflowArea()); #ifdef NOISY_BLOCK_INVALIDATE + nsRect visOverflow(cur->GetVisualOverflowArea()); printf("%p invalidate 10 (%d, %d, %d, %d)\n", this, visOverflow.x, visOverflow.y, visOverflow.width, visOverflow.height); diff --git a/layout/generic/nsBlockReflowState.cpp b/layout/generic/nsBlockReflowState.cpp index 21715d50cec7..06387223703d 100644 --- a/layout/generic/nsBlockReflowState.cpp +++ b/layout/generic/nsBlockReflowState.cpp @@ -804,8 +804,8 @@ nsBlockReflowState::FlowAndPlaceFloat(nsIFrame* aFloat) (NS_UNCONSTRAINEDSIZE != mContentArea.height)) { region.height = NS_MAX(region.height, mContentArea.height - floatY); } - nsresult rv = - mFloatManager->AddFloat(aFloat, region); + DebugOnly rv = + mFloatManager->AddFloat(aFloat, region); NS_ABORT_IF_FALSE(NS_SUCCEEDED(rv), "bad float placement"); // store region nsFloatManager::StoreRegionFor(aFloat, region); diff --git a/layout/generic/nsCanvasFrame.cpp b/layout/generic/nsCanvasFrame.cpp index 74c7d881977d..ff290042c0da 100644 --- a/layout/generic/nsCanvasFrame.cpp +++ b/layout/generic/nsCanvasFrame.cpp @@ -439,7 +439,6 @@ nsCanvasFrame::Reflow(nsPresContext* aPresContext, aDesiredSize.width = aDesiredSize.height = 0; } else { nsIFrame* kidFrame = mFrames.FirstChild(); - nsRect oldKidRect = kidFrame->GetRect(); bool kidDirty = (kidFrame->GetStateBits() & NS_FRAME_IS_DIRTY) != 0; nsHTMLReflowState kidReflowState(aPresContext, aReflowState, kidFrame, diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 4754f539ff93..2e7aced19a51 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -3054,14 +3054,11 @@ nsXULScrollFrame::LayoutScrollArea(nsBoxLayoutState& aState, mInner.mScrollPort.Size()); int32_t flags = NS_FRAME_NO_MOVE_VIEW; - nsRect originalRect = mInner.mScrolledFrame->GetRect(); - nsRect originalVisOverflow = mInner.mScrolledFrame->GetVisualOverflowRect(); - nsSize minSize = mInner.mScrolledFrame->GetMinSize(aState); - + if (minSize.height > childRect.height) childRect.height = minSize.height; - + if (minSize.width > childRect.width) childRect.width = minSize.width; diff --git a/layout/generic/nsObjectFrame.cpp b/layout/generic/nsObjectFrame.cpp index 64719fec937d..5a13317fac33 100644 --- a/layout/generic/nsObjectFrame.cpp +++ b/layout/generic/nsObjectFrame.cpp @@ -1261,8 +1261,8 @@ nsObjectFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, } nsRefPtr container = GetImageContainer(); - if (container && container->HasCurrentImage() || !isVisible || - container->GetCurrentSize() != gfxIntSize(window->width, window->height)) { + if (container && (container->HasCurrentImage() || !isVisible || + container->GetCurrentSize() != gfxIntSize(window->width, window->height))) { mInstanceOwner->NotifyPaintWaiter(aBuilder); } } diff --git a/layout/generic/nsSimplePageSequence.cpp b/layout/generic/nsSimplePageSequence.cpp index b0edc2e2d725..cfc1680ac510 100644 --- a/layout/generic/nsSimplePageSequence.cpp +++ b/layout/generic/nsSimplePageSequence.cpp @@ -86,10 +86,10 @@ NS_IMPL_FRAMEARENA_HELPERS(nsSimplePageSequenceFrame) nsSimplePageSequenceFrame::nsSimplePageSequenceFrame(nsStyleContext* aContext) : nsContainerFrame(aContext), mTotalPages(-1), - mCurrentCanvasListSetup(false), mSelectionHeight(-1), mYSelOffset(0), - mCalledBeginPage(false) + mCalledBeginPage(false), + mCurrentCanvasListSetup(false) { nscoord halfInch = PresContext()->CSSTwipsToAppUnits(NS_INCHES_TO_TWIPS(0.5)); mMargin.SizeTo(halfInch, halfInch, halfInch, halfInch); diff --git a/layout/generic/nsTextFrameUtils.cpp b/layout/generic/nsTextFrameUtils.cpp index 390fe8b9f2f5..f06b1398c0d0 100644 --- a/layout/generic/nsTextFrameUtils.cpp +++ b/layout/generic/nsTextFrameUtils.cpp @@ -165,8 +165,8 @@ nsTextFrameUtils::TransformText(const uint8_t* aText, uint32_t aLength, uint32_t i; for (i = 0; i < aLength; ++i) { uint8_t ch = *aText++; - if (IsDiscardable(ch, &flags) || - ch == '\n' && aCompression == DISCARD_NEWLINE) { + if (IsDiscardable(ch, &flags) || + (ch == '\n' && aCompression == DISCARD_NEWLINE)) { aSkipChars->SkipChar(); } else { aSkipChars->KeepChar(); diff --git a/layout/generic/nsViewportFrame.cpp b/layout/generic/nsViewportFrame.cpp index 524d1ce44888..b3ac269eb8ef 100644 --- a/layout/generic/nsViewportFrame.cpp +++ b/layout/generic/nsViewportFrame.cpp @@ -235,7 +235,10 @@ ViewportFrame::Reflow(nsPresContext* aPresContext, // Make a copy of the reflow state and change the computed width and height // to reflect the available space for the fixed items nsHTMLReflowState reflowState(aReflowState); - nsPoint offset = AdjustReflowStateForScrollbars(&reflowState); +#ifdef DEBUG + nsPoint offset = +#endif + AdjustReflowStateForScrollbars(&reflowState); if (IsAbsoluteContainer()) { NS_ASSERTION(GetAbsoluteContainingBlock()->GetChildList().IsEmpty() || diff --git a/layout/inspector/src/Makefile.in b/layout/inspector/src/Makefile.in index 2e50901048b2..26be1819f0c6 100644 --- a/layout/inspector/src/Makefile.in +++ b/layout/inspector/src/Makefile.in @@ -13,6 +13,7 @@ include $(DEPTH)/config/autoconf.mk MODULE = inspector LIBRARY_NAME = inspector_s LIBXUL_LIBRARY = 1 +FAIL_ON_WARNINGS = 1 EXPORTS = \ nsFontFace.h \ diff --git a/layout/mathml/Makefile.in b/layout/mathml/Makefile.in index 90411387ab77..d821de73439b 100644 --- a/layout/mathml/Makefile.in +++ b/layout/mathml/Makefile.in @@ -14,6 +14,7 @@ include $(DEPTH)/config/autoconf.mk MODULE = layout LIBRARY_NAME = gkmathml_s LIBXUL_LIBRARY = 1 +FAIL_ON_WARNINGS = 1 LOCAL_INCLUDES = \ diff --git a/layout/mathml/nsMathMLChar.cpp b/layout/mathml/nsMathMLChar.cpp index 0faa1920e8e5..e7b4144b8e9d 100644 --- a/layout/mathml/nsMathMLChar.cpp +++ b/layout/mathml/nsMathMLChar.cpp @@ -109,8 +109,7 @@ LoadProperties(const nsString& aName, class nsGlyphTable { public: explicit nsGlyphTable(const nsString& aPrimaryFontName) - : mType(NS_TABLE_TYPE_UNICODE), - mFontName(1), // ensure space for primary font name. + : mFontName(1), // ensure space for primary font name. mState(NS_TABLE_STATE_EMPTY), mCharCache(0) { @@ -172,14 +171,11 @@ private: nsGlyphCode ElementAt(nsPresContext* aPresContext, nsMathMLChar* aChar, uint32_t aPosition); - // The type is either NS_TABLE_TYPE_UNICODE or NS_TABLE_TYPE_GLYPH_INDEX - int32_t mType; - // mFontName[0] is the primary font associated to this table. The others // are possible "external" fonts for glyphs not in the primary font // but which are needed to stretch certain characters in the table - nsTArray mFontName; - + nsTArray mFontName; + // Tri-state variable for error/empty/ready int32_t mState; @@ -199,8 +195,7 @@ private: // mGlyphCache excludes the '@' symbol and explicitly inserts all optional '0' // that indicates the primary font identifier. Specifically therefore, the // k-th glyph is characterized by : - // 1) mGlyphCache[3*k],mGlyphCache[3*k+1] : its Unicode point (or glyph index - // -- depending on mType), + // 1) mGlyphCache[3*k],mGlyphCache[3*k+1] : its Unicode point // 2) mGlyphCache[3*k+2] : the numeric identifier of the font where it comes // from. // A font identifier of '0' means the default primary font associated to this diff --git a/layout/printing/Makefile.in b/layout/printing/Makefile.in index b581b4660ffb..01abc9fa503e 100644 --- a/layout/printing/Makefile.in +++ b/layout/printing/Makefile.in @@ -14,7 +14,7 @@ XPIDL_MODULE = layout_printing GRE_MODULE = 1 LIBRARY_NAME = gkprinting_s LIBXUL_LIBRARY = 1 - +FAIL_ON_WARNINGS = 1 XPIDLSRCS = \ nsIPrintProgress.idl \ diff --git a/layout/style/nsComputedDOMStyle.cpp b/layout/style/nsComputedDOMStyle.cpp index 204181fb20ea..8265708163f0 100644 --- a/layout/style/nsComputedDOMStyle.cpp +++ b/layout/style/nsComputedDOMStyle.cpp @@ -1245,7 +1245,7 @@ nsComputedDOMStyle::DoGetFontWeight() uint16_t weight = font->mFont.weight; NS_ASSERTION(weight % 100 == 0, "unexpected value of font-weight"); - val->SetNumber(font->mFont.weight); + val->SetNumber(weight); return val; } diff --git a/layout/xul/base/src/Makefile.in b/layout/xul/base/src/Makefile.in index fd41bf4b807a..86a03ce627fc 100644 --- a/layout/xul/base/src/Makefile.in +++ b/layout/xul/base/src/Makefile.in @@ -13,7 +13,7 @@ include $(DEPTH)/config/autoconf.mk MODULE = layout LIBRARY_NAME = gkxulbase_s LIBXUL_LIBRARY = 1 - +FAIL_ON_WARNINGS = 1 ifdef MOZ_XUL