Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(681)

Unified Diff: third_party/WebKit/Source/core/svg/SVGAnimatedLength.cpp

Issue 1491023003: Refactor SVGAnimatedLength negative values mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/svg/SVGAnimatedLength.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimatedLength.cpp b/third_party/WebKit/Source/core/svg/SVGAnimatedLength.cpp
index a22e1f5014faf7a4e62e3fa45c0fcbbe3ef8543b..1ed51ed635d72b1bcbc644430597ba61ee22cb4d 100644
--- a/third_party/WebKit/Source/core/svg/SVGAnimatedLength.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGAnimatedLength.cpp
@@ -33,6 +33,7 @@
#include "core/svg/SVGAnimatedLength.h"
#include "core/svg/SVGElement.h"
+#include "core/svg/SVGLength.h"
namespace blink {
@@ -50,7 +51,7 @@ void SVGAnimatedLength::setBaseValueAsString(const String& value, SVGParsingErro
if (es.hadException()) {
parseError = ParsingAttributeFailedError;
baseValue()->newValueSpecifiedUnits(CSSPrimitiveValue::UnitType::UserUnits, 0);
- } else if (m_negativeValuesMode == ForbidNegativeLengths && baseValue()->valueInSpecifiedUnits() < 0) {
+ } else if (SVGLength::negativeValuesModeForAnimatedLengthAttribute(attributeName()) == ForbidNegativeLengths && baseValue()->valueInSpecifiedUnits() < 0) {
fs 2015/12/02 14:45:42 It's possible that we ought/need to re-order these
parseError = NegativeValueForbiddenError;
}
}

Powered by Google App Engine
This is Rietveld 408576698