Changeset 279662 in webkit
- Timestamp:
- Jul 7, 2021, 1:20:06 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r279648 r279662 1 2021-07-07 Alex Christensen <achristensen@webkit.org> 2 3 URL path setter should add "./" before non-empty path and after empty host for URLs with non-special schemes 4 https://bugs.webkit.org/show_bug.cgi?id=227750 5 6 Reviewed by Chris Dumez. 7 8 * web-platform-tests/url/url-setters-a-area.window-expected.txt: 9 * web-platform-tests/url/url-setters.any-expected.txt: 10 * web-platform-tests/url/url-setters.any.worker-expected.txt: 11 1 12 2021-07-07 Chris Dumez <cdumez@apple.com> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-setters-a-area.window-expected.txt
r279211 r279662 379 379 PASS <a>: Setting <non-spec:/>.pathname = '/..//p' 380 380 PASS <area>: Setting <non-spec:/>.pathname = '/..//p' 381 FAIL <a>: Setting <non-spec:/>.pathname = '//p' assert_equals: expected "non-spec:/.//p" but got "non-spec://p" 382 FAIL <area>: Setting <non-spec:/>.pathname = '//p' assert_equals: expected "non-spec:/.//p" but got "non-spec://p" 381 PASS <a>: Setting <non-spec:/>.pathname = '//p' 382 PASS <area>: Setting <non-spec:/>.pathname = '//p' 383 383 PASS <a>: Setting <non-spec:/.//>.pathname = 'p' Drop /. from path 384 384 PASS <area>: Setting <non-spec:/.//>.pathname = 'p' Drop /. from path -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-setters.any-expected.txt
r279211 r279662 190 190 PASS URL: Setting <non-spec:/>.pathname = '/.//p' Serialize /. in path 191 191 PASS URL: Setting <non-spec:/>.pathname = '/..//p' 192 FAIL URL: Setting <non-spec:/>.pathname = '//p' assert_equals: expected "non-spec:/.//p" but got "non-spec://p" 192 PASS URL: Setting <non-spec:/>.pathname = '//p' 193 193 PASS URL: Setting <non-spec:/.//>.pathname = 'p' Drop /. from path 194 194 PASS URL: Setting <https://example.net#nav>.search = 'lang=fr' -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-setters.any.worker-expected.txt
r279211 r279662 190 190 PASS URL: Setting <non-spec:/>.pathname = '/.//p' Serialize /. in path 191 191 PASS URL: Setting <non-spec:/>.pathname = '/..//p' 192 FAIL URL: Setting <non-spec:/>.pathname = '//p' assert_equals: expected "non-spec:/.//p" but got "non-spec://p" 192 PASS URL: Setting <non-spec:/>.pathname = '//p' 193 193 PASS URL: Setting <non-spec:/.//>.pathname = 'p' Drop /. from path 194 194 PASS URL: Setting <https://example.net#nav>.search = 'lang=fr' -
trunk/Source/WTF/ChangeLog
r279660 r279662 1 2021-07-07 Alex Christensen <achristensen@webkit.org> 2 3 URL path setter should add "./" before non-empty path and after empty host for URLs with non-special schemes 4 https://bugs.webkit.org/show_bug.cgi?id=227750 5 6 Reviewed by Chris Dumez. 7 8 This is related to r267837 but in the path setter, too. 9 This helps preserve idempotence in parsed URLs. 10 This is an edge case that will rarely be hit in practice, but now the path setter matches the parser. 11 12 * wtf/URL.cpp: 13 (WTF::URL::setPath): 14 1 15 2021-07-07 Christopher Reid <chris.reid@sony.com> 2 16 -
trunk/Source/WTF/wtf/URL.cpp
r279099 r279662 684 684 StringView(m_string).left(pathStart()), 685 685 path.startsWith('/') || (path.startsWith('\\') && (hasSpecialScheme() || protocolIs("file"))) ? "" : "/", 686 !hasSpecialScheme() && host().isEmpty() && path.startsWith("//") && path.length() > 2 ? "/." : "", 686 687 escapePathWithoutCopying(path), 687 688 StringView(m_string).substring(m_pathEnd)
Note:
See TracChangeset
for help on using the changeset viewer.