WebCore:
[WebKit-https.git] / WebCore / page / DOMWindow.cpp
index 4cf9b2a739fa98dd0f628e2db1485fe878204ca7..3f269c4a39f7fd75dea2f40fdf0f99c012c920b4 100644 (file)
@@ -718,7 +718,7 @@ DOMWindow* DOMWindow::parent() const
     if (!m_frame)
         return 0;
 
-    Frame* parent = m_frame->tree()->parent();
+    Frame* parent = m_frame->tree()->parent(true);
     if (parent)
         return parent->domWindow();
 
@@ -734,7 +734,7 @@ DOMWindow* DOMWindow::top() const
     if (!page)
         return 0;
 
-    return page->mainFrame()->domWindow();
+    return m_frame->tree()->top(true)->domWindow();
 }
 
 Document* DOMWindow::document() const