зеркало из https://github.com/mozilla/gecko-dev.git
Fix for 78020 - Chromeless window when opening updated bookmarked page
Make bookmarks-service open a Navigator window with uri as argument using WindowWatcher interface. r=pchen, sr=blake, a=chofmann
This commit is contained in:
Родитель
7a29cc16d5
Коммит
9cdde5595b
|
@ -47,6 +47,7 @@
|
||||||
#include "nsSpecialSystemDirectory.h"
|
#include "nsSpecialSystemDirectory.h"
|
||||||
#include "nsVoidArray.h"
|
#include "nsVoidArray.h"
|
||||||
#include "nsXPIDLString.h"
|
#include "nsXPIDLString.h"
|
||||||
|
#include "nsISupportsPrimitives.h"
|
||||||
#include "prio.h"
|
#include "prio.h"
|
||||||
#include "prlog.h"
|
#include "prlog.h"
|
||||||
#include "rdf.h"
|
#include "rdf.h"
|
||||||
|
@ -154,7 +155,8 @@ static const char kURINC_NewSearchFolder[] = "NC:NewSearchFolder"; // XXX
|
||||||
static const char kDefaultPersonalToolbarFolder[] = "Personal Toolbar Folder";
|
static const char kDefaultPersonalToolbarFolder[] = "Personal Toolbar Folder";
|
||||||
static const char kBookmarkCommand[] = "http://home.netscape.com/NC-rdf#command?";
|
static const char kBookmarkCommand[] = "http://home.netscape.com/NC-rdf#command?";
|
||||||
|
|
||||||
#define bookmark_properties "chrome://communicator/locale/bookmarks/bookmark.properties"
|
#define bookmark_properties "chrome://communicator/locale/bookmarks/bookmark.properties"
|
||||||
|
#define NAVIGATOR_CHROME_URL "chrome://navigator/content/"
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@ -2390,7 +2392,16 @@ nsBookmarksService::OnStopRequest(nsIRequest* request, nsISupports *ctxt,
|
||||||
if (wwatch)
|
if (wwatch)
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIDOMWindow> newWindow;
|
nsCOMPtr<nsIDOMWindow> newWindow;
|
||||||
wwatch->OpenWindow(0, uri, "_blank", 0, 0, getter_AddRefs(newWindow));
|
nsCOMPtr<nsISupportsArray> suppArray;
|
||||||
|
rv = NS_NewISupportsArray(getter_AddRefs(suppArray));
|
||||||
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
nsCOMPtr<nsISupportsString> suppString(do_CreateInstance("@mozilla.org/supports-string;1", &rv));
|
||||||
|
if (!suppString) return rv;
|
||||||
|
rv = suppString->SetData(uri);
|
||||||
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
suppArray->AppendElement(suppString);
|
||||||
|
wwatch->OpenWindow(0, NAVIGATOR_CHROME_URL, "_blank", "chrome,dialog=no,all",
|
||||||
|
suppArray, getter_AddRefs(newWindow));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче