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

Unified Diff: Source/core/html/HTMLIFrameElement.cpp

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/html/HTMLHtmlElement.cpp ('k') | Source/core/html/HTMLImageElement.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 1fac054eb5691e42a0d3f63bec31f53bfc817629..0d42f8b98f4bafbf9393612eb091888b20db2409 100644
--- a/Source/core/html/HTMLIFrameElement.cpp
+++ b/Source/core/html/HTMLIFrameElement.cpp
@@ -78,8 +78,8 @@ void HTMLIFrameElement::collectStyleForPresentationAttribute(const QualifiedName
void HTMLIFrameElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (name == nameAttr) {
- if (inDocument() && document()->isHTMLDocument() && !isInShadowTree()) {
- HTMLDocument* document = toHTMLDocument(this->document());
+ if (inDocument() && document().isHTMLDocument() && !isInShadowTree()) {
+ HTMLDocument* document = toHTMLDocument(&this->document());
document->removeExtraNamedItem(m_name);
document->addExtraNamedItem(value);
}
@@ -88,7 +88,7 @@ void HTMLIFrameElement::parseAttribute(const QualifiedName& name, const AtomicSt
String invalidTokens;
setSandboxFlags(value.isNull() ? SandboxNone : SecurityContext::parseSandboxPolicy(value, invalidTokens));
if (!invalidTokens.isNull())
- document()->addConsoleMessage(OtherMessageSource, ErrorMessageLevel, "Error while parsing the 'sandbox' attribute: " + invalidTokens);
+ document().addConsoleMessage(OtherMessageSource, ErrorMessageLevel, "Error while parsing the 'sandbox' attribute: " + invalidTokens);
} else if (name == seamlessAttr) {
// If we're adding or removing the seamless attribute, we need to force the content document to recalculate its StyleResolver.
if (contentDocument())
@@ -110,16 +110,16 @@ RenderObject* HTMLIFrameElement::createRenderer(RenderStyle*)
Node::InsertionNotificationRequest HTMLIFrameElement::insertedInto(ContainerNode* insertionPoint)
{
InsertionNotificationRequest result = HTMLFrameElementBase::insertedInto(insertionPoint);
- if (insertionPoint->inDocument() && document()->isHTMLDocument() && !insertionPoint->isInShadowTree())
- toHTMLDocument(document())->addExtraNamedItem(m_name);
+ if (insertionPoint->inDocument() && document().isHTMLDocument() && !insertionPoint->isInShadowTree())
+ toHTMLDocument(&document())->addExtraNamedItem(m_name);
return result;
}
void HTMLIFrameElement::removedFrom(ContainerNode* insertionPoint)
{
HTMLFrameElementBase::removedFrom(insertionPoint);
- if (insertionPoint->inDocument() && document()->isHTMLDocument() && !insertionPoint->isInShadowTree())
- toHTMLDocument(document())->removeExtraNamedItem(m_name);
+ if (insertionPoint->inDocument() && document().isHTMLDocument() && !insertionPoint->isInShadowTree())
+ toHTMLDocument(&document())->removeExtraNamedItem(m_name);
}
bool HTMLIFrameElement::shouldDisplaySeamlessly() const
« no previous file with comments | « Source/core/html/HTMLHtmlElement.cpp ('k') | Source/core/html/HTMLImageElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698