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

Unified Diff: Source/core/dom/NamedNodeMap.cpp

Issue 26955005: Remove some useless null checks in Element/NamedNodeMap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Move shouldIgnoreAttributeCase to Element class Created 7 years, 2 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/dom/Element.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/NamedNodeMap.cpp
diff --git a/Source/core/dom/NamedNodeMap.cpp b/Source/core/dom/NamedNodeMap.cpp
index 6bce7783b46d462c8759e48802c6476ce87b23a4..f75ce6531071ac9eee555f986d67d3b39e615ce7 100644
--- a/Source/core/dom/NamedNodeMap.cpp
+++ b/Source/core/dom/NamedNodeMap.cpp
@@ -35,11 +35,6 @@ namespace WebCore {
using namespace HTMLNames;
-static inline bool shouldIgnoreAttributeCase(const Element* e)
-{
- return e && e->document().isHTMLDocument() && e->isHTMLElement();
-}
-
void NamedNodeMap::ref()
{
m_element->ref();
@@ -62,7 +57,7 @@ PassRefPtr<Node> NamedNodeMap::getNamedItemNS(const AtomicString& namespaceURI,
PassRefPtr<Node> NamedNodeMap::removeNamedItem(const AtomicString& name, ExceptionState& es)
{
- size_t index = m_element->hasAttributes() ? m_element->getAttributeItemIndex(name, shouldIgnoreAttributeCase(m_element)) : kNotFound;
+ size_t index = m_element->hasAttributes() ? m_element->getAttributeItemIndex(name, m_element->shouldIgnoreAttributeCase()) : kNotFound;
if (index == kNotFound) {
es.throwUninformativeAndGenericDOMException(NotFoundError);
return 0;
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698