From d11f84f5b5cdc0d92a08af01b13472fdd5f9acb9 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 11 Jan 2012 10:03:25 +0100 Subject: Imported WebKit commit 75bb2fc5882d2e1b3d5572c2961507996cbca5e3 (http://svn.webkit.org/repository/webkit/trunk@104681) --- Source/WebCore/html/HTMLPropertiesCollection.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'Source/WebCore/html/HTMLPropertiesCollection.cpp') diff --git a/Source/WebCore/html/HTMLPropertiesCollection.cpp b/Source/WebCore/html/HTMLPropertiesCollection.cpp index 439bae68c..86fcecfae 100644 --- a/Source/WebCore/html/HTMLPropertiesCollection.cpp +++ b/Source/WebCore/html/HTMLPropertiesCollection.cpp @@ -49,9 +49,9 @@ static inline bool compareTreeOrder(Node* node1, Node* node2) return (node2->compareDocumentPosition(node1) & (Node::DOCUMENT_POSITION_PRECEDING | Node::DOCUMENT_POSITION_DISCONNECTED)) == Node::DOCUMENT_POSITION_PRECEDING; } -PassRefPtr HTMLPropertiesCollection::create(PassRefPtr itemNode) +PassOwnPtr HTMLPropertiesCollection::create(PassRefPtr itemNode) { - return adoptRef(new HTMLPropertiesCollection(itemNode)); + return adoptPtr(new HTMLPropertiesCollection(itemNode)); } HTMLPropertiesCollection::HTMLPropertiesCollection(PassRefPtr itemNode) @@ -123,9 +123,6 @@ void HTMLPropertiesCollection::findPropetiesOfAnItem(Node* root) const unsigned HTMLPropertiesCollection::length() const { - if (!base()) - return 0; - if (!base()->isHTMLElement() || !toHTMLElement(base())->fastHasAttribute(itemscopeAttr)) return 0; @@ -136,9 +133,6 @@ unsigned HTMLPropertiesCollection::length() const Node* HTMLPropertiesCollection::item(unsigned index) const { - if (!base()) - return 0; - if (!base()->isHTMLElement() || !toHTMLElement(base())->fastHasAttribute(itemscopeAttr)) return 0; @@ -157,9 +151,6 @@ PassRefPtr HTMLPropertiesCollection::names() const m_properties.clear(); m_propertyNames->clear(); - if (!base()) - return 0; - if (!base()->isHTMLElement() || !toHTMLElement(base())->fastHasAttribute(itemscopeAttr)) return m_propertyNames; -- cgit v1.2.1