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

Unified Diff: third_party/WebKit/Source/core/css/CSSFontVariationValue.cpp

Issue 2558053002: Add CSS support for font-variation-settings (Closed)
Patch Set: DCHECK corrected, newline removed. Created 4 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/css/CSSFontVariationValue.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSFontVariationValue.cpp b/third_party/WebKit/Source/core/css/CSSFontVariationValue.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..b89f9f0025cceb987437b204ad9c161bef1afffa
--- /dev/null
+++ b/third_party/WebKit/Source/core/css/CSSFontVariationValue.cpp
@@ -0,0 +1,28 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "core/css/CSSFontVariationValue.h"
+
+#include "wtf/text/StringBuilder.h"
+
+namespace blink {
+
+CSSFontVariationValue::CSSFontVariationValue(const AtomicString& tag,
+ float value)
+ : CSSValue(FontVariationClass), m_tag(tag), m_value(value) {}
+
+String CSSFontVariationValue::customCSSText() const {
+ StringBuilder builder;
+ builder.append('\'');
+ builder.append(m_tag);
+ builder.append("' ");
+ builder.appendNumber(m_value);
+ return builder.toString();
+}
+
+bool CSSFontVariationValue::equals(const CSSFontVariationValue& other) const {
+ return m_tag == other.m_tag && m_value == other.m_value;
+}
+
+} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSFontVariationValue.h ('k') | third_party/WebKit/Source/core/css/CSSProperties.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698