Changeset 214944 in webkit


Ignore:
Timestamp:
Apr 5, 2017 6:36:47 AM (7 years ago)
Author:
Chris Dumez
Message:

_blank / _self / _parent / _top browsing context names should be case-insensitive
https://bugs.webkit.org/show_bug.cgi?id=169747

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Import test coverage from upstream web-platform-tests.

  • resources/import-expectations.json:
  • web-platform-tests/html/browsers/windows/browsing-context-names/001.html:
  • web-platform-tests/html/browsers/windows/browsing-context-names/002.html:
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank-expected.txt: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-existing.html:
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-001-expected.txt: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-001.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-002-expected.txt: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-002.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-003-expected.txt: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-003.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-004-expected.txt: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-004.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-1.html:
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-2.html:
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-default-name-expected.txt:
  • web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-default-name.html:
  • web-platform-tests/html/browsers/windows/browsing-context-names/existing.html:
  • web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-1.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-2.html: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/existing.html.
  • web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-3.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-insensitive-1.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-insensitive-2.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top-nested.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top-replace.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-opener.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-top-or-close.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-top.html: Added.
  • web-platform-tests/html/browsers/windows/browsing-context-names/resources/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/w3c-import.log.
  • web-platform-tests/html/browsers/windows/browsing-context-names/self1.html:
  • web-platform-tests/html/browsers/windows/browsing-context-names/self2.html:
  • web-platform-tests/html/browsers/windows/browsing-context-names/w3c-import.log:

Source/WebCore:

_blank / _self / _parent / _top browsing context names should be case-insensitive
as per the HTML specification:

This aligns our behavior with Firefox as well. See discussion at:

Tests: imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank.html

imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-001.html
imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-002.html
imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-003.html
imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-004.html

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::createWindow):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::open):

  • page/FrameTree.cpp:

(WebCore::FrameTree::uniqueChildName):
(WebCore::FrameTree::find):

