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

Side by Side Diff: Source/web/WebNodeList.cpp

Issue 144313014: Remove NodeList's anonymous named getter (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Another clang build fix Created 6 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
« no previous file with comments | « Source/core/dom/StaticNodeList.cpp ('k') | no next file » | 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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
50 static PassRefPtr<NodeListWithInternalCollection> create(HTMLCollection* col lection) 50 static PassRefPtr<NodeListWithInternalCollection> create(HTMLCollection* col lection)
51 { 51 {
52 return adoptRef(new NodeListWithInternalCollection(collection)); 52 return adoptRef(new NodeListWithInternalCollection(collection));
53 } 53 }
54 54
55 // We have null checks in the following methods because WebNodeList does not have a isNull() method 55 // We have null checks in the following methods because WebNodeList does not have a isNull() method
56 // and callers need to be moved to WebNodeCollection and need to handle null using 56 // and callers need to be moved to WebNodeCollection and need to handle null using
57 // WebNodeCollection::isNull(). 57 // WebNodeCollection::isNull().
58 virtual unsigned length() const OVERRIDE { return m_collection ? m_collectio n->length() : 0; } 58 virtual unsigned length() const OVERRIDE { return m_collection ? m_collectio n->length() : 0; }
59 virtual Node* item(unsigned index) const OVERRIDE { return m_collection ? m_ collection->item(index) : 0; } 59 virtual Node* item(unsigned index) const OVERRIDE { return m_collection ? m_ collection->item(index) : 0; }
60 virtual Node* namedItem(const AtomicString& elementId) const OVERRIDE { retu rn m_collection ? m_collection->namedItem(elementId) : 0; }
61 60
62 private: 61 private:
63 explicit NodeListWithInternalCollection(HTMLCollection* collection) 62 explicit NodeListWithInternalCollection(HTMLCollection* collection)
64 : m_collection(collection) 63 : m_collection(collection)
65 { 64 {
66 } 65 }
67 66
68 RefPtr<HTMLCollection> m_collection; 67 RefPtr<HTMLCollection> m_collection;
69 }; 68 };
70 69
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 { 103 {
105 return m_private->length(); 104 return m_private->length();
106 } 105 }
107 106
108 WebNode WebNodeList::item(size_t index) const 107 WebNode WebNodeList::item(size_t index) const
109 { 108 {
110 return WebNode(m_private->item(index)); 109 return WebNode(m_private->item(index));
111 } 110 }
112 111
113 } // namespace blink 112 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/StaticNodeList.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698