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

Side by Side Diff: Source/core/css/resolver/MatchResult.h

Issue 180003002: Consistently use on-heap collections for StyleRuleBase descendants. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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) 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 * Copyright (C) 2013 Google Inc. All rights reserved. 4 * Copyright (C) 2013 Google Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 union { 60 union {
61 struct { 61 struct {
62 unsigned linkMatchType : 2; 62 unsigned linkMatchType : 2;
63 unsigned whitelistType : 2; 63 unsigned whitelistType : 2;
64 }; 64 };
65 // Used to make sure all memory is zero-initialized since we compute the hash over the bytes of this object. 65 // Used to make sure all memory is zero-initialized since we compute the hash over the bytes of this object.
66 void* possiblyPaddedMember; 66 void* possiblyPaddedMember;
67 }; 67 };
68 }; 68 };
69 69
70 struct MatchResult { 70 struct MatchResult {
Mads Ager (chromium) 2014/02/25 19:35:58 STACK_ALLOCATED? (If Ian's change has landed?)
Vyacheslav Egorov (Chromium) 2014/02/26 13:12:24 Done.
71 MatchResult() : isCacheable(true) { } 71 MatchResult() : isCacheable(true) { }
72 Vector<MatchedProperties, 64> matchedProperties; 72 Vector<MatchedProperties, 64> matchedProperties;
73 Vector<StyleRule*, 64> matchedRules; 73 WillBeHeapVector<StyleRule*, 64> matchedRules;
Mads Ager (chromium) 2014/02/25 19:35:58 WillBeHeapVector<RawPtrWillBeMember<StyleRule>, 64
Vyacheslav Egorov (Chromium) 2014/02/26 13:12:24 Done.
74 MatchRanges ranges; 74 MatchRanges ranges;
75 bool isCacheable; 75 bool isCacheable;
76 76
77 void addMatchedProperties(const StylePropertySet* properties, StyleRule* = 0 , unsigned linkMatchType = SelectorChecker::MatchAll, PropertyWhitelistType = Pr opertyWhitelistNone); 77 void addMatchedProperties(const StylePropertySet* properties, StyleRule* = 0 , unsigned linkMatchType = SelectorChecker::MatchAll, PropertyWhitelistType = Pr opertyWhitelistNone);
78 }; 78 };
79 79
80 inline bool operator==(const MatchRanges& a, const MatchRanges& b) 80 inline bool operator==(const MatchRanges& a, const MatchRanges& b)
81 { 81 {
82 return a.firstUARule == b.firstUARule 82 return a.firstUARule == b.firstUARule
83 && a.lastUARule == b.lastUARule 83 && a.lastUARule == b.lastUARule
(...skipping 14 matching lines...) Expand all
98 } 98 }
99 99
100 inline bool operator!=(const MatchedProperties& a, const MatchedProperties& b) 100 inline bool operator!=(const MatchedProperties& a, const MatchedProperties& b)
101 { 101 {
102 return !(a == b); 102 return !(a == b);
103 } 103 }
104 104
105 } // namespace WebCore 105 } // namespace WebCore
106 106
107 #endif // MatchResult_h 107 #endif // MatchResult_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698