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

Unified Diff: Source/web/WebNodeList.cpp

Issue 150653007: Remove code allowing implicit conversion from WebElementCollection to WebNodeList. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | public/web/WebElementCollection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebNodeList.cpp
diff --git a/Source/web/WebNodeList.cpp b/Source/web/WebNodeList.cpp
index 19b6e9a0206ef160d0adcc7e509e523007effb26..1ced5d552552218030747eea850d7ee7b2862f8d 100644
--- a/Source/web/WebNodeList.cpp
+++ b/Source/web/WebNodeList.cpp
@@ -31,48 +31,15 @@
#include "config.h"
#include "WebNodeList.h"
-#include "core/dom/Element.h"
+#include "WebNode.h"
#include "core/dom/Node.h"
#include "core/dom/NodeList.h"
-#include "core/html/HTMLCollection.h"
#include "wtf/PassRefPtr.h"
-#include "WebNode.h"
-
using namespace WebCore;
namespace blink {
-// FIXME(crbug.com/235008): Remove once chromium has been updated to stop using
-// WebCollection as a WebNodeList.
-class NodeListWithInternalCollection FINAL : public NodeList {
-public:
- static PassRefPtr<NodeListWithInternalCollection> create(HTMLCollection* collection)
- {
- return adoptRef(new NodeListWithInternalCollection(collection));
- }
-
- // We have null checks in the following methods because WebNodeList does not have a isNull() method
- // and callers need to be moved to WebElementCollection and need to handle null using
- // WebElementCollection::isNull().
- virtual unsigned length() const OVERRIDE { return m_collection ? m_collection->length() : 0; }
- virtual Node* item(unsigned index) const OVERRIDE { return m_collection ? m_collection->item(index) : 0; }
-
-private:
- explicit NodeListWithInternalCollection(HTMLCollection* collection)
- : m_collection(collection)
- {
- }
-
- RefPtr<HTMLCollection> m_collection;
-};
-
-WebNodeList::WebNodeList(const WebElementCollection& n)
- : m_private(0)
-{
- assign(NodeListWithInternalCollection::create(n.m_private).leakRef());
-}
-
void WebNodeList::reset()
{
assign(0);
« no previous file with comments | « no previous file | public/web/WebElementCollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698