| OLD | NEW |
| 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 23 matching lines...) Expand all Loading... |
| 34 class StylePropertySet; | 34 class StylePropertySet; |
| 35 | 35 |
| 36 struct CORE_EXPORT MatchedProperties { | 36 struct CORE_EXPORT MatchedProperties { |
| 37 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 37 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| 38 public: | 38 public: |
| 39 MatchedProperties(); | 39 MatchedProperties(); |
| 40 ~MatchedProperties(); | 40 ~MatchedProperties(); |
| 41 | 41 |
| 42 DECLARE_TRACE(); | 42 DECLARE_TRACE(); |
| 43 | 43 |
| 44 RefPtrWillBeMember<StylePropertySet> properties; | 44 Member<StylePropertySet> properties; |
| 45 | 45 |
| 46 union { | 46 union { |
| 47 struct { | 47 struct { |
| 48 unsigned linkMatchType : 2; | 48 unsigned linkMatchType : 2; |
| 49 unsigned whitelistType : 2; | 49 unsigned whitelistType : 2; |
| 50 } m_types; | 50 } m_types; |
| 51 // Used to make sure all memory is zero-initialized since we compute the
hash over the bytes of this object. | 51 // Used to make sure all memory is zero-initialized since we compute the
hash over the bytes of this object. |
| 52 void* possiblyPaddedMember; | 52 void* possiblyPaddedMember; |
| 53 }; | 53 }; |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 } // namespace blink | 56 } // namespace blink |
| 57 | 57 |
| 58 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::MatchedProperties); | 58 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::MatchedProperties); |
| 59 | 59 |
| 60 namespace blink { | 60 namespace blink { |
| 61 | 61 |
| 62 using MatchedPropertiesVector = WillBeHeapVector<MatchedProperties, 64>; | 62 using MatchedPropertiesVector = HeapVector<MatchedProperties, 64>; |
| 63 | 63 |
| 64 // MatchedPropertiesRange is used to represent a subset of the matched propertie
s from | 64 // MatchedPropertiesRange is used to represent a subset of the matched propertie
s from |
| 65 // a given origin, for instance UA rules, author rules, or a shadow tree scope.
This is | 65 // a given origin, for instance UA rules, author rules, or a shadow tree scope.
This is |
| 66 // needed because rules from different origins are applied in the opposite order
for | 66 // needed because rules from different origins are applied in the opposite order
for |
| 67 // !important rules, yet in the same order as for normal rules within the same o
rigin. | 67 // !important rules, yet in the same order as for normal rules within the same o
rigin. |
| 68 | 68 |
| 69 class MatchedPropertiesRange { | 69 class MatchedPropertiesRange { |
| 70 public: | 70 public: |
| 71 MatchedPropertiesRange(MatchedPropertiesVector::const_iterator begin, Matche
dPropertiesVector::const_iterator end) | 71 MatchedPropertiesRange(MatchedPropertiesVector::const_iterator begin, Matche
dPropertiesVector::const_iterator end) |
| 72 : m_begin(begin) | 72 : m_begin(begin) |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 } | 158 } |
| 159 | 159 |
| 160 inline bool operator!=(const MatchedProperties& a, const MatchedProperties& b) | 160 inline bool operator!=(const MatchedProperties& a, const MatchedProperties& b) |
| 161 { | 161 { |
| 162 return !(a == b); | 162 return !(a == b); |
| 163 } | 163 } |
| 164 | 164 |
| 165 } // namespace blink | 165 } // namespace blink |
| 166 | 166 |
| 167 #endif // MatchResult_h | 167 #endif // MatchResult_h |
| OLD | NEW |