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

Issue 136463002: Don't fire popstate event on initial document load (Closed)

Created:
6 years, 11 months ago by Jens Widell
Modified:
6 years, 11 months ago
CC:
blink-reviews, b_lupton.cc
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Don't fire popstate event on initial document load According to the specification [1], a popstate event should only be fired when the document has a "last entry" and the entry being navigated to isn't it. A document is created without a "last entry" and gets one just after this check when it is first navigated to, so a popstate should be fired any time a document is navigated to except for the first time after it has been created. [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#traverse-the-history (step 12-14 in particular) BUG=63040 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=165221

Patch Set 1 #

Total comments: 3

Patch Set 2 : add 'window.' prefix #

Patch Set 3 : update a few more tests #

Patch Set 4 : rebased #

Total comments: 1

Patch Set 5 : fix replacestate-in-iframe test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -153 lines) Patch
M LayoutTests/fast/history/same-document-iframes-changing-fragment-expected.txt View 1 chunk +0 lines, -1 line 0 comments Download
M LayoutTests/fast/history/same-document-iframes-changing-pushstate-expected.txt View 1 chunk +0 lines, -1 line 0 comments Download
M LayoutTests/fast/loader/stateobjects/document-destroyed-navigate-back.html View 2 chunks +1 line, -13 lines 0 comments Download
M LayoutTests/fast/loader/stateobjects/document-destroyed-navigate-back-with-fragment-scroll.html View 2 chunks +1 line, -13 lines 0 comments Download
M LayoutTests/fast/loader/stateobjects/popstate-after-load-complete-addeventlistener.html View 2 chunks +1 line, -11 lines 0 comments Download
M LayoutTests/fast/loader/stateobjects/popstate-after-load-complete-body-attribute.html View 2 chunks +1 line, -11 lines 0 comments Download
M LayoutTests/fast/loader/stateobjects/popstate-after-load-complete-body-inline-attribute.html View 2 chunks +1 line, -11 lines 0 comments Download
M LayoutTests/fast/loader/stateobjects/popstate-after-load-complete-window-attribute.html View 2 chunks +1 line, -11 lines 0 comments Download
M LayoutTests/fast/loader/stateobjects/pushstate-object-types.html View 2 chunks +1 line, -12 lines 0 comments Download
M LayoutTests/fast/loader/stateobjects/pushstate-then-replacestate.html View 2 chunks +1 line, -11 lines 0 comments Download
M LayoutTests/fast/loader/stateobjects/pushstate-with-fragment-urls-and-hashchange.html View 2 chunks +1 line, -11 lines 0 comments Download
M LayoutTests/fast/loader/stateobjects/replacestate-then-pushstate.html View 2 chunks +1 line, -11 lines 0 comments Download
M LayoutTests/fast/loader/stateobjects/resources/pushstate-in-iframe-child.html View 1 2 3 1 chunk +0 lines, -8 lines 0 comments Download
M LayoutTests/fast/loader/stateobjects/resources/replacestate-in-iframe-window-child.html View 1 2 3 4 1 chunk +9 lines, -8 lines 0 comments Download
M LayoutTests/http/tests/history/popstate-fires-with-pending-requests.html View 1 2 2 chunks +14 lines, -15 lines 0 comments Download
M LayoutTests/http/tests/navigation/redirect-on-back-updates-history-item-expected.txt View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M LayoutTests/http/tests/navigation/redirect-on-reload-updates-history-item-expected.txt View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/frame/DOMWindow.cpp View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 18 (0 generated)
Jens Widell
Please have a look when possible. Minimal code change, and a bunch of existing test ...
6 years, 11 months ago (2014-01-13 10:54:33 UTC) #1
arv (Not doing code reviews)
LGTM https://codereview.chromium.org/136463002/diff/1/LayoutTests/fast/loader/stateobjects/resources/replacestate-in-iframe-window-child.html File LayoutTests/fast/loader/stateobjects/resources/replacestate-in-iframe-window-child.html (right): https://codereview.chromium.org/136463002/diff/1/LayoutTests/fast/loader/stateobjects/resources/replacestate-in-iframe-window-child.html#newcode2 LayoutTests/fast/loader/stateobjects/resources/replacestate-in-iframe-window-child.html:2: onload = function() { window.onload = function() { ...
6 years, 11 months ago (2014-01-13 14:26:43 UTC) #2
Jens Widell
Many thanks for quick review! https://codereview.chromium.org/136463002/diff/1/LayoutTests/fast/loader/stateobjects/resources/replacestate-in-iframe-window-child.html File LayoutTests/fast/loader/stateobjects/resources/replacestate-in-iframe-window-child.html (right): https://codereview.chromium.org/136463002/diff/1/LayoutTests/fast/loader/stateobjects/resources/replacestate-in-iframe-window-child.html#newcode2 LayoutTests/fast/loader/stateobjects/resources/replacestate-in-iframe-window-child.html:2: onload = function() { ...
6 years, 11 months ago (2014-01-13 14:57:04 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jl@opera.com/136463002/50001
6 years, 11 months ago (2014-01-13 14:57:35 UTC) #4
Jens Widell
On 2014/01/13 14:26:43, arv wrote: > LGTM I had somehow missed some tests that needed ...
6 years, 11 months ago (2014-01-13 16:02:49 UTC) #5
arv (Not doing code reviews)
Still LGTM
6 years, 11 months ago (2014-01-13 16:06:33 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jl@opera.com/136463002/190001
6 years, 11 months ago (2014-01-13 16:09:51 UTC) #7
commit-bot: I haz the power
Retried try job too often on linux_blink for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_blink&number=7328
6 years, 11 months ago (2014-01-13 18:45:27 UTC) #8
Jens Widell
On 2014/01/13 18:45:27, I haz the power (commit-bot) wrote: > Retried try job too often ...
6 years, 11 months ago (2014-01-14 11:02:05 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jl@opera.com/136463002/350001
6 years, 11 months ago (2014-01-15 10:43:45 UTC) #10
commit-bot: I haz the power
Retried try job too often on win_blink_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_blink_rel&number=22785
6 years, 11 months ago (2014-01-15 17:30:49 UTC) #11
eseidel
Woh. This is scary. Are we sure that things like History.js still work? I remember ...
6 years, 11 months ago (2014-01-15 17:33:20 UTC) #12
Jens Widell
On 2014/01/15 17:33:20, eseidel wrote: > Woh. This is scary. Are we sure that things ...
6 years, 11 months ago (2014-01-15 17:42:56 UTC) #13
eseidel
In the end, we should strive to match the spec/other-browsers perfectly and eventually libraries/apps will ...
6 years, 11 months ago (2014-01-15 17:56:39 UTC) #14
balupton
On 2014/01/15 17:56:39, eseidel wrote: > In the end, we should strive to match the ...
6 years, 11 months ago (2014-01-15 18:11:44 UTC) #15
Jens Widell
https://codereview.chromium.org/136463002/diff/350001/LayoutTests/fast/loader/stateobjects/resources/replacestate-in-iframe-window-child.html File LayoutTests/fast/loader/stateobjects/resources/replacestate-in-iframe-window-child.html (right): https://codereview.chromium.org/136463002/diff/350001/LayoutTests/fast/loader/stateobjects/resources/replacestate-in-iframe-window-child.html#newcode3 LayoutTests/fast/loader/stateobjects/resources/replacestate-in-iframe-window-child.html:3: top.opener.windowLoaded(); Since the window is navigated to a different ...
6 years, 11 months ago (2014-01-16 08:16:19 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jl@opera.com/136463002/570001
6 years, 11 months ago (2014-01-16 12:41:39 UTC) #17
commit-bot: I haz the power
6 years, 11 months ago (2014-01-16 13:53:36 UTC) #18
Message was sent while issue was closed.
Change committed as 165221

Powered by Google App Engine
This is Rietveld 408576698