diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-24 16:36:50 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-24 16:36:50 +0100 |
commit | ad0d549d4cc13433f77c1ac8f0ab379c83d93f28 (patch) | |
tree | b34b0daceb7c8e7fdde4b4ec43650ab7caadb0a9 /Source/WebCore/html/HTMLNameCollection.cpp | |
parent | 03e12282df9aa1e1fb05a8b90f1cfc2e08764cec (diff) | |
download | qtwebkit-ad0d549d4cc13433f77c1ac8f0ab379c83d93f28.tar.gz |
Imported WebKit commit bb52bf3c0119e8a128cd93afe5572413a8617de9 (http://svn.webkit.org/repository/webkit/trunk@108790)
Diffstat (limited to 'Source/WebCore/html/HTMLNameCollection.cpp')
-rw-r--r-- | Source/WebCore/html/HTMLNameCollection.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/WebCore/html/HTMLNameCollection.cpp b/Source/WebCore/html/HTMLNameCollection.cpp index aaf5b4d02..280c800a7 100644 --- a/Source/WebCore/html/HTMLNameCollection.cpp +++ b/Source/WebCore/html/HTMLNameCollection.cpp @@ -61,7 +61,7 @@ Element* HTMLNameCollection::itemAfter(Element* previous) const e->hasTagName(appletTag) || e->hasTagName(embedTag) || e->hasTagName(objectTag)) - if (e->getAttribute(nameAttr) == m_name) + if (e->getNameAttribute() == m_name) return e; if (e->getIdAttribute() == m_name) return e; @@ -71,17 +71,17 @@ Element* HTMLNameCollection::itemAfter(Element* previous) const // applets and object by id, and images by id but only if they have // a name attribute (this very strange rule matches IE) if (e->hasTagName(formTag) || e->hasTagName(embedTag) || e->hasTagName(iframeTag)) { - if (e->getAttribute(nameAttr) == m_name) + if (e->getNameAttribute() == m_name) return e; } else if (e->hasTagName(appletTag)) { - if (e->getAttribute(nameAttr) == m_name || e->getIdAttribute() == m_name) + if (e->getNameAttribute() == m_name || e->getIdAttribute() == m_name) return e; } else if (e->hasTagName(objectTag)) { - if ((e->getAttribute(nameAttr) == m_name || e->getIdAttribute() == m_name) + if ((e->getNameAttribute() == m_name || e->getIdAttribute() == m_name) && static_cast<HTMLObjectElement*>(e)->isDocNamedItem()) return e; } else if (e->hasTagName(imgTag)) { - if (e->getAttribute(nameAttr) == m_name || (e->getIdAttribute() == m_name && e->hasAttribute(nameAttr))) + if (e->getNameAttribute() == m_name || (e->getIdAttribute() == m_name && e->hasName())) return e; } break; |