Skip to content
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

Integration with the HTML spec #141

Merged
merged 8 commits into from
Apr 8, 2021
Merged

Integration with the HTML spec #141

merged 8 commits into from
Apr 8, 2021

Conversation

noamr
Copy link
Contributor

@noamr noamr commented Mar 29, 2021

Expose timing values measured in the HTML spec for the different
navigation timing values, instead of defining its own processing model.
Depends on whatwg/html#6536
See #136


Preview | Diff

Expose timing values measured in the HTML spec for the different
navigation timing values, instead of defining its o own processing model.
Depends on whatwg/html#6536
See #136
Copy link
Contributor

@yoavweiss yoavweiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pushing this!! :)

index.html Outdated
@@ -941,7 +549,7 @@ <h3>
instance, the unloading time reveals how long the previous page takes
to execute its unload handler, which could be used to infer the
user's login status. These attacks have been mitigated by enforcing
the <a>same-origin check</a> algorithm when timing information
the [=same origin=] check algorithm when timing information
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "these attack are mitigated in HTML (link to algorithm) by enforcing a same origin check..."?

index.html Show resolved Hide resolved
index.html Show resolved Hide resolved
index.html Show resolved Hide resolved
Copy link
Contributor

@yoavweiss yoavweiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more nits and comments

index.html Outdated
"HTML/parsing.html#the-end:current-document-readiness" title=
'interactive" document readiness'>"interactive"</a> [[HTML]].
The <dfn>domInteractive</dfn> getter steps are to return
|this|' [=load timing info=]'s [=document load timing info/dom interactive time=].</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: unfortunately, and unlike I previously said, s/|this|'/|this|'s/ :/ (here and elsewhere)

index.html Show resolved Hide resolved
run the following steps:

<p>A <a>PerformanceNavigationTiming</a> has an associated
[=document load timing info=] <a data-dfn-for="PerformanceResourceTiming">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broken link

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

index.html Outdated


<p>A <a>PerformanceNavigationTiming</a> has an associated
[=document unload timing info=] <a data-dfn-for="PerformanceNavigationTiming"><dfn>previous document
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broken link

Copy link
Contributor

@yoavweiss yoavweiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

</li>
</ol>
<p>
Some user agents maintain the DOM structure of the document in memory
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theoretically we would've wanted to keep a similar note in HTML (while making sure the Nav Timing entry is not dispatched nor altered in the BFCache case). Since we're planning to change that anyway (and fire new entries for BFCache), it may not be worth bothering over this, assuming the HTML's side processing model aligns with this statement.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently the processing model creates the entry when the new document is created. But I guess if it moves to the BFCache and brought back strange things can occur... Let's move this discussion to the HTML PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw I haven't seen any tests for this, nor did I find it in the Chromium implementation. Maybe this can be omitted or addressed later?

@yoavweiss
Copy link
Contributor

Thanks!! I think you can also add yourself as an editor :)

domenic pushed a commit to whatwg/html that referenced this pull request Apr 7, 2021
Creates "document load timing info" and "document unload timing info" structs which get populated at appropriate points in the navigation and loading algorithms, and eventually handed to the appropriate Navigation Timing algorithms.

See w3c/navigation-timing#136 and w3c/navigation-timing#141.
Copy link
Contributor

@yoavweiss yoavweiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

@yoavweiss yoavweiss merged commit 20af1c7 into gh-pages Apr 8, 2021
@yoavweiss yoavweiss deleted the html-integ branch April 8, 2021 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants