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 2338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2349 // http://www.whatwg.org/specs/web-apps/current-work/#dom-document-cl
ose | 2349 // http://www.whatwg.org/specs/web-apps/current-work/#dom-document-cl
ose |
2350 | 2350 |
2351 if (!scriptableDocumentParser() || !scriptableDocumentParser()->wasCreatedBy
Script() || !scriptableDocumentParser()->isParsing()) | 2351 if (!scriptableDocumentParser() || !scriptableDocumentParser()->wasCreatedBy
Script() || !scriptableDocumentParser()->isParsing()) |
2352 return; | 2352 return; |
2353 | 2353 |
2354 explicitClose(); | 2354 explicitClose(); |
2355 } | 2355 } |
2356 | 2356 |
2357 void Document::explicitClose() | 2357 void Document::explicitClose() |
2358 { | 2358 { |
2359 if (m_parser) | 2359 if (RefPtr<DocumentParser> parser = m_parser) |
2360 m_parser->finish(); | 2360 parser->finish(); |
2361 | 2361 |
2362 if (!m_frame) { | 2362 if (!m_frame) { |
2363 // Because we have no frame, we don't know if all loading has completed, | 2363 // Because we have no frame, we don't know if all loading has completed, |
2364 // so we just call implicitClose() immediately. FIXME: This might fire | 2364 // so we just call implicitClose() immediately. FIXME: This might fire |
2365 // the load event prematurely <http://bugs.webkit.org/show_bug.cgi?id=14
568>. | 2365 // the load event prematurely <http://bugs.webkit.org/show_bug.cgi?id=14
568>. |
2366 implicitClose(); | 2366 implicitClose(); |
2367 return; | 2367 return; |
2368 } | 2368 } |
2369 | 2369 |
2370 m_frame->loader()->checkCompleted(); | 2370 m_frame->loader()->checkCompleted(); |
(...skipping 3606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5977 m_templateContentsOwnerDocument = HTMLDocument::create(0, blankURL()
); | 5977 m_templateContentsOwnerDocument = HTMLDocument::create(0, blankURL()
); |
5978 else | 5978 else |
5979 m_templateContentsOwnerDocument = Document::create(0, blankURL()); | 5979 m_templateContentsOwnerDocument = Document::create(0, blankURL()); |
5980 } | 5980 } |
5981 | 5981 |
5982 return m_templateContentsOwnerDocument.get(); | 5982 return m_templateContentsOwnerDocument.get(); |
5983 } | 5983 } |
5984 #endif | 5984 #endif |
5985 | 5985 |
5986 } // namespace WebCore | 5986 } // namespace WebCore |
OLD | NEW |