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

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

Issue 23591020: Add toHTMLDocument() convenience methods that take a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Improve casting 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 | « no previous file | Source/core/html/HTMLDocument.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 416514120852be1468dafee7f501ea2cd9b4a870..5f7f5f287246394e7d84cb69ed2b5ff25f9c7e96 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -2878,10 +2878,10 @@ void Element::updateNamedItemRegistration(const AtomicString& oldName, const Ato
return;
if (!oldName.isEmpty())
- toHTMLDocument(&document())->removeNamedItem(oldName);
+ toHTMLDocument(document()).removeNamedItem(oldName);
if (!newName.isEmpty())
- toHTMLDocument(&document())->addNamedItem(newName);
+ toHTMLDocument(document()).addNamedItem(newName);
}
void Element::updateExtraNamedItemRegistration(const AtomicString& oldId, const AtomicString& newId)
@@ -2890,10 +2890,10 @@ void Element::updateExtraNamedItemRegistration(const AtomicString& oldId, const
return;
if (!oldId.isEmpty())
- toHTMLDocument(&document())->removeExtraNamedItem(oldId);
+ toHTMLDocument(document()).removeExtraNamedItem(oldId);
if (!newId.isEmpty())
- toHTMLDocument(&document())->addExtraNamedItem(newId);
+ toHTMLDocument(document()).addExtraNamedItem(newId);
}
PassRefPtr<HTMLCollection> Element::ensureCachedHTMLCollection(CollectionType type)
« no previous file with comments | « no previous file | Source/core/html/HTMLDocument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698