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

Unified Diff: third_party/WebKit/Source/core/css/cssom/SimpleLength.cpp

Issue 1602843003: Update StyleValue.cssString() to use existing methods instead of rolling our own. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert TransformValue.html Created 4 years, 11 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/css/cssom/SimpleLength.cpp
diff --git a/third_party/WebKit/Source/core/css/cssom/SimpleLength.cpp b/third_party/WebKit/Source/core/css/cssom/SimpleLength.cpp
index 422ff07ad903cc15047f04deff848625b13c9f58..49fa4bcd97501ae14bba4609fbd8ad61768d9951 100644
--- a/third_party/WebKit/Source/core/css/cssom/SimpleLength.cpp
+++ b/third_party/WebKit/Source/core/css/cssom/SimpleLength.cpp
@@ -10,18 +10,9 @@
namespace blink {
-String SimpleLength::cssString() const
-{
- StringBuilder s;
- s.appendNumber(m_value);
- s.append(unit());
- return s.toString();
-}
-
PassRefPtrWillBeRawPtr<CSSValue> SimpleLength::toCSSValue() const
{
- // TODO: Don't re-parse the unit.
- return cssValuePool().createValue(m_value, CSSPrimitiveValue::fromName(unit()));
+ return cssValuePool().createValue(m_value, LengthValue::lengthTypeToPrimitiveType(m_unit));
}
LengthValue* SimpleLength::addInternal(const LengthValue* other, ExceptionState& exceptionState)
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/SimpleLength.h ('k') | third_party/WebKit/Source/core/css/cssom/StyleCalcLength.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698