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

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

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 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/dom/DocumentType.cpp ('k') | 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 1b35d586547e802b1d3fd71aeff40bb827d7a799..5b060c5926fb0fa12fa19870fd405713abdd55fd 100644
--- a/Source/core/dom/Element.h
+++ b/Source/core/dom/Element.h
@@ -884,12 +884,12 @@ inline bool Element::isIdAttributeName(const QualifiedName& attributeName) const
// with a non-null namespace, because it will return false, a false negative, if the prefixes
// don't match but the local name and namespace both do. However, since this has been like this
// for a while and the code paths may be hot, we'll have to measure performance if we fix it.
- return attributeName == document()->idAttributeName();
+ return attributeName == document().idAttributeName();
}
inline const AtomicString& Element::getIdAttribute() const
{
- return hasID() ? fastGetAttribute(document()->idAttributeName()) : nullAtom;
+ return hasID() ? fastGetAttribute(document().idAttributeName()) : nullAtom;
}
inline const AtomicString& Element::getNameAttribute() const
@@ -908,7 +908,7 @@ inline const AtomicString& Element::getClassAttribute() const
inline void Element::setIdAttribute(const AtomicString& value)
{
- setAttribute(document()->idAttributeName(), value);
+ setAttribute(document().idAttributeName(), value);
}
inline const SpaceSplitString& Element::classNames() const
« no previous file with comments | « Source/core/dom/DocumentType.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698