-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set request's reload-navigation flag when the navigation is reload-trigerred #3592
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2819,6 +2819,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute | |
<li><dfn data-x="concept-request-nonce-metadata" data-x-href="https://fetch.spec.whatwg.org/#concept-request-nonce-metadata">cryptographic nonce metadata</dfn></li> | ||
<li><dfn data-x="concept-request-integrity-metadata" data-x-href="https://fetch.spec.whatwg.org/#concept-request-integrity-metadata">integrity metadata</dfn></li> | ||
<li><dfn data-x="concept-request-parser-metadata" data-x-href="https://fetch.spec.whatwg.org/#concept-request-parser-metadata">parser metadata</dfn></li> | ||
<li><dfn data-x="concept-request-reload-navigation-flag" data-x-href="https://fetch.spec.whatwg.org/#concept-request-reload-navigation-flag">reload-navigation flag</dfn></li> | ||
</ul> | ||
</li> | ||
</ul> | ||
|
@@ -81813,6 +81814,10 @@ interface <dfn>Location</dfn> { // but see also <a href="#the-location-interface | |
data-x="concept-request">request</span> whose <span data-x="concept-request-url">url</span> is | ||
<var>resource</var>.</p></li> | ||
|
||
<li><p>If <var>resource</var> is a <span data-x="concept-request">request</span> and this is | ||
a <dfn>reload-triggered navigation</dfn>, then set <var>resource</var>'s <span | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't this mean that a manual refresh wouldn't set the flag? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, what do you mean by "manual refresh"? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A user-initiated refresh. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oops, I put the statement in a wrong place. Fixed. |
||
data-x="concept-request-reload-navigation-flag">reload-navigation flag</span>. | ||
|
||
<li id="sandboxLinks"> | ||
<p>If the <span>source browsing context</span> is not <span>allowed to navigate</span> | ||
<var>browsingContext</var>, then:</p> | ||
|
@@ -81850,7 +81855,7 @@ interface <dfn>Location</dfn> { // but see also <a href="#the-location-interface | |
<span>prompt to unload</span> algorithm.</p></li> | ||
<!-- https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=1946 to 1955 --> | ||
|
||
<li id="navigate-fragid-step"><p>If this is not a <dfn>reload-triggered navigation</dfn>, | ||
<li id="navigate-fragid-step"><p>If this is not a <span>reload-triggered navigation</span> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing comma here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
<var>resource</var> is a <span data-x="concept-request">request</span>, <var>resource</var>'s | ||
<span data-x="concept-request-url">url</span> <span data-x="concept-url-equals">equals</span> | ||
<var>browsingContext</var>'s <span>active document</span>'s <span | ||
|
@@ -121493,6 +121498,7 @@ INSERT INTERFACES HERE | |
Yoav Weiss, | ||
Yonathan Randolph, | ||
Yury Delendik, | ||
平野裕 (Yutaka Hirano) | ||
Yuzo Fujishima, | ||
Zhenbin Xu, | ||
张智强 (Zhiqiang Zhang), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this change the algorithm may set a flag on the request. I thought that call-sites might be surprised by that behavior, and made a copy in case. If that's not the case I can remove this statement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think all the callers of navigate don't hold onto the objects they pass. And I think only
<form>
passes request objects, so that should be easy to verify.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Which also means that
location.reload()
doesn't, which means this patch doesn't do what it wants I think.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, what kind of object does location.reload() pass? If it's neither URL nor request, is it handled by "If resource is a request whose url's scheme is a fetch scheme..." statement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah sorry, I think
location.reload()
does pass a URL at the moment, but I think it should pass a "session history entry" since it's supposed to take into account whether the document was POSTed and such.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I deleted this statement.