зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1607573 - Part 3: Remove GetRealFrameElementOuter in favor of GetFrameElement, r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D59550 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
808bb3e060
Коммит
c76e93dad5
|
@ -3828,7 +3828,7 @@ Element* nsGlobalWindowInner::GetFrameElement(nsIPrincipal& aSubjectPrincipal,
|
|||
}
|
||||
|
||||
Element* nsGlobalWindowInner::GetRealFrameElement(ErrorResult& aError) {
|
||||
FORWARD_TO_OUTER_OR_THROW(GetRealFrameElementOuter, (), aError, nullptr);
|
||||
FORWARD_TO_OUTER_OR_THROW(GetFrameElement, (), aError, nullptr);
|
||||
}
|
||||
|
||||
void nsGlobalWindowInner::UpdateCommands(const nsAString& anAction,
|
||||
|
|
|
@ -6342,12 +6342,8 @@ void nsGlobalWindowOuter::NotifyWindowIDDestroyed(const char* aTopic) {
|
|||
|
||||
Element* nsGlobalWindowOuter::GetFrameElementOuter(
|
||||
nsIPrincipal& aSubjectPrincipal) {
|
||||
if (!mDocShell || mDocShell->GetIsMozBrowser()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Per HTML5, the frameElement getter returns null in cross-origin situations.
|
||||
Element* element = GetRealFrameElementOuter();
|
||||
Element* element = GetFrameElement();
|
||||
if (!element) {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -6359,21 +6355,13 @@ Element* nsGlobalWindowOuter::GetFrameElementOuter(
|
|||
return element;
|
||||
}
|
||||
|
||||
Element* nsGlobalWindowOuter::GetRealFrameElementOuter() {
|
||||
Element* nsGlobalWindowOuter::GetFrameElement() {
|
||||
if (!mBrowsingContext || mBrowsingContext->IsTop()) {
|
||||
return nullptr;
|
||||
}
|
||||
return mBrowsingContext->GetEmbedderElement();
|
||||
}
|
||||
|
||||
/**
|
||||
* nsIGlobalWindow::GetFrameElement (when called from C++) is just a wrapper
|
||||
* around GetRealFrameElement.
|
||||
*/
|
||||
Element* nsGlobalWindowOuter::GetFrameElement() {
|
||||
return GetRealFrameElementOuter();
|
||||
}
|
||||
|
||||
namespace {
|
||||
class ChildCommandDispatcher : public Runnable {
|
||||
public:
|
||||
|
|
|
@ -622,7 +622,6 @@ class nsGlobalWindowOuter final : public mozilla::dom::EventTarget,
|
|||
mozilla::ErrorResult& aError);
|
||||
nsIControllers* GetControllersOuter(mozilla::ErrorResult& aError);
|
||||
nsresult GetControllers(nsIControllers** aControllers) override;
|
||||
mozilla::dom::Element* GetRealFrameElementOuter();
|
||||
float GetMozInnerScreenXOuter(mozilla::dom::CallerType aCallerType);
|
||||
float GetMozInnerScreenYOuter(mozilla::dom::CallerType aCallerType);
|
||||
double GetDevicePixelRatioOuter(mozilla::dom::CallerType aCallerType);
|
||||
|
|
|
@ -2232,8 +2232,7 @@ static bool IsFullyActive(nsPIDOMWindowInner* aWindow) {
|
|||
if (context->IsTopLevelWindow()) {
|
||||
return true;
|
||||
}
|
||||
nsCOMPtr<Element> frameElement =
|
||||
nsGlobalWindowOuter::Cast(context)->GetRealFrameElementOuter();
|
||||
nsCOMPtr<Element> frameElement = context->GetFrameElement();
|
||||
if (!frameElement) {
|
||||
return false;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче