summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/RadioNodeList.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/html/RadioNodeList.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/html/RadioNodeList.h')
-rw-r--r--Source/WebCore/html/RadioNodeList.h32
1 files changed, 18 insertions, 14 deletions
diff --git a/Source/WebCore/html/RadioNodeList.h b/Source/WebCore/html/RadioNodeList.h
index f82264ed4..b87833d78 100644
--- a/Source/WebCore/html/RadioNodeList.h
+++ b/Source/WebCore/html/RadioNodeList.h
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2012 Motorola Mobility, Inc. All rights reserved.
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,39 +24,42 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef RadioNodeList_h
-#define RadioNodeList_h
+#pragma once
+#include "HTMLElement.h"
#include "LiveNodeList.h"
-#include <wtf/PassRefPtr.h>
#include <wtf/text/AtomicString.h>
namespace WebCore {
-class RadioNodeList : public LiveNodeList {
+class RadioNodeList final : public CachedLiveNodeList<RadioNodeList> {
public:
- static PassRefPtr<RadioNodeList> create(ContainerNode& rootNode, Type type, const AtomicString& name)
+ static Ref<RadioNodeList> create(ContainerNode& rootNode, const AtomicString& name)
{
- ASSERT_UNUSED(type, type == RadioNodeListType);
- return adoptRef(new RadioNodeList(rootNode, name));
+ return adoptRef(*new RadioNodeList(rootNode, name));
}
- ~RadioNodeList();
+ virtual ~RadioNodeList();
+
+ HTMLElement* item(unsigned offset) const override;
String value() const;
void setValue(const String&);
-protected:
- virtual bool nodeMatches(Element*) const override;
+ bool elementMatches(Element&) const override;
+ bool isRootedAtDocument() const override { return m_isRootedAtDocument; }
private:
RadioNodeList(ContainerNode&, const AtomicString& name);
- bool checkElementMatchesRadioNodeListFilter(Element*) const;
+ bool checkElementMatchesRadioNodeListFilter(const Element&) const;
AtomicString m_name;
+ bool m_isRootedAtDocument;
};
-} // namepsace
-
-#endif
+inline HTMLElement* RadioNodeList::item(unsigned offset) const
+{
+ return downcast<HTMLElement>(CachedLiveNodeList<RadioNodeList>::item(offset));
+}
+} // namepsace WebCore