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

Side by Side Diff: Source/core/html/CollectionIndexCache.h

Issue 932403002: InlinedVisitor: Migrate html 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
« no previous file with comments | « Source/core/html/ClassList.cpp ('k') | Source/core/html/DOMFormData.cpp » ('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) 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2013 Apple Inc. All rights reserved.
3 * Copyright (C) 2014 Samsung Electronics. All rights reserved. 3 * Copyright (C) 2014 Samsung Electronics. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 if (cachedNode()) 55 if (cachedNode())
56 return !cachedNodeIndex() && !nodeAt(collection, 1); 56 return !cachedNodeIndex() && !nodeAt(collection, 1);
57 return nodeAt(collection, 0) && !nodeAt(collection, 1); 57 return nodeAt(collection, 0) && !nodeAt(collection, 1);
58 } 58 }
59 59
60 unsigned nodeCount(const Collection&); 60 unsigned nodeCount(const Collection&);
61 NodeType* nodeAt(const Collection&, unsigned index); 61 NodeType* nodeAt(const Collection&, unsigned index);
62 62
63 void invalidate(); 63 void invalidate();
64 64
65 void trace(Visitor* visitor) 65 DEFINE_INLINE_TRACE()
66 { 66 {
67 visitor->trace(m_currentNode); 67 visitor->trace(m_currentNode);
68 } 68 }
69 69
70 protected: 70 protected:
71 ALWAYS_INLINE NodeType* cachedNode() const { return m_currentNode; } 71 ALWAYS_INLINE NodeType* cachedNode() const { return m_currentNode; }
72 ALWAYS_INLINE unsigned cachedNodeIndex() const { ASSERT(cachedNode()); retur n m_cachedNodeIndex; } 72 ALWAYS_INLINE unsigned cachedNodeIndex() const { ASSERT(cachedNode()); retur n m_cachedNodeIndex; }
73 ALWAYS_INLINE void setCachedNode(NodeType* node, unsigned index) 73 ALWAYS_INLINE void setCachedNode(NodeType* node, unsigned index)
74 { 74 {
75 ASSERT(node); 75 ASSERT(node);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 setCachedNodeCount(currentIndex + 1); 198 setCachedNodeCount(currentIndex + 1);
199 return nullptr; 199 return nullptr;
200 } 200 }
201 setCachedNode(currentNode, currentIndex); 201 setCachedNode(currentNode, currentIndex);
202 return currentNode; 202 return currentNode;
203 } 203 }
204 204
205 } // namespace blink 205 } // namespace blink
206 206
207 #endif // CollectionIndexCache_h 207 #endif // CollectionIndexCache_h
OLDNEW
« no previous file with comments | « Source/core/html/ClassList.cpp ('k') | Source/core/html/DOMFormData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698