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

Side by Side Diff: Source/core/dom/PresentationAttributeStyle.cpp

Issue 947393002: InlinedVisitor: Migrate dom to use inlined tracing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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) 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 DEFINE_INLINE_TRACE() { visitor->trace(value); }
64 64
65 PresentationAttributeCacheKey key; 65 PresentationAttributeCacheKey key;
66 RefPtrWillBeMember<StylePropertySet> value; 66 RefPtrWillBeMember<StylePropertySet> value;
67 }; 67 };
68 68
69 using PresentationAttributeCache = WillBeHeapHashMap<unsigned, OwnPtrWillBeMembe r<PresentationAttributeCacheEntry>, AlreadyHashed>; 69 using PresentationAttributeCache = WillBeHeapHashMap<unsigned, OwnPtrWillBeMembe r<PresentationAttributeCacheEntry>, AlreadyHashed>;
70 static PresentationAttributeCache& presentationAttributeCache() 70 static PresentationAttributeCache& presentationAttributeCache()
71 { 71 {
72 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<PresentationAttributeCache>, cach e, (adoptPtrWillBeNoop(new PresentationAttributeCache()))); 72 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<PresentationAttributeCache>, cach e, (adoptPtrWillBeNoop(new PresentationAttributeCache())));
73 return *cache; 73 return *cache;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 presentationAttributeCache().clear(); 199 presentationAttributeCache().clear();
200 presentationAttributeCache().set(cacheHash, newEntry.release()); 200 presentationAttributeCache().set(cacheHash, newEntry.release());
201 } else { 201 } else {
202 cacheValue->value = newEntry.release(); 202 cacheValue->value = newEntry.release();
203 } 203 }
204 204
205 return style.release(); 205 return style.release();
206 } 206 }
207 207
208 } // namespace blink 208 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698