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

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

Issue 2447653002: INPUT element: Do not dispatch events in detachLayoutTree(). (Closed)
Patch Set: Created 4 years, 2 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/core/html/forms/ColorInputType.cpp ('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/WebPagePopupImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebPagePopupImpl.cpp b/third_party/WebKit/Source/web/WebPagePopupImpl.cpp
index 7a9d696d6a124aa000f0dff8f5159a5281a70f2b..e41a86be8aa332207b6cdbbe12332332e7578a89 100644
--- a/third_party/WebKit/Source/web/WebPagePopupImpl.cpp
+++ b/third_party/WebKit/Source/web/WebPagePopupImpl.cpp
@@ -518,26 +518,27 @@ void WebPagePopupImpl::close() {
}
void WebPagePopupImpl::closePopup() {
- // This function can be called in EventDispatchForbiddenScope for the main
- // document, and the following operations dispatch some events. It's safe
- // because web authors can't listen the events.
- EventDispatchForbiddenScope::AllowUserAgentEvents allowEvents;
-
- if (m_page) {
- toLocalFrame(m_page->mainFrame())->loader().stopAllLoaders();
- PagePopupSupplement::uninstall(*toLocalFrame(m_page->mainFrame()));
- }
- bool closeAlreadyCalled = m_closing;
- m_closing = true;
+ {
+ // This function can be called in EventDispatchForbiddenScope for the main
+ // document, and the following operations dispatch some events. It's safe
+ // because web authors can't listen the events.
+ EventDispatchForbiddenScope::AllowUserAgentEvents allowEvents;
+
+ if (m_page) {
+ toLocalFrame(m_page->mainFrame())->loader().stopAllLoaders();
+ PagePopupSupplement::uninstall(*toLocalFrame(m_page->mainFrame()));
+ }
+ bool closeAlreadyCalled = m_closing;
+ m_closing = true;
- destroyPage();
+ destroyPage();
- // m_widgetClient might be 0 because this widget might be already closed.
- if (m_widgetClient && !closeAlreadyCalled) {
- // closeWidgetSoon() will call this->close() later.
- m_widgetClient->closeWidgetSoon();
+ // m_widgetClient might be 0 because this widget might be already closed.
+ if (m_widgetClient && !closeAlreadyCalled) {
+ // closeWidgetSoon() will call this->close() later.
+ m_widgetClient->closeWidgetSoon();
+ }
}
-
m_popupClient->didClosePopup();
m_webView->cleanupPagePopup();
}
« no previous file with comments | « third_party/WebKit/Source/core/html/forms/ColorInputType.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698