Speculative loader should respect the `media` attribute of the <link> tag
Categories
(Core :: DOM: HTML Parser, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox87 | --- | fixed |
People
(Reporter: mayhemer, Assigned: emilio)
References
(Blocks 2 open bugs)
Details
Attachments
(4 files)
HTML link media Attribute
According to the speculative loader code we make requests for stylesheets that don't match the media criteria because the attribute is not at all consulted at the prescan phase.
Reporter | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Just drive-by clean-up, no behavior change.
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Just drive-by cleanup, no behavior change.
There's an using namespace mozilla, so also remove some useless
namespace qualifications while at it.
Depends on D103562
Assignee | ||
Comment 3•4 years ago
|
||
Hah, I noticed the same bug looking at the code today.
Assignee | ||
Comment 4•4 years ago
|
||
Just drive-by cleanup, no behavior change.
Depends on D103563
Assignee | ||
Comment 5•4 years ago
|
||
<link media> applies to both <link rel="stylesheet"> (see
HTMLLinkElement::GetStyleSheetInfo) and all link rel="preload" links,
regardless of as value (see HTMLLinkElement::CheckPreloadAttrs), so pass it
down and check them for all of those cases.
Note that in the <link rel="stylesheet"> case we'd still have to load it, but
it doesn't block rendering and we defer its loading until more important
stylesheets are done (see SheetLoadData::ShouldDefer() which returns false if
the media attribute didn't match). So speculatively loading it seems
counter-productive.
Depends on D103564
Assignee | ||
Updated•4 years ago
|
Comment 7•4 years ago
|
||
bugherder |
Assignee | ||
Updated•4 years ago
|
Comment 10•4 years ago
|
||
bugherder |
Description
•