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

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

Issue 2771193002: Form validation: Validation bubble should be closed on document unload process. (Closed)
Patch Set: . Created 3 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/DocumentTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3060 matching lines...) Expand 10 before | Expand all | Expand 10 after
3071 3071
3072 void Document::dispatchUnloadEvents() { 3072 void Document::dispatchUnloadEvents() {
3073 PluginScriptForbiddenScope forbidPluginDestructorScripting; 3073 PluginScriptForbiddenScope forbidPluginDestructorScripting;
3074 if (m_parser) 3074 if (m_parser)
3075 m_parser->stopParsing(); 3075 m_parser->stopParsing();
3076 3076
3077 if (m_loadEventProgress == LoadEventNotRun) 3077 if (m_loadEventProgress == LoadEventNotRun)
3078 return; 3078 return;
3079 3079
3080 if (m_loadEventProgress <= UnloadEventInProgress) { 3080 if (m_loadEventProgress <= UnloadEventInProgress) {
3081 if (page())
3082 page()->willUnloadDocument(*this);
3081 Element* currentFocusedElement = focusedElement(); 3083 Element* currentFocusedElement = focusedElement();
3082 if (isHTMLInputElement(currentFocusedElement)) 3084 if (isHTMLInputElement(currentFocusedElement))
3083 toHTMLInputElement(*currentFocusedElement).endEditing(); 3085 toHTMLInputElement(*currentFocusedElement).endEditing();
3084 if (m_loadEventProgress < PageHideInProgress) { 3086 if (m_loadEventProgress < PageHideInProgress) {
3085 m_loadEventProgress = PageHideInProgress; 3087 m_loadEventProgress = PageHideInProgress;
3086 if (LocalDOMWindow* window = domWindow()) 3088 if (LocalDOMWindow* window = domWindow())
3087 window->dispatchEvent( 3089 window->dispatchEvent(
3088 PageTransitionEvent::create(EventTypeNames::pagehide, false), this); 3090 PageTransitionEvent::create(EventTypeNames::pagehide, false), this);
3089 if (!m_frame) 3091 if (!m_frame)
3090 return; 3092 return;
(...skipping 3565 matching lines...) Expand 10 before | Expand all | Expand 10 after
6656 } 6658 }
6657 6659
6658 void showLiveDocumentInstances() { 6660 void showLiveDocumentInstances() {
6659 WeakDocumentSet& set = liveDocumentSet(); 6661 WeakDocumentSet& set = liveDocumentSet();
6660 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6662 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6661 for (blink::Document* document : set) 6663 for (blink::Document* document : set)
6662 fprintf(stderr, "- Document %p URL: %s\n", document, 6664 fprintf(stderr, "- Document %p URL: %s\n", document,
6663 document->url().getString().utf8().data()); 6665 document->url().getString().utf8().data());
6664 } 6666 }
6665 #endif 6667 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/DocumentTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698