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

Unified Diff: third_party/WebKit/Source/web/ValidationMessageClientImpl.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/web/ValidationMessageClientImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/ValidationMessageClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/ValidationMessageClientImpl.cpp b/third_party/WebKit/Source/web/ValidationMessageClientImpl.cpp
index 294af072b5f51f7b529614fbedc162655bf87a40..c740f75145ad894c1fb50a5118102daf7c623ebc 100644
--- a/third_party/WebKit/Source/web/ValidationMessageClientImpl.cpp
+++ b/third_party/WebKit/Source/web/ValidationMessageClientImpl.cpp
@@ -111,11 +111,16 @@ bool ValidationMessageClientImpl::isValidationMessageVisible(
return m_currentAnchor == &anchor;
}
-void ValidationMessageClientImpl::documentDetached(const Document& document) {
+void ValidationMessageClientImpl::willUnloadDocument(const Document& document) {
if (m_currentAnchor && m_currentAnchor->document() == document)
hideValidationMessage(*m_currentAnchor);
}
+void ValidationMessageClientImpl::documentDetached(const Document& document) {
+ DCHECK(!m_currentAnchor || m_currentAnchor->document() != document)
+ << "willUnloadDocument() should be called beforehand.";
+}
+
void ValidationMessageClientImpl::checkAnchorStatus(TimerBase*) {
DCHECK(m_currentAnchor);
if (monotonicallyIncreasingTime() >= m_finishTime || !currentView()) {
« no previous file with comments | « third_party/WebKit/Source/web/ValidationMessageClientImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698