Location:
trunk
Files:
21 added
17 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r214660 r214944  
     12017-04-05  Chris Dumez  <cdumez@apple.com>
     2
     3        _blank / _self / _parent / _top browsing context names should be case-insensitive
     4        https://bugs.webkit.org/show_bug.cgi?id=169747
     5
     6        Reviewed by Alex Christensen.
     7
     8        Import test coverage from upstream web-platform-tests.
     9
     10        * resources/import-expectations.json:
     11        * web-platform-tests/html/browsers/windows/browsing-context-names/001.html:
     12        * web-platform-tests/html/browsers/windows/browsing-context-names/002.html:
     13        * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank-expected.txt: Added.
     14        * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank.html: Added.
     15        * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-existing.html:
     16        * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-001-expected.txt: Added.
     17        * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-001.html: Added.
     18        * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-002-expected.txt: Added.
     19        * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-002.html: Added.
     20        * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-003-expected.txt: Added.
     21        * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-003.html: Added.
     22        * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-004-expected.txt: Added.
     23        * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-004.html: Added.
     24        * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-1.html:
     25        * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-2.html:
     26        * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-default-name-expected.txt:
     27        * web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-default-name.html:
     28        * web-platform-tests/html/browsers/windows/browsing-context-names/existing.html:
     29        * web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-1.html: Added.
     30        * web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-2.html: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/existing.html.
     31        * web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-3.html: Added.
     32        * web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-insensitive-1.html: Added.
     33        * web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-insensitive-2.html: Added.
     34        * web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top-nested.html: Added.
     35        * web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top-replace.html: Added.
     36        * web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top.html: Added.
     37        * web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-opener.html: Added.
     38        * web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-top-or-close.html: Added.
     39        * web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-top.html: Added.
     40        * web-platform-tests/html/browsers/windows/browsing-context-names/resources/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/w3c-import.log.
     41        * web-platform-tests/html/browsers/windows/browsing-context-names/self1.html:
     42        * web-platform-tests/html/browsers/windows/browsing-context-names/self2.html:
     43        * web-platform-tests/html/browsers/windows/browsing-context-names/w3c-import.log:
     44
    1452017-03-31  Manuel Rego Casasnovas  <rego@igalia.com>
    246
  • trunk/LayoutTests/imported/w3c/resources/import-expectations.json

    r214660 r214944  
    200200    "web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/": "import",
    201201    "web-platform-tests/html/browsers/windows/browsing-context-first-created.xhtml": "skip",
     202    "web-platform-tests/html/browsers/windows/browsing-context-names": "import",
    202203    "web-platform-tests/html/browsers/windows/nested-browsing-contexts/frameElement.html": "skip",
    203204    "web-platform-tests/html/browsers/windows/targeting-cross-origin-nested-browsing-contexts.html": "skip",
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/001.html

    r204844 r214944  
    11<!doctype html>
    22<title>Link with target=_blank, rel=noreferrer</title>
    3 <script src="/resources/testharness.js"></script>
    4 <script src="/resources/testharnessreport.js"></script>
     3<script src="../../../../../../../resources/testharness.js"></script>
     4<script src="../../../../../../../resources/testharnessreport.js"></script>
    55<div id="log"></div>
    66<a href="001-1.html" rel="noreferrer" target="_blank">Link</a>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/002.html

    r204844 r214944  
    11<!doctype html>
    22<title>Link with target=_blank, no rel</title>
    3 <script src="/resources/testharness.js"></script>
    4 <script src="/resources/testharnessreport.js"></script>
     3<script src="../../../../../../../resources/testharness.js"></script>
     4<script src="../../../../../../../resources/testharnessreport.js"></script>
    55<div id="log"></div>
    66<a href="002-1.html" target="_blank">Link</a>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-existing.html

    r204844 r214944  
    33<title>HTML Test: Choose browsing context - the given name is same as an existing browsing context's name</title>
    44<link rel="author" title="Intel" href="http://www.intel.com/">
    5 <script src="/resources/testharness.js"></script>
    6 <script src="/resources/testharnessreport.js"></script>
     5<script src="../../../../../../../resources/testharness.js"></script>
     6<script src="../../../../../../../resources/testharnessreport.js"></script>
    77<div id="log"></div>
    88<iframe src="existing.html" style="display:none"></iframe>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-1.html

    r204844 r214944  
    33<title>HTML Test: Choose browsing context - the given name is '_self'</title>
    44<link rel="author" title="Intel" href="http://www.intel.com/">
    5 <script src="/resources/testharness.js"></script>
    6 <script src="/resources/testharnessreport.js"></script>
     5<script src="../../../../../../../resources/testharness.js"></script>
     6<script src="../../../../../../../resources/testharnessreport.js"></script>
    77<div id="log"></div>
    88<iframe src="self1.html" style="display:none"></iframe>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-2.html

    r204844 r214944  
    33<title>HTML Test: Choose browsing context - the given name is empty string</title>
    44<link rel="author" title="Intel" href="http://www.intel.com/">
    5 <script src="/resources/testharness.js"></script>
    6 <script src="/resources/testharnessreport.js"></script>
     5<script src="../../../../../../../resources/testharness.js"></script>
     6<script src="../../../../../../../resources/testharnessreport.js"></script>
    77<div id="log"></div>
    88<iframe src="self2.html" style="display:none"></iframe>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-default-name-expected.txt

    r204844 r214944  
    11
    2 PASS A embedded browsing context has no default name
    3 PASS A browsing context which is opened by window.open() method with '_blank' parameter has no default name
    4 PASS A browsing context has no default name
    5 
     2PASS A embedded browsing context has empty-string default name
     3PASS A browsing context which is opened by window.open() method with '_blank' parameter has empty-string default name
     4PASS A browsing context has an empty-string default name
     5 
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-default-name.html

    r204844 r214944  
    33<title>HTML Test: Browsing context - Default name</title>
    44<link rel="author" title="Intel" href="http://www.intel.com/">
    5 <script src="/resources/testharness.js"></script>
    6 <script src="/resources/testharnessreport.js"></script>
     5<script src="../../../../../../../resources/testharness.js"></script>
     6<script src="../../../../../../../resources/testharnessreport.js"></script>
    77<div id="log"></div>
    8 <iframe src="message.html" style="display:none"></iframe>
     8<iframe src="/common/blank.html" style="display:none"></iframe>
     9<object id="obj" type="text/html" data="about:blank"></object>
     10<embed id="embedded" type="image/svg+xml" src="/images/green.svg" width="0" height="0" />
    911<script>
     12test(t => {
     13  assert_equals(window.frames[0].name, "");
     14  assert_equals(document.getElementById("embedded").name, "");
     15  assert_equals(window["obj"].name, "");
     16}, "A embedded browsing context has empty-string default name");
    1017
    11 test(function () {
    12   assert_equals(window.frames[0].name, "", "The browsing context should not have a default name.");
    13 }, "A embedded browsing context has no default name");
    14 
    15 test(function () {
     18test(t => {
    1619  var win = window.open("about:blank", "_blank");
    17   assert_equals(win.name, "", "The browsing context should not have a name.");
     20  assert_equals(win.name, "");
    1821  win.close();
    19 }, "A browsing context which is opened by window.open() method with '_blank' parameter has no default name");
     22}, "A browsing context which is opened by window.open() method with '_blank' parameter has empty-string default name");
    2023
    2124//This test must be run when the current browsing context's name is not set
    22 test(function () {
    23   assert_equals(window.name, "", "The browsing context should not have a name.");
    24 }, "A browsing context has no default name");
     25test(t => {
     26  assert_equals(window.name, "");
     27}, "A browsing context has an empty-string default name");
    2528
    2629</script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/existing.html

    r204844 r214944  
    66
    77function do_test() {
    8   window.open("message.html", "existWin");
     8  window.open("resources/post-to-top.html", "existWin");
    99}
    1010
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-2.html

    r214943 r214944  
    11<!DOCTYPE html>
    22<meta charset="utf-8">
    3 <title>This is a test page</title>
     3<title>HTML Test: browsing context name - parent</title>
    44<link rel="author" title="Intel" href="http://www.intel.com/">
    55<script>
    66
    7 function do_test() {
    8   window.open("message.html", "existWin");
    9 }
     7window.open("post-to-top.html", "_parent");
    108
    119</script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/w3c-import.log

    r214943 r214944  
    1616------------------------------------------------------------------------
    1717List of files:
    18 /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/001-1.html
    19 /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/001.html
    20 /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/002-1.html
    21 /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/002.html
    22 /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-existing.html
    23 /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent.html
    24 /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-1.html
    25 /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-2.html
    26 /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-default-name.html
    27 /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/existing.html
    28 /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/message.html
    29 /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/parent1.html
    30 /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/parent2.html
    31 /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/self1.html
    32 /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/self2.html
     18/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-1.html
     19/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-2.html
     20/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-3.html
     21/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-insensitive-1.html
     22/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-iframe-insensitive-2.html
     23/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top-nested.html
     24/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top-replace.html
     25/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/parent-top.html
     26/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-opener.html
     27/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-top-or-close.html
     28/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/resources/post-to-top.html
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/self1.html

    r204844 r214944  
    66
    77window.name = "selfWin1";
    8 var win = window.open("message.html", "_self");
     8var win = window.open("resources/post-to-top.html", "_self");
    99win.close();
    1010
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/self2.html

    r204844 r214944  
    66
    77window.name = "selfWin2";
    8 var win = window.open("message.html", "");
     8var win = window.open("resources/post-to-top.html", "");
    99win.close();
    1010
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/w3c-import.log

    r212202 r214944  
    2020/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/002-1.html
    2121/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/002.html
     22/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank.html
    2223/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-existing.html
    23 /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent.html
     24/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-001.html
     25/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-002.html
     26/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-003.html
     27/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-004.html
    2428/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-1.html
    2529/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-2.html
    2630/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-default-name.html
    2731/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/existing.html
    28 /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/message.html
    29 /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/parent1.html
    30 /LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/parent2.html
    3132/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/self1.html
    3233/LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/self2.html
  • trunk/Source/WebCore/ChangeLog

    r214939 r214944  
     12017-04-05  Chris Dumez  <cdumez@apple.com>
     2
     3        _blank / _self / _parent / _top browsing context names should be case-insensitive
     4        https://bugs.webkit.org/show_bug.cgi?id=169747
     5
     6        Reviewed by Alex Christensen.
     7
     8        _blank / _self / _parent / _top browsing context names should be case-insensitive
     9        as per the HTML specification:
     10        - https://html.spec.whatwg.org/#browsing-context-names
     11
     12        This aligns our behavior with Firefox as well. See discussion at:
     13        - https://github.com/whatwg/html/issues/2443
     14
     15        Tests: imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-_blank.html
     16               imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-001.html
     17               imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-002.html
     18               imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-003.html
     19               imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-parent-004.html
     20
     21        * loader/FrameLoader.cpp:
     22        (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
     23        (WebCore::createWindow):
     24        * page/DOMWindow.cpp:
     25        (WebCore::DOMWindow::open):
     26        * page/FrameTree.cpp:
     27        (WebCore::FrameTree::uniqueChildName):
     28        (WebCore::FrameTree::find):
     29
    1302017-04-05  Miguel Gomez  <magomez@igalia.com>
    231
  • trunk/Source/WebCore/loader/FrameLoader.cpp

    r214900 r214944  
    31993199    mainFrame->loader().forceSandboxFlags(frame->loader().effectiveSandboxFlags());
    32003200
    3201     if (frameName != "_blank")
     3201    if (!equalIgnoringASCIICase(frameName, "_blank"))
    32023202        mainFrame->tree().setName(frameName);
    32033203
     
    37053705    created = false;
    37063706
    3707     if (!request.frameName().isEmpty() && request.frameName() != "_blank") {
     3707    if (!request.frameName().isEmpty() && !equalIgnoringASCIICase(request.frameName(), "_blank")) {
    37083708        if (RefPtr<Frame> frame = lookupFrame.loader().findFrameForNavigation(request.frameName(), openerFrame.document())) {
    3709             if (request.frameName() != "_self") {
     3709            if (!equalIgnoringASCIICase(request.frameName(), "_self")) {
    37103710                if (Page* page = frame->page())
    37113711                    page->chrome().focus();
     
    37433743    frame->loader().forceSandboxFlags(openerFrame.document()->sandboxFlags());
    37443744
    3745     if (request.frameName() != "_blank")
     3745    if (!equalIgnoringASCIICase(request.frameName(), "_blank"))
    37463746        frame->tree().setName(request.frameName());
    37473747
  • trunk/Source/WebCore/page/DOMWindow.cpp

    r214703 r214944  
    22642264    // In those cases, we schedule a location change right now and return early.
    22652265    Frame* targetFrame = nullptr;
    2266     if (frameName == "_top")
     2266    if (equalIgnoringASCIICase(frameName, "_top"))
    22672267        targetFrame = &m_frame->tree().top();
    2268     else if (frameName == "_parent") {
     2268    else if (equalIgnoringASCIICase(frameName, "_parent")) {
    22692269        if (Frame* parent = m_frame->tree().parent())
    22702270            targetFrame = parent;
  • trunk/Source/WebCore/page/FrameTree.cpp

    r214893 r214944  
    110110{
    111111    // If the requested name (the frame's "name" attribute) is unique, just use that.
    112     if (!requestedName.isEmpty() && !child(requestedName) && requestedName != "_blank")
     112    if (!requestedName.isEmpty() && !child(requestedName) && !equalIgnoringASCIICase(requestedName, "_blank"))
    113113        return requestedName;
    114114
     
    252252Frame* FrameTree::find(const AtomicString& name) const
    253253{
    254     if (name == "_self" || name == "_current" || name.isEmpty())
     254    // FIXME: _current is not part of the HTML specification.
     255    if (equalIgnoringASCIICase(name, "_self") || name == "_current" || name.isEmpty())
    255256        return &m_thisFrame;
    256257   
    257     if (name == "_top")
     258    if (equalIgnoringASCIICase(name, "_top"))
    258259        return &top();
    259260   
    260     if (name == "_parent")
     261    if (equalIgnoringASCIICase(name, "_parent"))
    261262        return parent() ? parent() : &m_thisFrame;
    262263
    263264    // Since "_blank" should never be any frame's name, the following is only an optimization.
    264     if (name == "_blank")
     265    if (equalIgnoringASCIICase(name, "_blank"))
    265266        return nullptr;
    266267
Note: See TracChangeset for help on using the changeset viewer.