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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2617733004: binding: Changes the association among global-proxy/global/window-instance. (Closed)
Patch Set: Addressed review comments. Created 3 years, 10 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/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/Document.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 03a65cf6a6ec13f79de3710a15377b2db0ef2274..37178b2943fee552d0cfd3da7a05ed7a4b19066f 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -5211,6 +5211,13 @@ DocumentNameCollection* Document::documentNamedItems(const AtomicString& name) {
name);
}
+LocalDOMWindow* Document::defaultView() const {
+ // The HTML spec requires to return null if the document is detached from a
+ // frame. However, |m_domWindow| is not cleared on the detachment. So, we
+ // need to check |m_frame| to tell whether the document is attached or not.
+ return m_frame ? m_domWindow : nullptr;
+}
+
void Document::finishedParsing() {
DCHECK(!scriptableDocumentParser() || !m_parser->isParsing());
DCHECK(!scriptableDocumentParser() || m_readyState != Loading);
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/Document.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698