summaryrefslogtreecommitdiffstats
path: root/dom/html/HTMLLinkElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/html/HTMLLinkElement.cpp')
-rw-r--r--dom/html/HTMLLinkElement.cpp20
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