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

Unified Diff: Source/core/html/HTMLIFrameElement.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 | « Source/core/html/HTMLDocument.h ('k') | Source/core/html/HTMLObjectElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLIFrameElement.cpp
diff --git a/Source/core/html/HTMLIFrameElement.cpp b/Source/core/html/HTMLIFrameElement.cpp
index 0d42f8b98f4bafbf9393612eb091888b20db2409..bd47bc4a56a8141d20360e0f5f19e67aa51bb5f9 100644
--- a/Source/core/html/HTMLIFrameElement.cpp
+++ b/Source/core/html/HTMLIFrameElement.cpp
@@ -79,9 +79,9 @@ void HTMLIFrameElement::parseAttribute(const QualifiedName& name, const AtomicSt
{
if (name == nameAttr) {
if (inDocument() && document().isHTMLDocument() && !isInShadowTree()) {
- HTMLDocument* document = toHTMLDocument(&this->document());
- document->removeExtraNamedItem(m_name);
- document->addExtraNamedItem(value);
+ HTMLDocument& document = toHTMLDocument(this->document());
+ document.removeExtraNamedItem(m_name);
+ document.addExtraNamedItem(value);
}
m_name = value;
} else if (name == sandboxAttr) {
@@ -111,7 +111,7 @@ Node::InsertionNotificationRequest HTMLIFrameElement::insertedInto(ContainerNode
{
InsertionNotificationRequest result = HTMLFrameElementBase::insertedInto(insertionPoint);
if (insertionPoint->inDocument() && document().isHTMLDocument() && !insertionPoint->isInShadowTree())
- toHTMLDocument(&document())->addExtraNamedItem(m_name);
+ toHTMLDocument(document()).addExtraNamedItem(m_name);
return result;
}
@@ -119,7 +119,7 @@ void HTMLIFrameElement::removedFrom(ContainerNode* insertionPoint)
{
HTMLFrameElementBase::removedFrom(insertionPoint);
if (insertionPoint->inDocument() && document().isHTMLDocument() && !insertionPoint->isInShadowTree())
- toHTMLDocument(&document())->removeExtraNamedItem(m_name);
+ toHTMLDocument(document()).removeExtraNamedItem(m_name);
}
bool HTMLIFrameElement::shouldDisplaySeamlessly() const
« no previous file with comments | « Source/core/html/HTMLDocument.h ('k') | Source/core/html/HTMLObjectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698