Bug 268137 - Change document.documentURI and document.URL to match web specification
Summary: Change document.documentURI and document.URL to match web specification
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2024-01-25 19:17 PST by Ahmad Saleem
Modified: 2024-05-29 05:19 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2024-01-25 19:17:34 PST
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.
Comment 1 Radar WebKit Bug Importer 2024-02-01 19:18:13 PST
<rdar://problem/122154366>
Comment 2 Anne van Kesteren 2024-02-02 04:07:53 PST
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.