-
Notifications
You must be signed in to change notification settings - Fork 672
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
[css-syntax-3][css-values-3][css-cascade-4][css-fonts-4] Formalize fetching and resource timing reporting #6715
Conversation
Open-ish issues:
|
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.
In addition to the individual comments nits, most of which can be fixed by accepting the provided suggestions, there's some style nits where your additions don't match the surrounding spec and would need to be reformatted at some point by us.
CSSWG style is to give the algo steps their actual numbers when using Markdown numbered lists, and most importantly, we use semantic linebreaks, breaking at sentence/phrase/clause boundaries (usually after commas or before conjunctions) as feels appropriate for meaningful units of text that aren't overly long.
Otherwise looks great, thanks so much for filling in details that I was gradually loading into my head on my own. Would you mind also doing the CSSOM "load a stylesheet" algo? (In this PR or separate, doesn't matter.)
I think Colors 4, for @color-profile, is the only other place we load resources currently. |
OK I fixed that as well. Let me know if anything else is missing.
I will try to find the time to look at this separately, and it probably wouldn't use the "fetch a style resource" algorithm as stylesheets loaded like that are not exactly style resources. Seems like that algorithm is only used internally in CSSOM, for things like XML stylesheets and link headers. I wouldn't use it for HTML, as it would require too much information about |
@noamr could you please link your W3C account to your GitHub account? Our IPR bot doesn't know who you are, otherwise. Thanks! |
Yes, 10.3. Specifying a color profile: the @color-profile at-rule which should point to the new, centrally-defined "how CSS does fetch" stuff. Thanks for doing all this, @noamr much appreciated. |
I just logged in to my w3c account (noamr) and it's connected. I think I'm not in the repository's group though, there was some similar issue when I contributed to |
@svgeesus anything we can do about this? Not sure what's missing IPR-wise |
Add a generic method to fetch style resources, and make use of it in fonts & imports. [css-syntax-3]: Make sure we have a location when parsing a stylesheet. [css-values-3]: Add a reusable method to fetch a style-originated resource. [css-cascade-4]: Formalize the import algorithm to use the new fetch method. [css=fonts-4]: Formalize font loading to use the new fetch method.
Co-authored-by: Tab Atkins Jr. <jackalmage@gmail.com>
Co-authored-by: Tab Atkins Jr. <jackalmage@gmail.com>
Co-authored-by: Tab Atkins Jr. <jackalmage@gmail.com>
Co-authored-by: Tab Atkins Jr. <jackalmage@gmail.com>
Added support for CSS shapes, still missing css-images and color profiles. |
Yes, I just sent you an email with a non-participant commitment. Actually I will send two, one now for the spec with the largest change and then (once you are done patching all our fetch holes) another listing all the other specs that were changed, that says "and the same for these". |
So, you suggest that I finish the remaining FETCH holes as part of this PR and do an IPR thing for all these specs together? |
Yes, that would be perfect. |
css-values-4/Overview.bs
Outdated
is |environmentSettings|'s [=environment settings object/origin=], | ||
[=request/credentials mode=] is "same-origin", [=request/use-url-credentials flag=] is | ||
set, and whose [=request/header list=] is a [=/header list=] containing a [=header=] | ||
with its [=header/name=] set to "referrer" and its [=header/value=] set to |referrer|. |
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.
This is somewhat wrong. You want to set the referrer field on the request. That will set the Referer
(note, one r less) header. But good that it sets it explicitly though as CSS cannot take it from the global.
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.
Right, fixed.
That's all done now. No additional specs planned for this PR :) |
@tabatkins have your requested changes been made? |
I think I made lots of changes since. It would be good to re-review. |
As mentioned in whatwg/fetch#1324, it'd be best if they used CORS, like all other modern web platform features (w3ctag/design-principles#171 (comment)) |
Reminder to take another look when possible, @tabatkins :) |
This reverts commit e610888.
Ping? |
Timed out, better to merge now and fix any nits later
@svgeesus Can you rebase PRs before you merge, please? Unless it's a complicated conflicty thing that really requires a merge commit, history is a lot cleaner with a rebase. (There's a drop-down button next to the Merge button in GH that let's you choose whether to rebase or not. I'm pretty sure I've mentioned this before...) |
@noamr If it's not too much trouble, would you mind adding yourself to the acknowledgements section of at least some of these specs? Your call on which ones, and I'm happy to merge that PR. But I think you deserve some credit for sorting this out. :) |
I think the Github settings allow to change the default to "Squash and merge", wouldn't that be preferable? |
The CSS Working Group just discussed The full IRC log of that discussion<fantasai> Topic: URLs vs Fetch<fantasai> github: https://github.com//pull/6715/files <dbaron> github: github: https://github.com//pull/6715 <drott> fantasai: areas where we need to better integarte with the fetch spec <dbaron> github: https://github.com//pull/6715 <drott> fantasai: chris recently merged PR contributed by contributor <drott> fantasai: we need those to be reviewed - and ask to publish these changes <chris> rrsagent, here <RRSAgent> See https://www.w3.org/2021/11/10-css-irc#T17-04-45 <drott> ikilpatrick: did these get reviewed by anna or nicole? <drott> tab: I did review it <drott> tab: anna and domenic coordinating on reviewing... <chris> Yeah I reviewed it too <fantasai> s/anna/anne/ <drott> fantasai: if it sounds like it's been reviewed, then I'd suggest to accept the changes <dbaron> s/nicole/Dominic Denicola/ <drott> > s/nicole/Dominic Denicola/ - sorry about, that, of course <fantasai> i/github: github:/scribenick: drott/ <fantasai> scribenick: fantasai |
Add a generic method to fetch style resources, and make use of it in
fonts & imports.
[css-syntax-3]: Make sure we have a location when parsing a stylesheet, as the location is necessary for parsing import rules.
[css-values-3]: Add a reusable method to fetch a style-originated
resource.
[css-cascade-4]: Formalize the import algorithm to use the new fetch
method.
[css-fonts-4]: Formalize font loading to use the new fetch method. Removed some of the font loading "guidelines" as they are now baked in to the algorithm.
[css-shapes-2]: Load css-shapes external images/SVG using fetch style resoure
See #562
Fixes #6076
Tests: web-platform-tests/wpt#31344