mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02:00
script: Implement full logic for script-blocking stylesheets (#41988)
We only implemented the first part (parser_inserted), but weren't checking any of the other cases. Testing: WPT Part of #22715 Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This commit is contained in:
committed by
GitHub
parent
983482b5f3
commit
6f9a0831bd
@@ -415,6 +415,12 @@ impl StylesheetOwner for HTMLStyleElement {
|
||||
self.parser_inserted.get()
|
||||
}
|
||||
|
||||
/// <https://html.spec.whatwg.org/multipage/#the-style-element:implicitly-potentially-render-blocking>
|
||||
fn potentially_render_blocking(&self) -> bool {
|
||||
// > A style element is implicitly potentially render-blocking if the element was created by its node document's parser.
|
||||
self.parser_inserted()
|
||||
}
|
||||
|
||||
fn referrer_policy(&self) -> ReferrerPolicy {
|
||||
ReferrerPolicy::EmptyString
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user