From 6fc5f921547f062f9d9fbbbd69013d84dbf02787 Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Mon, 7 Nov 2016 15:28:19 +1100 Subject: [PATCH] Bug 1294299 - Followup: Serialize style attribute for Element.getAttribute. r=heycam MozReview-Commit-ID: DBDDpqV9eUM --HG-- extra : rebase_source : 35498bf3202fb98863b5c44967ea28841ddf3f6c --- dom/base/nsAttrValue.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dom/base/nsAttrValue.cpp b/dom/base/nsAttrValue.cpp index da3e96865abd..8eb1aaf974e5 100644 --- a/dom/base/nsAttrValue.cpp +++ b/dom/base/nsAttrValue.cpp @@ -644,11 +644,8 @@ nsAttrValue::ToString(nsAString& aResult) const { aResult.Truncate(); MiscContainer *container = GetMiscContainer(); - DeclarationBlock* decl = container->mValue.mCSSDeclaration; - // XXXheycam Once we support CSSOM access to them, we should - // probably serialize ServoDeclarationBlock like this too. - if (decl && decl->IsGecko()) { - decl->AsGecko()->ToString(aResult); + if (DeclarationBlock* decl = container->mValue.mCSSDeclaration) { + decl->ToString(aResult); } const_cast(this)->SetMiscAtomOrString(&aResult);