Changeset 206219 in webkit
- Timestamp:
- Sep 21, 2016 11:02:52 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r206218 r206219 1 2016-09-21 Alex Christensen <achristensen@webkit.org> 2 3 URLParser: Correctly parse URLs that are just nonspecialscheme:/ 4 https://bugs.webkit.org/show_bug.cgi?id=162340 5 6 Reviewed by Tim Horton. 7 8 Covered by new API tests. 9 10 * platform/URLParser.cpp: 11 (WebCore::URLParser::parse): 12 r206162 wasn't quite right. If a url is just nonspecialscheme:/ then the path should indeed be / 13 1 14 2016-09-21 Alex Christensen <achristensen@webkit.org> 2 15 -
trunk/Source/WebCore/platform/URLParser.cpp
r206218 r206219 1474 1474 case State::PathOrAuthority: 1475 1475 LOG_FINAL_STATE("PathOrAuthority"); 1476 m_url.m_userEnd = m_asciiBuffer.size(); 1477 m_url.m_passwordEnd = m_url.m_userEnd; 1478 m_url.m_hostEnd = m_url.m_userEnd; 1479 m_url.m_portEnd = m_url.m_userEnd; 1480 m_url.m_pathAfterLastSlash = m_url.m_userEnd; 1476 ASSERT(m_url.m_userStart); 1477 ASSERT(m_url.m_userStart == m_asciiBuffer.size()); 1478 ASSERT(m_asciiBuffer.last() == '/'); 1479 m_url.m_userStart--; 1480 m_url.m_userEnd = m_url.m_userStart; 1481 m_url.m_passwordEnd = m_url.m_userStart; 1482 m_url.m_hostEnd = m_url.m_userStart; 1483 m_url.m_portEnd = m_url.m_userStart; 1484 m_url.m_pathAfterLastSlash = m_url.m_userStart + 1; 1481 1485 m_url.m_pathEnd = m_url.m_pathAfterLastSlash; 1482 1486 m_url.m_queryEnd = m_url.m_pathAfterLastSlash; -
trunk/Tools/ChangeLog
r206218 r206219 1 2016-09-21 Alex Christensen <achristensen@webkit.org> 2 3 URLParser: Correctly parse URLs that are just nonspecialscheme:/ 4 https://bugs.webkit.org/show_bug.cgi?id=162340 5 6 Reviewed by Tim Horton. 7 8 * TestWebKitAPI/Tests/WebCore/URLParser.cpp: 9 (TestWebKitAPI::TEST_F): 10 1 11 2016-09-21 Alex Christensen <achristensen@webkit.org> 2 12 -
trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp
r206218 r206219 216 216 checkURL("notspecial:/a", {"notspecial", "", "", "", 0, "/a", "", "", "notspecial:/a"}); 217 217 checkURL("notspecial:", {"notspecial", "", "", "", 0, "", "", "", "notspecial:"}); 218 checkURL("notspecial:/", {"notspecial", "", "", "", 0, "/", "", "", "notspecial:/"}); 218 219 219 220 // This disagrees with the web platform test for http://:@www.example.com but agrees with Chrome and URL::parse, … … 303 304 checkRelativeURL("!", "sc://ho/pa", {"sc", "", "", "ho", 0, "/!", "", "", "sc://ho/!"}); 304 305 checkRelativeURL("!", "sc:/ho/pa", {"sc", "", "", "", 0, "/ho/!", "", "", "sc:/ho/!"}); 305 306 checkRelativeURL("notspecial:/", "about:blank", {"notspecial", "", "", "", 0, "/", "", "", "notspecial:/"}); 307 checkRelativeURL("notspecial:/", "http://host", {"notspecial", "", "", "", 0, "/", "", "", "notspecial:/"}); 308 checkRelativeURL("foo:/", "http://example.org/foo/bar", {"foo", "", "", "", 0, "/", "", "", "foo:/"}); 309 306 310 // The checking of slashes in SpecialAuthoritySlashes needed to get this to pass contradicts what is in the spec, 307 311 // but it is included in the web platform tests. … … 568 572 {"http", "", "", "host", 0, "/", "%C3%9F%F0%9F%98%8D", wideString(L"ß😍"), wideString(L"http://host/?%C3%9F%F0%9F%98%8D#ß😍")}, 569 573 {"http", "", "", "host", 0, "/", "%C3%9F%F0%9F%98%8D", "%C3%9F%F0%9F%98%8D", "http://host/?%C3%9F%F0%9F%98%8D#%C3%9F%F0%9F%98%8D"}); 570 571 // This matches the spec and web platform tests, but not Chrome, Firefox, or URL::parse.572 checkRelativeURLDifferences("notspecial:/", "about:blank",573 {"notspecial", "", "", "", 0, "", "", "", "notspecial:/"},574 {"notspecial", "", "", "", 0, "/", "", "", "notspecial:/"});575 checkRelativeURLDifferences("notspecial:/", "http://host",576 {"notspecial", "", "", "", 0, "", "", "", "notspecial:/"},577 {"notspecial", "", "", "", 0, "/", "", "", "notspecial:/"});578 checkURLDifferences("notspecial:/",579 {"notspecial", "", "", "", 0, "", "", "", "notspecial:/"},580 {"notspecial", "", "", "", 0, "/", "", "", "notspecial:/"});581 574 } 582 575
Note: See TracChangeset
for help on using the changeset viewer.