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

Side by Side Diff: Source/core/dom/StaticNodeList.h

Issue 1219063013: Fix virtual/override/final usage in Source/core/dom/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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/dom/ScriptableDocumentParser.h ('k') | Source/core/dom/StringCallback.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) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 template <typename NodeType> 43 template <typename NodeType>
44 class StaticNodeTypeList final : public NodeList { 44 class StaticNodeTypeList final : public NodeList {
45 public: 45 public:
46 static PassRefPtrWillBeRawPtr<StaticNodeTypeList> adopt(WillBeHeapVector<Ref PtrWillBeMember<NodeType>>& nodes); 46 static PassRefPtrWillBeRawPtr<StaticNodeTypeList> adopt(WillBeHeapVector<Ref PtrWillBeMember<NodeType>>& nodes);
47 47
48 static PassRefPtrWillBeRawPtr<StaticNodeTypeList> createEmpty() 48 static PassRefPtrWillBeRawPtr<StaticNodeTypeList> createEmpty()
49 { 49 {
50 return adoptRefWillBeNoop(new StaticNodeTypeList); 50 return adoptRefWillBeNoop(new StaticNodeTypeList);
51 } 51 }
52 52
53 virtual ~StaticNodeTypeList(); 53 ~StaticNodeTypeList() override;
54 54
55 virtual unsigned length() const override; 55 unsigned length() const override;
56 virtual NodeType* item(unsigned index) const override; 56 NodeType* item(unsigned index) const override;
57 57
58 DECLARE_VIRTUAL_TRACE(); 58 DECLARE_VIRTUAL_TRACE();
59 59
60 private: 60 private:
61 ptrdiff_t AllocationSize() 61 ptrdiff_t AllocationSize()
62 { 62 {
63 return m_nodes.capacity() * sizeof(RefPtrWillBeMember<NodeType>); 63 return m_nodes.capacity() * sizeof(RefPtrWillBeMember<NodeType>);
64 } 64 }
65 65
66 WillBeHeapVector<RefPtrWillBeMember<NodeType>> m_nodes; 66 WillBeHeapVector<RefPtrWillBeMember<NodeType>> m_nodes;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 template <typename VisitorDispatcher> 107 template <typename VisitorDispatcher>
108 ALWAYS_INLINE void StaticNodeTypeList<NodeType>::traceImpl(VisitorDispatcher vis itor) 108 ALWAYS_INLINE void StaticNodeTypeList<NodeType>::traceImpl(VisitorDispatcher vis itor)
109 { 109 {
110 visitor->trace(m_nodes); 110 visitor->trace(m_nodes);
111 NodeList::trace(visitor); 111 NodeList::trace(visitor);
112 } 112 }
113 113
114 } // namespace blink 114 } // namespace blink
115 115
116 #endif // StaticNodeList_h 116 #endif // StaticNodeList_h
OLDNEW
« no previous file with comments | « Source/core/dom/ScriptableDocumentParser.h ('k') | Source/core/dom/StringCallback.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698