From a405065792b9a45393663f627f38c617042216e2 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Tue, 11 Aug 2015 00:24:27 -0400 Subject: [PATCH] Bug 968923 - fix bogus assert in nsSVGElement.cpp; r=heycam Landing this on a CLOSED TREE --- dom/svg/nsSVGElement.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/dom/svg/nsSVGElement.cpp b/dom/svg/nsSVGElement.cpp index 01035eda86b7..dc0433e70850 100644 --- a/dom/svg/nsSVGElement.cpp +++ b/dom/svg/nsSVGElement.cpp @@ -1189,10 +1189,19 @@ MappedAttrParser::ParseMappedAttrValue(nsIAtom* aMappedAttrName, if (changed) { // The normal reporting of use counters by the nsCSSParser won't happen // since it doesn't have a sheet. - MOZ_ASSERT(!nsCSSProps::IsShorthand(propertyID)); - UseCounter useCounter = nsCSSProps::UseCounterFor(propertyID); - if (useCounter != eUseCounter_UNKNOWN) { - mElement->OwnerDoc()->SetDocumentAndPageUseCounter(useCounter); + if (nsCSSProps::IsShorthand(propertyID)) { + CSSPROPS_FOR_SHORTHAND_SUBPROPERTIES(subprop, propertyID, + nsCSSProps::eEnabledForAllContent) { + UseCounter useCounter = nsCSSProps::UseCounterFor(*subprop); + if (useCounter != eUseCounter_UNKNOWN) { + mElement->OwnerDoc()->SetDocumentAndPageUseCounter(useCounter); + } + } + } else { + UseCounter useCounter = nsCSSProps::UseCounterFor(propertyID); + if (useCounter != eUseCounter_UNKNOWN) { + mElement->OwnerDoc()->SetDocumentAndPageUseCounter(useCounter); + } } } return;