| 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();
|
|
|