Make @import preload scanner deal well with supports()
Categories
(Core :: CSS Parsing and Computation, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox114 | --- | fixed |
People
(Reporter: emilio, Assigned: canadahonk)
References
Details
Attachments
(1 file)
We should consider fixing layout/style/ImportScanner.cpp
so that we don't preload @import ... supports()
if we don't actually support the relevant feature.
Assignee | ||
Comment 1•1 year ago
|
||
Added evaluating supports() conditions in the import preload scanner
and not emitting URLs if they do not match.
There is no use preloading imports for features we do not support,
as they will never be loaded since supports() conditions cannot
change mid-page.
WIP. Todo:
- Address TODO comments added
- Testing/etc
Assignee | ||
Comment 2•1 year ago
|
||
@emilio would you mind looking at the patch when free and seeing if you can tell why 1 new gtest is failing? Can't find a cause myself, thanks!
Reporter | ||
Comment 3•1 year ago
|
||
So you're doing:
if (OptionalSupportsMatches(...)) {
EmitUrl();
}
But EmitUrl()
not only emits the url but also resets the rule state, and you're not doing that if the supports doesn't match.
So it seems you should move the supports()
check to EmitUrl()
, also so that it gets caught in early-eof.
Updated•1 year ago
|
Updated•1 year ago
|
Pushed by oj@oojmed.com: https://hg.mozilla.org/integration/autoland/rev/0a9fbe8c409f Do not preload nonmatching @import supports() r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/39678 for changes under testing/web-platform/tests
Comment 6•1 year ago
|
||
bugherder |
Upstream PR merged by moz-wptsync-bot
Description
•