| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 Vector<std::pair<StringImpl*, AtomicString>, 3> attributesAndValues; | 50 Vector<std::pair<StringImpl*, AtomicString>, 3> attributesAndValues; |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 static bool operator!=(const PresentationAttributeCacheKey& a, const Presentatio
nAttributeCacheKey& b) | 53 static bool operator!=(const PresentationAttributeCacheKey& a, const Presentatio
nAttributeCacheKey& b) |
| 54 { | 54 { |
| 55 if (a.tagName != b.tagName) | 55 if (a.tagName != b.tagName) |
| 56 return true; | 56 return true; |
| 57 return a.attributesAndValues != b.attributesAndValues; | 57 return a.attributesAndValues != b.attributesAndValues; |
| 58 } | 58 } |
| 59 | 59 |
| 60 struct PresentationAttributeCacheEntry FINAL : public NoBaseWillBeGarbageCollect
edFinalized<PresentationAttributeCacheEntry> { | 60 struct PresentationAttributeCacheEntry final : public NoBaseWillBeGarbageCollect
edFinalized<PresentationAttributeCacheEntry> { |
| 61 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; | 61 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
| 62 public: | 62 public: |
| 63 void trace(Visitor* visitor) { visitor->trace(value); } | 63 void trace(Visitor* visitor) { visitor->trace(value); } |
| 64 | 64 |
| 65 PresentationAttributeCacheKey key; | 65 PresentationAttributeCacheKey key; |
| 66 RefPtrWillBeMember<StylePropertySet> value; | 66 RefPtrWillBeMember<StylePropertySet> value; |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 typedef WillBeHeapHashMap<unsigned, OwnPtrWillBeMember<PresentationAttributeCach
eEntry>, AlreadyHashed> PresentationAttributeCache; | 69 typedef WillBeHeapHashMap<unsigned, OwnPtrWillBeMember<PresentationAttributeCach
eEntry>, AlreadyHashed> PresentationAttributeCache; |
| 70 static PresentationAttributeCache& presentationAttributeCache() | 70 static PresentationAttributeCache& presentationAttributeCache() |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 presentationAttributeCache().clear(); | 201 presentationAttributeCache().clear(); |
| 202 presentationAttributeCache().set(cacheHash, newEntry.release()); | 202 presentationAttributeCache().set(cacheHash, newEntry.release()); |
| 203 } else { | 203 } else { |
| 204 cacheValue->value = newEntry.release(); | 204 cacheValue->value = newEntry.release(); |
| 205 } | 205 } |
| 206 | 206 |
| 207 return style.release(); | 207 return style.release(); |
| 208 } | 208 } |
| 209 | 209 |
| 210 } // namespace blink | 210 } // namespace blink |
| OLD | NEW |