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

Side by Side Diff: Source/core/dom/SpaceSplitString.h

Issue 1304043002: Make classes and structures in core/dom fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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 | « Source/core/dom/ScriptLoader.h ('k') | Source/core/dom/StyleChangeReason.h » ('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 * Copyright (C) 2007, 2008, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details. 12 * Library General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU Library General Public License 14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to 15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 16 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA. 17 * Boston, MA 02111-1307, USA.
18 * 18 *
19 */ 19 */
20 20
21 #ifndef SpaceSplitString_h 21 #ifndef SpaceSplitString_h
22 #define SpaceSplitString_h 22 #define SpaceSplitString_h
23 23
24 #include "wtf/Allocator.h"
24 #include "wtf/RefCounted.h" 25 #include "wtf/RefCounted.h"
25 #include "wtf/Vector.h" 26 #include "wtf/Vector.h"
26 #include "wtf/text/AtomicString.h" 27 #include "wtf/text/AtomicString.h"
27 28
28 namespace blink { 29 namespace blink {
29 30
30 class SpaceSplitString { 31 class SpaceSplitString {
32 WTF_MAKE_FAST_ALLOCATED(SpaceSplitString);
31 public: 33 public:
32 enum CaseFolding { ShouldNotFoldCase, ShouldFoldCase }; 34 enum CaseFolding { ShouldNotFoldCase, ShouldFoldCase };
33 SpaceSplitString() { } 35 SpaceSplitString() { }
34 SpaceSplitString(const AtomicString& string, CaseFolding caseFolding) { set( string, caseFolding); } 36 SpaceSplitString(const AtomicString& string, CaseFolding caseFolding) { set( string, caseFolding); }
35 37
36 bool operator!=(const SpaceSplitString& other) const { return m_data != othe r.m_data; } 38 bool operator!=(const SpaceSplitString& other) const { return m_data != othe r.m_data; }
37 39
38 void set(const AtomicString&, CaseFolding); 40 void set(const AtomicString&, CaseFolding);
39 void clear() { m_data.clear(); } 41 void clear() { m_data.clear(); }
40 42
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 if (m_data && !m_data->isUnique()) 96 if (m_data && !m_data->isUnique())
95 m_data = Data::createUnique(*m_data); 97 m_data = Data::createUnique(*m_data);
96 } 98 }
97 99
98 RefPtr<Data> m_data; 100 RefPtr<Data> m_data;
99 }; 101 };
100 102
101 } // namespace blink 103 } // namespace blink
102 104
103 #endif // SpaceSplitString_h 105 #endif // SpaceSplitString_h
OLDNEW
« no previous file with comments | « Source/core/dom/ScriptLoader.h ('k') | Source/core/dom/StyleChangeReason.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698