From c9991a9d1c29ea2dd4328317f75aeb144923747e Mon Sep 17 00:00:00 2001
From: Domenic Denicola
Date: Wed, 15 Jan 2025 15:00:09 +0900
Subject: [PATCH 1/2] Fix url and src in NotRestoredReasons
url was previously listed as a DOMString, but it should be a USVString. This change is not observable since it always contained a serialized URL anyway.
src was previously listed as containing the literal value of the src="" content attribute. However, the intended behavior was to contain the parsed-then-serialized value of the src IDL attribute, i.e., the result after content/IDL attribute reflection. Fix the spec to reflect that, which allows also changing it to USVString.
Finally, also account for the fact that sometimes content attributes can be missing, in which case these properties need to return the empty string. (Not null, which is reserved for the top level or non-iframe child cases.)
Closes #10895.
---
source | 41 +++++++++++++++++++++++++++++------------
1 file changed, 29 insertions(+), 12 deletions(-)
diff --git a/source b/source
index 5ac4faf7eb7..844c33a2917 100644
--- a/source
+++ b/source
@@ -96948,10 +96948,10 @@ interface NotRestoredReasonDetails {
[Exposed=Window]
interface NotRestoredReasons {
- readonly attribute DOMString? src;
+ readonly attribute USVString? src;
readonly attribute DOMString? id;
readonly attribute DOMString? name;
- readonly attribute DOMString? url;
+ readonly attribute USVString? url;
readonly attribute FrozenArray<NotRestoredReasonDetails>? reasons;
readonly attribute FrozenArray<NotRestoredReasons>? children;
[Default] object toJSON();
@@ -97395,7 +97395,8 @@ interface NotRestoredReasons {
the following items:
- src, a string or null, initially null.
+ src, a scalar value string or null, initially
+ null.
id, a string or null, initially null.
@@ -104757,22 +104758,38 @@ location.href = '#foo';
Set notRestoredReasonsForDocument's URL to
document's URL.
+ Let container be document's node navigable's container.
+
-
-
If document's node navigable's container is an iframe
element, then:
+ If container is an iframe
element:
+ Let src be the empty string.
+
+ -
+
If container has a src
attribute:
+
+
+ Let src be the result of encoding-parsing-and-serializing a
+ URL given container's src
attribute's
+ value.
+
+ If src is failure, then set src to container's src
attribute's value.
+
+
+
Set notRestoredReasonsForDocument's src to
- the value of document's node navigable's container's src
attribute.
+ src.
Set notRestoredReasonsForDocument's id to
- the value of document's node navigable's container's id
attribute.
+ container's id
attribute's value, or the empty string
+ if it has no such attribute.
- Set notRestoredReasonsForDocument's name
- to the value of document's node navigable's container's name
attribute.
+ Set notRestoredReasonsForDocument's name to
+ container's name
attribute's value, or the
+ empty string if it has no such attribute.
From 3475390363b48503877529fadd0b2acd1b1ea1b5 Mon Sep 17 00:00:00 2001
From: Domenic Denicola
Date: Wed, 15 Jan 2025 16:15:13 +0900
Subject: [PATCH 2/2] Missed "relative to"
---
source | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source b/source
index 844c33a2917..ea5cd16a5fc 100644
--- a/source
+++ b/source
@@ -104773,7 +104773,7 @@ location.href = '#foo';
Let src be the result of encoding-parsing-and-serializing a
URL given container's src
attribute's
- value.
+ value, relative to container's node document.
If src is failure, then set src to container's src
attribute's value.