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

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: Fixed Document.defaultView Created 3 years, 11 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
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 6ef0630d57d2d42711f744f095cd31f58813385e..40eab85e530201454a408673fe3b0a5e38fff8bf 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -5208,6 +5208,10 @@ DocumentNameCollection* Document::documentNamedItems(const AtomicString& name) {
name);
}
+LocalDOMWindow* Document::defaultView() const {
+ return m_frame ? m_domWindow : nullptr;
haraken 2017/02/09 12:46:40 Would you help me understand why we need to check
Yuki 2017/02/10 07:47:21 https://html.spec.whatwg.org/multipage/browsers.ht
haraken 2017/02/10 07:59:40 I'm wondering why this cannot be 'return m_domWind
Yuki 2017/02/10 08:18:19 I read code a little, and found that - m_domWindow
haraken 2017/02/10 09:15:31 Makes sense. Can you add a comment about it?
Yuki 2017/02/10 11:22:47 Done.
+}
+
void Document::finishedParsing() {
DCHECK(!scriptableDocumentParser() || !m_parser->isParsing());
DCHECK(!scriptableDocumentParser() || m_readyState != Loading);

Powered by Google App Engine
This is Rietveld 408576698