зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1232696 - Remove NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW as it causes segfaulting for GCC 6 builds (3 of 5, fixes for layout/). r=dholbert.
This commit is contained in:
Родитель
6f7fcae338
Коммит
ebea2b59c1
|
@ -768,8 +768,80 @@ PresShell::AccessibleCaretEnabled(nsIDocShell* aDocShell)
|
|||
return false;
|
||||
}
|
||||
|
||||
nsIPresShell::nsIPresShell()
|
||||
: mFrameConstructor(nullptr)
|
||||
, mViewManager(nullptr)
|
||||
, mFrameManager(nullptr)
|
||||
, mHiddenInvalidationObserverRefreshDriver(nullptr)
|
||||
#ifdef ACCESSIBILITY
|
||||
, mDocAccessible(nullptr)
|
||||
#endif
|
||||
#ifdef DEBUG
|
||||
, mDrawEventTargetFrame(nullptr)
|
||||
#endif
|
||||
, mPaintCount(0)
|
||||
, mWeakFrames(nullptr)
|
||||
, mCanvasBackgroundColor(NS_RGBA(0,0,0,0))
|
||||
, mSelectionFlags(0)
|
||||
, mRenderFlags(0)
|
||||
, mStylesHaveChanged(false)
|
||||
, mDidInitialize(false)
|
||||
, mIsDestroying(false)
|
||||
, mIsReflowing(false)
|
||||
, mPaintingSuppressed(false)
|
||||
, mIsThemeSupportDisabled(false)
|
||||
, mIsActive(false)
|
||||
, mFrozen(false)
|
||||
, mIsFirstPaint(false)
|
||||
, mObservesMutationsForPrint(false)
|
||||
, mReflowScheduled(false)
|
||||
, mSuppressInterruptibleReflows(false)
|
||||
, mScrollPositionClampingScrollPortSizeSet(false)
|
||||
, mPresShellId(0)
|
||||
, mFontSizeInflationEmPerLine(0)
|
||||
, mFontSizeInflationMinTwips(0)
|
||||
, mFontSizeInflationLineThreshold(0)
|
||||
, mFontSizeInflationForceEnabled(false)
|
||||
, mFontSizeInflationDisabledInMasterProcess(false)
|
||||
, mFontSizeInflationEnabled(false)
|
||||
, mPaintingIsFrozen(false)
|
||||
, mFontSizeInflationEnabledIsDirty(false)
|
||||
, mIsNeverPainting(false)
|
||||
{}
|
||||
|
||||
PresShell::PresShell()
|
||||
: mMouseLocation(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE)
|
||||
: mCaretEnabled(false)
|
||||
#ifdef DEBUG
|
||||
, mInVerifyReflow(false)
|
||||
, mCurrentReflowRoot(nullptr)
|
||||
, mUpdateCount(0)
|
||||
#endif
|
||||
#ifdef MOZ_REFLOW_PERF
|
||||
, mReflowCountMgr(nullptr)
|
||||
#endif
|
||||
, mMouseLocation(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE)
|
||||
, mCurrentEventFrame(nullptr)
|
||||
, mFirstCallbackEventRequest(nullptr)
|
||||
, mLastCallbackEventRequest(nullptr)
|
||||
, mLastReflowStart(0.0)
|
||||
, mLastAnchorScrollPositionY(0)
|
||||
, mChangeNestCount(0)
|
||||
, mDocumentLoading(false)
|
||||
, mIgnoreFrameDestruction(false)
|
||||
, mHaveShutDown(false)
|
||||
, mLastRootReflowHadUnconstrainedBSize(false)
|
||||
, mNoDelayedMouseEvents(false)
|
||||
, mNoDelayedKeyEvents(false)
|
||||
, mIsDocumentGone(false)
|
||||
, mShouldUnsuppressPainting(false)
|
||||
, mAsyncResizeTimerIsActive(false)
|
||||
, mInResize(false)
|
||||
, mApproximateFrameVisibilityVisited(false)
|
||||
, mNextPaintCompressed(false)
|
||||
, mHasCSSBackgroundColor(false)
|
||||
, mScaleToResolution(false)
|
||||
, mIsLastChromeOnlyEscapeKeyConsumed(false)
|
||||
, mHasReceivedPaintMessage(false)
|
||||
{
|
||||
#ifdef MOZ_REFLOW_PERF
|
||||
mReflowCountMgr = new ReflowCountMgr();
|
||||
|
|
|
@ -84,8 +84,6 @@ class PresShell final : public nsIPresShell,
|
|||
public:
|
||||
PresShell();
|
||||
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
// nsISupports
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
|
|
|
@ -225,8 +225,6 @@ class nsDocumentViewer final : public nsIContentViewer,
|
|||
public:
|
||||
nsDocumentViewer();
|
||||
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
// nsISupports interface...
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
|
@ -506,14 +504,36 @@ void nsDocumentViewer::PrepareToStartLoad()
|
|||
#endif // NS_PRINTING
|
||||
}
|
||||
|
||||
// Note: operator new zeros our memory, so no need to init things to null.
|
||||
nsDocumentViewer::nsDocumentViewer()
|
||||
: mTextZoom(1.0), mPageZoom(1.0), mOverrideDPPX(0.0), mMinFontSize(0),
|
||||
: mParentWidget(nullptr),
|
||||
mAttachedToParent(false),
|
||||
mTextZoom(1.0),
|
||||
mPageZoom(1.0),
|
||||
mOverrideDPPX(0.0),
|
||||
mMinFontSize(0),
|
||||
mNumURLStarts(0),
|
||||
mDestroyRefCount(0),
|
||||
mStopped(false),
|
||||
mLoaded(false),
|
||||
mDeferredWindowClose(false),
|
||||
mIsSticky(true),
|
||||
#ifdef NS_PRINT_PREVIEW
|
||||
mInPermitUnload(false),
|
||||
mInPermitUnloadPrompt(false),
|
||||
#ifdef NS_PRINTING
|
||||
mClosingWhilePrinting(false),
|
||||
#if NS_PRINT_PREVIEW
|
||||
mPrintPreviewZoomed(false),
|
||||
mPrintIsPending(false),
|
||||
mPrintDocIsFullyLoaded(false),
|
||||
mOriginalPrintPreviewScale(0.0),
|
||||
mPrintPreviewZoom(1.0),
|
||||
#endif
|
||||
#endif // NS_PRINT_PREVIEW
|
||||
#ifdef DEBUG
|
||||
mDebugFile(nullptr),
|
||||
#endif // DEBUG
|
||||
#endif // NS_PRINTING
|
||||
mHintCharsetSource(kCharsetUninitialized),
|
||||
mIsPageMode(false),
|
||||
mInitializedForPrintPreview(false),
|
||||
mHidden(false)
|
||||
{
|
||||
|
|
|
@ -194,6 +194,8 @@ protected:
|
|||
typedef uint8_t RenderFlags; // for storing the above flags
|
||||
|
||||
public:
|
||||
nsIPresShell();
|
||||
|
||||
/**
|
||||
* All callers are responsible for calling |Destroy| after calling
|
||||
* |EndObservingDocument|. It needs to be separate only because form
|
||||
|
|
|
@ -202,21 +202,98 @@ IsVisualCharset(const nsCString& aCharset)
|
|||
}
|
||||
}
|
||||
|
||||
// NOTE! nsPresContext::operator new() zeroes out all members, so don't
|
||||
// bother initializing members to 0.
|
||||
|
||||
nsPresContext::nsPresContext(nsIDocument* aDocument, nsPresContextType aType)
|
||||
: mType(aType), mDocument(aDocument), mBaseMinFontSize(0),
|
||||
mTextZoom(1.0), mFullZoom(1.0), mOverrideDPPX(0.0),
|
||||
: mType(aType),
|
||||
mShell(nullptr),
|
||||
mDocument(aDocument),
|
||||
mMedium(nullptr),
|
||||
mLinkHandler(nullptr),
|
||||
mInflationDisabledForShrinkWrap(false),
|
||||
mBaseMinFontSize(0),
|
||||
mTextZoom(1.0),
|
||||
mFullZoom(1.0),
|
||||
mOverrideDPPX(0.0),
|
||||
mLastFontInflationScreenSize(gfxSize(-1.0, -1.0)),
|
||||
mPageSize(-1, -1), mPPScale(1.0f),
|
||||
mCurAppUnitsPerDevPixel(0),
|
||||
mAutoQualityMinFontSizePixelsPref(0),
|
||||
mPageSize(-1, -1),
|
||||
mPageScale(0.0),
|
||||
mPPScale(1.0f),
|
||||
mDefaultColor(NS_RGBA(0,0,0,0)),
|
||||
mBackgroundColor(NS_RGBA(0,0,0,0)),
|
||||
mLinkColor(NS_RGBA(0,0,0,0)),
|
||||
mActiveLinkColor(NS_RGBA(0,0,0,0)),
|
||||
mVisitedLinkColor(NS_RGBA(0,0,0,0)),
|
||||
mFocusBackgroundColor(NS_RGBA(0,0,0,0)),
|
||||
mFocusTextColor(NS_RGBA(0,0,0,0)),
|
||||
mBodyTextColor(NS_RGBA(0,0,0,0)),
|
||||
mViewportStyleScrollbar(NS_STYLE_OVERFLOW_AUTO, NS_STYLE_OVERFLOW_AUTO),
|
||||
mFocusRingWidth(0),
|
||||
mExistThrottledUpdates(false),
|
||||
mImageAnimationMode(0),
|
||||
mImageAnimationModePref(imgIContainer::kNormalAnimMode),
|
||||
mInterruptChecksToSkip(0),
|
||||
mElementsRestyled(0),
|
||||
mFramesConstructed(0),
|
||||
mFramesReflowed(0),
|
||||
mInteractionTimeEnabled(false),
|
||||
mHasPendingInterrupt(false),
|
||||
mPendingInterruptFromTest(false),
|
||||
mInterruptsEnabled(false),
|
||||
mUseDocumentFonts(false),
|
||||
mUseDocumentColors(false),
|
||||
mUnderlineLinks(false),
|
||||
mSendAfterPaintToContent(false),
|
||||
mUseFocusColors(false),
|
||||
mFocusRingOnAnything(false),
|
||||
mFocusRingStyle(false),
|
||||
mDrawImageBackground(false),
|
||||
mDrawColorBackground(false),
|
||||
mNeverAnimate(false),
|
||||
mIsRenderingOnlySelection(false),
|
||||
mPaginated(false),
|
||||
mCanPaginatedScroll(false),
|
||||
mDoScaledTwips(false),
|
||||
mIsRootPaginatedDocument(false),
|
||||
mPrefBidiDirection(false),
|
||||
mPrefScrollbarSide(0),
|
||||
mPendingSysColorChanged(false),
|
||||
mPendingThemeChanged(false),
|
||||
mPendingUIResolutionChanged(false),
|
||||
mPendingMediaFeatureValuesChanged(false),
|
||||
mPrefChangePendingNeedsReflow(false),
|
||||
mIsEmulatingMedia(false),
|
||||
mAllInvalidated(false),
|
||||
mPaintFlashing(false), mPaintFlashingInitialized(false)
|
||||
mIsGlyph(false),
|
||||
mUsesRootEMUnits(false),
|
||||
mUsesExChUnits(false),
|
||||
mUsesViewportUnits(false),
|
||||
mPendingViewportChange(false),
|
||||
mCounterStylesDirty(false),
|
||||
mPostedFlushCounterStyles(false),
|
||||
mSuppressResizeReflow(false),
|
||||
mIsVisual(false),
|
||||
mFireAfterPaintEvents(false),
|
||||
mIsChrome(false),
|
||||
mIsChromeOriginImage(false),
|
||||
mPaintFlashing(false),
|
||||
mPaintFlashingInitialized(false),
|
||||
mHasWarnedAboutPositionedTableParts(false),
|
||||
mHasWarnedAboutTooLargeDashedOrDottedRadius(false),
|
||||
mQuirkSheetAdded(false),
|
||||
mNeedsPrefUpdate(false),
|
||||
mHadNonBlankPaint(false)
|
||||
#ifdef RESTYLE_LOGGING
|
||||
, mRestyleLoggingEnabled(false)
|
||||
#endif
|
||||
#ifdef DEBUG
|
||||
, mInitialized(false)
|
||||
#endif
|
||||
{
|
||||
// NOTE! nsPresContext::operator new() zeroes out all members, so don't
|
||||
// bother initializing members to 0.
|
||||
PodZero(&mBorderWidthTable);
|
||||
#ifdef DEBUG
|
||||
PodZero(&mLayoutPhaseCount);
|
||||
#endif
|
||||
|
||||
mDoScaledTwips = true;
|
||||
|
||||
|
|
|
@ -147,7 +147,6 @@ public:
|
|||
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_NSIOBSERVER
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS(nsPresContext)
|
||||
MOZ_DECLARE_WEAKREFERENCE_TYPENAME(nsPresContext)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче