OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
(...skipping 2123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2134 return; | 2134 return; |
2135 | 2135 |
2136 // We have to clear the parser to avoid possibly triggering | 2136 // We have to clear the parser to avoid possibly triggering |
2137 // the onload handler when closing as a side effect of a cancel-style | 2137 // the onload handler when closing as a side effect of a cancel-style |
2138 // change, such as opening a new document or closing the window while | 2138 // change, such as opening a new document or closing the window while |
2139 // still parsing | 2139 // still parsing |
2140 detachParser(); | 2140 detachParser(); |
2141 explicitClose(); | 2141 explicitClose(); |
2142 } | 2142 } |
2143 | 2143 |
2144 void Document::implicitOpen() | 2144 PassRefPtr<DocumentParser> Document::implicitOpen() |
2145 { | 2145 { |
2146 cancelParsing(); | 2146 cancelParsing(); |
2147 | 2147 |
2148 removeChildren(); | 2148 removeChildren(); |
2149 ASSERT(!m_focusedNode); | 2149 ASSERT(!m_focusedNode); |
2150 | 2150 |
2151 setCompatibilityMode(NoQuirksMode); | 2151 setCompatibilityMode(NoQuirksMode); |
2152 | 2152 |
2153 // Documents rendered seamlessly should start out requiring a stylesheet | 2153 // Documents rendered seamlessly should start out requiring a stylesheet |
2154 // collection update in order to ensure they inherit all the relevant data | 2154 // collection update in order to ensure they inherit all the relevant data |
2155 // from their parent. | 2155 // from their parent. |
2156 if (shouldDisplaySeamlesslyWithParent()) | 2156 if (shouldDisplaySeamlesslyWithParent()) |
2157 styleResolverChanged(DeferRecalcStyle); | 2157 styleResolverChanged(DeferRecalcStyle); |
2158 | 2158 |
2159 m_parser = createParser(); | 2159 m_parser = createParser(); |
2160 setParsing(true); | 2160 setParsing(true); |
2161 setReadyState(Loading); | 2161 setReadyState(Loading); |
| 2162 |
| 2163 return m_parser; |
2162 } | 2164 } |
2163 | 2165 |
2164 HTMLElement* Document::body() const | 2166 HTMLElement* Document::body() const |
2165 { | 2167 { |
2166 Node* de = documentElement(); | 2168 Node* de = documentElement(); |
2167 if (!de) | 2169 if (!de) |
2168 return 0; | 2170 return 0; |
2169 | 2171 |
2170 // try to prefer a FRAMESET element over BODY | 2172 // try to prefer a FRAMESET element over BODY |
2171 Node* body = 0; | 2173 Node* body = 0; |
(...skipping 3037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5209 { | 5211 { |
5210 return DocumentLifecycleNotifier::create(this); | 5212 return DocumentLifecycleNotifier::create(this); |
5211 } | 5213 } |
5212 | 5214 |
5213 DocumentLifecycleNotifier* Document::lifecycleNotifier() | 5215 DocumentLifecycleNotifier* Document::lifecycleNotifier() |
5214 { | 5216 { |
5215 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec
ycleNotifier()); | 5217 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec
ycleNotifier()); |
5216 } | 5218 } |
5217 | 5219 |
5218 } // namespace WebCore | 5220 } // namespace WebCore |
OLD | NEW |