mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1453795 - Layout - Initialize member fields in classes/ structures. r=dbaron
This commit is contained in:
parent
b29a806017
commit
5e3e0d4498
@ -826,6 +826,7 @@ PresShell::PresShell()
|
||||
, mScaleToResolution(false)
|
||||
, mIsLastChromeOnlyEscapeKeyConsumed(false)
|
||||
, mHasReceivedPaintMessage(false)
|
||||
, mIsLastKeyDownCanceled(false)
|
||||
, mHasHandledUserInput(false)
|
||||
#ifdef NIGHTLY_BUILD
|
||||
, mForceDispatchKeyPressEventsForNonPrintableKeys(false)
|
||||
|
@ -156,6 +156,7 @@ struct MOZ_STACK_CLASS BidiParagraphData
|
||||
, mRequiresBidi(false)
|
||||
, mParaLevel(nsBidiPresUtils::BidiLevelFromStyle(aBlockFrame->Style()))
|
||||
, mPrevContent(nullptr)
|
||||
, mPrevFrame(nullptr)
|
||||
#ifdef DEBUG
|
||||
, mCurrentBlock(aBlockFrame)
|
||||
#endif
|
||||
@ -2309,6 +2310,8 @@ public:
|
||||
, mTextRunConstructionDrawTarget(aTextRunConstructionDrawTarget)
|
||||
, mFontMetrics(aFontMetrics)
|
||||
, mPt(aPt)
|
||||
, mText(nullptr)
|
||||
, mLength(0)
|
||||
{}
|
||||
|
||||
~nsIRenderingContextBidiProcessor()
|
||||
|
@ -1834,9 +1834,6 @@ protected:
|
||||
bool mFontSizeInflationDisabledInMasterProcess;
|
||||
bool mFontSizeInflationEnabled;
|
||||
|
||||
// Dirty bit indicating that mFontSizeInflationEnabled needs to be recomputed.
|
||||
bool mFontSizeInflationEnabledIsDirty;
|
||||
|
||||
bool mPaintingIsFrozen;
|
||||
|
||||
// If a document belongs to an invisible DocShell, this flag must be set
|
||||
|
@ -8850,6 +8850,7 @@ AutoMaybeDisableFontInflation::AutoMaybeDisableFontInflation(nsIFrame *aFrame)
|
||||
} else {
|
||||
// indicate we have nothing to restore
|
||||
mPresContext = nullptr;
|
||||
mOldValue = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -193,6 +193,7 @@ nsPresContext::nsPresContext(nsIDocument* aDocument, nsPresContextType aType)
|
||||
mLastFontInflationScreenSize(gfxSize(-1.0, -1.0)),
|
||||
mCurAppUnitsPerDevPixel(0),
|
||||
mAutoQualityMinFontSizePixelsPref(0),
|
||||
mLangService(nsLanguageAtomService::GetService()),
|
||||
// origin nscoord_MIN is impossible, so the first ResizeReflow always fires
|
||||
mLastResizeEventVisibleArea(nsRect(nscoord_MIN, nscoord_MIN,
|
||||
NS_UNCONSTRAINEDSIZE,
|
||||
@ -244,6 +245,7 @@ nsPresContext::nsPresContext(nsIDocument* aDocument, nsPresContextType aType)
|
||||
mPendingThemeChanged(false),
|
||||
mPendingUIResolutionChanged(false),
|
||||
mPrefChangePendingNeedsReflow(false),
|
||||
mPostedPrefChangedRunnable(false),
|
||||
mIsEmulatingMedia(false),
|
||||
mIsGlyph(false),
|
||||
mUsesRootEMUnits(false),
|
||||
@ -880,8 +882,6 @@ nsPresContext::Init(nsDeviceContext* aDeviceContext)
|
||||
}
|
||||
}
|
||||
|
||||
mLangService = nsLanguageAtomService::GetService();
|
||||
|
||||
// Register callbacks so we're notified when the preferences change
|
||||
Preferences::RegisterPrefixCallback(nsPresContext::PrefChangedCallback,
|
||||
"font.",
|
||||
|
@ -30,6 +30,7 @@ using namespace mozilla::image;
|
||||
using namespace mozilla::layers;
|
||||
|
||||
nsButtonFrameRenderer::nsButtonFrameRenderer()
|
||||
: mFrame(nullptr)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsButtonFrameRenderer);
|
||||
}
|
||||
|
@ -40,6 +40,7 @@ class BlockReflowInput {
|
||||
, mIsOverflowContainer(false)
|
||||
, mIsFloatListInBlockPropertyTable(false)
|
||||
, mFloatFragmentsInsideColumnEnabled(false)
|
||||
, mCanHaveTextOverflow(false)
|
||||
{}
|
||||
|
||||
// Set in the BlockReflowInput constructor when the frame being reflowed has
|
||||
|
@ -62,6 +62,8 @@ ReflowInput::ReflowInput(nsPresContext* aPresContext,
|
||||
: SizeComputationInput(aFrame, aRenderingContext)
|
||||
, mBlockDelta(0)
|
||||
, mOrthogonalLimit(NS_UNCONSTRAINEDSIZE)
|
||||
, mAvailableWidth(0)
|
||||
, mAvailableHeight(0)
|
||||
, mContainingBlockSize(mWritingMode)
|
||||
, mReflowDepth(0)
|
||||
{
|
||||
@ -182,6 +184,8 @@ ReflowInput::ReflowInput(
|
||||
: SizeComputationInput(aFrame, aParentReflowInput.mRenderingContext)
|
||||
, mBlockDelta(0)
|
||||
, mOrthogonalLimit(NS_UNCONSTRAINEDSIZE)
|
||||
, mAvailableWidth(0)
|
||||
, mAvailableHeight(0)
|
||||
, mContainingBlockSize(mWritingMode)
|
||||
, mFlags(aParentReflowInput.mFlags)
|
||||
, mReflowDepth(aParentReflowInput.mReflowDepth + 1)
|
||||
|
@ -74,7 +74,7 @@ class MOZ_HEAP_CLASS TextOverflow final {
|
||||
typedef mozilla::LogicalRect LogicalRect;
|
||||
|
||||
struct AlignmentEdges {
|
||||
AlignmentEdges() : mAssigned(false) {}
|
||||
AlignmentEdges() : mIStart(0), mIEnd(0), mAssigned(false) {}
|
||||
void Accumulate(WritingMode aWM, const LogicalRect& aRect)
|
||||
{
|
||||
if (MOZ_LIKELY(mAssigned)) {
|
||||
@ -93,7 +93,11 @@ class MOZ_HEAP_CLASS TextOverflow final {
|
||||
};
|
||||
|
||||
struct InnerClipEdges {
|
||||
InnerClipEdges() : mAssignedIStart(false), mAssignedIEnd(false) {}
|
||||
InnerClipEdges()
|
||||
: mIStart(0)
|
||||
, mIEnd(0)
|
||||
, mAssignedIStart(false)
|
||||
, mAssignedIEnd(false) {}
|
||||
void AccumulateIStart(WritingMode aWM, const LogicalRect& aRect)
|
||||
{
|
||||
if (MOZ_LIKELY(mAssignedIStart)) {
|
||||
@ -234,6 +238,9 @@ class MOZ_HEAP_CLASS TextOverflow final {
|
||||
mInitialized = false;
|
||||
mISize = 0;
|
||||
mStyle = &aStyle;
|
||||
mIntrinsicISize = 0;
|
||||
mHasOverflow = false;
|
||||
mActive = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -31,7 +31,10 @@ nsBlockReflowContext::nsBlockReflowContext(nsPresContext* aPresContext,
|
||||
const ReflowInput& aParentRI)
|
||||
: mPresContext(aPresContext),
|
||||
mOuterReflowInput(aParentRI),
|
||||
mFrame(nullptr),
|
||||
mSpace(aParentRI.GetWritingMode()),
|
||||
mICoord(0),
|
||||
mBCoord(0),
|
||||
mMetrics(aParentRI)
|
||||
{
|
||||
}
|
||||
|
@ -204,6 +204,7 @@ public:
|
||||
BulletRenderer(imgIContainer* image, const nsRect& dest)
|
||||
: mImage(image)
|
||||
, mDest(dest)
|
||||
, mColor(NS_RGBA(0, 0, 0, 0))
|
||||
, mListStyleType(NS_STYLE_LIST_STYLE_NONE)
|
||||
{
|
||||
MOZ_ASSERT(IsImageType());
|
||||
|
@ -3618,7 +3618,10 @@ FlexboxAxisTracker::FlexboxAxisTracker(
|
||||
const nsFlexContainerFrame* aFlexContainer,
|
||||
const WritingMode& aWM,
|
||||
AxisTrackerFlags aFlags)
|
||||
: mWM(aWM),
|
||||
: mMainAxis(eAxis_LR),
|
||||
mWM(aWM),
|
||||
mIsRowOriented(true),
|
||||
mIsMainAxisReversed(false),
|
||||
mAreAxesInternallyReversed(false)
|
||||
{
|
||||
if (IsLegacyBox(aFlexContainer)) {
|
||||
|
@ -2374,6 +2374,8 @@ nsFloatManager::FloatInfo::FloatInfo(nsIFrame* aFrame,
|
||||
WritingMode aWM,
|
||||
const nsSize& aContainerSize)
|
||||
: mFrame(aFrame)
|
||||
, mLeftBEnd(nscoord_MIN)
|
||||
, mRightBEnd(nscoord_MIN)
|
||||
, mRect(ShapeInfo::ConvertToFloatLogical(aMarginRect, aWM, aContainerSize) +
|
||||
nsPoint(aLineLeft, aBlockStart))
|
||||
{
|
||||
|
@ -134,7 +134,15 @@ public:
|
||||
// Structure that stores the current state of a float manager for
|
||||
// Save/Restore purposes.
|
||||
struct SavedState {
|
||||
explicit SavedState() {}
|
||||
explicit SavedState()
|
||||
: mFloatInfoCount(0)
|
||||
, mLineLeft(0)
|
||||
, mBlockStart(0)
|
||||
, mPushedLeftFloatPastBreak(false)
|
||||
, mPushedRightFloatPastBreak(false)
|
||||
, mSplitLeftFloatAcrossBreak(false)
|
||||
, mSplitRightFloatAcrossBreak(false) {}
|
||||
|
||||
private:
|
||||
uint32_t mFloatInfoCount;
|
||||
nscoord mLineLeft, mBlockStart;
|
||||
|
@ -31,10 +31,13 @@ class nsRange;
|
||||
|
||||
struct SelectionDetails
|
||||
{
|
||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||
SelectionDetails() {
|
||||
SelectionDetails()
|
||||
: mStart()
|
||||
, mEnd()
|
||||
, mSelectionType(mozilla::SelectionType::eInvalid) {
|
||||
MOZ_COUNT_CTOR(SelectionDetails);
|
||||
}
|
||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||
~SelectionDetails() {
|
||||
MOZ_COUNT_DTOR(SelectionDetails);
|
||||
}
|
||||
|
@ -2086,6 +2086,7 @@ ScrollFrameHelper::ScrollFrameHelper(nsContainerFrame* aOuter,
|
||||
, mLastUpdateFramesPos(-1, -1)
|
||||
, mHadDisplayPortAtLastFrameUpdate(false)
|
||||
, mDisplayPortAtLastFrameUpdate()
|
||||
, mScrollParentID(mozilla::layers::FrameMetrics::NULL_SCROLL_ID)
|
||||
, mNeverHasVerticalScrollbar(false)
|
||||
, mNeverHasHorizontalScrollbar(false)
|
||||
, mHasVerticalScrollbar(false)
|
||||
@ -2107,6 +2108,7 @@ ScrollFrameHelper::ScrollFrameHelper(nsContainerFrame* aOuter,
|
||||
, mWillBuildScrollableLayer(false)
|
||||
, mIsScrollParent(false)
|
||||
, mIsScrollableLayerInRootContainer(false)
|
||||
, mAddClipRectToLayer(false)
|
||||
, mHasBeenScrolled(false)
|
||||
, mIgnoreMomentumScroll(false)
|
||||
, mTransformingByAPZ(false)
|
||||
|
@ -493,7 +493,10 @@ struct nsGridContainerFrame::LineRange
|
||||
int32_t mUntranslatedEnd;
|
||||
};
|
||||
protected:
|
||||
LineRange() {}
|
||||
LineRange()
|
||||
: mStart(0)
|
||||
, mEnd(0)
|
||||
{}
|
||||
};
|
||||
|
||||
/**
|
||||
@ -1061,7 +1064,9 @@ struct nsGridContainerFrame::TrackSizingFunctions
|
||||
struct nsGridContainerFrame::Tracks
|
||||
{
|
||||
explicit Tracks(LogicalAxis aAxis)
|
||||
: mStateUnion(TrackSize::StateBits(0))
|
||||
: mContentBoxSize(0)
|
||||
, mGridGap(0)
|
||||
, mStateUnion(TrackSize::StateBits(0))
|
||||
, mAxis(aAxis)
|
||||
, mCanResolveLineRangeSize(false)
|
||||
{
|
||||
|
@ -771,7 +771,11 @@ class nsLineList_iterator {
|
||||
typedef nsLineLink link_type;
|
||||
|
||||
#ifdef DEBUG
|
||||
nsLineList_iterator() { memset(&mCurrent, 0xcd, sizeof(mCurrent)); }
|
||||
nsLineList_iterator()
|
||||
: mListLink(nullptr)
|
||||
{
|
||||
memset(&mCurrent, 0xcd, sizeof(mCurrent));
|
||||
}
|
||||
#else
|
||||
// Auto generated default constructor OK.
|
||||
#endif
|
||||
@ -810,36 +814,42 @@ class nsLineList_iterator {
|
||||
|
||||
reference operator*()
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mCurrent != mListLink, "running past end");
|
||||
return *static_cast<pointer>(mCurrent);
|
||||
}
|
||||
|
||||
pointer operator->()
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mCurrent != mListLink, "running past end");
|
||||
return static_cast<pointer>(mCurrent);
|
||||
}
|
||||
|
||||
pointer get()
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mCurrent != mListLink, "running past end");
|
||||
return static_cast<pointer>(mCurrent);
|
||||
}
|
||||
|
||||
operator pointer()
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mCurrent != mListLink, "running past end");
|
||||
return static_cast<pointer>(mCurrent);
|
||||
}
|
||||
|
||||
const_reference operator*() const
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mCurrent != mListLink, "running past end");
|
||||
return *static_cast<const_pointer>(mCurrent);
|
||||
}
|
||||
|
||||
const_pointer operator->() const
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mCurrent != mListLink, "running past end");
|
||||
return static_cast<const_pointer>(mCurrent);
|
||||
}
|
||||
@ -847,6 +857,7 @@ class nsLineList_iterator {
|
||||
#ifndef __MWERKS__
|
||||
operator const_pointer() const
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mCurrent != mListLink, "running past end");
|
||||
return static_cast<const_pointer>(mCurrent);
|
||||
}
|
||||
@ -880,21 +891,25 @@ class nsLineList_iterator {
|
||||
// to keep AIX happy.
|
||||
bool operator==(const iterator_self_type aOther) const
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mListLink == aOther.mListLink, "comparing iterators over different lists");
|
||||
return mCurrent == aOther.mCurrent;
|
||||
}
|
||||
bool operator!=(const iterator_self_type aOther) const
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mListLink == aOther.mListLink, "comparing iterators over different lists");
|
||||
return mCurrent != aOther.mCurrent;
|
||||
}
|
||||
bool operator==(const iterator_self_type aOther)
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mListLink == aOther.mListLink, "comparing iterators over different lists");
|
||||
return mCurrent == aOther.mCurrent;
|
||||
}
|
||||
bool operator!=(const iterator_self_type aOther)
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mListLink == aOther.mListLink, "comparing iterators over different lists");
|
||||
return mCurrent != aOther.mCurrent;
|
||||
}
|
||||
@ -930,7 +945,11 @@ class nsLineList_reverse_iterator {
|
||||
typedef nsLineLink link_type;
|
||||
|
||||
#ifdef DEBUG
|
||||
nsLineList_reverse_iterator() { memset(&mCurrent, 0xcd, sizeof(mCurrent)); }
|
||||
nsLineList_reverse_iterator()
|
||||
: mListLink(nullptr)
|
||||
{
|
||||
memset(&mCurrent, 0xcd, sizeof(mCurrent));
|
||||
}
|
||||
#else
|
||||
// Auto generated default constructor OK.
|
||||
#endif
|
||||
@ -969,36 +988,42 @@ class nsLineList_reverse_iterator {
|
||||
|
||||
reference operator*()
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mCurrent != mListLink, "running past end");
|
||||
return *static_cast<pointer>(mCurrent);
|
||||
}
|
||||
|
||||
pointer operator->()
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mCurrent != mListLink, "running past end");
|
||||
return static_cast<pointer>(mCurrent);
|
||||
}
|
||||
|
||||
pointer get()
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mCurrent != mListLink, "running past end");
|
||||
return static_cast<pointer>(mCurrent);
|
||||
}
|
||||
|
||||
operator pointer()
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mCurrent != mListLink, "running past end");
|
||||
return static_cast<pointer>(mCurrent);
|
||||
}
|
||||
|
||||
const_reference operator*() const
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mCurrent != mListLink, "running past end");
|
||||
return *static_cast<const_pointer>(mCurrent);
|
||||
}
|
||||
|
||||
const_pointer operator->() const
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mCurrent != mListLink, "running past end");
|
||||
return static_cast<const_pointer>(mCurrent);
|
||||
}
|
||||
@ -1006,6 +1031,7 @@ class nsLineList_reverse_iterator {
|
||||
#ifndef __MWERKS__
|
||||
operator const_pointer() const
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mCurrent != mListLink, "running past end");
|
||||
return static_cast<const_pointer>(mCurrent);
|
||||
}
|
||||
@ -1015,21 +1041,25 @@ class nsLineList_reverse_iterator {
|
||||
// to keep AIX happy.
|
||||
bool operator==(const iterator_self_type aOther) const
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists");
|
||||
return mCurrent == aOther.mCurrent;
|
||||
}
|
||||
bool operator!=(const iterator_self_type aOther) const
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists");
|
||||
return mCurrent != aOther.mCurrent;
|
||||
}
|
||||
bool operator==(const iterator_self_type aOther)
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists");
|
||||
return mCurrent == aOther.mCurrent;
|
||||
}
|
||||
bool operator!=(const iterator_self_type aOther)
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists");
|
||||
return mCurrent != aOther.mCurrent;
|
||||
}
|
||||
@ -1066,7 +1096,11 @@ class nsLineList_const_iterator {
|
||||
typedef nsLineLink link_type;
|
||||
|
||||
#ifdef DEBUG
|
||||
nsLineList_const_iterator() { memset(&mCurrent, 0xcd, sizeof(mCurrent)); }
|
||||
nsLineList_const_iterator()
|
||||
: mListLink(nullptr)
|
||||
{
|
||||
memset(&mCurrent, 0xcd, sizeof(mCurrent));
|
||||
}
|
||||
#else
|
||||
// Auto generated default constructor OK.
|
||||
#endif
|
||||
@ -1109,18 +1143,21 @@ class nsLineList_const_iterator {
|
||||
|
||||
const_reference operator*() const
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mCurrent != mListLink, "running past end");
|
||||
return *static_cast<const_pointer>(mCurrent);
|
||||
}
|
||||
|
||||
const_pointer operator->() const
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mCurrent != mListLink, "running past end");
|
||||
return static_cast<const_pointer>(mCurrent);
|
||||
}
|
||||
|
||||
const_pointer get() const
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mCurrent != mListLink, "running past end");
|
||||
return static_cast<const_pointer>(mCurrent);
|
||||
}
|
||||
@ -1128,6 +1165,7 @@ class nsLineList_const_iterator {
|
||||
#ifndef __MWERKS__
|
||||
operator const_pointer() const
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mCurrent != mListLink, "running past end");
|
||||
return static_cast<const_pointer>(mCurrent);
|
||||
}
|
||||
@ -1149,21 +1187,25 @@ class nsLineList_const_iterator {
|
||||
// to keep AIX happy.
|
||||
bool operator==(const iterator_self_type aOther) const
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists");
|
||||
return mCurrent == aOther.mCurrent;
|
||||
}
|
||||
bool operator!=(const iterator_self_type aOther) const
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists");
|
||||
return mCurrent != aOther.mCurrent;
|
||||
}
|
||||
bool operator==(const iterator_self_type aOther)
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists");
|
||||
return mCurrent == aOther.mCurrent;
|
||||
}
|
||||
bool operator!=(const iterator_self_type aOther)
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists");
|
||||
return mCurrent != aOther.mCurrent;
|
||||
}
|
||||
@ -1200,7 +1242,11 @@ class nsLineList_const_reverse_iterator {
|
||||
typedef nsLineLink link_type;
|
||||
|
||||
#ifdef DEBUG
|
||||
nsLineList_const_reverse_iterator() { memset(&mCurrent, 0xcd, sizeof(mCurrent)); }
|
||||
nsLineList_const_reverse_iterator()
|
||||
: mListLink(nullptr)
|
||||
{
|
||||
memset(&mCurrent, 0xcd, sizeof(mCurrent));
|
||||
}
|
||||
#else
|
||||
// Auto generated default constructor OK.
|
||||
#endif
|
||||
@ -1243,18 +1289,21 @@ class nsLineList_const_reverse_iterator {
|
||||
|
||||
const_reference operator*() const
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mCurrent != mListLink, "running past end");
|
||||
return *static_cast<const_pointer>(mCurrent);
|
||||
}
|
||||
|
||||
const_pointer operator->() const
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mCurrent != mListLink, "running past end");
|
||||
return static_cast<const_pointer>(mCurrent);
|
||||
}
|
||||
|
||||
const_pointer get() const
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mCurrent != mListLink, "running past end");
|
||||
return static_cast<const_pointer>(mCurrent);
|
||||
}
|
||||
@ -1262,6 +1311,7 @@ class nsLineList_const_reverse_iterator {
|
||||
#ifndef __MWERKS__
|
||||
operator const_pointer() const
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
MOZ_ASSERT(mCurrent != mListLink, "running past end");
|
||||
return static_cast<const_pointer>(mCurrent);
|
||||
}
|
||||
@ -1271,21 +1321,25 @@ class nsLineList_const_reverse_iterator {
|
||||
// to keep AIX happy.
|
||||
bool operator==(const iterator_self_type aOther) const
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists");
|
||||
return mCurrent == aOther.mCurrent;
|
||||
}
|
||||
bool operator!=(const iterator_self_type aOther) const
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists");
|
||||
return mCurrent != aOther.mCurrent;
|
||||
}
|
||||
bool operator==(const iterator_self_type aOther)
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists");
|
||||
return mCurrent == aOther.mCurrent;
|
||||
}
|
||||
bool operator!=(const iterator_self_type aOther)
|
||||
{
|
||||
MOZ_ASSERT(mListLink);
|
||||
NS_ASSERTION(mListLink == aOther.mListLink, "comparing iterators over different lists");
|
||||
return mCurrent != aOther.mCurrent;
|
||||
}
|
||||
|
@ -62,6 +62,9 @@ nsLineLayout::nsLineLayout(nsPresContext* aPresContext,
|
||||
mForceBreakFrameOffset(-1),
|
||||
mMinLineBSize(0),
|
||||
mTextIndent(0),
|
||||
mMaxStartBoxBSize(0),
|
||||
mMaxEndBoxBSize(0),
|
||||
mFinalLineBSize(0),
|
||||
mFirstLetterStyleOK(false),
|
||||
mIsTopOfPage(false),
|
||||
mImpactedByFloats(false),
|
||||
@ -77,6 +80,13 @@ nsLineLayout::nsLineLayout(nsPresContext* aPresContext,
|
||||
mLineAtStart(false),
|
||||
mHasRuby(false),
|
||||
mSuppressLineWrap(nsSVGUtils::IsInSVGTextSubtree(aOuterReflowInput->mFrame))
|
||||
#ifdef DEBUG
|
||||
,
|
||||
mSpansAllocated(0),
|
||||
mSpansFreed(0),
|
||||
mFramesAllocated(0),
|
||||
mFramesFreed(0)
|
||||
#endif
|
||||
{
|
||||
MOZ_ASSERT(aOuterReflowInput, "aOuterReflowInput must not be null");
|
||||
NS_ASSERTION(aFloatManager || aOuterReflowInput->mFrame->IsLetterFrame(),
|
||||
|
@ -425,7 +425,6 @@ protected:
|
||||
|
||||
// Selection data
|
||||
|
||||
int16_t mSelectionStatus; // see nsIDocument.h SetDisplaySelection()
|
||||
nscolor mSelectionTextColor;
|
||||
nscolor mSelectionBGColor;
|
||||
RefPtr<nsCSSShadowArray> mSelectionShadow;
|
||||
@ -1004,7 +1003,9 @@ public:
|
||||
mCommonAncestorWithLastFrame(nullptr),
|
||||
mMissingFonts(aPresContext->MissingFontRecorder()),
|
||||
mBidiEnabled(aPresContext->BidiEnabled()),
|
||||
mStartOfLine(true),
|
||||
mSkipIncompleteTextRuns(false),
|
||||
mCanStopOnThisLine(false),
|
||||
mWhichTextRun(aWhichTextRun),
|
||||
mNextRunContextInfo(nsTextFrameUtils::INCOMING_NONE),
|
||||
mCurrentRunContextInfo(nsTextFrameUtils::INCOMING_NONE) {
|
||||
@ -3099,6 +3100,7 @@ public:
|
||||
mLetterSpacing(LetterSpacing(aFrame, aTextStyle)),
|
||||
mHyphenWidth(-1),
|
||||
mOffsetFromBlockOriginForTabs(aOffsetFromBlockOriginForTabs),
|
||||
mJustificationArrayStart(0),
|
||||
mReflowing(true),
|
||||
mWhichTextRun(aWhichTextRun)
|
||||
{
|
||||
@ -3123,6 +3125,7 @@ public:
|
||||
mLetterSpacing(LetterSpacing(aFrame)),
|
||||
mHyphenWidth(-1),
|
||||
mOffsetFromBlockOriginForTabs(0),
|
||||
mJustificationArrayStart(0),
|
||||
mReflowing(false),
|
||||
mWhichTextRun(aWhichTextRun)
|
||||
{
|
||||
@ -3755,7 +3758,13 @@ nsTextPaintStyle::nsTextPaintStyle(nsTextFrame* aFrame)
|
||||
mInitCommonColors(false),
|
||||
mInitSelectionColorsAndShadow(false),
|
||||
mResolveColors(true),
|
||||
mHasSelectionShadow(false)
|
||||
mSelectionTextColor(NS_RGBA(0, 0, 0, 0)),
|
||||
mSelectionBGColor(NS_RGBA(0, 0, 0, 0)),
|
||||
mHasSelectionShadow(false),
|
||||
mSufficientContrast(0),
|
||||
mFrameBackgroundColor(NS_RGBA(0, 0, 0, 0)),
|
||||
mSystemFieldForegroundColor(NS_RGBA(0, 0, 0, 0)),
|
||||
mSystemFieldBackgroundColor(NS_RGBA(0, 0, 0, 0))
|
||||
{
|
||||
for (uint32_t i = 0; i < ArrayLength(mSelectionStyle); i++)
|
||||
mSelectionStyle[i].mInit = false;
|
||||
@ -8169,7 +8178,8 @@ ClusterIterator::NextCluster()
|
||||
|
||||
ClusterIterator::ClusterIterator(nsTextFrame* aTextFrame, int32_t aPosition,
|
||||
int32_t aDirection, nsString& aContext)
|
||||
: mTextFrame(aTextFrame), mDirection(aDirection), mCharIndex(-1)
|
||||
: mTextFrame(aTextFrame), mDirection(aDirection), mCharIndex(-1),
|
||||
mHaveWordBreak(false)
|
||||
{
|
||||
mIterator = aTextFrame->EnsureTextRun(nsTextFrame::eInflated);
|
||||
if (!aTextFrame->GetTextRun(nsTextFrame::eInflated)) {
|
||||
|
@ -164,7 +164,7 @@ public:
|
||||
nsSkipCharsRunIterator(const gfxSkipCharsIterator& aStart,
|
||||
LengthMode aLengthIncludesSkipped, uint32_t aLength)
|
||||
: mIterator(aStart), mRemainingLength(aLength), mRunLength(0),
|
||||
mVisitSkipped(false),
|
||||
mSkipped(false), mVisitSkipped(false),
|
||||
mLengthIncludesSkipped(aLengthIncludesSkipped) {
|
||||
}
|
||||
void SetVisitSkipped() { mVisitSkipped = true; }
|
||||
|
@ -28,6 +28,7 @@ inDeepTreeWalker::inDeepTreeWalker()
|
||||
: mShowAnonymousContent(false),
|
||||
mShowSubDocuments(false),
|
||||
mShowDocumentsAsNodes(false),
|
||||
mCurrentIndex(-1),
|
||||
mWhatToShow(mozilla::dom::NodeFilter_Binding::SHOW_ALL)
|
||||
{
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
nsPrintObject::nsPrintObject() :
|
||||
mContent(nullptr), mFrameType(eFrame), mParent(nullptr),
|
||||
mHasBeenPrinted(false), mDontPrint(true), mPrintAsIs(false),
|
||||
mInvisible(false), mDidCreateDocShell(false),
|
||||
mInvisible(false), mPrintPreview(false), mDidCreateDocShell(false),
|
||||
mShrinkRatio(1.0), mZoomRatio(1.0)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsPrintObject);
|
||||
|
@ -559,7 +559,8 @@ class nsCellMapColumnIterator
|
||||
public:
|
||||
nsCellMapColumnIterator(const nsTableCellMap* aMap, int32_t aCol) :
|
||||
mMap(aMap), mCurMap(aMap->mFirstMap), mCurMapStart(0),
|
||||
mCurMapRow(0), mCol(aCol), mFoundCells(0)
|
||||
mCurMapRow(0), mCol(aCol), mFoundCells(0),
|
||||
mCurMapContentRowCount(0), mCurMapRelevantRowCount(0)
|
||||
{
|
||||
MOZ_ASSERT(aMap, "Must have map");
|
||||
MOZ_ASSERT(mCol < aMap->GetColCount(), "Invalid column");
|
||||
|
@ -4569,6 +4569,9 @@ BCMapCellInfo::BCMapCellInfo(nsTableFrame* aTableFrame)
|
||||
, mNumTableCols(aTableFrame->GetColCount())
|
||||
, mTableBCData(mTableFrame->GetProperty(TableBCProperty()))
|
||||
, mTableWM(aTableFrame->Style())
|
||||
, mCurrentRowFrame(nullptr)
|
||||
, mCurrentColGroupFrame(nullptr)
|
||||
, mCurrentColFrame(nullptr)
|
||||
{
|
||||
ResetCellInfo();
|
||||
}
|
||||
@ -4653,7 +4656,13 @@ private:
|
||||
|
||||
BCMapCellIterator::BCMapCellIterator(nsTableFrame* aTableFrame,
|
||||
const TableArea& aDamageArea)
|
||||
: mTableFrame(aTableFrame)
|
||||
: mRowGroupStart(0)
|
||||
, mRowGroupEnd(0)
|
||||
, mCellMap(nullptr)
|
||||
, mTableFrame(aTableFrame)
|
||||
, mRowGroup(nullptr)
|
||||
, mPrevRow(nullptr)
|
||||
, mIsNewRow(false)
|
||||
{
|
||||
mTableCellMap = aTableFrame->GetCellMap();
|
||||
|
||||
@ -5299,7 +5308,7 @@ struct BCCornerInfo
|
||||
uint32_t hasDashDot:1; // does a dashed, dotted segment enter the corner, they cannot be beveled
|
||||
uint32_t numSegs:3; // number of segments entering corner
|
||||
uint32_t bevel:1; // is the corner beveled (uses the above two fields together with subWidth)
|
||||
uint32_t unused:1;
|
||||
// one bit is unused
|
||||
};
|
||||
|
||||
void
|
||||
@ -6797,7 +6806,32 @@ BCPaintBorderIterator::BCPaintBorderIterator(nsTableFrame* aTable)
|
||||
: mTable(aTable)
|
||||
, mTableFirstInFlow(static_cast<nsTableFrame*>(aTable->FirstInFlow()))
|
||||
, mTableCellMap(aTable->GetCellMap())
|
||||
, mCellMap(nullptr)
|
||||
, mTableWM(aTable->Style())
|
||||
, mPrevRg(nullptr)
|
||||
, mRg(nullptr)
|
||||
, mIsRepeatedHeader(false)
|
||||
, mIsRepeatedFooter(false)
|
||||
, mStartRg(nullptr)
|
||||
, mRgIndex(0)
|
||||
, mFifRgFirstRowIndex(0)
|
||||
, mRgFirstRowIndex(0)
|
||||
, mRgLastRowIndex(0)
|
||||
, mColIndex(0)
|
||||
, mRowIndex(0)
|
||||
, mIsNewRow(false)
|
||||
, mAtEnd(false)
|
||||
, mPrevRow(nullptr)
|
||||
, mRow(nullptr)
|
||||
, mStartRow(nullptr)
|
||||
, mPrevCell(nullptr)
|
||||
, mCell(nullptr)
|
||||
, mPrevCellData(nullptr)
|
||||
, mCellData(nullptr)
|
||||
, mBCData(nullptr)
|
||||
, mInitialOffsetI(0)
|
||||
, mNextOffsetB(0)
|
||||
, mPrevInlineSegBSize(0)
|
||||
{
|
||||
mBlockDirInfo = nullptr;
|
||||
LogicalMargin childAreaOffset = mTable->GetChildAreaOffset(mTableWM, nullptr);
|
||||
@ -7217,6 +7251,11 @@ CalcHorCornerOffset(nsPresContext* aPresContext,
|
||||
}
|
||||
|
||||
BCBlockDirSeg::BCBlockDirSeg()
|
||||
: mFirstRowGroup(nullptr)
|
||||
, mFirstRow(nullptr)
|
||||
, mBEndInlineSegBSize(0)
|
||||
, mBEndOffset(0)
|
||||
, mIsBEndBevel(false)
|
||||
{
|
||||
mCol = nullptr;
|
||||
mFirstCell = mLastCell = mAjaCell = nullptr;
|
||||
@ -7546,6 +7585,11 @@ BCBlockDirSeg::IncludeCurrentBorder(BCPaintBorderIterator& aIter)
|
||||
}
|
||||
|
||||
BCInlineDirSeg::BCInlineDirSeg()
|
||||
: mIsIEndBevel(false)
|
||||
, mIEndBevelOffset(0)
|
||||
, mIEndBevelSide(eLogicalSideBStart)
|
||||
, mEndOffset(0)
|
||||
, mOwner(eTableOwner)
|
||||
{
|
||||
mOffsetI = mOffsetB = mLength = mWidth = mIStartBevelOffset = 0;
|
||||
mIStartBevelSide = eLogicalSideBStart;
|
||||
|
@ -74,7 +74,9 @@ private:
|
||||
class nsAutoPushCurrentTableItem
|
||||
{
|
||||
public:
|
||||
nsAutoPushCurrentTableItem() : mBuilder(nullptr) {}
|
||||
nsAutoPushCurrentTableItem()
|
||||
: mBuilder(nullptr)
|
||||
, mOldCurrentItem(nullptr) {}
|
||||
|
||||
void Push(nsDisplayListBuilder* aBuilder, nsDisplayTableItem* aPushItem)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user