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

Side by Side Diff: Source/WebCore/dom/TagNodeList.h

Issue 10695128: Merge 120979 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 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
« no previous file with comments | « Source/WebCore/dom/NodeRareData.h ('k') | Source/WebCore/dom/TagNodeList.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 16 matching lines...) Expand all
27 #include "DynamicNodeList.h" 27 #include "DynamicNodeList.h"
28 #include <wtf/text/AtomicString.h> 28 #include <wtf/text/AtomicString.h>
29 29
30 namespace WebCore { 30 namespace WebCore {
31 31
32 // NodeList that limits to a particular tag. 32 // NodeList that limits to a particular tag.
33 class TagNodeList : public DynamicSubtreeNodeList { 33 class TagNodeList : public DynamicSubtreeNodeList {
34 public: 34 public:
35 static PassRefPtr<TagNodeList> create(PassRefPtr<Node> rootNode, const A tomicString& namespaceURI, const AtomicString& localName) 35 static PassRefPtr<TagNodeList> create(PassRefPtr<Node> rootNode, const A tomicString& namespaceURI, const AtomicString& localName)
36 { 36 {
37 ASSERT(namespaceURI != starAtom);
37 return adoptRef(new TagNodeList(rootNode, namespaceURI, localName)); 38 return adoptRef(new TagNodeList(rootNode, namespaceURI, localName));
38 } 39 }
39 40
41 static PassRefPtr<TagNodeList> create(PassRefPtr<Node> rootNode, const A tomicString& localName)
42 {
43 return adoptRef(new TagNodeList(rootNode, starAtom, localName));
44 }
45
40 virtual ~TagNodeList(); 46 virtual ~TagNodeList();
41 47
42 protected: 48 protected:
43 TagNodeList(PassRefPtr<Node> rootNode, const AtomicString& namespaceURI, const AtomicString& localName); 49 TagNodeList(PassRefPtr<Node> rootNode, const AtomicString& namespaceURI, const AtomicString& localName);
44 50
45 virtual bool nodeMatches(Element*) const; 51 virtual bool nodeMatches(Element*) const;
46 52
47 AtomicString m_namespaceURI; 53 AtomicString m_namespaceURI;
48 AtomicString m_localName; 54 AtomicString m_localName;
49 }; 55 };
50 56
51 class HTMLTagNodeList : public TagNodeList { 57 class HTMLTagNodeList : public TagNodeList {
52 public: 58 public:
53 static PassRefPtr<TagNodeList> create(PassRefPtr<Node> rootNode, const A tomicString& namespaceURI, const AtomicString& localName) 59 static PassRefPtr<HTMLTagNodeList> create(PassRefPtr<Node> rootNode, con st AtomicString& localName)
54 { 60 {
55 return adoptRef(new HTMLTagNodeList(rootNode, namespaceURI, localNam e)); 61 return adoptRef(new HTMLTagNodeList(rootNode, localName));
56 } 62 }
57 63
58 private: 64 private:
59 HTMLTagNodeList(PassRefPtr<Node> rootNode, const AtomicString& namespace URI, const AtomicString& localName); 65 HTMLTagNodeList(PassRefPtr<Node> rootNode, const AtomicString& localName );
60 66
61 virtual bool nodeMatches(Element*) const; 67 virtual bool nodeMatches(Element*) const;
62 68
63 AtomicString m_loweredLocalName; 69 AtomicString m_loweredLocalName;
64 }; 70 };
65 } // namespace WebCore 71 } // namespace WebCore
66 72
67 #endif // TagNodeList_h 73 #endif // TagNodeList_h
OLDNEW
« no previous file with comments | « Source/WebCore/dom/NodeRareData.h ('k') | Source/WebCore/dom/TagNodeList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698