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

Unified Diff: Source/core/xml/XPathFunctions.cpp

Issue 436603003: Make Element::attributes() less error-prone and simplify call sites (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Take feedback into consideration Created 6 years, 4 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 | « Source/core/page/PageSerializer.cpp ('k') | Source/core/xml/XPathNodeSet.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XPathFunctions.cpp
diff --git a/Source/core/xml/XPathFunctions.cpp b/Source/core/xml/XPathFunctions.cpp
index 766f576d70e45117dd9326f555a34489fb5c4c8d..f1f4864155e135e5ed211af93f354167d1a1dfd7 100644
--- a/Source/core/xml/XPathFunctions.cpp
+++ b/Source/core/xml/XPathFunctions.cpp
@@ -602,8 +602,7 @@ Value FunLang::evaluate(EvaluationContext& context) const
while (node) {
if (node->isElementNode()) {
Element* element = toElement(node);
- if (element->hasAttributes())
- languageAttribute = element->attributes().find(XMLNames::langAttr);
+ languageAttribute = element->attributes().find(XMLNames::langAttr);
}
if (languageAttribute)
break;
« no previous file with comments | « Source/core/page/PageSerializer.cpp ('k') | Source/core/xml/XPathNodeSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698