| 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 | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
| 7 * rights reserved. | 7 * rights reserved. |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| (...skipping 3050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3061 | 3061 |
| 3062 void Document::dispatchUnloadEvents() { | 3062 void Document::dispatchUnloadEvents() { |
| 3063 PluginScriptForbiddenScope forbidPluginDestructorScripting; | 3063 PluginScriptForbiddenScope forbidPluginDestructorScripting; |
| 3064 if (m_parser) | 3064 if (m_parser) |
| 3065 m_parser->stopParsing(); | 3065 m_parser->stopParsing(); |
| 3066 | 3066 |
| 3067 if (m_loadEventProgress == LoadEventNotRun) | 3067 if (m_loadEventProgress == LoadEventNotRun) |
| 3068 return; | 3068 return; |
| 3069 | 3069 |
| 3070 if (m_loadEventProgress <= UnloadEventInProgress) { | 3070 if (m_loadEventProgress <= UnloadEventInProgress) { |
| 3071 if (page()) |
| 3072 page()->willUnloadDocument(*this); |
| 3071 Element* currentFocusedElement = focusedElement(); | 3073 Element* currentFocusedElement = focusedElement(); |
| 3072 if (isHTMLInputElement(currentFocusedElement)) | 3074 if (isHTMLInputElement(currentFocusedElement)) |
| 3073 toHTMLInputElement(*currentFocusedElement).endEditing(); | 3075 toHTMLInputElement(*currentFocusedElement).endEditing(); |
| 3074 if (m_loadEventProgress < PageHideInProgress) { | 3076 if (m_loadEventProgress < PageHideInProgress) { |
| 3075 m_loadEventProgress = PageHideInProgress; | 3077 m_loadEventProgress = PageHideInProgress; |
| 3076 if (LocalDOMWindow* window = domWindow()) | 3078 if (LocalDOMWindow* window = domWindow()) |
| 3077 window->dispatchEvent( | 3079 window->dispatchEvent( |
| 3078 PageTransitionEvent::create(EventTypeNames::pagehide, false), this); | 3080 PageTransitionEvent::create(EventTypeNames::pagehide, false), this); |
| 3079 if (!m_frame) | 3081 if (!m_frame) |
| 3080 return; | 3082 return; |
| (...skipping 3577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6658 } | 6660 } |
| 6659 | 6661 |
| 6660 void showLiveDocumentInstances() { | 6662 void showLiveDocumentInstances() { |
| 6661 WeakDocumentSet& set = liveDocumentSet(); | 6663 WeakDocumentSet& set = liveDocumentSet(); |
| 6662 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6664 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6663 for (blink::Document* document : set) | 6665 for (blink::Document* document : set) |
| 6664 fprintf(stderr, "- Document %p URL: %s\n", document, | 6666 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6665 document->url().getString().utf8().data()); | 6667 document->url().getString().utf8().data()); |
| 6666 } | 6668 } |
| 6667 #endif | 6669 #endif |
| OLD | NEW |