mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Update Window::open and document::open parameters to match the spec
Fixes #24012
This commit is contained in:
parent
6ff2524781
commit
ec6b478775
7 changed files with 9 additions and 14 deletions
|
@ -4453,7 +4453,7 @@ impl DocumentMethods for Document {
|
|||
// https://html.spec.whatwg.org/multipage/#dom-document-open-window
|
||||
fn Open_(
|
||||
&self,
|
||||
url: DOMString,
|
||||
url: USVString,
|
||||
target: DOMString,
|
||||
features: DOMString,
|
||||
) -> Fallible<DomRoot<WindowProxy>> {
|
||||
|
|
|
@ -122,7 +122,7 @@ partial /*sealed*/ interface Document {
|
|||
[CEReactions, Throws]
|
||||
Document open(optional DOMString unused1, optional DOMString unused2);
|
||||
[CEReactions, Throws]
|
||||
WindowProxy open(DOMString url, DOMString name, DOMString features);
|
||||
WindowProxy open(USVString url, DOMString name, DOMString features);
|
||||
[CEReactions, Throws]
|
||||
void close();
|
||||
[CEReactions, Throws]
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
// https://github.com/whatwg/html/issues/2115
|
||||
[Replaceable] readonly attribute WindowProxy? parent;
|
||||
readonly attribute Element? frameElement;
|
||||
WindowProxy? open(optional DOMString url = "about:blank", optional DOMString target = "_blank",
|
||||
WindowProxy? open(optional USVString url = "", optional DOMString target = "_blank",
|
||||
optional DOMString features = "");
|
||||
//getter WindowProxy (unsigned long index);
|
||||
|
||||
|
|
|
@ -616,7 +616,7 @@ impl WindowMethods for Window {
|
|||
// https://html.spec.whatwg.org/multipage/#dom-open
|
||||
fn Open(
|
||||
&self,
|
||||
url: DOMString,
|
||||
url: USVString,
|
||||
target: DOMString,
|
||||
features: DOMString,
|
||||
) -> Option<DomRoot<WindowProxy>> {
|
||||
|
|
|
@ -10,7 +10,7 @@ use crate::dom::bindings::inheritance::Castable;
|
|||
use crate::dom::bindings::proxyhandler::fill_property_descriptor;
|
||||
use crate::dom::bindings::reflector::{DomObject, Reflector};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::bindings::str::{DOMString, USVString};
|
||||
use crate::dom::bindings::trace::JSTraceable;
|
||||
use crate::dom::bindings::utils::{get_array_index_from_id, AsVoidPtr, WindowProxyHandler};
|
||||
use crate::dom::dissimilaroriginwindow::DissimilarOriginWindow;
|
||||
|
@ -395,7 +395,7 @@ impl WindowProxy {
|
|||
// https://html.spec.whatwg.org/multipage/#window-open-steps
|
||||
pub fn open(
|
||||
&self,
|
||||
url: DOMString,
|
||||
url: USVString,
|
||||
target: DOMString,
|
||||
features: DOMString,
|
||||
) -> Option<DomRoot<WindowProxy>> {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[embedded-credentials.tentative.sub.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Embedded credentials are treated as network errors.]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -11,11 +10,11 @@
|
|||
expected: FAIL
|
||||
|
||||
[Embedded credentials matching the top-level are not treated as network errors for relative URLs.]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[Embedded credentials matching the top-level are not treated as network errors for same-origin URLs.]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[Embedded credentials matching the top-level are treated as network errors for cross-origin URLs.]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[window-open-defaults.window.html]
|
||||
[window.open()'s url parameter default]
|
||||
expected: FAIL
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue