RESOLVED FIXED 36202
popstate event should be dispatched asynchronously
https://bugs.webkit.org/show_bug.cgi?id=36202
Summary popstate event should be dispatched asynchronously
Darin Fisher (:fishd, Google)
Reported Wednesday, March 17, 2010 12:51:24 AM UTC
popstate event should be dispatched asynchronously see step #10.2 of the history traversal algorithm (section 6.5.9): http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#traverse-the-history this is a recent change to the spec
Attachments
Patch (9.50 KB, patch)
2011-02-08 09:18 PST, Mihai Parparita
no flags
Patch (9.43 KB, patch)
2015-11-11 18:55 PST, Jon Honeycutt
bfulgham: review+
Brady Eidson
Comment 1 Wednesday, March 17, 2010 12:53:19 AM UTC
Mihai Parparita
Comment 2 Tuesday, February 8, 2011 5:18:38 PM UTC
Mihai Parparita
Comment 3 Tuesday, February 8, 2011 5:19:16 PM UTC
Darin, let me know if the change to FrameLoaderClientImpl::pluginLoadObserver can be tested.
Darin Fisher (:fishd, Google)
Comment 4 Tuesday, February 8, 2011 5:42:15 PM UTC
Comment on attachment 81647 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=81647&action=review > Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp:-1548 > - // We can arrive here if a popstate event handler detaches this frame. To test this, I think you'd need to modify the NPAPI test plugin. This patch actually fixes the bug where we would fail to notify a plugin of when a frame finishes navigating. You could have a test, where a plugin uses NPN_GetURLNotify w/ target equal to the name of a frame. It expects to receive a NPP_URLNotify call once the frame navigation completes. I'm not sure if TestNetscapePlugin has any tests like this already.
Eric Seidel (no email)
Comment 5 Saturday, June 18, 2011 9:42:48 PM UTC
Attachment 81647 [details] was posted by a committer and has review+, assigning to Mihai Parparita for commit.
Jon Honeycutt
Comment 6 Thursday, November 12, 2015 2:55:53 AM UTC
Brent Fulgham
Comment 7 Thursday, November 12, 2015 3:13:30 AM UTC
Comment on attachment 265347 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=265347&action=review Looks great! R=me. > Source/WebCore/ChangeLog:4 > + https://bugs.webkit.org/show_bug.cgi?id=36202 I think there might be a radar for this. Can you add it, please? > Source/WebCore/ChangeLog:6 > + Based on an original patch by Mihai Parparita <mihaip@chromium.org>. Please reference the CRBugs entry, if available.
Jon Honeycutt
Comment 8 Thursday, November 12, 2015 7:00:01 AM UTC
(In reply to comment #7) > Comment on attachment 265347 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=265347&action=review > > Looks great! R=me. > > > Source/WebCore/ChangeLog:4 > > + https://bugs.webkit.org/show_bug.cgi?id=36202 > > I think there might be a radar for this. Can you add it, please? Fixed. > > > Source/WebCore/ChangeLog:6 > > + Based on an original patch by Mihai Parparita <mihaip@chromium.org>. > > Please reference the CRBugs entry, if available. The original patch came from this bug, not a CR. Thanks for the review! I've pinged Brady to take a look at this as well before I land it.
Jon Honeycutt
Comment 9 Thursday, November 12, 2015 6:39:08 PM UTC
Andy Estes
Comment 10 Tuesday, January 26, 2016 1:10:32 AM UTC
I don't think this fix is right. The spec says to dispatch the event asynchronously only when the "asynchronous events" flag is set. This flag is only set is during navigation to a fragment identifier, afaict. For cases like history.back(), we still want to dispatch the event synchronously (which makes sense, because the history navigation itself happens asynchronously).
Brady Eidson
Comment 11 Tuesday, January 26, 2016 2:53:45 AM UTC
(In reply to comment #10) > I don't think this fix is right. The spec says to dispatch the event > asynchronously only when the "asynchronous events" flag is set. This flag is > only set is during navigation to a fragment identifier, afaict. For cases > like history.back(), we still want to dispatch the event synchronously > (which makes sense, because the history navigation itself happens > asynchronously). Reading the spec, yup you're right.
Andy Estes
Comment 12 Saturday, January 30, 2016 12:22:32 AM UTC
(In reply to comment #11) > (In reply to comment #10) > > I don't think this fix is right. The spec says to dispatch the event > > asynchronously only when the "asynchronous events" flag is set. This flag is > > only set is during navigation to a fragment identifier, afaict. For cases > > like history.back(), we still want to dispatch the event synchronously > > (which makes sense, because the history navigation itself happens > > asynchronously). > > Reading the spec, yup you're right. I filed https://bugs.webkit.org/show_bug.cgi?id=153686
Note You need to log in before you can comment on or make changes to this bug.