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

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

Issue 2113943003: SVGLength.value setter should set the value to <number> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Align with review comments Created 4 years, 6 months 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/SVGLength.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGLength.cpp b/third_party/WebKit/Source/core/svg/SVGLength.cpp
index 8d66d974af40ea2aa6faf4d7a18ca2a7ebf75b5a..baca6224015d143522ff80038003daa4c906a100 100644
--- a/third_party/WebKit/Source/core/svg/SVGLength.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGLength.cpp
@@ -77,6 +77,11 @@ float SVGLength::value(const SVGLengthContext& context) const
m_value->getFloatValue(), unitMode(), m_value->typeWithCalcResolved());
}
+void SVGLength::setValueAsNumber(float value)
+{
+ m_value = CSSPrimitiveValue::create(value, CSSPrimitiveValue::UnitType::UserUnits);
+}
+
void SVGLength::setValue(float value, const SVGLengthContext& context)
{
m_value = CSSPrimitiveValue::create(
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGLength.h ('k') | third_party/WebKit/Source/core/svg/SVGLengthTearOff.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698