summaryrefslogtreecommitdiffstats
path: root/dom/html/HTMLStyleElement.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /dom/html/HTMLStyleElement.cpp
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/html/HTMLStyleElement.cpp')
-rw-r--r--dom/html/HTMLStyleElement.cpp27
1 files changed, 25 insertions, 2 deletions
diff --git a/dom/html/HTMLStyleElement.cpp b/dom/html/HTMLStyleElement.cpp
index ed4c141897..e0bc228011 100644
--- a/dom/html/HTMLStyleElement.cpp
+++ b/dom/html/HTMLStyleElement.cpp
@@ -91,15 +91,29 @@ nsresult HTMLStyleElement::BindToTree(BindContext& aContext, nsINode& aParent) {
return rv;
}
-void HTMLStyleElement::UnbindFromTree(bool aNullParent) {
+void HTMLStyleElement::UnbindFromTree(UnbindContext& aContext) {
RefPtr<Document> oldDoc = GetUncomposedDoc();
ShadowRoot* oldShadow = GetContainingShadow();
- nsGenericHTMLElement::UnbindFromTree(aNullParent);
+ nsGenericHTMLElement::UnbindFromTree(aContext);
Unused << UpdateStyleSheetInternal(oldDoc, oldShadow);
}
+bool HTMLStyleElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
+ const nsAString& aValue,
+ nsIPrincipal* aMaybeScriptedPrincipal,
+ nsAttrValue& aResult) {
+ if (aNamespaceID == kNameSpaceID_None && aAttribute == nsGkAtoms::blocking &&
+ StaticPrefs::dom_element_blocking_enabled()) {
+ aResult.ParseAtomArray(aValue);
+ return true;
+ }
+
+ return nsGenericHTMLElement::ParseAttribute(aNamespaceID, aAttribute, aValue,
+ aMaybeScriptedPrincipal, aResult);
+}
+
void HTMLStyleElement::AfterSetAttr(int32_t aNameSpaceID, nsAtom* aName,
const nsAttrValue* aValue,
const nsAttrValue* aOldValue,
@@ -199,4 +213,13 @@ nsDOMTokenList* HTMLStyleElement::Blocking() {
return mBlocking;
}
+bool HTMLStyleElement::IsPotentiallyRenderBlocking() {
+ return BlockingContainsRender();
+
+ // TODO: handle implicitly potentially render blocking
+ // https://html.spec.whatwg.org/#implicitly-potentially-render-blocking
+ // A style element is implicitly potentially render-blocking if the element
+ // was created by its node document's parser.
+}
+
} // namespace mozilla::dom