Bug 1459529: Remove PresShell::BeginUpdate. r?heycam
It's useless after the last patch.
MozReview-Commit-ID: LdljMfnMjTy
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -795,17 +795,16 @@ nsIPresShell::nsIPresShell()
, mInFlush(false)
{}
PresShell::PresShell()
: 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)
@@ -2518,31 +2517,18 @@ PresShell::GetPageSequenceFrame() const
nsCanvasFrame*
PresShell::GetCanvasFrame() const
{
nsIFrame* frame = mFrameConstructor->GetDocElementContainingBlock();
return do_QueryFrame(frame);
}
void
-PresShell::BeginUpdate(nsIDocument *aDocument, nsUpdateType aUpdateType)
-{
-#ifdef DEBUG
- mUpdateCount++;
-#endif
-}
-
-void
PresShell::EndUpdate(nsIDocument *aDocument, nsUpdateType aUpdateType)
{
-#ifdef DEBUG
- MOZ_ASSERT(0 != mUpdateCount, "too many EndUpdate's");
- --mUpdateCount;
-#endif
-
if (aUpdateType & UPDATE_STYLE) {
if (mStyleSet->StyleSheetsHaveChanged()) {
RestyleForCSSRuleChanges();
}
}
}
void
--- a/layout/base/PresShell.h
+++ b/layout/base/PresShell.h
@@ -278,17 +278,16 @@ public:
NS_IMETHOD CompleteScroll(bool aForward) override;
NS_IMETHOD CompleteMove(bool aForward, bool aExtend) override;
NS_IMETHOD SelectAll() override;
NS_IMETHOD CheckVisibility(nsIDOMNode *node, int16_t startOffset, int16_t EndOffset, bool *_retval) override;
nsresult CheckVisibilityContent(nsIContent* aNode, int16_t aStartOffset,
int16_t aEndOffset, bool* aRetval) override;
// nsIDocumentObserver
- NS_DECL_NSIDOCUMENTOBSERVER_BEGINUPDATE
NS_DECL_NSIDOCUMENTOBSERVER_ENDUPDATE
NS_DECL_NSIDOCUMENTOBSERVER_BEGINLOAD
NS_DECL_NSIDOCUMENTOBSERVER_ENDLOAD
NS_DECL_NSIDOCUMENTOBSERVER_CONTENTSTATECHANGED
NS_DECL_NSIDOCUMENTOBSERVER_DOCUMENTSTATESCHANGED
// nsIMutationObserver
NS_DECL_NSIMUTATIONOBSERVER_CHARACTERDATACHANGED
@@ -751,17 +750,16 @@ private:
nsresult SetResolutionImpl(float aResolution, bool aScaleToResolution);
nsIContent* GetOverrideClickTarget(WidgetGUIEvent* aEvent,
nsIFrame* aFrame);
#ifdef DEBUG
// The reflow root under which we're currently reflowing. Null when
// not in reflow.
nsIFrame* mCurrentReflowRoot;
- uint32_t mUpdateCount;
#endif
#ifdef MOZ_REFLOW_PERF
ReflowCountMgr* mReflowCountMgr;
#endif
// This is used for synthetic mouse events that are sent when what is under
// the mouse pointer may have changed without the mouse moving (eg scrolling,