Bug 169747 - _blank / _self / _parent / _top browsing context names should be case-insensitive
Summary: _blank / _self / _parent / _top browsing context names should be case-insensi...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
: 169748 170128 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-03-16 06:15 PDT by Lyza Gardner
Modified: 2017-04-05 06:36 PDT (History)
10 users (show)

See Also:


Attachments
Patch (46.07 KB, patch)
2017-04-04 20:11 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lyza Gardner 2017-03-16 06:15:18 PDT
Per section 7.1.5 Named Browsing Contexts[1] of the WHATWG HTML specification:

> A valid browsing context name or keyword is any string that is either a valid browsing context name or that is an ASCII case-insensitive match for one of: _blank, _self, _parent, or _top.

However, the behavior observed is that case-mixed variants of `_blank` are treated as non-keyword browsing context names. To reproduce, e.g.:

1. `window.open` into `_bLAnk`
2. `window.open` into `_bLAnk`

Expected result:

Browser should create two new browsing contexts, treating `_bLAnk` as a case-insensitive match for the keyword `_blank`.

Actual result:

Browser only creates one new browsing context. The second invocation of `window.open` reuses the `_bLAnk` browsing context created by the first invocation.

Relevant web-platform-tests: https://github.com/w3c/web-platform-tests/pull/5145

[1] https://html.spec.whatwg.org/#browsing-context-names
Comment 1 PhistucK 2017-03-20 03:37:18 PDT
Filed an HTML issue, so this might not be a bug -
https://github.com/whatwg/html/issues/2443
Comment 2 Simon Pieters (:zcorpan) 2017-03-27 00:24:29 PDT
Concluded in https://github.com/whatwg/html/issues/2443#issuecomment-289043039 that case-insensitive is better.
Comment 3 Chris Dumez 2017-04-04 20:11:02 PDT
Created attachment 306240 [details]
Patch
Comment 4 Chris Dumez 2017-04-04 20:13:33 PDT
*** Bug 169748 has been marked as a duplicate of this bug. ***
Comment 5 Chris Dumez 2017-04-04 20:13:38 PDT
*** Bug 170128 has been marked as a duplicate of this bug. ***
Comment 6 WebKit Commit Bot 2017-04-05 06:36:50 PDT
Comment on attachment 306240 [details]
Patch

Clearing flags on attachment: 306240

Committed r214944: <http://trac.webkit.org/changeset/214944>
Comment 7 WebKit Commit Bot 2017-04-05 06:36:52 PDT
All reviewed patches have been landed.  Closing bug.