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

Side by Side Diff: third_party/WebKit/Source/core/css/cssom/StyleValue.h

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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/StyleCalcLength.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef StyleValue_h 5 #ifndef StyleValue_h
6 #define StyleValue_h 6 #define StyleValue_h
7 7
8 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "core/CoreExport.h" 9 #include "core/CoreExport.h"
10 #include "core/css/CSSValue.h" 10 #include "core/css/CSSValue.h"
(...skipping 12 matching lines...) Expand all
23 KeywordValueType, SimpleLengthType, CalcLengthType, NumberType, Transfor mValueType 23 KeywordValueType, SimpleLengthType, CalcLengthType, NumberType, Transfor mValueType
24 }; 24 };
25 25
26 virtual ~StyleValue() { } 26 virtual ~StyleValue() { }
27 27
28 virtual StyleValueType type() const = 0; 28 virtual StyleValueType type() const = 0;
29 29
30 static StyleValue* create(const CSSValue&); 30 static StyleValue* create(const CSSValue&);
31 static ScriptValue parse(ScriptState*, const String& property, const String& cssText); 31 static ScriptValue parse(ScriptState*, const String& property, const String& cssText);
32 32
33 virtual String cssString() const = 0;
34 virtual PassRefPtrWillBeRawPtr<CSSValue> toCSSValue() const = 0; 33 virtual PassRefPtrWillBeRawPtr<CSSValue> toCSSValue() const = 0;
34 virtual String cssString() const
35 {
36 return toCSSValue()->cssText();
37 }
35 38
36 DEFINE_INLINE_VIRTUAL_TRACE() { } 39 DEFINE_INLINE_VIRTUAL_TRACE() { }
37 40
38 protected: 41 protected:
39 StyleValue() {} 42 StyleValue() {}
40 }; 43 };
41 44
42 } // namespace blink 45 } // namespace blink
43 46
44 #endif 47 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/StyleCalcLength.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698