Bug 1541253 - Make PresShell::IsVisible const. r=tnikkel
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Fri, 10 May 2019 11:15:30 +0000
changeset 532198 d3340f866c7df1f283153c1dec37d5b83933bf7f
parent 532197 c5798de806e28251aeda7d23123ab2b05eb7e8fb
child 532199 335b9a8f496819c5777c0f67eff5f88bf983288b
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstnikkel
bugs1541253
milestone68.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 1541253 - Make PresShell::IsVisible const. r=tnikkel Differential Revision: https://phabricator.services.mozilla.com/D26251
layout/base/PresShell.cpp
layout/base/PresShell.h
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -8806,17 +8806,17 @@ void PresShell::DidPaintWindow() {
       nsCOMPtr<nsIDOMChromeWindow> chromeWin(do_QueryInterface(window));
       if (chromeWin) {
         obsvc->NotifyObservers(chromeWin, "widget-first-paint", nullptr);
       }
     }
   }
 }
 
-bool PresShell::IsVisible() {
+bool PresShell::IsVisible() const {
   if (!mIsActive || !mViewManager) return false;
 
   nsView* view = mViewManager->GetRootView();
   if (!view) return true;
 
   // inner view of subdoc frame
   view = view->GetParent();
   if (!view) return true;
--- a/layout/base/PresShell.h
+++ b/layout/base/PresShell.h
@@ -1038,17 +1038,17 @@ class PresShell final : public nsStubDoc
   MOZ_CAN_RUN_SCRIPT void WillPaintWindow();
   /**
    * Notify that we called Paint with PaintFlags::PaintComposite.
    * Fires on the presshell for the painted widget.
    * This is issued at a time when it's safe to modify widget geometry.
    */
   MOZ_CAN_RUN_SCRIPT void DidPaintWindow();
 
-  bool IsVisible();
+  bool IsVisible() const;
   MOZ_CAN_RUN_SCRIPT
   void DispatchSynthMouseMove(WidgetGUIEvent* aEvent);
 
   /* Temporarily ignore the Displayport for better paint performance. We
    * trigger a repaint once suppression is disabled. Without that
    * the displayport may get left at the suppressed size for an extended
    * period of time and result in unnecessary checkerboarding (see bug
    * 1255054). */