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.
Also tweaked internals a bit (added a generic ResetState internal func) and
added a new gtest for import supports(), plus a WPT test print test.
Differential Revision: https://phabricator.services.mozilla.com/D175432
Consider the case of a very big <style> element, with a few imports on top,
which we cut half-way over the network.
The @import scanner would be likely to have found anything there is to be found,
but we won't process it until we pop the <style> element. It's relatively low
effort to support this use-case by making Scan() return the already-found urls.
Differential Revision: https://phabricator.services.mozilla.com/D47914
Doesn't recognize all the edge cases, but I think this should be good enough.
Let me know if you think something common is missing.
Differential Revision: https://phabricator.services.mozilla.com/D47469
Doesn't recognize all the edge cases, but I think this should be good enough.
Let me know if you think something common is missing.
Differential Revision: https://phabricator.services.mozilla.com/D47469