зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1363395 - nsGlobalWindow::GetLocation should support to be called on the outer window, r=smaug
This commit is contained in:
Родитель
18368ca143
Коммит
667a1e29ae
|
@ -509,7 +509,7 @@ nsChromeRegistry::ReloadChrome()
|
|||
if (NS_SUCCEEDED(rv)) {
|
||||
nsCOMPtr<nsPIDOMWindowOuter> domWindow = do_QueryInterface(protoWindow);
|
||||
if (domWindow) {
|
||||
Location* location = domWindow->Location();
|
||||
Location* location = domWindow->GetLocation();
|
||||
if (location) {
|
||||
rv = location->Reload(false);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
|
|
@ -6874,7 +6874,7 @@ nsIDocument::GetLocation() const
|
|||
}
|
||||
|
||||
nsGlobalWindow* window = nsGlobalWindow::Cast(w);
|
||||
RefPtr<Location> loc = window->Location();
|
||||
RefPtr<Location> loc = window->GetLocation();
|
||||
return loc.forget();
|
||||
}
|
||||
|
||||
|
|
|
@ -10438,8 +10438,11 @@ nsGlobalWindow::GetPrivateRoot()
|
|||
}
|
||||
|
||||
Location*
|
||||
nsGlobalWindow::Location()
|
||||
nsGlobalWindow::GetLocation()
|
||||
{
|
||||
// This method can be called on the outer window as well.
|
||||
FORWARD_TO_INNER(GetLocation, (), nullptr);
|
||||
|
||||
MOZ_RELEASE_ASSERT(IsInnerWindow());
|
||||
|
||||
if (!mLocation) {
|
||||
|
|
|
@ -855,7 +855,7 @@ public:
|
|||
void GetName(nsAString& aName, mozilla::ErrorResult& aError);
|
||||
void SetNameOuter(const nsAString& aName, mozilla::ErrorResult& aError);
|
||||
void SetName(const nsAString& aName, mozilla::ErrorResult& aError);
|
||||
mozilla::dom::Location* Location() override;
|
||||
mozilla::dom::Location* GetLocation() override;
|
||||
nsHistory* GetHistory(mozilla::ErrorResult& aError);
|
||||
mozilla::dom::CustomElementRegistry* CustomElements() override;
|
||||
mozilla::dom::BarProp* GetLocationbar(mozilla::ErrorResult& aError);
|
||||
|
|
|
@ -573,7 +573,7 @@ public:
|
|||
|
||||
virtual nsIDOMScreen* GetScreen() = 0;
|
||||
virtual nsIDOMNavigator* GetNavigator() = 0;
|
||||
virtual mozilla::dom::Location* Location() = 0;
|
||||
virtual mozilla::dom::Location* GetLocation() = 0;
|
||||
virtual nsresult GetPrompter(nsIPrompt** aPrompt) = 0;
|
||||
virtual nsresult GetControllers(nsIControllers** aControllers) = 0;
|
||||
virtual already_AddRefed<nsISelection> GetSelection() = 0;
|
||||
|
|
|
@ -35,7 +35,7 @@ interface nsIDOMCrypto;
|
|||
CrossOriginReadable] readonly attribute Window self;
|
||||
[Unforgeable, StoreInSlot, Pure] readonly attribute Document? document;
|
||||
[Throws] attribute DOMString name;
|
||||
[PutForwards=href, Unforgeable,
|
||||
[PutForwards=href, Unforgeable, BinaryName="getLocation",
|
||||
CrossOriginReadable, CrossOriginWritable] readonly attribute Location location;
|
||||
[Throws] readonly attribute History history;
|
||||
[Func="CustomElementRegistry::IsCustomElementEnabled"]
|
||||
|
|
|
@ -609,7 +609,7 @@ PeerConnectionImpl::Initialize(PeerConnectionObserver& aObserver,
|
|||
|
||||
nsAutoCString locationCStr;
|
||||
|
||||
if (RefPtr<Location> location = mWindow->Location()) {
|
||||
if (RefPtr<Location> location = mWindow->GetLocation()) {
|
||||
nsAutoString locationAStr;
|
||||
res = location->ToString(locationAStr);
|
||||
NS_ENSURE_SUCCESS(res, res);
|
||||
|
|
|
@ -967,7 +967,7 @@ nsNativeAppSupportWin::HandleDDENotification( UINT uType, // transaction t
|
|||
break;
|
||||
}
|
||||
// Get location.
|
||||
RefPtr<dom::Location> location = internalContent->Location();
|
||||
RefPtr<dom::Location> location = internalContent->GetLocation();
|
||||
if ( !location ) {
|
||||
break;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче