Bug 268137
| Summary: | Change document.documentURI and document.URL to match web specification | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | annevk, karlcow, mike, webkit-bug-importer |
| Priority: | P2 | Keywords: | BrowserCompat, InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Ahmad Saleem
hi Team,
While going through Blink's commit, I came across potential clean-up and at the same time failing test case:
Test Case: https://jsfiddle.net/jyxnf2rd/show
^ Chrome Canary 123 passes all while Firefox Nightly 124 fails few.
Blink Commit: https://src.chromium.org/viewvc/blink?view=revision&revision=193066
WebKit Source: https://searchfox.org/wubkat/rev/66bf68c9f4593eecb8dc370eb0761cb7a0e1ae77/Source/WebCore/dom/Document.cpp#637
Minibrowser fails following:
FAIL testWindow.location.host = 'c' should be c. Threw exception SyntaxError: Invalid URL
FAIL testWindow.location.hostname = 'd' should be d. Threw exception SyntaxError: Invalid URL
FAIL testWindow.location.port = 'e' should be e. Threw exception SyntaxError: Invalid URL
FAIL testWindow.location.pathname = 'f' should be f. Threw exception SyntaxError: Invalid URL
FAIL testWindow.location.search = 'g' should be g. Threw exception SyntaxError: Invalid URL
__
Just wanted to raise to align with other browser as needed or fix as needed.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/122154366>
Anne van Kesteren
This test case is quite confusing and not really related to the title of this bug.
It seems to be mainly testing what window.location returns on a newly created popup. I suspect we already have a bug on the lifetime of the Location object.
Ahmad Saleem
This landed in Chromium - https://github.com/chromium/chromium/commit/4e6f9520752797224d1e496bf6c8b518dbdac909
and reverted - https://github.com/chromium/chromium/commit/229018558c607278970decb79f35e2a72c89d230
Web-spec: https://dom.spec.whatwg.org/#concept-document-url
https://lists.w3.org/Archives/Public/public-whatwg-archive/2011Jun/0388.html
https://lists.w3.org/Archives/Public/public-whatwg-archive/2012Jun/0249.html
Original Behavior - https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-documentURI
Chrome bug (Still open - assigned) - https://issues.chromium.org/issues/40081740