Bug 1357295 - Allow all numeric values for SMIL. r?birtles
MozReview-Commit-ID: Knlgs1j4dan
--- a/dom/smil/nsSMILCSSValueType.cpp
+++ b/dom/smil/nsSMILCSSValueType.cpp
@@ -473,43 +473,32 @@ ValueFromStringHelper(nsCSSPropertyID aP
const ServoComputedValues* parentStyle =
aStyleContext->GetParentAllowServo()
? aStyleContext->GetParentAllowServo()->StyleSource()
.AsServoComputedValues()
: nullptr;
const ServoComputedValuesWithParent servoStyles =
{ currentStyle, parentStyle };
- // FIXME (bug 1357295): Handle negative values properly
-#ifdef DEBUG
- {
- bool isNegative = false;
- Unused << GetNonNegativePropValue(aString, aPropID, isNegative);
- if (isNegative) {
- NS_WARNING("stylo: Special negative value handling not yet supported"
- " (bug 1357295)");
- }
- }
-#endif // DEBUG
-
// Parse property
nsIDocument* doc = aTargetElement->GetUncomposedDoc();
if (!doc) {
return nullptr;
}
// FIXME this is using the wrong base uri (bug 1343919)
RefPtr<URLExtraData> data = new URLExtraData(doc->GetDocumentURI(),
doc->GetDocumentURI(),
doc->NodePrincipal());
NS_ConvertUTF16toUTF8 value(aString);
RefPtr<RawServoDeclarationBlock> servoDeclarationBlock =
Servo_ParseProperty(aPropID,
&value,
data,
- ParsingMode::AllowUnitlessLength).Consume();
+ ParsingMode::AllowUnitlessLength |
+ ParsingMode::AllowAllNumericValues).Consume();
if (!servoDeclarationBlock) {
return nullptr;
}
// Compute value
PropertyValuePair propValuePair;
propValuePair.mProperty = aPropID;
propValuePair.mServoDeclarationBlock = servoDeclarationBlock;