Index: Source/WebCore/html/HTMLElement.cpp |
diff --git a/Source/WebCore/html/HTMLElement.cpp b/Source/WebCore/html/HTMLElement.cpp |
index a9c682f6a3cf67a17eee66f46f8a9c4c390a22f9..24f78b329f0fa2fc5769766a6440908793fdacea 100644 |
--- a/Source/WebCore/html/HTMLElement.cpp |
+++ b/Source/WebCore/html/HTMLElement.cpp |
@@ -59,11 +59,6 @@ |
#include <wtf/StdLibExtras.h> |
#include <wtf/text/CString.h> |
-#if ENABLE(MICRODATA) |
-#include "HTMLPropertiesCollection.h" |
-#include "MicroDataItemValue.h" |
-#endif |
- |
namespace WebCore { |
using namespace HTMLNames; |
@@ -301,14 +296,6 @@ void HTMLElement::parseAttribute(const QualifiedName& name, const AtomicString& |
// Clamp tabindex to the range of 'short' to match Firefox's behavior. |
setTabIndexExplicitly(max(static_cast<int>(std::numeric_limits<short>::min()), min(tabindex, static_cast<int>(std::numeric_limits<short>::max())))); |
} |
-#if ENABLE(MICRODATA) |
- } else if (name == itempropAttr) { |
- setItemProp(value); |
- } else if (name == itemrefAttr) { |
- setItemRef(value); |
- } else if (name == itemtypeAttr) { |
- setItemType(value); |
-#endif |
} else { |
AtomicString eventName = eventNameForAttributeName(name); |
if (!eventName.isNull()) |
@@ -941,94 +928,6 @@ void HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged(Node* beforeC |
} |
} |
-bool HTMLElement::isURLAttribute(const Attribute& attribute) const |
-{ |
-#if ENABLE(MICRODATA) |
- if (attribute.name() == itemidAttr) |
- return true; |
-#endif |
- return StyledElement::isURLAttribute(attribute); |
-} |
- |
-#if ENABLE(MICRODATA) |
-void HTMLElement::setItemValue(const String& value, ExceptionCode& ec) |
-{ |
- if (!hasAttribute(itempropAttr) || hasAttribute(itemscopeAttr)) { |
- ec = INVALID_ACCESS_ERR; |
- return; |
- } |
- |
- setItemValueText(value, ec); |
-} |
- |
-PassRefPtr<MicroDataItemValue> HTMLElement::itemValue() const |
-{ |
- if (!hasAttribute(itempropAttr)) |
- return 0; |
- |
- if (hasAttribute(itemscopeAttr)) |
- return MicroDataItemValue::createFromNode(const_cast<HTMLElement* const>(this)); |
- |
- return MicroDataItemValue::createFromString(itemValueText()); |
-} |
- |
-String HTMLElement::itemValueText() const |
-{ |
- return textContent(true); |
-} |
- |
-void HTMLElement::setItemValueText(const String& value, ExceptionCode& ec) |
-{ |
- setTextContent(value, ec); |
-} |
- |
-PassRefPtr<HTMLPropertiesCollection> HTMLElement::properties() |
-{ |
- return static_cast<HTMLPropertiesCollection*>(ensureCachedHTMLCollection(ItemProperties).get()); |
-} |
- |
-void HTMLElement::getItemRefElements(Vector<HTMLElement*>& itemRefElements) |
-{ |
- if (!fastHasAttribute(itemscopeAttr)) |
- return; |
- |
- if (!fastHasAttribute(itemrefAttr) || !itemRef()->length()) { |
- itemRefElements.append(this); |
- return; |
- } |
- |
- DOMSettableTokenList* itemRefs = itemRef(); |
- RefPtr<DOMSettableTokenList> processedItemRef = DOMSettableTokenList::create(); |
- |
- Node* rootNode; |
- if (inDocument()) |
- rootNode = document(); |
- else { |
- rootNode = this; |
- while (Node* parent = rootNode->parentNode()) |
- rootNode = parent; |
- } |
- |
- for (Node* current = rootNode; current; current = NodeTraversal::next(current, rootNode)) { |
- if (!current->isHTMLElement()) |
- continue; |
- HTMLElement* element = toHTMLElement(current); |
- |
- if (element == this) { |
- itemRefElements.append(element); |
- continue; |
- } |
- |
- const AtomicString& id = element->getIdAttribute(); |
- if (!processedItemRef->tokens().contains(id) && itemRefs->tokens().contains(id)) { |
- processedItemRef->setValue(id); |
- if (!element->isDescendantOf(this)) |
- itemRefElements.append(element); |
- } |
- } |
-} |
-#endif |
- |
void HTMLElement::addHTMLLengthToStyle(MutableStylePropertySet* style, CSSPropertyID propertyID, const String& value) |
{ |
// FIXME: This function should not spin up the CSS parser, but should instead just figure out the correct |