WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
Bug 97171
Support the replace attribute of window.open
https://bugs.webkit.org/show_bug.cgi?id=97171
Summary
Support the replace attribute of window.open
KyungTae Kim
Reported
2012-09-19 22:38:53 PDT
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);
Attachments
test case
(201 bytes, text/html)
2012-09-19 22:39 PDT
,
KyungTae Kim
no flags
Details
Patch
(15.80 KB, patch)
2012-09-24 03:42 PDT
,
KyungTae Kim
no flags
Details
Formatted Diff
Diff
Patch
(11.80 KB, patch)
2012-11-01 02:37 PDT
,
KyungTae Kim
abarth
: review-
webkit-ews
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
KyungTae Kim
Comment 1
2012-09-19 22:39:26 PDT
Created
attachment 164841
[details]
test case
KyungTae Kim
Comment 2
2012-09-24 03:42:47 PDT
Created
attachment 165346
[details]
Patch
Build Bot
Comment 3
2012-09-24 04:30:46 PDT
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
WebKit Review Bot
Comment 4
2012-09-24 08:58:58 PDT
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
WebKit Review Bot
Comment 5
2012-09-24 10:00:14 PDT
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
KyungTae Kim
Comment 6
2012-11-01 01:13:33 PDT
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?
KyungTae Kim
Comment 7
2012-11-01 02:37:25 PDT
Created
attachment 171800
[details]
Patch
Early Warning System Bot
Comment 8
2012-11-01 02:46:36 PDT
Comment on
attachment 171800
[details]
Patch
Attachment 171800
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/14670434
Early Warning System Bot
Comment 9
2012-11-01 02:47:57 PDT
Comment on
attachment 171800
[details]
Patch
Attachment 171800
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/14697238
Build Bot
Comment 10
2012-11-01 03:09:25 PDT
Comment on
attachment 171800
[details]
Patch
Attachment 171800
[details]
did not pass win-ews (win): Output:
http://queues.webkit.org/results/14693459
Build Bot
Comment 11
2012-11-01 03:12:04 PDT
Comment on
attachment 171800
[details]
Patch
Attachment 171800
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/14696268
EFL EWS Bot
Comment 12
2012-11-01 04:01:14 PDT
Comment on
attachment 171800
[details]
Patch
Attachment 171800
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/14656506
EFL EWS Bot
Comment 13
2012-11-01 04:20:10 PDT
Comment on
attachment 171800
[details]
Patch
Attachment 171800
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/14685552
WebKit Review Bot
Comment 14
2012-11-01 04:45:33 PDT
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
WebKit Review Bot
Comment 15
2012-11-01 05:41:29 PDT
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
Adam Barth
Comment 16
2012-11-01 08:01:50 PDT
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
Ian 'Hixie' Hickson
Comment 17
2012-11-01 14:42:12 PDT
(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.
Chris Dumez
Comment 18
2016-07-14 11:53:18 PDT
Only IE/Edge implements this. It looks like it is about to get removed from the specification:
https://github.com/whatwg/html/pull/1556
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug