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

Unified Diff: Source/core/dom/Element.h

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 | « no previous file | Source/core/dom/Element.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.h
diff --git a/Source/core/dom/Element.h b/Source/core/dom/Element.h
index 5b42acc28c18bf285bc4d79e2df2ef2f766e88cd..ffe6f3b9c206afd166ef62e569c2fe9ab97cde3a 100644
--- a/Source/core/dom/Element.h
+++ b/Source/core/dom/Element.h
@@ -287,6 +287,8 @@ public:
const AtomicString& getNameAttribute() const;
const AtomicString& getClassAttribute() const;
+ bool shouldIgnoreAttributeCase() const;
+
// Call this to get the value of the id attribute for style resolution purposes.
// The value will already be lowercased if the document is in compatibility mode,
// so this function is not suitable for non-style uses.
@@ -882,6 +884,11 @@ inline const AtomicString& Element::getClassAttribute() const
return fastGetAttribute(HTMLNames::classAttr);
}
+inline bool Element::shouldIgnoreAttributeCase() const
+{
+ return isHTMLElement() && document().isHTMLDocument();
+}
+
inline void Element::setIdAttribute(const AtomicString& value)
{
setAttribute(document().idAttributeName(), value);
« no previous file with comments | « no previous file | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698