Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Unified Diff: third_party/WebKit/Source/core/frame/DOMWindow.cpp

Issue 2177383004: Revert "binding: Window-returning attributes return null if a Window is detached." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ToV8.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/DOMWindow.cpp
diff --git a/third_party/WebKit/Source/core/frame/DOMWindow.cpp b/third_party/WebKit/Source/core/frame/DOMWindow.cpp
index 4e42da30fadd58788336bcc40100ec25761c1ac1..1c0aa0925a30e30562f87db1f14746598d686bd7 100644
--- a/third_party/WebKit/Source/core/frame/DOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/DOMWindow.cpp
@@ -103,10 +103,7 @@ DOMWindow* DOMWindow::opener() const
DOMWindow* DOMWindow::parent() const
{
- // TODO(yukishiino): The 'parent' attribute must return |this|
- // (the WindowProxy object of the browsing context itself) when it's
- // top-level or detached.
- if (!isCurrentlyDisplayedInFrame())
+ if (!frame())
return nullptr;
Frame* parent = frame()->tree().parent();
@@ -115,10 +112,7 @@ DOMWindow* DOMWindow::parent() const
DOMWindow* DOMWindow::top() const
{
- // TODO(yukishiino): The 'top' attribute must return |this|
- // (the WindowProxy object of the browsing context itself) when it's
- // top-level or detached.
- if (!isCurrentlyDisplayedInFrame())
+ if (!frame())
return nullptr;
return frame()->tree().top()->domWindow();
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ToV8.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698