Bug 1489095 - Change nsITooltipListener to use XPCOM strings. r=hsivonen
authorRyan Scherich <ryan.k.scherich@gmail.com>
Mon, 14 Jan 2019 14:06:07 +0000
changeset 513712 745be69de37d90a0debb060c50ed50717bdcbd13
parent 513711 ab005166185ed5b0d725060527edf017b7c49783
child 513713 4d932b82695c7ac58901ef0a03f44fed6ce2d1f0
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershsivonen
bugs1489095
milestone66.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 1489095 - Change nsITooltipListener to use XPCOM strings. r=hsivonen Differential Revision: https://phabricator.services.mozilla.com/D15602
docshell/base/nsDocShellTreeOwner.cpp
docshell/base/nsITooltipListener.idl
dom/ipc/TabChild.cpp
--- a/docshell/base/nsDocShellTreeOwner.cpp
+++ b/docshell/base/nsDocShellTreeOwner.cpp
@@ -1161,19 +1161,18 @@ ChromeTooltipListener::ShowTooltip(int32
                                    const nsAString& aInTipText,
                                    const nsAString& aTipDir) {
   nsresult rv = NS_OK;
 
   // do the work to call the client
   nsCOMPtr<nsITooltipListener> tooltipListener(
       do_QueryInterface(mWebBrowserChrome));
   if (tooltipListener) {
-    rv = tooltipListener->OnShowTooltip(aInXCoords, aInYCoords,
-                                        PromiseFlatString(aInTipText).get(),
-                                        PromiseFlatString(aTipDir).get());
+    rv = tooltipListener->OnShowTooltip(aInXCoords, aInYCoords, aInTipText,
+                                        aTipDir);
     if (NS_SUCCEEDED(rv)) {
       mShowingTooltip = true;
     }
   }
 
   return rv;
 }
 
--- a/docshell/base/nsITooltipListener.idl
+++ b/docshell/base/nsITooltipListener.idl
@@ -28,17 +28,17 @@ interface nsITooltipListener : nsISuppor
      * @param aTipDir  The direction (ltr or rtl) in which to display the text
      *
      * @note
      * Coordinates are specified in pixels, relative to the top-left
      * corner of the browser area.
      *
      * @return <code>NS_OK</code> if the tooltip was displayed.
      */
-    void onShowTooltip(in long aXCoords, in long aYCoords, in wstring aTipText,
-                       in wstring aTipDir);
+    void onShowTooltip(in long aXCoords, in long aYCoords, in AString aTipText,
+                       in AString aTipDir);
   
     /**
      * Called when the tooltip should be hidden, either because the pointer
      * has moved or the tooltip has timed out.
      */
     void onHideTooltip();
 };
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -2969,17 +2969,17 @@ void TabChild::ReinitRenderingForDeviceR
   }
 
   // Proceed with destroying and recreating the layer manager.
   ReinitRendering();
 }
 
 NS_IMETHODIMP
 TabChild::OnShowTooltip(int32_t aXCoords, int32_t aYCoords,
-                        const char16_t* aTipText, const char16_t* aTipDir) {
+                        const nsAString& aTipText, const nsAString& aTipDir) {
   nsString str(aTipText);
   nsString dir(aTipDir);
   SendShowTooltip(aXCoords, aYCoords, str, dir);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 TabChild::OnHideTooltip() {