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

Side by Side Diff: Source/core/html/HTMLFrameOwnerElement.cpp

Issue 235553006: Move Document pointer from Frame to LocalFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 } 145 }
146 146
147 HTMLFrameOwnerElement::~HTMLFrameOwnerElement() 147 HTMLFrameOwnerElement::~HTMLFrameOwnerElement()
148 { 148 {
149 if (m_contentFrame) 149 if (m_contentFrame)
150 m_contentFrame->disconnectOwnerElement(); 150 m_contentFrame->disconnectOwnerElement();
151 } 151 }
152 152
153 Document* HTMLFrameOwnerElement::contentDocument() const 153 Document* HTMLFrameOwnerElement::contentDocument() const
154 { 154 {
155 return m_contentFrame ? m_contentFrame->document() : 0; 155 return (m_contentFrame && m_contentFrame->isLocalFrame()) ? toLocalFrame(m_c ontentFrame)->document() : 0;
156 } 156 }
157 157
158 DOMWindow* HTMLFrameOwnerElement::contentWindow() const 158 DOMWindow* HTMLFrameOwnerElement::contentWindow() const
159 { 159 {
160 return m_contentFrame ? m_contentFrame->domWindow() : 0; 160 return m_contentFrame ? m_contentFrame->domWindow() : 0;
161 } 161 }
162 162
163 void HTMLFrameOwnerElement::setSandboxFlags(SandboxFlags flags) 163 void HTMLFrameOwnerElement::setSandboxFlags(SandboxFlags flags)
164 { 164 {
165 m_sandboxFlags = flags; 165 m_sandboxFlags = flags;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 // FIXME: In this case the LocalFrame will have finished loading before 261 // FIXME: In this case the LocalFrame will have finished loading before
262 // it's being added to the child list. It would be a good idea to 262 // it's being added to the child list. It would be a good idea to
263 // create the child first, then invoke the loader separately. 263 // create the child first, then invoke the loader separately.
264 if (childFrame->loader().state() == FrameStateComplete && !childFrame->loade r().policyDocumentLoader()) 264 if (childFrame->loader().state() == FrameStateComplete && !childFrame->loade r().policyDocumentLoader())
265 childFrame->loader().checkCompleted(); 265 childFrame->loader().checkCompleted();
266 return true; 266 return true;
267 } 267 }
268 268
269 269
270 } // namespace WebCore 270 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698