forked from mirrors/gecko-dev
Backed out changeset 85fd8d212397 (bug 1479544) for windows build bustages CLOSED TREE
This commit is contained in:
parent
a0fa30904d
commit
a5db0f5415
6 changed files with 54 additions and 0 deletions
|
|
@ -472,6 +472,47 @@ nsChromeRegistry::FlushAllCaches()
|
||||||
NS_CHROME_FLUSH_TOPIC, nullptr);
|
NS_CHROME_FLUSH_TOPIC, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// xxxbsmedberg Move me to nsIWindowMediator
|
||||||
|
NS_IMETHODIMP
|
||||||
|
nsChromeRegistry::ReloadChrome()
|
||||||
|
{
|
||||||
|
FlushAllCaches();
|
||||||
|
// Do a reload of all top level windows.
|
||||||
|
nsresult rv = NS_OK;
|
||||||
|
|
||||||
|
// Get the window mediator
|
||||||
|
nsCOMPtr<nsIWindowMediator> windowMediator
|
||||||
|
(do_GetService(NS_WINDOWMEDIATOR_CONTRACTID));
|
||||||
|
if (windowMediator) {
|
||||||
|
nsCOMPtr<nsISimpleEnumerator> windowEnumerator;
|
||||||
|
|
||||||
|
rv = windowMediator->GetEnumerator(nullptr, getter_AddRefs(windowEnumerator));
|
||||||
|
if (NS_SUCCEEDED(rv)) {
|
||||||
|
// Get each dom window
|
||||||
|
bool more;
|
||||||
|
rv = windowEnumerator->HasMoreElements(&more);
|
||||||
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
while (more) {
|
||||||
|
nsCOMPtr<nsISupports> protoWindow;
|
||||||
|
rv = windowEnumerator->GetNext(getter_AddRefs(protoWindow));
|
||||||
|
if (NS_SUCCEEDED(rv)) {
|
||||||
|
nsCOMPtr<nsPIDOMWindowOuter> domWindow = do_QueryInterface(protoWindow);
|
||||||
|
if (domWindow) {
|
||||||
|
Location* location = domWindow->GetLocation();
|
||||||
|
if (location) {
|
||||||
|
rv = location->Reload(false);
|
||||||
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rv = windowEnumerator->HasMoreElements(&more);
|
||||||
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsChromeRegistry::AllowScriptsForPackage(nsIURI* aChromeURI, bool *aResult)
|
nsChromeRegistry::AllowScriptsForPackage(nsIURI* aChromeURI, bool *aResult)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ public:
|
||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
|
|
||||||
// nsIXULChromeRegistry methods:
|
// nsIXULChromeRegistry methods:
|
||||||
|
NS_IMETHOD ReloadChrome() override;
|
||||||
NS_IMETHOD RefreshSkins() override;
|
NS_IMETHOD RefreshSkins() override;
|
||||||
NS_IMETHOD AllowScriptsForPackage(nsIURI* url,
|
NS_IMETHOD AllowScriptsForPackage(nsIURI* url,
|
||||||
bool* _retval) override;
|
bool* _retval) override;
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,9 @@ interface nsIChromeRegistry : nsISupports
|
||||||
[scriptable, uuid(93251ddf-5e85-4172-ac2a-31780562974f)]
|
[scriptable, uuid(93251ddf-5e85-4172-ac2a-31780562974f)]
|
||||||
interface nsIXULChromeRegistry : nsIChromeRegistry
|
interface nsIXULChromeRegistry : nsIChromeRegistry
|
||||||
{
|
{
|
||||||
|
/* Should be called when locales change to reload all chrome (including XUL). */
|
||||||
|
void reloadChrome();
|
||||||
|
|
||||||
// If the optional asBCP47 parameter is true, the locale code will be
|
// If the optional asBCP47 parameter is true, the locale code will be
|
||||||
// converted to a BCP47 language tag; in particular, this means that
|
// converted to a BCP47 language tag; in particular, this means that
|
||||||
// "ja-JP-mac" will be returned as "ja-JP-x-lvariant-mac", which can be
|
// "ja-JP-mac" will be returned as "ja-JP-x-lvariant-mac", which can be
|
||||||
|
|
|
||||||
|
|
@ -6430,6 +6430,13 @@ nsGlobalWindowOuter::GetPrivateRoot()
|
||||||
return top;
|
return top;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Location*
|
||||||
|
nsGlobalWindowOuter::GetLocation()
|
||||||
|
{
|
||||||
|
// This method can be called on the outer window as well.
|
||||||
|
FORWARD_TO_INNER(GetLocation, (), nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsGlobalWindowOuter::ActivateOrDeactivate(bool aActivate)
|
nsGlobalWindowOuter::ActivateOrDeactivate(bool aActivate)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -561,6 +561,7 @@ public:
|
||||||
}
|
}
|
||||||
void GetNameOuter(nsAString& aName);
|
void GetNameOuter(nsAString& aName);
|
||||||
void SetNameOuter(const nsAString& aName, mozilla::ErrorResult& aError);
|
void SetNameOuter(const nsAString& aName, mozilla::ErrorResult& aError);
|
||||||
|
mozilla::dom::Location* GetLocation() override;
|
||||||
void GetStatusOuter(nsAString& aStatus);
|
void GetStatusOuter(nsAString& aStatus);
|
||||||
void SetStatusOuter(const nsAString& aStatus);
|
void SetStatusOuter(const nsAString& aStatus);
|
||||||
void CloseOuter(bool aTrustedCaller);
|
void CloseOuter(bool aTrustedCaller);
|
||||||
|
|
|
||||||
|
|
@ -1098,6 +1098,7 @@ public:
|
||||||
// XXX(nika): These feel like they should be inner window only, but they're
|
// XXX(nika): These feel like they should be inner window only, but they're
|
||||||
// called on the outer window.
|
// called on the outer window.
|
||||||
virtual mozilla::dom::Navigator* GetNavigator() = 0;
|
virtual mozilla::dom::Navigator* GetNavigator() = 0;
|
||||||
|
virtual mozilla::dom::Location* GetLocation() = 0;
|
||||||
|
|
||||||
virtual nsresult GetPrompter(nsIPrompt** aPrompt) = 0;
|
virtual nsresult GetPrompter(nsIPrompt** aPrompt) = 0;
|
||||||
virtual nsresult GetControllers(nsIControllers** aControllers) = 0;
|
virtual nsresult GetControllers(nsIControllers** aControllers) = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue