⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 290899 in webkit


Ignore:
Timestamp:
Mar 7, 2022, 11:21:15 AM (5 years ago)
Author:
Chris Dumez
Message:

Make "true" count as truthy in window.open()'s boolean features
​https://bugs.webkit.org/show_bug.cgi?id=237530

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Import WPT test coverage.

  • resources/resource-files.json:
  • web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-is-popup-condition.html:
  • web-platform-tests/html/browsers/the-window-object/support/w3c-import.log:
  • web-platform-tests/html/browsers/the-window-object/support/windowFeature-values-target.html: Added.
  • web-platform-tests/html/browsers/the-window-object/w3c-import.log:
  • web-platform-tests/html/browsers/the-window-object/window-open-noopener.html:
  • web-platform-tests/html/browsers/the-window-object/window-open-windowfeatures-values-expected.txt: Added.
  • web-platform-tests/html/browsers/the-window-object/window-open-windowfeatures-values.html: Added.

Source/WebCore:

Make "true" count as truthy in window.open()'s boolean features, as per:

Test: imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-windowfeatures-values.html

  • page/WindowFeatures.cpp:

(WebCore::setWindowFeature):

LayoutTests:

  • tests-options.json:
Location:
trunk
Files:
3 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r290891 r290899  
     12022-03-07  Chris Dumez  <cdumez@apple.com>
     2
     3        Make "true" count as truthy in window.open()'s boolean features
     4        https://bugs.webkit.org/show_bug.cgi?id=237530
     5
     6        Reviewed by Alex Christensen.
     7
     8        * tests-options.json:
     9
    1102022-03-07  Chris Dumez  <cdumez@apple.com>
    211
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r290898 r290899  
     12022-03-07  Chris Dumez  <cdumez@apple.com>
     2
     3        Make "true" count as truthy in window.open()'s boolean features
     4        https://bugs.webkit.org/show_bug.cgi?id=237530
     5
     6        Reviewed by Alex Christensen.
     7
     8        Import WPT test coverage.
     9
     10        * resources/resource-files.json:
     11        * web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-is-popup-condition.html:
     12        * web-platform-tests/html/browsers/the-window-object/support/w3c-import.log:
     13        * web-platform-tests/html/browsers/the-window-object/support/windowFeature-values-target.html: Added.
     14        * web-platform-tests/html/browsers/the-window-object/w3c-import.log:
     15        * web-platform-tests/html/browsers/the-window-object/window-open-noopener.html:
     16        * web-platform-tests/html/browsers/the-window-object/window-open-windowfeatures-values-expected.txt: Added.
     17        * web-platform-tests/html/browsers/the-window-object/window-open-windowfeatures-values.html: Added.
     18
    1192022-03-07  Antoine Quint  <graouts@webkit.org>
    220
  • trunk/LayoutTests/imported/w3c/resources/resource-files.json

    r290774 r290899  
    22392239        "web-platform-tests/html/browsers/the-window-object/support/sizing-target.html",
    22402240        "web-platform-tests/html/browsers/the-window-object/support/window-open-popup-target.html",
     2241        "web-platform-tests/html/browsers/the-window-object/support/windowFeature-values-target.html",
    22412242        "web-platform-tests/html/browsers/windows/browsing-context-names/001-1.html",
    22422243        "web-platform-tests/html/browsers/windows/browsing-context-names/002-1.html",
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-is-popup-condition.html

    r287846 r290899  
    2727    ["popup", false],
    2828    ["popup=1", false],
     29    ["popup=true", false],
    2930    ["popup=0", true],
    3031
    … …  
    3233    ["location", false],
    3334    ["location=yes", false],
     35    ["location=true", false],
    3436    ["location=no", false],
    3537
    3638    ["toolbar", false],
    3739    ["toolbar=yes", false],
     40    ["toolbar=true", false],
    3841    ["toolbar=no", false],
    3942
    4043    ["menubar", false],
    4144    ["menubar=yes", false],
     45    ["menubar=true", false],
    4246    ["menubar=no", false],
    4347
    4448    ["resizable", false],
    4549    ["resizable=yes", false],
     50    ["resizable=true", false],
    4651    ["resizable=no", false],
    4752  ],
    … …  
    4954    ["scrollbars", false],
    5055    ["scrollbars=yes", false],
     56    ["scrollbars=true", false],
    5157    ["scrollbars=no", false],
    5258
    5359    ["status", false],
    5460    ["status=yes", false],
     61    ["status=true", false],
    5562    ["status=no", false],
    5663
    5764    ["titlebar", false],
    5865    ["titlebar=yes", false],
     66    ["titlebar=true", false],
    5967    ["titlebar=no", false],
    6068
    6169    ["close", false],
    6270    ["close=yes", false],
     71    ["close=true", false],
    6372    ["close=no", false],
    6473
    6574    ["minimizable", false],
    6675    ["minimizable=yes", false],
     76    ["minimizable=true", false],
    6777    ["minimizable=no", false],
    6878
    6979    ["personalbar", false],
    7080    ["personalbar=yes", false],
     81    ["personalbar=true", false],
    7182    ["personalbar=no", false],
    7283  ],
    … …  
    114125    // The explicit popup feature has priority than others.
    115126    ["popup=1,location,toolbar,menubar,resizable,scrollbars,status", false],
     127    ["popup=yes,location,toolbar,menubar,resizable,scrollbars,status", false],
     128    ["popup=true,location,toolbar,menubar,resizable,scrollbars,status", false],
    116129    ["popup=0,location,toolbar,menubar,resizable,scrollbars", true],
    117130  ],
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/support/w3c-import.log

    r287846 r290899  
    2222/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/support/sizing-target.html
    2323/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/support/window-open-popup-target.html
     24/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/support/windowFeature-values-target.html
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/w3c-import.log

    r287846 r290899  
    3939/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-noreferrer.html
    4040/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-popup-behavior.html
     41/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-windowfeatures-values.html
    4142/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-opener-unconfigurable.window.js
    4243/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties.https.html
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-noopener.html

    r249123 r290899  
    1818  { testDescription: "noopener=1 means the same as noopener",
    1919    secondWindowFeatureString: "noopener=1",
     20    shouldReturnWindow: false },
     21  { testDescription: "noopener=true means the same as noopener",
     22    secondWindowFeatureString: "noopener=true",
    2023    shouldReturnWindow: false },
    2124  { testDescription: "noopener=0 means lack of noopener",
  • trunk/LayoutTests/tests-options.json

    r289558 r290899  
    25502550        "slow"
    25512551    ],
     2552    "imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-windowfeatures-values.html": [
     2553        "slow"
     2554    ],
    25522555    "imported/w3c/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-setter.html": [
    25532556        "slow"
  • trunk/Source/WebCore/ChangeLog

    r290898 r290899  
     12022-03-07  Chris Dumez  <cdumez@apple.com>
     2
     3        Make "true" count as truthy in window.open()'s boolean features
     4        https://bugs.webkit.org/show_bug.cgi?id=237530
     5
     6        Reviewed by Alex Christensen.
     7
     8        Make "true" count as truthy in window.open()'s boolean features, as per:
     9        - https://github.com/whatwg/html/pull/7425
     10
     11        Test: imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-windowfeatures-values.html
     12
     13        * page/WindowFeatures.cpp:
     14        (WebCore::setWindowFeature):
     15
    1162022-03-07  Antoine Quint  <graouts@webkit.org>
    217
  • trunk/Source/WebCore/page/WindowFeatures.cpp

    r284857 r290899  
    131131    // Listing a key with no value is shorthand for key=yes
    132132    int numericValue;
    133     if (value.isEmpty() || equalLettersIgnoringASCIICase(value, "yes"))
     133    if (value.isEmpty() || equalLettersIgnoringASCIICase(value, "yes") || equalLettersIgnoringASCIICase(value, "true"))
    134134        numericValue = 1;
    135135    else
Note: See TracChangeset for help on using the changeset viewer.