Bug 1459529: Remove PresShell::BeginUpdate. r=heycam
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 11 May 2018 14:33:49 +0200
changeset 418353 0c1c3fb200c0c7ba67fe99b06574e823709da712
parent 418352 f04194f1a3d07c4f838101417eccf770fb354df4
child 418354 6695fc0e528919199981beefc16681badf486281
push id64004
push userecoal95@gmail.com
push dateTue, 15 May 2018 16:44:48 +0000
treeherderautoland@a40accc5c91c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1459529
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1459529: Remove PresShell::BeginUpdate. r=heycam It's useless after the last patch. MozReview-Commit-ID: LdljMfnMjTy
layout/base/PresShell.cpp
layout/base/PresShell.h
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -794,17 +794,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)
@@ -2517,31 +2516,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,