Skip to content

Commit

Permalink
Merge pull request #2276 from w3c/sync_fc679ce47b4d27b72b347efc564838…
Browse files Browse the repository at this point in the history
…15f9b3c48c

Merge pull request #2276 from sync_fc679ce47b4d27b72b347efc56483815f9b3c48c
  • Loading branch information
Ms2ger committed Oct 21, 2015
2 parents a751944 + fc679ce commit 4b25d32
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 80 deletions.
2 changes: 1 addition & 1 deletion html/dom/elements-embedded.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ var embeddedElements = {
hreflang: "string",
type: "string",

//URLUtils
// HTMLHyperlinkElementUtils
href: "url",

// Obsolete
Expand Down
2 changes: 1 addition & 1 deletion html/dom/elements-text.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var textElements = {
hreflang: "string",
type: "string",

// URLUtils
// HTMLHyperlinkElementUtils
href: "url",

// Obsolete
Expand Down
94 changes: 57 additions & 37 deletions html/dom/interfaces.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,6 @@
<h1>HTML IDL tests</h1>
<div id=log></div>

<!-- URLUtils* stubs -->
<script type=text/plain class=untested>
interface URLUtils {
stringifier;
};
interface URLUtilsReadOnly {
stringifier;
};
</script>
<!-- DOM IDLs -->
<script type=text/plain class=untested>
[Constructor(DOMString type, optional EventInit eventInitDict)/*,
Exposed=(Window,Worker)*/]
Expand Down Expand Up @@ -868,6 +858,21 @@ <h1>HTML IDL tests</h1>
Float32Array or Float64Array or
DataView) ArrayBufferView;

[NoInterfaceObject, Exposed=Window]
interface HTMLHyperlinkElementUtils {
stringifier attribute USVString href;
attribute USVString origin;
attribute USVString protocol;
attribute USVString username;
attribute USVString password;
attribute USVString host;
attribute USVString hostname;
attribute USVString port;
attribute USVString pathname;
attribute USVString search;
attribute USVString hash;
};

interface HTMLAllCollection : HTMLCollection {
// inherits length and 'getter'
Element? item(unsigned long index);
Expand Down Expand Up @@ -1125,19 +1130,17 @@ <h1>HTML IDL tests</h1>
};

interface HTMLAnchorElement : HTMLElement {
attribute DOMString target;
attribute DOMString download;
[PutForwards=value] attribute DOMSettableTokenList ping;
attribute DOMString rel;
attribute DOMString target;
attribute DOMString download;
[PutForwards=value] readonly attribute DOMSettableTokenList ping;
attribute DOMString rel;
readonly attribute DOMTokenList relList;
attribute DOMString hreflang;
attribute DOMString type;

attribute DOMString text;
attribute DOMString hreflang;
attribute DOMString type;

// also has obsolete members
attribute DOMString text;
};
HTMLAnchorElement implements URLUtils;
HTMLAnchorElement implements HTMLHyperlinkElementUtils;

interface HTMLDataElement : HTMLElement {
attribute DOMString value;
Expand Down Expand Up @@ -1494,20 +1497,17 @@ <h1>HTML IDL tests</h1>
};

interface HTMLAreaElement : HTMLElement {
attribute DOMString alt;
attribute DOMString coords;
attribute DOMString shape;
attribute DOMString target;
attribute DOMString download;
[PutForwards=value] attribute DOMSettableTokenList ping;
attribute DOMString rel;
attribute DOMString alt;
attribute DOMString coords;
attribute DOMString shape;
attribute DOMString target;
attribute DOMString download;
[PutForwards=value] readonly attribute DOMSettableTokenList ping;
attribute DOMString rel;
readonly attribute DOMTokenList relList;
attribute DOMString hreflang;
attribute DOMString type;

// also has obsolete members
// hreflang and type are not reflected
};
HTMLAreaElement implements URLUtils;
HTMLAreaElement implements HTMLHyperlinkElementUtils;

interface HTMLTableElement : HTMLElement {
attribute HTMLTableCaptionElement? caption;
Expand Down Expand Up @@ -2320,11 +2320,22 @@ <h1>HTML IDL tests</h1>
};

[Unforgeable] interface Location {
void assign(DOMString url);
void replace(DOMString url);
stringifier attribute USVString href;
attribute USVString origin;
attribute USVString protocol;
attribute USVString host;
attribute USVString hostname;
attribute USVString port;
attribute USVString pathname;
attribute USVString search;
attribute USVString hash;

void assign(USVString url);
void replace(USVString url);
void reload();

[SameObject] readonly attribute USVString[] ancestorOrigins;
};
Location implements URLUtils;

[Constructor(DOMString type, optional PopStateEventInit eventInitDict), Exposed=Window,Worker]
interface PopStateEvent : Event {
Expand Down Expand Up @@ -2816,8 +2827,17 @@ <h1>HTML IDL tests</h1>
WorkerNavigator implements NavigatorOnLine;

[Exposed=Worker]
interface WorkerLocation { };
WorkerLocation implements URLUtilsReadOnly;
interface WorkerLocation {
stringifier readonly attribute USVString href;
readonly attribute USVString origin;
readonly attribute USVString protocol;
readonly attribute USVString host;
readonly attribute USVString hostname;
readonly attribute USVString port;
readonly attribute USVString pathname;
readonly attribute USVString search;
readonly attribute USVString hash;
};

interface Storage {
readonly attribute unsigned long length;
Expand Down
66 changes: 25 additions & 41 deletions url/interfaces.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,54 +9,38 @@ <h1>URL IDL tests</h1>
<div id=log></div>

<script type=text/plain>
[Constructor(DOMString url, optional DOMString base = "about:blank"),
Exposed=Window,Worker]
[Constructor(USVString url, optional USVString base),
Exposed=(Window,Worker)]
interface URL {
static DOMString domainToASCII(ScalarValueString domain);
static DOMString domainToUnicode(ScalarValueString domain);
};
URL implements URLUtils;

[NoInterfaceObject]
interface URLUtils {
stringifier attribute ScalarValueString href;
readonly attribute DOMString origin;
static USVString domainToASCII(USVString domain);
static USVString domainToUnicode(USVString domain);

attribute ScalarValueString protocol;
attribute ScalarValueString username;
attribute ScalarValueString password;
attribute ScalarValueString host;
attribute ScalarValueString hostname;
attribute ScalarValueString port;
attribute ScalarValueString pathname;
attribute ScalarValueString search;
readonly attribute URLSearchParams searchParams;
attribute ScalarValueString hash;
stringifier attribute USVString href;
readonly attribute USVString origin;
attribute USVString protocol;
attribute USVString username;
attribute USVString password;
attribute USVString host;
attribute USVString hostname;
attribute USVString port;
attribute USVString pathname;
attribute USVString search;
readonly attribute URLSearchParams searchParams;
attribute USVString hash;
};

[NoInterfaceObject]
interface URLUtilsReadOnly {
stringifier readonly attribute DOMString href;
readonly attribute DOMString origin;

readonly attribute DOMString protocol;
readonly attribute DOMString host;
readonly attribute DOMString hostname;
readonly attribute DOMString port;
readonly attribute DOMString pathname;
readonly attribute DOMString search;
readonly attribute DOMString hash;
};
[Constructor(optional (USVString or URLSearchParams) init = ""),
Exposed=(Window,Worker)]
interface URLSearchParams {
void append(ScalarValueString name, ScalarValueString value);
void delete(ScalarValueString name);
DOMString? get(ScalarValueString name);
sequence<DOMString> getAll(ScalarValueString name);
boolean has(ScalarValueString name);
void set(ScalarValueString name, ScalarValueString value);
void append(USVString name, USVString value);
void delete(USVString name);
USVString? get(USVString name);
sequence<USVString> getAll(USVString name);
boolean has(USVString name);
void set(USVString name, USVString value);
iterable<USVString, USVString>;
stringifier;
};
typedef DOMString ScalarValueString;
</script>
<script>
"use strict";
Expand Down

0 comments on commit 4b25d32

Please sign in to comment.