Bug 567702. Walking the sametype parent chain of our docshell is not guaranteed to lead to a widget, so walk the parent chain instead. This fixes printing on Linux and opening a file dialog everywhere with bug 130078. r=roc
authorTimothy Nikkel <tnikkel@gmail.com>
Fri, 25 Jun 2010 16:51:17 -0500
changeset 46251 375eee52bbdd72dac80ce120f2bdf42cea087b22
parent 46250 99f7e3994a54db21f0fb7d72de05a089b5e17894
child 46252 4f1ae85ff9d149cb9b015839d0c3f611fc93ad1f
push idunknown
push userunknown
push dateunknown
reviewersroc
bugs567702, 130078
milestone1.9.3a6pre
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 567702. Walking the sametype parent chain of our docshell is not guaranteed to lead to a widget, so walk the parent chain instead. This fixes printing on Linux and opening a file dialog everywhere with bug 130078. r=roc
widget/src/shared/WidgetUtils.cpp
--- a/widget/src/shared/WidgetUtils.cpp
+++ b/widget/src/shared/WidgetUtils.cpp
@@ -61,17 +61,17 @@ WidgetUtils::DOMWindowToWidget(nsIDOMWin
     while (!widget && baseWin) {
       baseWin->GetParentWidget(getter_AddRefs(widget));
       if (!widget) {
         nsCOMPtr<nsIDocShellTreeItem> docShellAsItem(do_QueryInterface(baseWin));
         if (!docShellAsItem)
           return nsnull;
 
         nsCOMPtr<nsIDocShellTreeItem> parent;
-        docShellAsItem->GetSameTypeParent(getter_AddRefs(parent));
+        docShellAsItem->GetParent(getter_AddRefs(parent));
 
         window = do_GetInterface(parent);
         if (!window)
           return nsnull;
 
         baseWin = do_QueryInterface(window->GetDocShell());
       }
     }