Bug 1957689 - Appease old gcc which doesn't like the nullptr vs NonNull<Encoding*> ternary.

MANUAL PUSH: Trivial bustage fix CLOSED TREE
This commit is contained in:
Emilio Cobos Álvarez
2025-04-02 22:01:51 +02:00
parent af277d99cc
commit 7b67ce8702

View File

@@ -491,13 +491,17 @@ Document* SVGUseElement::GetSourceDocument() const {
}
nsIURI* SVGUseElement::GetSourceDocURI() const {
auto* doc = GetSourceDocument();
return doc ? doc->GetDocumentURI() : nullptr;
if (auto* doc = GetSourceDocument()) {
return doc->GetDocumentURI();
}
return nullptr;
}
const Encoding* SVGUseElement::GetSourceDocCharacterSet() const {
auto* doc = GetSourceDocument();
return doc ? doc->GetDocumentCharacterSet() : nullptr;
if (auto* doc = GetSourceDocument()) {
return doc->GetDocumentCharacterSet();
}
return nullptr;
}
static nsINode* GetClonedChild(const SVGUseElement& aUseElement) {