| 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 3233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3244 | 3244 |
| 3245 void Document::DispatchUnloadEvents() { | 3245 void Document::DispatchUnloadEvents() { |
| 3246 PluginScriptForbiddenScope forbid_plugin_destructor_scripting; | 3246 PluginScriptForbiddenScope forbid_plugin_destructor_scripting; |
| 3247 if (parser_) | 3247 if (parser_) |
| 3248 parser_->StopParsing(); | 3248 parser_->StopParsing(); |
| 3249 | 3249 |
| 3250 if (load_event_progress_ == kLoadEventNotRun) | 3250 if (load_event_progress_ == kLoadEventNotRun) |
| 3251 return; | 3251 return; |
| 3252 | 3252 |
| 3253 if (load_event_progress_ <= kUnloadEventInProgress) { | 3253 if (load_event_progress_ <= kUnloadEventInProgress) { |
| 3254 if (GetPage()) | |
| 3255 GetPage()->WillUnloadDocument(*this); | |
| 3256 Element* current_focused_element = FocusedElement(); | 3254 Element* current_focused_element = FocusedElement(); |
| 3257 if (isHTMLInputElement(current_focused_element)) | 3255 if (isHTMLInputElement(current_focused_element)) |
| 3258 toHTMLInputElement(*current_focused_element).EndEditing(); | 3256 toHTMLInputElement(*current_focused_element).EndEditing(); |
| 3259 if (load_event_progress_ < kPageHideInProgress) { | 3257 if (load_event_progress_ < kPageHideInProgress) { |
| 3260 load_event_progress_ = kPageHideInProgress; | 3258 load_event_progress_ = kPageHideInProgress; |
| 3261 if (LocalDOMWindow* window = domWindow()) | 3259 if (LocalDOMWindow* window = domWindow()) |
| 3262 window->DispatchEvent( | 3260 window->DispatchEvent( |
| 3263 PageTransitionEvent::Create(EventTypeNames::pagehide, false), this); | 3261 PageTransitionEvent::Create(EventTypeNames::pagehide, false), this); |
| 3264 if (!frame_) | 3262 if (!frame_) |
| 3265 return; | 3263 return; |
| (...skipping 3660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6926 } | 6924 } |
| 6927 | 6925 |
| 6928 void showLiveDocumentInstances() { | 6926 void showLiveDocumentInstances() { |
| 6929 WeakDocumentSet& set = liveDocumentSet(); | 6927 WeakDocumentSet& set = liveDocumentSet(); |
| 6930 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6928 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6931 for (blink::Document* document : set) | 6929 for (blink::Document* document : set) |
| 6932 fprintf(stderr, "- Document %p URL: %s\n", document, | 6930 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6933 document->Url().GetString().Utf8().data()); | 6931 document->Url().GetString().Utf8().data()); |
| 6934 } | 6932 } |
| 6935 #endif | 6933 #endif |
| OLD | NEW |