[Bug 799407] Fix build warnings in layout r=roc

This commit is contained in:
David Zbarsky
2012-10-10 01:00:05 -04:00
parent 3904369181
commit b22e7c6a8e
26 changed files with 68 additions and 74 deletions

View File

@@ -1479,6 +1479,7 @@ ContainerState::CreateOrRecycleThebesLayer(const nsIFrame* aActiveScrolledRoot,
return layer.forget(); return layer.forget();
} }
#ifdef DEBUG
/** /**
* Returns the appunits per dev pixel for the item's frame. The item must * 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, * have a frame because only nsDisplayClip items don't have a frame,
@@ -1496,6 +1497,7 @@ AppUnitsPerDevPixel(nsDisplayItem* aItem)
} }
return aItem->GetUnderlyingFrame()->PresContext()->AppUnitsPerDevPixel(); return aItem->GetUnderlyingFrame()->PresContext()->AppUnitsPerDevPixel();
} }
#endif
/** /**
* Restrict the visible region of aLayer to the region that is actually visible. * 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 FrameLayerBuilder::Clip& aClip,
const nsPoint& aTopLeft) const nsPoint& aTopLeft)
{ {
nsIFrame* f = aItem->GetUnderlyingFrame(); NS_ASSERTION(aItem->GetUnderlyingFrame(),
NS_ASSERTION(f, "Display items that render using Thebes must have a frame"); "Display items that render using Thebes must have a frame");
uint32_t key = aItem->GetPerFrameKey(); NS_ASSERTION(aItem->GetPerFrameKey(),
NS_ASSERTION(key, "Display items that render using Thebes must have a key"); "Display items that render using Thebes must have a key");
nsDisplayItemGeometry *oldGeometry = NULL; nsDisplayItemGeometry *oldGeometry = NULL;
FrameLayerBuilder::Clip* oldClip = NULL; FrameLayerBuilder::Clip* oldClip = NULL;
nsAutoPtr<nsDisplayItemGeometry> geometry(aItem->AllocateGeometry(mBuilder)); nsAutoPtr<nsDisplayItemGeometry> geometry(aItem->AllocateGeometry(mBuilder));
@@ -2908,8 +2910,8 @@ Layer*
FrameLayerBuilder::GetLeafLayerFor(nsDisplayListBuilder* aBuilder, FrameLayerBuilder::GetLeafLayerFor(nsDisplayListBuilder* aBuilder,
nsDisplayItem* aItem) nsDisplayItem* aItem)
{ {
nsIFrame* f = aItem->GetUnderlyingFrame(); NS_ASSERTION(aItem->GetUnderlyingFrame(),
NS_ASSERTION(f, "Can only call GetLeafLayerFor on items that have a frame"); "Can only call GetLeafLayerFor on items that have a frame");
Layer* layer = GetOldLayerFor(aItem); Layer* layer = GetOldLayerFor(aItem);
if (!layer) if (!layer)
return nullptr; return nullptr;

View File

@@ -2010,7 +2010,6 @@ private:
nsPoint mPt; nsPoint mPt;
const PRUnichar* mText; const PRUnichar* mText;
int32_t mLength; int32_t mLength;
nsBidiDirection mDirection;
}; };
nsresult nsBidiPresUtils::ProcessTextForRenderingContext(const PRUnichar* aText, nsresult nsBidiPresUtils::ProcessTextForRenderingContext(const PRUnichar* aText,

View File

@@ -1955,6 +1955,7 @@ ComputeRadialGradientLine(nsPresContext* aPresContext,
break; break;
} }
default: default:
radiusX = radiusY = 0;
NS_ABORT_IF_FALSE(false, "unknown radial gradient sizing method"); NS_ABORT_IF_FALSE(false, "unknown radial gradient sizing method");
} }
*aRadiusX = radiusX; *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 // If we're not drawing the back-most layer, we don't want to draw the
// background color. // background color.
const nsStyleBackground *bg = aBackgroundSC->GetStyleBackground(); const nsStyleBackground *bg = aBackgroundSC->GetStyleBackground();
if (drawBackgroundColor && aLayer >= 0 && aLayer != bg->mImageCount - 1) { if (drawBackgroundColor && aLayer >= 0 &&
static_cast<uint32_t>(aLayer) != bg->mImageCount - 1) {
drawBackgroundColor = false; drawBackgroundColor = false;
} }

View File

@@ -452,8 +452,8 @@ nsFrameManager::InsertFrames(nsIFrame* aParentFrame,
nsFrameList& aFrameList) nsFrameList& aFrameList)
{ {
NS_PRECONDITION(!aPrevFrame || (!aPrevFrame->GetNextContinuation() NS_PRECONDITION(!aPrevFrame || (!aPrevFrame->GetNextContinuation()
|| (aPrevFrame->GetNextContinuation()->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER)) || ((aPrevFrame->GetNextContinuation()->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER))
&& !(aPrevFrame->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER), && !(aPrevFrame->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER)),
"aPrevFrame must be the last continuation in its chain!"); "aPrevFrame must be the last continuation in its chain!");
if (aParentFrame->IsAbsoluteContainer() && if (aParentFrame->IsAbsoluteContainer() &&

View File

@@ -22,6 +22,7 @@ IS_COMPONENT = 1
MODULE_NAME = nsLayoutModule MODULE_NAME = nsLayoutModule
GRE_MODULE = 1 GRE_MODULE = 1
LIBXUL_LIBRARY = 1 LIBXUL_LIBRARY = 1
FAIL_ON_WARNINGS = 1
CPPSRCS = \ CPPSRCS = \

View File

@@ -18,6 +18,7 @@ MODULE = layout
XPIDL_MODULE = layout_forms XPIDL_MODULE = layout_forms
LIBRARY_NAME = gkforms_s LIBRARY_NAME = gkforms_s
LIBXUL_LIBRARY = 1 LIBXUL_LIBRARY = 1
FAIL_ON_WARNINGS = 1
XPIDLSRCS = nsICapturePicker.idl XPIDLSRCS = nsICapturePicker.idl

View File

@@ -59,7 +59,7 @@ public:
* Returns the number of options in the listbox * 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 * Called by combobox when it's about to drop down

View File

@@ -52,7 +52,7 @@
using namespace mozilla; using namespace mozilla;
// Constants // 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; const int32_t kNothingSelected = -1;
// Static members // Static members
@@ -577,11 +577,11 @@ nsListControlFrame::ReflowAsDropdown(nsPresContext* aPresContext,
nscoord bp = aReflowState.mComputedBorderPadding.TopBottom(); nscoord bp = aReflowState.mComputedBorderPadding.TopBottom();
nscoord availableHeight = NS_MAX(above, below) - bp; nscoord availableHeight = NS_MAX(above, below) - bp;
nscoord newHeight; nscoord newHeight;
int32_t rows; uint32_t rows;
if (visibleHeight <= availableHeight) { if (visibleHeight <= availableHeight) {
// The dropdown fits in the available height. // The dropdown fits in the available height.
rows = GetNumberOfOptions(); rows = GetNumberOfOptions();
mNumDisplayRows = clamped(rows, 1, kMaxDropDownRows); mNumDisplayRows = clamped<uint32_t>(rows, 1, kMaxDropDownRows);
if (mNumDisplayRows == rows) { if (mNumDisplayRows == rows) {
newHeight = visibleHeight; // use the exact height newHeight = visibleHeight; // use the exact height
} else { } else {
@@ -589,7 +589,7 @@ nsListControlFrame::ReflowAsDropdown(nsPresContext* aPresContext,
} }
} else { } else {
rows = availableHeight / heightOfARow; rows = availableHeight / heightOfARow;
mNumDisplayRows = clamped(rows, 1, kMaxDropDownRows); mNumDisplayRows = clamped<uint32_t>(rows, 1, kMaxDropDownRows);
newHeight = mNumDisplayRows * heightOfARow; // approximate newHeight = mNumDisplayRows * heightOfARow; // approximate
} }
state.SetComputedHeight(newHeight); state.SetComputedHeight(newHeight);
@@ -1265,21 +1265,21 @@ nsListControlFrame::IsInDropDownMode() const
return (mComboboxFrame != nullptr); return (mComboboxFrame != nullptr);
} }
int32_t uint32_t
nsListControlFrame::GetNumberOfOptions() nsListControlFrame::GetNumberOfOptions()
{ {
if (mContent != nullptr) { if (!mContent) {
nsCOMPtr<nsIDOMHTMLOptionsCollection> options = GetOptions(mContent); return 0;
if (!options) {
return 0;
} else {
uint32_t length = 0;
options->GetLength(&length);
return (int32_t)length;
}
} }
return 0;
nsCOMPtr<nsIDOMHTMLOptionsCollection> 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; mIsAllFramesHere = false;
mHasBeenInitialized = false; mHasBeenInitialized = false;
} else { } else {
mIsAllFramesHere = (aIndex == GetNumberOfOptions()-1); mIsAllFramesHere = (aIndex == static_cast<int32_t>(GetNumberOfOptions()-1));
} }
} }
// Make sure we scroll to the selected option as needed // Make sure we scroll to the selected option as needed
mNeedToReset = true; mNeedToReset = true;

View File

@@ -126,7 +126,7 @@ public:
virtual void CaptureMouseEvents(bool aGrabMouseEvents) MOZ_OVERRIDE; virtual void CaptureMouseEvents(bool aGrabMouseEvents) MOZ_OVERRIDE;
virtual nscoord GetHeightOfARow() MOZ_OVERRIDE; virtual nscoord GetHeightOfARow() MOZ_OVERRIDE;
virtual int32_t GetNumberOfOptions() MOZ_OVERRIDE; virtual uint32_t GetNumberOfOptions() MOZ_OVERRIDE;
virtual void AboutToDropDown() MOZ_OVERRIDE; virtual void AboutToDropDown() MOZ_OVERRIDE;
/** /**

View File

@@ -444,7 +444,7 @@ nsTextControlFrame::AppendAnonymousContentTo(nsBaseContentList& aElements,
nscoord nscoord
nsTextControlFrame::GetPrefWidth(nsRenderingContext* aRenderingContext) nsTextControlFrame::GetPrefWidth(nsRenderingContext* aRenderingContext)
{ {
nscoord result = 0; DebugOnly<nscoord> result = 0;
DISPLAY_PREF_WIDTH(this, result); DISPLAY_PREF_WIDTH(this, result);
float inflation = nsLayoutUtils::FontSizeInflationFor(this); float inflation = nsLayoutUtils::FontSizeInflationFor(this);

View File

@@ -16,7 +16,6 @@ LIBRARY_NAME = gkgeneric_s
LIBXUL_LIBRARY = 1 LIBXUL_LIBRARY = 1
EXPORTS = \ EXPORTS = \
nsQueryFrame.h \ nsQueryFrame.h \
nsFrameIdList.h \ nsFrameIdList.h \

View File

@@ -364,12 +364,6 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat
AutoNoisyIndenter indent(nsBlockFrame::gNoisy); AutoNoisyIndenter indent(nsBlockFrame::gNoisy);
#endif // DEBUG #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; nsresult rv;
// Get the border values // Get the border values
const nsMargin& border = aReflowState.mStyleBorder->GetComputedBorder(); const nsMargin& border = aReflowState.mStyleBorder->GetComputedBorder();
@@ -381,7 +375,7 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat
availWidth = availWidth =
aReflowState.ComputedWidth() + aReflowState.mComputedPadding.LeftRight(); aReflowState.ComputedWidth() + aReflowState.mComputedPadding.LeftRight();
} }
nsHTMLReflowMetrics kidDesiredSize; nsHTMLReflowMetrics kidDesiredSize;
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, aKidFrame, nsHTMLReflowState kidReflowState(aPresContext, aReflowState, aKidFrame,
nsSize(availWidth, NS_UNCONSTRAINEDSIZE), nsSize(availWidth, NS_UNCONSTRAINEDSIZE),

View File

@@ -1553,13 +1553,13 @@ IsAlignedLeft(uint8_t aAlignment,
uint8_t aUnicodeBidi, uint8_t aUnicodeBidi,
nsIFrame* aFrame) nsIFrame* aFrame)
{ {
return (aFrame->IsSVGText() || return aFrame->IsSVGText() ||
NS_STYLE_TEXT_ALIGN_LEFT == aAlignment || NS_STYLE_TEXT_ALIGN_LEFT == aAlignment ||
((NS_STYLE_TEXT_ALIGN_DEFAULT == aAlignment && (((NS_STYLE_TEXT_ALIGN_DEFAULT == aAlignment &&
NS_STYLE_DIRECTION_LTR == aDirection) || NS_STYLE_DIRECTION_LTR == aDirection) ||
(NS_STYLE_TEXT_ALIGN_END == aAlignment && (NS_STYLE_TEXT_ALIGN_END == aAlignment &&
NS_STYLE_DIRECTION_RTL == aDirection)) && NS_STYLE_DIRECTION_RTL == aDirection)) &&
!(NS_STYLE_UNICODE_BIDI_PLAINTEXT & aUnicodeBidi)); !(NS_STYLE_UNICODE_BIDI_PLAINTEXT & aUnicodeBidi));
} }
nsresult 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 // 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 // a call to RemoveFrame(), but we may not need to do this in all
// cases... // cases...
nsRect visOverflow(cur->GetVisualOverflowArea());
#ifdef NOISY_BLOCK_INVALIDATE #ifdef NOISY_BLOCK_INVALIDATE
nsRect visOverflow(cur->GetVisualOverflowArea());
printf("%p invalidate 10 (%d, %d, %d, %d)\n", printf("%p invalidate 10 (%d, %d, %d, %d)\n",
this, visOverflow.x, visOverflow.y, this, visOverflow.x, visOverflow.y,
visOverflow.width, visOverflow.height); visOverflow.width, visOverflow.height);

View File

@@ -804,8 +804,8 @@ nsBlockReflowState::FlowAndPlaceFloat(nsIFrame* aFloat)
(NS_UNCONSTRAINEDSIZE != mContentArea.height)) { (NS_UNCONSTRAINEDSIZE != mContentArea.height)) {
region.height = NS_MAX(region.height, mContentArea.height - floatY); region.height = NS_MAX(region.height, mContentArea.height - floatY);
} }
nsresult rv = DebugOnly<nsresult> rv =
mFloatManager->AddFloat(aFloat, region); mFloatManager->AddFloat(aFloat, region);
NS_ABORT_IF_FALSE(NS_SUCCEEDED(rv), "bad float placement"); NS_ABORT_IF_FALSE(NS_SUCCEEDED(rv), "bad float placement");
// store region // store region
nsFloatManager::StoreRegionFor(aFloat, region); nsFloatManager::StoreRegionFor(aFloat, region);

View File

@@ -439,7 +439,6 @@ nsCanvasFrame::Reflow(nsPresContext* aPresContext,
aDesiredSize.width = aDesiredSize.height = 0; aDesiredSize.width = aDesiredSize.height = 0;
} else { } else {
nsIFrame* kidFrame = mFrames.FirstChild(); nsIFrame* kidFrame = mFrames.FirstChild();
nsRect oldKidRect = kidFrame->GetRect();
bool kidDirty = (kidFrame->GetStateBits() & NS_FRAME_IS_DIRTY) != 0; bool kidDirty = (kidFrame->GetStateBits() & NS_FRAME_IS_DIRTY) != 0;
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, kidFrame, nsHTMLReflowState kidReflowState(aPresContext, aReflowState, kidFrame,

View File

@@ -3054,14 +3054,11 @@ nsXULScrollFrame::LayoutScrollArea(nsBoxLayoutState& aState,
mInner.mScrollPort.Size()); mInner.mScrollPort.Size());
int32_t flags = NS_FRAME_NO_MOVE_VIEW; int32_t flags = NS_FRAME_NO_MOVE_VIEW;
nsRect originalRect = mInner.mScrolledFrame->GetRect();
nsRect originalVisOverflow = mInner.mScrolledFrame->GetVisualOverflowRect();
nsSize minSize = mInner.mScrolledFrame->GetMinSize(aState); nsSize minSize = mInner.mScrolledFrame->GetMinSize(aState);
if (minSize.height > childRect.height) if (minSize.height > childRect.height)
childRect.height = minSize.height; childRect.height = minSize.height;
if (minSize.width > childRect.width) if (minSize.width > childRect.width)
childRect.width = minSize.width; childRect.width = minSize.width;

View File

@@ -1261,8 +1261,8 @@ nsObjectFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
} }
nsRefPtr<ImageContainer> container = GetImageContainer(); nsRefPtr<ImageContainer> container = GetImageContainer();
if (container && container->HasCurrentImage() || !isVisible || if (container && (container->HasCurrentImage() || !isVisible ||
container->GetCurrentSize() != gfxIntSize(window->width, window->height)) { container->GetCurrentSize() != gfxIntSize(window->width, window->height))) {
mInstanceOwner->NotifyPaintWaiter(aBuilder); mInstanceOwner->NotifyPaintWaiter(aBuilder);
} }
} }

View File

@@ -86,10 +86,10 @@ NS_IMPL_FRAMEARENA_HELPERS(nsSimplePageSequenceFrame)
nsSimplePageSequenceFrame::nsSimplePageSequenceFrame(nsStyleContext* aContext) : nsSimplePageSequenceFrame::nsSimplePageSequenceFrame(nsStyleContext* aContext) :
nsContainerFrame(aContext), nsContainerFrame(aContext),
mTotalPages(-1), mTotalPages(-1),
mCurrentCanvasListSetup(false),
mSelectionHeight(-1), mSelectionHeight(-1),
mYSelOffset(0), mYSelOffset(0),
mCalledBeginPage(false) mCalledBeginPage(false),
mCurrentCanvasListSetup(false)
{ {
nscoord halfInch = PresContext()->CSSTwipsToAppUnits(NS_INCHES_TO_TWIPS(0.5)); nscoord halfInch = PresContext()->CSSTwipsToAppUnits(NS_INCHES_TO_TWIPS(0.5));
mMargin.SizeTo(halfInch, halfInch, halfInch, halfInch); mMargin.SizeTo(halfInch, halfInch, halfInch, halfInch);

View File

@@ -165,8 +165,8 @@ nsTextFrameUtils::TransformText(const uint8_t* aText, uint32_t aLength,
uint32_t i; uint32_t i;
for (i = 0; i < aLength; ++i) { for (i = 0; i < aLength; ++i) {
uint8_t ch = *aText++; uint8_t ch = *aText++;
if (IsDiscardable(ch, &flags) || if (IsDiscardable(ch, &flags) ||
ch == '\n' && aCompression == DISCARD_NEWLINE) { (ch == '\n' && aCompression == DISCARD_NEWLINE)) {
aSkipChars->SkipChar(); aSkipChars->SkipChar();
} else { } else {
aSkipChars->KeepChar(); aSkipChars->KeepChar();

View File

@@ -235,7 +235,10 @@ ViewportFrame::Reflow(nsPresContext* aPresContext,
// Make a copy of the reflow state and change the computed width and height // Make a copy of the reflow state and change the computed width and height
// to reflect the available space for the fixed items // to reflect the available space for the fixed items
nsHTMLReflowState reflowState(aReflowState); nsHTMLReflowState reflowState(aReflowState);
nsPoint offset = AdjustReflowStateForScrollbars(&reflowState); #ifdef DEBUG
nsPoint offset =
#endif
AdjustReflowStateForScrollbars(&reflowState);
if (IsAbsoluteContainer()) { if (IsAbsoluteContainer()) {
NS_ASSERTION(GetAbsoluteContainingBlock()->GetChildList().IsEmpty() || NS_ASSERTION(GetAbsoluteContainingBlock()->GetChildList().IsEmpty() ||

View File

@@ -13,6 +13,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = inspector MODULE = inspector
LIBRARY_NAME = inspector_s LIBRARY_NAME = inspector_s
LIBXUL_LIBRARY = 1 LIBXUL_LIBRARY = 1
FAIL_ON_WARNINGS = 1
EXPORTS = \ EXPORTS = \
nsFontFace.h \ nsFontFace.h \

View File

@@ -14,6 +14,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = layout MODULE = layout
LIBRARY_NAME = gkmathml_s LIBRARY_NAME = gkmathml_s
LIBXUL_LIBRARY = 1 LIBXUL_LIBRARY = 1
FAIL_ON_WARNINGS = 1
LOCAL_INCLUDES = \ LOCAL_INCLUDES = \

View File

@@ -109,8 +109,7 @@ LoadProperties(const nsString& aName,
class nsGlyphTable { class nsGlyphTable {
public: public:
explicit nsGlyphTable(const nsString& aPrimaryFontName) 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), mState(NS_TABLE_STATE_EMPTY),
mCharCache(0) mCharCache(0)
{ {
@@ -172,14 +171,11 @@ private:
nsGlyphCode ElementAt(nsPresContext* aPresContext, nsMathMLChar* aChar, nsGlyphCode ElementAt(nsPresContext* aPresContext, nsMathMLChar* aChar,
uint32_t aPosition); 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 // mFontName[0] is the primary font associated to this table. The others
// are possible "external" fonts for glyphs not in the primary font // are possible "external" fonts for glyphs not in the primary font
// but which are needed to stretch certain characters in the table // but which are needed to stretch certain characters in the table
nsTArray<nsString> mFontName; nsTArray<nsString> mFontName;
// Tri-state variable for error/empty/ready // Tri-state variable for error/empty/ready
int32_t mState; int32_t mState;
@@ -199,8 +195,7 @@ private:
// mGlyphCache excludes the '@' symbol and explicitly inserts all optional '0' // mGlyphCache excludes the '@' symbol and explicitly inserts all optional '0'
// that indicates the primary font identifier. Specifically therefore, the // that indicates the primary font identifier. Specifically therefore, the
// k-th glyph is characterized by : // k-th glyph is characterized by :
// 1) mGlyphCache[3*k],mGlyphCache[3*k+1] : its Unicode point (or glyph index // 1) mGlyphCache[3*k],mGlyphCache[3*k+1] : its Unicode point
// -- depending on mType),
// 2) mGlyphCache[3*k+2] : the numeric identifier of the font where it comes // 2) mGlyphCache[3*k+2] : the numeric identifier of the font where it comes
// from. // from.
// A font identifier of '0' means the default primary font associated to this // A font identifier of '0' means the default primary font associated to this

View File

@@ -14,7 +14,7 @@ XPIDL_MODULE = layout_printing
GRE_MODULE = 1 GRE_MODULE = 1
LIBRARY_NAME = gkprinting_s LIBRARY_NAME = gkprinting_s
LIBXUL_LIBRARY = 1 LIBXUL_LIBRARY = 1
FAIL_ON_WARNINGS = 1
XPIDLSRCS = \ XPIDLSRCS = \
nsIPrintProgress.idl \ nsIPrintProgress.idl \

View File

@@ -1245,7 +1245,7 @@ nsComputedDOMStyle::DoGetFontWeight()
uint16_t weight = font->mFont.weight; uint16_t weight = font->mFont.weight;
NS_ASSERTION(weight % 100 == 0, "unexpected value of font-weight"); NS_ASSERTION(weight % 100 == 0, "unexpected value of font-weight");
val->SetNumber(font->mFont.weight); val->SetNumber(weight);
return val; return val;
} }

View File

@@ -13,7 +13,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = layout MODULE = layout
LIBRARY_NAME = gkxulbase_s LIBRARY_NAME = gkxulbase_s
LIBXUL_LIBRARY = 1 LIBXUL_LIBRARY = 1
FAIL_ON_WARNINGS = 1
ifdef MOZ_XUL ifdef MOZ_XUL