diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /dom/html/HTMLLinkElement.cpp | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/html/HTMLLinkElement.cpp')
-rw-r--r-- | dom/html/HTMLLinkElement.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/dom/html/HTMLLinkElement.cpp b/dom/html/HTMLLinkElement.cpp index 53c2d86d8d..cb316a6f7b 100644 --- a/dom/html/HTMLLinkElement.cpp +++ b/dom/html/HTMLLinkElement.cpp @@ -110,7 +110,7 @@ void HTMLLinkElement::LinkAdded() { CreateAndDispatchEvent(u"DOMLinkAdded"_ns); } -void HTMLLinkElement::UnbindFromTree(bool aNullParent) { +void HTMLLinkElement::UnbindFromTree(UnbindContext& aContext) { CancelDNSPrefetch(*this); CancelPrefetchOrPreload(); @@ -130,7 +130,7 @@ void HTMLLinkElement::UnbindFromTree(bool aNullParent) { } } - nsGenericHTMLElement::UnbindFromTree(aNullParent); + nsGenericHTMLElement::UnbindFromTree(aContext); Unused << UpdateStyleSheetInternal(oldDoc, oldShadowRoot); } @@ -164,6 +164,12 @@ bool HTMLLinkElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute, ParseFetchPriority(aValue, aResult); return true; } + + if (aAttribute == nsGkAtoms::blocking && + StaticPrefs::dom_element_blocking_enabled()) { + aResult.ParseAtomArray(aValue); + return true; + } } return nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue, @@ -703,4 +709,14 @@ nsDOMTokenList* HTMLLinkElement::Blocking() { return mBlocking; } +bool HTMLLinkElement::IsPotentiallyRenderBlocking() { + return BlockingContainsRender(); + + // TODO: handle implicitly potentially render blocking + // https://html.spec.whatwg.org/#implicitly-potentially-render-blocking + // The default type for resources given by the stylesheet keyword is text/css. + // A link element of this type is implicitly potentially render-blocking if + // the element was created by its node document's parser. +} + } // namespace mozilla::dom |