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

Side by Side Diff: Source/core/css/Counter.h

Issue 16415007: Cleanup usage of CSSPropertyID and CSSValueID inside Blink. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/css/CSSToStyleMap.cpp ('k') | Source/core/css/DeprecatedStyleBuilder.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 13 * Library General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Library General Public License 15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to 16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 */ 19 */
20 20
21 #ifndef Counter_h 21 #ifndef Counter_h
22 #define Counter_h 22 #define Counter_h
23 23
24 #include "core/css/CSSPrimitiveValue.h" 24 #include "core/css/CSSPrimitiveValue.h"
25 #include <wtf/text/WTFString.h> 25 #include "wtf/text/WTFString.h"
26 26
27 namespace WebCore { 27 namespace WebCore {
28 28
29 class Counter : public RefCounted<Counter> { 29 class Counter : public RefCounted<Counter> {
30 public: 30 public:
31 static PassRefPtr<Counter> create(PassRefPtr<CSSPrimitiveValue> identifier, PassRefPtr<CSSPrimitiveValue> listStyle, PassRefPtr<CSSPrimitiveValue> separator ) 31 static PassRefPtr<Counter> create(PassRefPtr<CSSPrimitiveValue> identifier, PassRefPtr<CSSPrimitiveValue> listStyle, PassRefPtr<CSSPrimitiveValue> separator )
32 { 32 {
33 return adoptRef(new Counter(identifier, listStyle, separator)); 33 return adoptRef(new Counter(identifier, listStyle, separator));
34 } 34 }
35 35
36 String identifier() const { return m_identifier ? m_identifier->getStringVal ue() : String(); } 36 String identifier() const { return m_identifier ? m_identifier->getStringVal ue() : String(); }
37 String listStyle() const { return m_listStyle ? m_listStyle->getStringValue( ) : String(); } 37 String listStyle() const { return m_listStyle ? m_listStyle->getStringValue( ) : String(); }
38 String separator() const { return m_separator ? m_separator->getStringValue( ) : String(); } 38 String separator() const { return m_separator ? m_separator->getStringValue( ) : String(); }
39 39
40 int listStyleIdent() const { return m_listStyle ? m_listStyle->getIdent() : 0; } 40 CSSValueID listStyleIdent() const { return m_listStyle ? m_listStyle->getVal ueID() : CSSValueInvalid; }
41 41
42 void setIdentifier(PassRefPtr<CSSPrimitiveValue> identifier) { m_identifier = identifier; } 42 void setIdentifier(PassRefPtr<CSSPrimitiveValue> identifier) { m_identifier = identifier; }
43 void setListStyle(PassRefPtr<CSSPrimitiveValue> listStyle) { m_listStyle = l istStyle; } 43 void setListStyle(PassRefPtr<CSSPrimitiveValue> listStyle) { m_listStyle = l istStyle; }
44 void setSeparator(PassRefPtr<CSSPrimitiveValue> separator) { m_separator = s eparator; } 44 void setSeparator(PassRefPtr<CSSPrimitiveValue> separator) { m_separator = s eparator; }
45 45
46 bool equals(const Counter& other) const 46 bool equals(const Counter& other) const
47 { 47 {
48 return identifier() == other.identifier() 48 return identifier() == other.identifier()
49 && listStyle() == other.listStyle() 49 && listStyle() == other.listStyle()
50 && separator() == other.separator(); 50 && separator() == other.separator();
(...skipping 15 matching lines...) Expand all
66 } 66 }
67 67
68 RefPtr<CSSPrimitiveValue> m_identifier; // string 68 RefPtr<CSSPrimitiveValue> m_identifier; // string
69 RefPtr<CSSPrimitiveValue> m_listStyle; // ident 69 RefPtr<CSSPrimitiveValue> m_listStyle; // ident
70 RefPtr<CSSPrimitiveValue> m_separator; // string 70 RefPtr<CSSPrimitiveValue> m_separator; // string
71 }; 71 };
72 72
73 } // namespace WebCore 73 } // namespace WebCore
74 74
75 #endif // Counter_h 75 #endif // Counter_h
OLDNEW
« no previous file with comments | « Source/core/css/CSSToStyleMap.cpp ('k') | Source/core/css/DeprecatedStyleBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698