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

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

Issue 249363002: Use macros instead of specializing VectorTraits explicitly (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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/css/CSSPropertySourceData.h ('k') | Source/core/css/RuleSet.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // trace a raw rule data pointer at this point. 78 // trace a raw rule data pointer at this point.
79 const RuleData* m_ruleData; 79 const RuleData* m_ruleData;
80 unsigned m_specificity; 80 unsigned m_specificity;
81 CascadeScope m_cascadeScope; 81 CascadeScope m_cascadeScope;
82 uint64_t m_position; 82 uint64_t m_position;
83 RawPtrWillBeMember<const CSSStyleSheet> m_parentStyleSheet; 83 RawPtrWillBeMember<const CSSStyleSheet> m_parentStyleSheet;
84 }; 84 };
85 85
86 } // namespace WebCore 86 } // namespace WebCore
87 87
88 88 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(WebCore::MatchedRule);
89 namespace WTF {
90
91 template <> struct VectorTraits<WebCore::MatchedRule> : VectorTraitsBase<WebCore ::MatchedRule> {
92 static const bool canInitializeWithMemset = true;
93 static const bool canMoveWithMemcpy = true;
94 };
95
96 } // namespace WTF
97 89
98 namespace WebCore { 90 namespace WebCore {
99 91
100 // FIXME: oilpan: when transition types are gone this class can be replaced with HeapVector. 92 // FIXME: oilpan: when transition types are gone this class can be replaced with HeapVector.
101 class StyleRuleList FINAL : public RefCountedWillBeGarbageCollected<StyleRuleLis t> { 93 class StyleRuleList FINAL : public RefCountedWillBeGarbageCollected<StyleRuleLis t> {
102 public: 94 public:
103 static PassRefPtrWillBeRawPtr<StyleRuleList> create() { return adoptRefWillB eNoop(new StyleRuleList()); } 95 static PassRefPtrWillBeRawPtr<StyleRuleList> create() { return adoptRefWillB eNoop(new StyleRuleList()); }
104 96
105 void trace(Visitor* visitor) 97 void trace(Visitor* visitor)
106 { 98 {
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 176
185 // Output. 177 // Output.
186 RefPtrWillBeMember<StaticCSSRuleList> m_cssRuleList; 178 RefPtrWillBeMember<StaticCSSRuleList> m_cssRuleList;
187 RefPtrWillBeMember<StyleRuleList> m_styleRuleList; 179 RefPtrWillBeMember<StyleRuleList> m_styleRuleList;
188 MatchResult m_result; 180 MatchResult m_result;
189 }; 181 };
190 182
191 } // namespace WebCore 183 } // namespace WebCore
192 184
193 #endif // ElementRuleCollector_h 185 #endif // ElementRuleCollector_h
OLDNEW
« no previous file with comments | « Source/core/css/CSSPropertySourceData.h ('k') | Source/core/css/RuleSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698