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

Unified Diff: third_party/WebKit/Source/web/ValidationMessageClientImpl.cpp

Issue 2834783002: window.print() should close form validation bubble. (Closed)
Patch Set: Created 3 years, 8 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 0608b48da7ec413276a3cd293be6a155b1403429..784a1a268f95bb54b75f416598738cbb8f738d46 100644
--- a/third_party/WebKit/Source/web/ValidationMessageClientImpl.cpp
+++ b/third_party/WebKit/Source/web/ValidationMessageClientImpl.cpp
@@ -84,6 +84,7 @@ void ValidationMessageClientImpl::ShowValidationMessage(
web_view_.Client()->ShowValidationMessage(
anchor_in_viewport, message_, ToWebTextDirection(message_dir),
sub_message, ToWebTextDirection(sub_message_dir));
+ web_view_.ChromeClient().RegisterPopupOpeningObserver(this);
finish_time_ =
MonotonicallyIncreasingTime() +
@@ -105,6 +106,7 @@ void ValidationMessageClientImpl::HideValidationMessage(const Element& anchor) {
message_ = String();
finish_time_ = 0;
web_view_.Client()->HideValidationMessage();
+ web_view_.ChromeClient().UnregisterPopupOpeningObserver(this);
}
bool ValidationMessageClientImpl::IsValidationMessageVisible(
@@ -152,6 +154,11 @@ void ValidationMessageClientImpl::WillBeDestroyed() {
HideValidationMessage(*current_anchor_);
}
+void ValidationMessageClientImpl::WillOpenPopup() {
+ if (current_anchor_)
+ HideValidationMessage(*current_anchor_);
+}
+
DEFINE_TRACE(ValidationMessageClientImpl) {
visitor->Trace(current_anchor_);
ValidationMessageClient::Trace(visitor);
« 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