According to a spec of window.open() below, if the 'replace' attribute is false, the current window must be exist in the window's session history. http://www.w3.org/TR/2009/WD-html5-20090423/browsers.html#dom-open When test with the attached html file, I can back to the page after redirected on the IE and the the Firefox, but not on the Webkit browser. Is the last parameter of the below function ignored on Webkit? window.open("http://www.google.com", "_self", "", false);
Created attachment 164841 [details] test case
Created attachment 165346 [details] Patch
Comment on attachment 165346 [details] Patch Attachment 165346 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/13994604 New failing tests: fast/history/window-open-replace-true.html fast/history/window-open-replace-false.html fast/history/gesture-before-onload-form-submit.html
Comment on attachment 165346 [details] Patch Attachment 165346 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13985751 New failing tests: fast/history/window-open-replace-false.html fast/history/gesture-before-onload-form-submit.html
Comment on attachment 165346 [details] Patch Attachment 165346 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13993687 New failing tests: fast/history/window-open-replace-false.html fast/history/gesture-before-onload-form-submit.html
The standard says "the replace attribute, if true, means that whatever page is currently open in that window will be removed from the window's session history". http://www.w3.org/TR/2009/WD-html5-20090423/browsers.html#dom-open Then, if the replace attribute is false, what is proper operation? Not remove the current opened page, or following "by the user gesture" rules?
Created attachment 171800 [details] Patch
Comment on attachment 171800 [details] Patch Attachment 171800 [details] did not pass qt-ews (qt): Output: http://queues.webkit.org/results/14670434
Comment on attachment 171800 [details] Patch Attachment 171800 [details] did not pass qt-wk2-ews (qt): Output: http://queues.webkit.org/results/14697238
Comment on attachment 171800 [details] Patch Attachment 171800 [details] did not pass win-ews (win): Output: http://queues.webkit.org/results/14693459
Comment on attachment 171800 [details] Patch Attachment 171800 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/14696268
Comment on attachment 171800 [details] Patch Attachment 171800 [details] did not pass efl-ews (efl): Output: http://queues.webkit.org/results/14656506
Comment on attachment 171800 [details] Patch Attachment 171800 [details] did not pass efl-ews (efl): Output: http://queues.webkit.org/results/14685552
Comment on attachment 171800 [details] Patch Attachment 171800 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/14670460 New failing tests: fast/history/window-open-replace-false.html
Comment on attachment 171800 [details] Patch Attachment 171800 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/14693489 New failing tests: fast/history/window-open-replace-false.html
Comment on attachment 171800 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=171800&action=review Looks like you have compile and test failures. > Source/WebCore/page/DOMWindow.cpp:1933 > + bool lockHistory = false, lockBackForwardList = false; > + if (locking == LockHistoryAndBackForwardList) > + lockHistory = lockBackForwardList = true; This is pretty far out of style. Please take a look at http://www.webkit.org/coding/coding-style.html
(In reply to comment #6) > The standard says "the replace attribute, if true, means that whatever page is currently open in that window will be removed from the window's session history". > http://www.w3.org/TR/2009/WD-html5-20090423/browsers.html#dom-open First, that's a REALLY OLD version of the spec, quite obsolete. The up to date link is: http://whatwg.org/html#dom-open The behaviour of the "replace" argument is just "If the replace is true or if the browsing context was just created as part of the rules for choosing a browsing context given a browsing context name, then replacement must be enabled". (The text quoted in comment 6 isn't normative and doesn't define what "replace" does, it's just descriptive. Please ignore it for when implementing the spec. See the introduction to the spec for information on how to read the spec to avoid interpreting non-normative statements as normative ones; the basic idea is that if it doesn't say "must", it's not normative.) The meaning of "replacement enabled" is defined here: http://whatwg.org/html#replacement-enabled If "replace" isn't specified, then replacement isn't enabled and so the text above doesn't take effect. HTH.
Only IE/Edge implements this. It looks like it is about to get removed from the specification: https://github.com/whatwg/html/pull/1556