mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +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
|
// https://html.spec.whatwg.org/multipage/#dom-document-open-window
|
||||||
fn Open_(
|
fn Open_(
|
||||||
&self,
|
&self,
|
||||||
url: DOMString,
|
url: USVString,
|
||||||
target: DOMString,
|
target: DOMString,
|
||||||
features: DOMString,
|
features: DOMString,
|
||||||
) -> Fallible<DomRoot<WindowProxy>> {
|
) -> Fallible<DomRoot<WindowProxy>> {
|
||||||
|
|
|
@ -122,7 +122,7 @@ partial /*sealed*/ interface Document {
|
||||||
[CEReactions, Throws]
|
[CEReactions, Throws]
|
||||||
Document open(optional DOMString unused1, optional DOMString unused2);
|
Document open(optional DOMString unused1, optional DOMString unused2);
|
||||||
[CEReactions, Throws]
|
[CEReactions, Throws]
|
||||||
WindowProxy open(DOMString url, DOMString name, DOMString features);
|
WindowProxy open(USVString url, DOMString name, DOMString features);
|
||||||
[CEReactions, Throws]
|
[CEReactions, Throws]
|
||||||
void close();
|
void close();
|
||||||
[CEReactions, Throws]
|
[CEReactions, Throws]
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
// https://github.com/whatwg/html/issues/2115
|
// https://github.com/whatwg/html/issues/2115
|
||||||
[Replaceable] readonly attribute WindowProxy? parent;
|
[Replaceable] readonly attribute WindowProxy? parent;
|
||||||
readonly attribute Element? frameElement;
|
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 = "");
|
optional DOMString features = "");
|
||||||
//getter WindowProxy (unsigned long index);
|
//getter WindowProxy (unsigned long index);
|
||||||
|
|
||||||
|
|
|
@ -616,7 +616,7 @@ impl WindowMethods for Window {
|
||||||
// https://html.spec.whatwg.org/multipage/#dom-open
|
// https://html.spec.whatwg.org/multipage/#dom-open
|
||||||
fn Open(
|
fn Open(
|
||||||
&self,
|
&self,
|
||||||
url: DOMString,
|
url: USVString,
|
||||||
target: DOMString,
|
target: DOMString,
|
||||||
features: DOMString,
|
features: DOMString,
|
||||||
) -> Option<DomRoot<WindowProxy>> {
|
) -> 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::proxyhandler::fill_property_descriptor;
|
||||||
use crate::dom::bindings::reflector::{DomObject, Reflector};
|
use crate::dom::bindings::reflector::{DomObject, Reflector};
|
||||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
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::trace::JSTraceable;
|
||||||
use crate::dom::bindings::utils::{get_array_index_from_id, AsVoidPtr, WindowProxyHandler};
|
use crate::dom::bindings::utils::{get_array_index_from_id, AsVoidPtr, WindowProxyHandler};
|
||||||
use crate::dom::dissimilaroriginwindow::DissimilarOriginWindow;
|
use crate::dom::dissimilaroriginwindow::DissimilarOriginWindow;
|
||||||
|
@ -395,7 +395,7 @@ impl WindowProxy {
|
||||||
// https://html.spec.whatwg.org/multipage/#window-open-steps
|
// https://html.spec.whatwg.org/multipage/#window-open-steps
|
||||||
pub fn open(
|
pub fn open(
|
||||||
&self,
|
&self,
|
||||||
url: DOMString,
|
url: USVString,
|
||||||
target: DOMString,
|
target: DOMString,
|
||||||
features: DOMString,
|
features: DOMString,
|
||||||
) -> Option<DomRoot<WindowProxy>> {
|
) -> Option<DomRoot<WindowProxy>> {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
[embedded-credentials.tentative.sub.html]
|
[embedded-credentials.tentative.sub.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
expected: TIMEOUT
|
|
||||||
[Embedded credentials are treated as network errors.]
|
[Embedded credentials are treated as network errors.]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -11,11 +10,11 @@
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Embedded credentials matching the top-level are not treated as network errors for relative URLs.]
|
[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.]
|
[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.]
|
[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