Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(272)

Unified Diff: Source/WebCore/html/HTMLCollection.cpp

Issue 10368018: Merge 115398 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/dom/htmlcollection-non-html-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/html/HTMLCollection.cpp
===================================================================
--- Source/WebCore/html/HTMLCollection.cpp (revision 116139)
+++ Source/WebCore/html/HTMLCollection.cpp (working copy)
@@ -100,6 +100,9 @@
inline bool HTMLCollection::isAcceptableElement(Element* element) const
{
+ if (!element->isHTMLElement() && !(m_type == DocAll || m_type == NodeChildren))
+ return false;
+
switch (m_type) {
case DocImages:
return element->hasLocalName(imgTag);
@@ -146,7 +149,7 @@
return true;
#if ENABLE(MICRODATA)
case ItemProperties:
- return element->isHTMLElement() && element->fastHasAttribute(itempropAttr);
+ return element->fastHasAttribute(itempropAttr);
#endif
case DocumentNamedItems:
case OtherCollection:
« no previous file with comments | « LayoutTests/fast/dom/htmlcollection-non-html-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698