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

Unified Diff: Source/core/html/HTMLFrameElementBase.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/HTMLFormElement.cpp ('k') | Source/core/html/HTMLFrameOwnerElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLFrameElementBase.cpp
diff --git a/Source/core/html/HTMLFrameElementBase.cpp b/Source/core/html/HTMLFrameElementBase.cpp
index d04a479f0698e206dd6d0a5c8f4ea619ea75081e..a91f6a8a00da3e866bd5021fced31865df7397a7 100644
--- a/Source/core/html/HTMLFrameElementBase.cpp
+++ b/Source/core/html/HTMLFrameElementBase.cpp
@@ -55,7 +55,7 @@ bool HTMLFrameElementBase::isURLAllowed() const
if (m_URL.isEmpty())
return true;
- const KURL& completeURL = document()->completeURL(m_URL);
+ const KURL& completeURL = document().completeURL(m_URL);
if (protocolIsJavaScript(completeURL)) {
Document* contentDoc = this->contentDocument();
@@ -63,7 +63,7 @@ bool HTMLFrameElementBase::isURLAllowed() const
return false;
}
- Frame* parentFrame = document()->frame();
+ Frame* parentFrame = document().frame();
if (parentFrame)
return parentFrame->isURLAllowed(completeURL);
@@ -78,13 +78,13 @@ void HTMLFrameElementBase::openURL(bool lockBackForwardList)
if (m_URL.isEmpty())
m_URL = blankURL().string();
- Frame* parentFrame = document()->frame();
+ Frame* parentFrame = document().frame();
if (!parentFrame)
return;
// Support for <frame src="javascript:string">
KURL scriptURL;
- KURL url = document()->completeURL(m_URL);
+ KURL url = document().completeURL(m_URL);
if (protocolIsJavaScript(m_URL)) {
scriptURL = url;
url = blankURL();
@@ -156,7 +156,7 @@ void HTMLFrameElementBase::didNotifySubtreeInsertions(ContainerNode*)
return;
// DocumentFragments don't kick of any loads.
- if (!document()->frame())
+ if (!document().frame())
return;
if (!SubframeLoadingDisabler::canLoadFrame(this))
@@ -187,7 +187,7 @@ KURL HTMLFrameElementBase::location() const
{
if (fastHasAttribute(srcdocAttr))
return KURL(ParsedURLString, "about:srcdoc");
- return document()->completeURL(getAttribute(srcAttr));
+ return document().completeURL(getAttribute(srcAttr));
}
void HTMLFrameElementBase::setLocation(const String& str)
@@ -206,7 +206,7 @@ bool HTMLFrameElementBase::supportsFocus() const
void HTMLFrameElementBase::setFocus(bool received)
{
HTMLFrameOwnerElement::setFocus(received);
- if (Page* page = document()->page()) {
+ if (Page* page = document().page()) {
if (received)
page->focusController().setFocusedFrame(contentFrame());
else if (page->focusController().focusedFrame() == contentFrame()) // Focus may have already been given to another frame, don't take it away.
@@ -226,7 +226,7 @@ bool HTMLFrameElementBase::isHTMLContentAttribute(const Attribute& attribute) co
int HTMLFrameElementBase::width()
{
- document()->updateLayoutIgnorePendingStylesheets();
+ document().updateLayoutIgnorePendingStylesheets();
if (!renderBox())
return 0;
return renderBox()->width();
@@ -234,7 +234,7 @@ int HTMLFrameElementBase::width()
int HTMLFrameElementBase::height()
{
- document()->updateLayoutIgnorePendingStylesheets();
+ document().updateLayoutIgnorePendingStylesheets();
if (!renderBox())
return 0;
return renderBox()->height();
« no previous file with comments | « Source/core/html/HTMLFormElement.cpp ('k') | Source/core/html/HTMLFrameOwnerElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698