Index: Source/core/html/HTMLNameCollection.cpp |
diff --git a/Source/core/html/HTMLNameCollection.cpp b/Source/core/html/HTMLNameCollection.cpp |
index 57a181d65051d2b87c97d9cd5da2c008d65ec7b7..0706e81cb23f32197478caca3cfe5b1fb0b5f20b 100644 |
--- a/Source/core/html/HTMLNameCollection.cpp |
+++ b/Source/core/html/HTMLNameCollection.cpp |
@@ -27,7 +27,6 @@ |
#include "core/dom/Element.h" |
#include "core/dom/ElementTraversal.h" |
#include "core/dom/NodeRareData.h" |
-#include "core/html/HTMLObjectElement.h" |
namespace WebCore { |
@@ -82,13 +81,9 @@ Element* HTMLNameCollection::virtualItemAfter(unsigned& offsetInArray, Element* |
if (current->hasTagName(formTag) || current->hasTagName(embedTag) || current->hasTagName(iframeTag)) { |
if (current->getNameAttribute() == m_name) |
return current; |
- } else if (current->hasTagName(appletTag)) { |
+ } else if (current->hasTagName(appletTag) || current->hasTagName(objectTag)) { |
if (current->getNameAttribute() == m_name || current->getIdAttribute() == m_name) |
return current; |
- } else if (current->hasTagName(objectTag)) { |
- if ((current->getNameAttribute() == m_name || current->getIdAttribute() == m_name) |
- && toHTMLObjectElement(current)->isDocNamedItem()) |
- return current; |
} else if (current->hasTagName(imgTag)) { |
if (current->getNameAttribute() == m_name || (current->getIdAttribute() == m_name && current->hasName())) |
return current; |