Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2956593003: Revert of Move navigation-induced hiding of form-validation-bubble to the browser process. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 3211 matching lines...) Expand 10 before | Expand all | Expand 10 after
3222 3222
3223 void Document::DispatchUnloadEvents() { 3223 void Document::DispatchUnloadEvents() {
3224 PluginScriptForbiddenScope forbid_plugin_destructor_scripting; 3224 PluginScriptForbiddenScope forbid_plugin_destructor_scripting;
3225 if (parser_) 3225 if (parser_)
3226 parser_->StopParsing(); 3226 parser_->StopParsing();
3227 3227
3228 if (load_event_progress_ == kLoadEventNotRun) 3228 if (load_event_progress_ == kLoadEventNotRun)
3229 return; 3229 return;
3230 3230
3231 if (load_event_progress_ <= kUnloadEventInProgress) { 3231 if (load_event_progress_ <= kUnloadEventInProgress) {
3232 if (GetPage())
3233 GetPage()->WillUnloadDocument(*this);
3232 Element* current_focused_element = FocusedElement(); 3234 Element* current_focused_element = FocusedElement();
3233 if (isHTMLInputElement(current_focused_element)) 3235 if (isHTMLInputElement(current_focused_element))
3234 toHTMLInputElement(*current_focused_element).EndEditing(); 3236 toHTMLInputElement(*current_focused_element).EndEditing();
3235 if (load_event_progress_ < kPageHideInProgress) { 3237 if (load_event_progress_ < kPageHideInProgress) {
3236 load_event_progress_ = kPageHideInProgress; 3238 load_event_progress_ = kPageHideInProgress;
3237 if (LocalDOMWindow* window = domWindow()) 3239 if (LocalDOMWindow* window = domWindow())
3238 window->DispatchEvent( 3240 window->DispatchEvent(
3239 PageTransitionEvent::Create(EventTypeNames::pagehide, false), this); 3241 PageTransitionEvent::Create(EventTypeNames::pagehide, false), this);
3240 if (!frame_) 3242 if (!frame_)
3241 return; 3243 return;
(...skipping 3656 matching lines...) Expand 10 before | Expand all | Expand 10 after
6898 } 6900 }
6899 6901
6900 void showLiveDocumentInstances() { 6902 void showLiveDocumentInstances() {
6901 WeakDocumentSet& set = liveDocumentSet(); 6903 WeakDocumentSet& set = liveDocumentSet();
6902 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6904 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6903 for (blink::Document* document : set) 6905 for (blink::Document* document : set)
6904 fprintf(stderr, "- Document %p URL: %s\n", document, 6906 fprintf(stderr, "- Document %p URL: %s\n", document,
6905 document->Url().GetString().Utf8().data()); 6907 document->Url().GetString().Utf8().data());
6906 } 6908 }
6907 #endif 6909 #endif
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl_browsertest.cc ('k') | third_party/WebKit/Source/core/dom/DocumentTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698