Commit 976e8d9
achristensen@apple.com
Copy host from base file URL
https://bugs.webkit.org/show_bug.cgi?id=217170
Reviewed by Brady Eidson.
LayoutTests/imported/w3c:
* web-platform-tests/url/a-element-expected.txt:
* web-platform-tests/url/a-element-xhtml-expected.txt:
* web-platform-tests/url/resources/urltestdata.json:
* web-platform-tests/url/url-constructor-expected.txt:
Source/WTF:
This matches Chrome and the URL specification.
Covered by newly passing web platform tests.
I also updated the web platform tests from web-platform-tests/wpt#25716
which aligns with Safari in cases except copying of the host from base file URLs.
The implementation pushes copying from the base URL downstream in the parsing process to where it is in the URL specification
so that we can properly decide how much of the base URL to copy and so we can copy it into the right place in the result URL.
I also updated an assertion that makes sure that we re-use the input String if possible because there are cases where we copy
part of the parent URL, which is a "syntax violation" (meaning we copy the string parts and assemble a new one), then re-assemble
a new String that is equal to the input string. This is not a problem, it just needed to be reflected in the assertion.
* wtf/URLParser.cpp:
(WTF::URLParser::URLParser):
(WTF::URLParser::parse):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@267896 268f45cc-cd09-0410-ab3c-d52691b4dbfc1 parent ea87d23 commit 976e8d9
7 files changed
Lines changed: 410 additions & 140 deletions
File tree
- LayoutTests/imported/w3c
- web-platform-tests/url
- resources
- Source/WTF
- wtf
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
1 | 13 | | |
2 | 14 | | |
3 | 15 | | |
| |||
Lines changed: 29 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
| 420 | + | |
| 421 | + | |
420 | 422 | | |
421 | 423 | | |
422 | 424 | | |
| |||
427 | 429 | | |
428 | 430 | | |
429 | 431 | | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
436 | 438 | | |
437 | | - | |
438 | | - | |
439 | | - | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
440 | 442 | | |
441 | | - | |
442 | | - | |
443 | | - | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
444 | 446 | | |
445 | | - | |
446 | | - | |
447 | | - | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
448 | 450 | | |
449 | 451 | | |
450 | 452 | | |
| |||
457 | 459 | | |
458 | 460 | | |
459 | 461 | | |
460 | | - | |
461 | | - | |
462 | | - | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
463 | 465 | | |
464 | 466 | | |
465 | 467 | | |
| |||
475 | 477 | | |
476 | 478 | | |
477 | 479 | | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
478 | 489 | | |
479 | 490 | | |
480 | 491 | | |
| |||
Lines changed: 29 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
| 420 | + | |
| 421 | + | |
420 | 422 | | |
421 | 423 | | |
422 | 424 | | |
| |||
427 | 429 | | |
428 | 430 | | |
429 | 431 | | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
436 | 438 | | |
437 | | - | |
438 | | - | |
439 | | - | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
440 | 442 | | |
441 | | - | |
442 | | - | |
443 | | - | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
444 | 446 | | |
445 | | - | |
446 | | - | |
447 | | - | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
448 | 450 | | |
449 | 451 | | |
450 | 452 | | |
| |||
457 | 459 | | |
458 | 460 | | |
459 | 461 | | |
460 | | - | |
461 | | - | |
462 | | - | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
463 | 465 | | |
464 | 466 | | |
465 | 467 | | |
| |||
475 | 477 | | |
476 | 478 | | |
477 | 479 | | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
478 | 489 | | |
479 | 490 | | |
480 | 491 | | |
| |||
0 commit comments