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

Unified Diff: third_party/WebKit/Source/core/html/HTMLDialogElement.cpp

Issue 2355743005: Queue a close event for dialog.close (Closed)
Patch Set: Queue a close event for dialog.close Created 4 years, 3 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/HTMLDialogElement.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/core/html/HTMLDialogElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLDialogElement.cpp b/third_party/WebKit/Source/core/html/HTMLDialogElement.cpp
index c915e17df2d5c88a884cad83464a17d13a8396e6..7400fe10aefd810cd9d050327652253d9f02e2af 100644
--- a/third_party/WebKit/Source/core/html/HTMLDialogElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLDialogElement.cpp
@@ -122,7 +122,7 @@ void HTMLDialogElement::closeDialog(const String& returnValue)
if (!returnValue.isNull())
m_returnValue = returnValue;
- dispatchScopedEvent(Event::create(EventTypeNames::close));
+ scheduleCloseEvent();
}
void HTMLDialogElement::forceLayoutForCentering()
@@ -133,6 +133,13 @@ void HTMLDialogElement::forceLayoutForCentering()
setNotCentered();
}
+void HTMLDialogElement::scheduleCloseEvent()
+{
+ Event* event = Event::create(EventTypeNames::close);
+ event->setTarget(this);
+ document().enqueueAnimationFrameEvent(event);
+}
+
void HTMLDialogElement::show()
{
if (fastHasAttribute(openAttr))
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLDialogElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698