Bug 1336768. Use the right element to get our tree box object from; fixes problem introduced in <https://hg.mozilla.org/integration/mozilla-inbound/rev/d4cafa51586a>. r=smaug
authorBoris Zbarsky <bzbarsky@mit.edu>
Mon, 06 Feb 2017 17:00:41 -0500
changeset 340952 558a9f23b39c187175fad3cc8e4aca6fb61ac331
parent 340951 5619be2962c6a26f28da7acccdd13a946794ad30
child 340953 e7b337b0606513f3ea5edf80d06dd786b73e4caf
push id86604
push userbzbarsky@mozilla.com
push dateMon, 06 Feb 2017 22:01:27 +0000
treeherdermozilla-inbound@e7b337b06065 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1336768
milestone54.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 1336768. Use the right element to get our tree box object from; fixes problem introduced in <https://hg.mozilla.org/integration/mozilla-inbound/rev/d4cafa51586a>. r=smaug
layout/xul/nsXULTooltipListener.cpp
--- a/layout/xul/nsXULTooltipListener.cpp
+++ b/layout/xul/nsXULTooltipListener.cpp
@@ -723,17 +723,18 @@ nsXULTooltipListener::sTooltipCallback(n
 #ifdef MOZ_XUL
 nsresult
 nsXULTooltipListener::GetSourceTreeBoxObject(nsITreeBoxObject** aBoxObject)
 {
   *aBoxObject = nullptr;
 
   nsCOMPtr<nsIContent> sourceNode = do_QueryReferent(mSourceNode);
   if (mIsSourceTree && sourceNode) {
-    RefPtr<nsXULElement> xulEl = nsXULElement::FromContent(sourceNode);
+    RefPtr<nsXULElement> xulEl =
+      nsXULElement::FromContentOrNull(sourceNode->GetParent());
     if (xulEl) {
       IgnoredErrorResult ignored;
       nsCOMPtr<nsIBoxObject> bx = xulEl->GetBoxObject(ignored);
       nsCOMPtr<nsITreeBoxObject> obx(do_QueryInterface(bx));
       if (obx) {
         *aBoxObject = obx;
         NS_ADDREF(*aBoxObject);
         return NS_OK;