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

Side by Side Diff: Source/core/rendering/style/StyleVariableData.h

Issue 20253002: core/rendering: Include wtf files using "wtf/foo.h" form. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixes Created 7 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 31
32 #ifndef StyleVariableData_h 32 #ifndef StyleVariableData_h
33 #define StyleVariableData_h 33 #define StyleVariableData_h
34 34
35 #include <wtf/Forward.h> 35 #include "wtf/Forward.h"
36 #include <wtf/HashMap.h> 36 #include "wtf/HashMap.h"
37 #include <wtf/RefCounted.h> 37 #include "wtf/RefCounted.h"
38 #include <wtf/text/AtomicStringHash.h> 38 #include "wtf/text/AtomicStringHash.h"
39 39
40 namespace WebCore { 40 namespace WebCore {
41 41
42 class CursorList; 42 class CursorList;
43 class QuotesData; 43 class QuotesData;
44 class ShadowData; 44 class ShadowData;
45 45
46 class StyleVariableData : public RefCounted<StyleVariableData> { 46 class StyleVariableData : public RefCounted<StyleVariableData> {
47 public: 47 public:
48 static PassRefPtr<StyleVariableData> create() { return adoptRef(new StyleVar iableData()); } 48 static PassRefPtr<StyleVariableData> create() { return adoptRef(new StyleVar iableData()); }
49 PassRefPtr<StyleVariableData> copy() const { return adoptRef(new StyleVariab leData(*this)); } 49 PassRefPtr<StyleVariableData> copy() const { return adoptRef(new StyleVariab leData(*this)); }
50 50
51 bool operator==(const StyleVariableData& other) const { return other.m_data == m_data; } 51 bool operator==(const StyleVariableData& other) const { return other.m_data == m_data; }
52 bool operator!=(const StyleVariableData& other) const { return !(*this == ot her); } 52 bool operator!=(const StyleVariableData& other) const { return !(*this == ot her); }
53 53
54 void setVariable(const AtomicString& name, const String& value) { m_data.set (name, value); } 54 void setVariable(const AtomicString& name, const String& value) { m_data.set (name, value); }
55 55
56 HashMap<AtomicString, String> m_data; 56 HashMap<AtomicString, String> m_data;
57 private: 57 private:
58 explicit StyleVariableData() : RefCounted<StyleVariableData>() { } 58 explicit StyleVariableData() : RefCounted<StyleVariableData>() { }
59 StyleVariableData(const StyleVariableData& other) : RefCounted<StyleVariable Data>(), m_data(HashMap<AtomicString, String>(other.m_data)) { } 59 StyleVariableData(const StyleVariableData& other) : RefCounted<StyleVariable Data>(), m_data(HashMap<AtomicString, String>(other.m_data)) { }
60 }; 60 };
61 61
62 } // namespace WebCore 62 } // namespace WebCore
63 63
64 #endif /* StyleVariableData_h */ 64 #endif /* StyleVariableData_h */
OLDNEW
« no previous file with comments | « Source/core/rendering/style/StyleTransformData.h ('k') | Source/core/rendering/style/StyleVisualData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698