#include "../platform/WebString.h"
#include "WebExceptionCode.h"
-namespace WebCore { class Node; }
+namespace blink {
-namespace WebKit {
+class Node;
+class WebAXObject;
class WebDOMEvent;
-class WebDOMEventListener;
-class WebDOMEventListenerPrivate;
class WebDocument;
class WebElement;
-class WebFrame;
+class WebElementCollection;
class WebNodeList;
class WebPluginContainer;
// Provides access to some properties of a DOM node.
// Note that the class design requires that neither this class nor any of its subclasses have any virtual
// methods (other than the destructor), so that it is possible to safely static_cast an instance of one
-// class to the appropriate subclass based on the actual type of the wrapped WebCore::Node. For the same
+// class to the appropriate subclass based on the actual type of the wrapped blink::Node. For the same
// reason, subclasses must not add any additional data members.
class WebNode {
public:
AttributeNode = 2,
TextNode = 3,
CDataSectionNode = 4,
- // EntityReferenceNodes are deprecated and impossible to create in WebKit.
- EntityNode = 6,
+ // EntityReferenceNodes are impossible to create in Blink.
+ // EntityNodes are impossible to create in Blink.
ProcessingInstructionsNode = 7,
CommentNode = 8,
DocumentNode = 9,
DocumentTypeNode = 10,
DocumentFragmentNode = 11,
- NotationNode = 12,
- XPathNamespaceNode = 13,
+ // NotationNodes are impossible to create in Blink.
+ // XPathNamespaceNodes are impossible to create in Blink.
ShadowRootNode = 14
};
BLINK_EXPORT bool isFocusable() const;
BLINK_EXPORT bool isContentEditable() const;
BLINK_EXPORT bool isElementNode() const;
- // addEventListener only works with a small set of eventTypes.
- BLINK_EXPORT void addEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture);
BLINK_EXPORT bool dispatchEvent(const WebDOMEvent&);
BLINK_EXPORT void simulateClick();
- BLINK_EXPORT WebNodeList getElementsByTagName(const WebString&) const;
+ // The argument should be lower-cased.
+ BLINK_EXPORT WebElementCollection getElementsByHTMLTagName(const WebString&) const;
BLINK_EXPORT WebElement querySelector(const WebString&, WebExceptionCode&) const;
BLINK_EXPORT WebElement rootEditableElement() const;
BLINK_EXPORT bool focused() const;
// This does not 100% guarantee the user can see it, but is pretty close.
// Note: This method only works properly after layout has occurred.
BLINK_EXPORT bool hasNonEmptyBoundingBox() const;
+
+ BLINK_EXPORT bool containsIncludingShadowDOM(const WebNode&) const;
BLINK_EXPORT WebPluginContainer* pluginContainer() const;
BLINK_EXPORT WebElement shadowHost() const;
+ BLINK_EXPORT WebAXObject accessibilityObject();
+
template<typename T> T to()
{
T res;
}
#if BLINK_IMPLEMENTATION
- WebNode(const WTF::PassRefPtr<WebCore::Node>&);
- WebNode& operator=(const WTF::PassRefPtr<WebCore::Node>&);
- operator WTF::PassRefPtr<WebCore::Node>() const;
+ WebNode(const PassRefPtrWillBeRawPtr<Node>&);
+ WebNode& operator=(const PassRefPtrWillBeRawPtr<Node>&);
+ operator PassRefPtrWillBeRawPtr<Node>() const;
#endif
#if BLINK_IMPLEMENTATION
#endif
protected:
- WebPrivatePtr<WebCore::Node> m_private;
+ WebPrivatePtr<Node> m_private;
};
inline bool operator==(const WebNode& a, const WebNode& b)
return a.lessThan(b);
}
-} // namespace WebKit
+} // namespace blink
#endif