Bug 1427691 - Fix the incorrect nsIWidgetListener function names in nsWebBrowser. r=bz
authorSamael Wang <freesamael@gmail.com>
Wed, 03 Jan 2018 00:11:00 -0500
changeset 449647 94114f8f6418c07bffba1744186f466514c447d9
parent 449646 ba79a634141b50e99b2aee7853111a232c1a3597
child 449648 1f394da377b0250c21506645b5535dc4a8e7cdf0
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1427691, 743975
milestone59.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 1427691 - Fix the incorrect nsIWidgetListener function names in nsWebBrowser. r=bz The original patch in bug 743975 defined nsIWidgetListener::WindowRaised and nsIWidgetListener::WindowLowered, but they were renamed to WindowActivated / WindowDeactivated before landing according to bug 743975 comment 69. The implementation of nsWebBrowser was left with incorrect names. MozReview-Commit-ID: 3bmLT0RcZzw
toolkit/components/browser/nsWebBrowser.cpp
toolkit/components/browser/nsWebBrowser.h
--- a/toolkit/components/browser/nsWebBrowser.cpp
+++ b/toolkit/components/browser/nsWebBrowser.cpp
@@ -1749,30 +1749,30 @@ DrawPaintedLayer(PaintedLayer* aLayer,
 
   ColorPattern color(ToDeviceColor(*static_cast<nscolor*>(aCallbackData)));
   nsIntRect dirtyRect = aRegionToDraw.GetBounds();
   aDrawTarget.FillRect(
     Rect(dirtyRect.x, dirtyRect.y, dirtyRect.width, dirtyRect.height), color);
 }
 
 void
-nsWebBrowser::WindowRaised(nsIWidget* aWidget)
+nsWebBrowser::WindowActivated()
 {
 #if defined(DEBUG_smaug)
   nsCOMPtr<nsIDocument> document = mDocShell->GetDocument();
   nsAutoString documentURI;
   document->GetDocumentURI(documentURI);
   printf("nsWebBrowser::NS_ACTIVATE %p %s\n", (void*)this,
          NS_ConvertUTF16toUTF8(documentURI).get());
 #endif
   Activate();
 }
 
 void
-nsWebBrowser::WindowLowered(nsIWidget* aWidget)
+nsWebBrowser::WindowDeactivated()
 {
 #if defined(DEBUG_smaug)
   nsCOMPtr<nsIDocument> document = mDocShell->GetDocument();
   nsAutoString documentURI;
   document->GetDocumentURI(documentURI);
   printf("nsWebBrowser::NS_DEACTIVATE %p %s\n", (void*)this,
          NS_ConvertUTF16toUTF8(documentURI).get());
 #endif
--- a/toolkit/components/browser/nsWebBrowser.h
+++ b/toolkit/components/browser/nsWebBrowser.h
@@ -113,18 +113,18 @@ protected:
   // XXXbz why are these NS_IMETHOD?  They're not interface methods!
   NS_IMETHOD SetDocShell(nsIDocShell* aDocShell);
   NS_IMETHOD EnsureDocShellTreeOwner();
   NS_IMETHOD BindListener(nsISupports* aListener, const nsIID& aIID);
   NS_IMETHOD UnBindListener(nsISupports* aListener, const nsIID& aIID);
   NS_IMETHOD EnableGlobalHistory(bool aEnable);
 
   // nsIWidgetListener
-  virtual void WindowRaised(nsIWidget* aWidget);
-  virtual void WindowLowered(nsIWidget* aWidget);
+  virtual void WindowActivated() override;
+  virtual void WindowDeactivated() override;
   virtual bool PaintWindow(nsIWidget* aWidget,
                            mozilla::LayoutDeviceIntRegion aRegion) override;
 
 protected:
   RefPtr<nsDocShellTreeOwner> mDocShellTreeOwner;
   nsCOMPtr<nsIDocShell> mDocShell;
   nsCOMPtr<nsIInterfaceRequestor> mDocShellAsReq;
   nsCOMPtr<nsIBaseWindow> mDocShellAsWin;