Changeset 268853 in webkit
- Timestamp:
- Oct 21, 2020, 10:24:47 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r268843 r268853 1 2020-10-21 Alex Christensen <achristensen@webkit.org> 2 3 Update and pass new URL web platform tests 4 https://bugs.webkit.org/show_bug.cgi?id=218056 5 6 Reviewed by Tim Horton. 7 8 * web-platform-tests/url/a-element-expected.txt: 9 * web-platform-tests/url/a-element-xhtml-expected.txt: 10 * web-platform-tests/url/resources/setters_tests.json: 11 * web-platform-tests/url/resources/urltestdata.json: 12 * web-platform-tests/url/url-constructor-expected.txt: 13 * web-platform-tests/url/url-searchparams.any.js: 14 * web-platform-tests/url/url-setters-expected.txt: 15 1 16 2020-10-21 Alex Christensen <achristensen@webkit.org> 2 17 -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt
r268479 r268853 489 489 PASS Parsing: <////one/two> against <file:///> 490 490 PASS Parsing: <file:///.//> against <file:////> 491 PASS Parsing: <file:.//p> against <about:blank> 492 PASS Parsing: <file:/.//p> against <about:blank> 491 493 PASS Parsing: <http://[1:0::]> against <http://example.net/> 492 494 PASS Parsing: <http://[0:1:2:3:4:5:6:7:8]> against <http://example.net/> -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt
r268479 r268853 489 489 PASS Parsing: <////one/two> against <file:///> 490 490 PASS Parsing: <file:///.//> against <file:////> 491 PASS Parsing: <file:.//p> against <about:blank> 492 PASS Parsing: <file:/.//p> against <about:blank> 491 493 PASS Parsing: <http://[1:0::]> against <http://example.net/> 492 494 PASS Parsing: <http://[0:1:2:3:4:5:6:7:8]> against <http://example.net/> -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/resources/setters_tests.json
r266399 r268853 1673 1673 "new_value": "\\\\", 1674 1674 "expected": { 1675 "href": "file://monkey/ ",1676 "pathname": "/ "1675 "href": "file://monkey//", 1676 "pathname": "//" 1677 1677 } 1678 1678 }, … … 1682 1682 "new_value": "//\\/", 1683 1683 "expected": { 1684 "href": "file:/// ",1685 "pathname": "/ "1684 "href": "file://////", 1685 "pathname": "////" 1686 1686 } 1687 1687 }, … … 1691 1691 "new_value": "//monkey/..//", 1692 1692 "expected": { 1693 "href": "file:/// ",1694 "pathname": "/ "1693 "href": "file://///", 1694 "pathname": "///" 1695 1695 } 1696 1696 }, -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/resources/urltestdata.json
r267964 r268853 6092 6092 "failure": true 6093 6093 }, 6094 "# Additional file URL te tsts for (https://github.com/whatwg/url/issues/405)",6094 "# Additional file URL tests for (https://github.com/whatwg/url/issues/405)", 6095 6095 { 6096 6096 "input": "file://localhost//a//../..//foo", … … 6216 6216 "port": "", 6217 6217 "pathname": "//", 6218 "search": "", 6219 "hash": "" 6220 }, 6221 "File URL tests for https://github.com/whatwg/url/issues/549", 6222 { 6223 "input": "file:.//p", 6224 "base": "about:blank", 6225 "href": "file:////p", 6226 "protocol": "file:", 6227 "username": "", 6228 "password": "", 6229 "host": "", 6230 "hostname": "", 6231 "port": "", 6232 "pathname": "//p", 6233 "search": "", 6234 "hash": "" 6235 }, 6236 { 6237 "input": "file:/.//p", 6238 "base": "about:blank", 6239 "href": "file:////p", 6240 "protocol": "file:", 6241 "username": "", 6242 "password": "", 6243 "host": "", 6244 "hostname": "", 6245 "port": "", 6246 "pathname": "//p", 6218 6247 "search": "", 6219 6248 "hash": "" -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt
r268479 r268853 488 488 PASS Parsing: <////one/two> against <file:///> 489 489 PASS Parsing: <file:///.//> against <file:////> 490 PASS Parsing: <file:.//p> against <about:blank> 491 PASS Parsing: <file:/.//p> against <about:blank> 490 492 PASS Parsing: <http://[1:0::]> against <http://example.net/> 491 493 PASS Parsing: <http://[0:1:2:3:4:5:6:7:8]> against <http://example.net/> -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-searchparams.any.js
r264197 r268853 8 8 assert_true("searchParams" in url) 9 9 var searchParams = url.searchParams 10 assert_ true(url.searchParams ===searchParams, 'Object identity should hold.')10 assert_equals(url.searchParams, searchParams, 'Object identity should hold.') 11 11 }, 'URL.searchParams getter') 12 12 -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-setters-expected.txt
r268479 r268853 508 508 PASS <a>: Setting <https://example.net#nav>.pathname = '../home' 509 509 PASS <area>: Setting <https://example.net#nav>.pathname = '../home' 510 FAIL URL: Setting <http://example.net/home?lang=fr#nav>.pathname = '\a\%2E\b\%2e.\c' \ is a segment delimiter for 'special' URLs assert_equals: expected "http://example.net/a/c?lang=fr#nav" but got "http://example.net//a/c?lang=fr#nav" 511 FAIL <a>: Setting <http://example.net/home?lang=fr#nav>.pathname = '\a\%2E\b\%2e.\c' \ is a segment delimiter for 'special' URLs assert_equals: expected "http://example.net/a/c?lang=fr#nav" but got "http://example.net//a/c?lang=fr#nav" 512 FAIL <area>: Setting <http://example.net/home?lang=fr#nav>.pathname = '\a\%2E\b\%2e.\c' \ is a segment delimiter for 'special' URLs assert_equals: expected "http://example.net/a/c?lang=fr#nav" but got "http://example.net//a/c?lang=fr#nav" 510 PASS URL: Setting <http://example.net/home?lang=fr#nav>.pathname = '\a\%2E\b\%2e.\c' \ is a segment delimiter for 'special' URLs 511 PASS <a>: Setting <http://example.net/home?lang=fr#nav>.pathname = '\a\%2E\b\%2e.\c' \ is a segment delimiter for 'special' URLs 512 PASS <area>: Setting <http://example.net/home?lang=fr#nav>.pathname = '\a\%2E\b\%2e.\c' \ is a segment delimiter for 'special' URLs 513 513 PASS URL: Setting <view-source+http://example.net/home?lang=fr#nav>.pathname = '\a\%2E\b\%2e.\c' \ is *not* a segment delimiter for non-'special' URLs 514 514 PASS <a>: Setting <view-source+http://example.net/home?lang=fr#nav>.pathname = '\a\%2E\b\%2e.\c' \ is *not* a segment delimiter for non-'special' URLs … … 535 535 PASS <a>: Setting <sc://example.net>.pathname = '#' # needs to be encoded, non-special scheme 536 536 PASS <area>: Setting <sc://example.net>.pathname = '#' # needs to be encoded, non-special scheme 537 FAIL URL: Setting <file://monkey/>.pathname = '\\' File URLs and (back)slashes assert_equals: expected "file://monkey/" but got "file://monkey///" 538 FAIL <a>: Setting <file://monkey/>.pathname = '\\' File URLs and (back)slashes assert_equals: expected "file://monkey/" but got "file://monkey///" 539 FAIL <area>: Setting <file://monkey/>.pathname = '\\' File URLs and (back)slashes assert_equals: expected "file://monkey/" but got "file://monkey///" 540 FAIL URL: Setting <file:///unicorn>.pathname = '//\/' File URLs and (back)slashes assert_equals: expected "file:///" but got "file://////" 541 FAIL <a>: Setting <file:///unicorn>.pathname = '//\/' File URLs and (back)slashes assert_equals: expected "file:///" but got "file://////" 542 FAIL <area>: Setting <file:///unicorn>.pathname = '//\/' File URLs and (back)slashes assert_equals: expected "file:///" but got "file://////" 543 FAIL URL: Setting <file:///unicorn>.pathname = '//monkey/..//' File URLs and (back)slashes assert_equals: expected "file:///" but got "file://///" 544 FAIL <a>: Setting <file:///unicorn>.pathname = '//monkey/..//' File URLs and (back)slashes assert_equals: expected "file:///" but got "file://///" 545 FAIL <area>: Setting <file:///unicorn>.pathname = '//monkey/..//' File URLs and (back)slashes assert_equals: expected "file:///" but got "file://///" 537 PASS URL: Setting <file://monkey/>.pathname = '\\' File URLs and (back)slashes 538 PASS <a>: Setting <file://monkey/>.pathname = '\\' File URLs and (back)slashes 539 PASS <area>: Setting <file://monkey/>.pathname = '\\' File URLs and (back)slashes 540 PASS URL: Setting <file:///unicorn>.pathname = '//\/' File URLs and (back)slashes 541 PASS <a>: Setting <file:///unicorn>.pathname = '//\/' File URLs and (back)slashes 542 PASS <area>: Setting <file:///unicorn>.pathname = '//\/' File URLs and (back)slashes 543 PASS URL: Setting <file:///unicorn>.pathname = '//monkey/..//' File URLs and (back)slashes 544 PASS <a>: Setting <file:///unicorn>.pathname = '//monkey/..//' File URLs and (back)slashes 545 PASS <area>: Setting <file:///unicorn>.pathname = '//monkey/..//' File URLs and (back)slashes 546 546 PASS URL: Setting <non-spec:/>.pathname = '/.//p' Serialize /. in path 547 547 PASS <a>: Setting <non-spec:/>.pathname = '/.//p' Serialize /. in path -
trunk/Source/WTF/ChangeLog
r268780 r268853 1 2020-10-21 Alex Christensen <achristensen@webkit.org> 2 3 Update and pass new URL web platform tests 4 https://bugs.webkit.org/show_bug.cgi?id=218056 5 6 Reviewed by Tim Horton. 7 8 * wtf/URL.cpp: 9 (WTF::URL::setPath): 10 1 11 2020-10-20 Sihui Liu <sihui_liu@apple.com> 2 12 -
trunk/Source/WTF/wtf/URL.cpp
r268362 r268853 678 678 parse(makeString( 679 679 StringView(m_string).left(pathStart()), 680 path.startsWith('/') || ( hasSpecialScheme() && path.startsWith('\\')) ? "" : "/",680 path.startsWith('/') || (path.startsWith('\\') && (hasSpecialScheme() || protocolIs("file"))) ? "" : "/", 681 681 escapePathWithoutCopying(path), 682 682 StringView(m_string).substring(m_pathEnd) -
trunk/Source/WebCore/ChangeLog
r268852 r268853 1 2020-10-21 Alex Christensen <achristensen@webkit.org> 2 3 Update and pass new URL web platform tests 4 https://bugs.webkit.org/show_bug.cgi?id=218056 5 6 Reviewed by Tim Horton. 7 8 Don't add an extra forward slash at the beginning when setting the path of a file URL 9 that starts with a backslash, which we turn into a forward slash when parsing file URL paths. 10 This conveniently involves removing duplicate code. 11 12 This matches the behavior of Chrome and the URL spec. 13 Covered by newly passing web platform tests. 14 15 * html/URLDecomposition.cpp: 16 (WebCore::URLDecomposition::setPathname): 17 1 18 2020-10-21 Alex Christensen <achristensen@webkit.org> 2 19 -
trunk/Source/WebCore/html/URLDecomposition.cpp
r264611 r268853 203 203 if (fullURL.cannotBeABaseURL() || !fullURL.canSetPathname()) 204 204 return; 205 if (value.startsWith('/')) 206 fullURL.setPath(value); 207 else 208 fullURL.setPath(makeString('/', value)); 205 fullURL.setPath(value); 209 206 setFullURL(fullURL); 210 207 }
Note:
See TracChangeset
for help on using the changeset viewer.