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

Unified Diff: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp

Issue 2815803003: Make Pageshow event asynchronous in EventQueueScope (Closed)
Patch Set: Delete unnecessary change 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
Index: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
index e3135f1287c06d78933b25eb417a9570161103b4..abf4836a9dfa17662230ca6846fb32c27f502d83 100644
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
@@ -425,7 +425,12 @@ void LocalDOMWindow::EnqueuePageshowEvent(PageshowEventPersistence persisted) {
// FIXME: https://bugs.webkit.org/show_bug.cgi?id=36334 Pageshow event needs
// to fire asynchronously. As per spec pageshow must be triggered
// asynchronously. However to be compatible with other browsers blink fires
tkent 2017/04/13 01:26:16 Did you check behavior of latest versions of other
tkent 2017/04/13 06:19:14 We had offline discussion. It's too difficult to r
- // pageshow synchronously.
+ // pageshow synchronously unless we are in EventQueueScope.
+ if (ScopedEventQueue::Instance()->ShouldQueueEvents() && document_) {
yosin_UTC9 2017/04/12 10:08:03 Nice finding. I've not known |(ScopedEventQueue::I
+ EnqueueWindowEvent(
+ PageTransitionEvent::Create(EventTypeNames::pageshow, persisted));
+ return;
+ }
DispatchEvent(
PageTransitionEvent::Create(EventTypeNames::pageshow, persisted),
document_.Get());

Powered by Google App Engine
This is Rietveld 408576698