Index: Source/core/html/HTMLObjectElement.cpp |
diff --git a/Source/core/html/HTMLObjectElement.cpp b/Source/core/html/HTMLObjectElement.cpp |
index b4bb9b462cf8c0f377a2b08f4c27de37b05cb105..542a2bcdba48bfae9878e63aa4284ebc68a0d805 100644 |
--- a/Source/core/html/HTMLObjectElement.cpp |
+++ b/Source/core/html/HTMLObjectElement.cpp |
@@ -50,7 +50,6 @@ using namespace HTMLNames; |
inline HTMLObjectElement::HTMLObjectElement(const QualifiedName& tagName, Document& document, HTMLFormElement* form, bool createdByParser) |
: HTMLPlugInElement(tagName, document, createdByParser, ShouldNotPreferPlugInsForImages) |
- , m_docNamedItem(true) |
, m_useFallbackContent(false) |
{ |
ASSERT(hasTagName(objectTag)); |
@@ -335,7 +334,6 @@ void HTMLObjectElement::removedFrom(ContainerNode* insertionPoint) |
void HTMLObjectElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta) |
{ |
- updateDocNamedItem(); |
if (inDocument() && !useFallbackContent()) { |
setNeedsWidgetUpdate(true); |
setNeedsStyleRecalc(); |
@@ -414,40 +412,6 @@ static bool isRecognizedTagName(const QualifiedName& tagName) |
return tagList.contains(tagName.localName().impl()); |
} |
-void HTMLObjectElement::updateDocNamedItem() |
-{ |
- // The rule is "<object> elements with no children other than |
- // <param> elements, unknown elements and whitespace can be |
- // found by name in a document, and other <object> elements cannot." |
- bool wasNamedItem = m_docNamedItem; |
- bool isNamedItem = true; |
- Node* child = firstChild(); |
- while (child && isNamedItem) { |
- if (child->isElementNode()) { |
- Element* element = toElement(child); |
- // FIXME: Use of isRecognizedTagName is almost certainly wrong here. |
- if (isRecognizedTagName(element->tagQName()) && !element->hasTagName(paramTag)) |
- isNamedItem = false; |
- } else if (child->isTextNode()) { |
- if (!toText(child)->containsOnlyWhitespace()) |
- isNamedItem = false; |
- } else |
- isNamedItem = false; |
- child = child->nextSibling(); |
- } |
- if (isNamedItem != wasNamedItem && document().isHTMLDocument()) { |
- HTMLDocument& document = toHTMLDocument(this->document()); |
- if (isNamedItem) { |
- document.addNamedItem(getNameAttribute()); |
- document.addExtraNamedItem(getIdAttribute()); |
- } else { |
- document.removeNamedItem(getNameAttribute()); |
- document.removeExtraNamedItem(getIdAttribute()); |
- } |
- } |
- m_docNamedItem = isNamedItem; |
-} |
- |
bool HTMLObjectElement::containsJavaApplet() const |
{ |
if (MIMETypeRegistry::isJavaAppletMIMEType(getAttribute(typeAttr))) |