Chromium Code Reviews| 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); |