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 2366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2377 m_closeAfterStyleRecalc = true; | 2377 m_closeAfterStyleRecalc = true; |
2378 return; | 2378 return; |
2379 } | 2379 } |
2380 | 2380 |
2381 bool wasLocationChangePending = frame() && frame()->navigationScheduler()->l
ocationChangePending(); | 2381 bool wasLocationChangePending = frame() && frame()->navigationScheduler()->l
ocationChangePending(); |
2382 bool doload = !parsing() && m_parser && !m_processingLoadEvent && !wasLocati
onChangePending; | 2382 bool doload = !parsing() && m_parser && !m_processingLoadEvent && !wasLocati
onChangePending; |
2383 | 2383 |
2384 if (!doload) | 2384 if (!doload) |
2385 return; | 2385 return; |
2386 | 2386 |
| 2387 // Call to dispatchWindowLoadEvent can blow us from underneath. |
| 2388 RefPtr<Document> protect(this); |
| 2389 |
2387 m_processingLoadEvent = true; | 2390 m_processingLoadEvent = true; |
2388 | 2391 |
2389 ScriptableDocumentParser* parser = scriptableDocumentParser(); | 2392 ScriptableDocumentParser* parser = scriptableDocumentParser(); |
2390 m_wellFormed = parser && parser->wellFormed(); | 2393 m_wellFormed = parser && parser->wellFormed(); |
2391 | 2394 |
2392 // We have to clear the parser, in case someone document.write()s from the | 2395 // We have to clear the parser, in case someone document.write()s from the |
2393 // onLoad event handler, as in Radar 3206524. | 2396 // onLoad event handler, as in Radar 3206524. |
2394 detachParser(); | 2397 detachParser(); |
2395 | 2398 |
2396 // Parser should have picked up all preloads by now | 2399 // Parser should have picked up all preloads by now |
(...skipping 3577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5974 m_templateContentsOwnerDocument = HTMLDocument::create(0, blankURL()
); | 5977 m_templateContentsOwnerDocument = HTMLDocument::create(0, blankURL()
); |
5975 else | 5978 else |
5976 m_templateContentsOwnerDocument = Document::create(0, blankURL()); | 5979 m_templateContentsOwnerDocument = Document::create(0, blankURL()); |
5977 } | 5980 } |
5978 | 5981 |
5979 return m_templateContentsOwnerDocument.get(); | 5982 return m_templateContentsOwnerDocument.get(); |
5980 } | 5983 } |
5981 #endif | 5984 #endif |
5982 | 5985 |
5983 } // namespace WebCore | 5986 } // namespace WebCore |
OLD | NEW |