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

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

Issue 334483002: Add Blink APIs for frame tree mirroring. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Devirtualize initializeAsMainFrame Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLFrameOwnerElement.h ('k') | Source/web/WebLocalFrameImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 92
93 HTMLFrameOwnerElement::HTMLFrameOwnerElement(const QualifiedName& tagName, Docum ent& document) 93 HTMLFrameOwnerElement::HTMLFrameOwnerElement(const QualifiedName& tagName, Docum ent& document)
94 : HTMLElement(tagName, document) 94 : HTMLElement(tagName, document)
95 , m_contentFrame(0) 95 , m_contentFrame(0)
96 , m_widget(nullptr) 96 , m_widget(nullptr)
97 , m_sandboxFlags(SandboxNone) 97 , m_sandboxFlags(SandboxNone)
98 { 98 {
99 } 99 }
100 100
101 void HTMLFrameOwnerElement::dispatchLoad()
102 {
103 dispatchEvent(Event::create(EventTypeNames::load));
104 }
105
106 RenderPart* HTMLFrameOwnerElement::renderPart() const 101 RenderPart* HTMLFrameOwnerElement::renderPart() const
107 { 102 {
108 // HTMLObjectElement and HTMLEmbedElement may return arbitrary renderers 103 // HTMLObjectElement and HTMLEmbedElement may return arbitrary renderers
109 // when using fallback content. 104 // when using fallback content.
110 if (!renderer() || !renderer()->isRenderPart()) 105 if (!renderer() || !renderer()->isRenderPart())
111 return 0; 106 return 0;
112 return toRenderPart(renderer()); 107 return toRenderPart(renderer());
113 } 108 }
114 109
115 void HTMLFrameOwnerElement::setContentFrame(Frame& frame) 110 void HTMLFrameOwnerElement::setContentFrame(Frame& frame)
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 void HTMLFrameOwnerElement::setSandboxFlags(SandboxFlags flags) 163 void HTMLFrameOwnerElement::setSandboxFlags(SandboxFlags flags)
169 { 164 {
170 m_sandboxFlags = flags; 165 m_sandboxFlags = flags;
171 } 166 }
172 167
173 bool HTMLFrameOwnerElement::isKeyboardFocusable() const 168 bool HTMLFrameOwnerElement::isKeyboardFocusable() const
174 { 169 {
175 return m_contentFrame && HTMLElement::isKeyboardFocusable(); 170 return m_contentFrame && HTMLElement::isKeyboardFocusable();
176 } 171 }
177 172
173 void HTMLFrameOwnerElement::dispatchLoad()
174 {
175 dispatchEvent(Event::create(EventTypeNames::load));
176 }
177
178 Document* HTMLFrameOwnerElement::getSVGDocument(ExceptionState& exceptionState) const 178 Document* HTMLFrameOwnerElement::getSVGDocument(ExceptionState& exceptionState) const
179 { 179 {
180 Document* doc = contentDocument(); 180 Document* doc = contentDocument();
181 if (doc && doc->isSVGDocument()) 181 if (doc && doc->isSVGDocument())
182 return doc; 182 return doc;
183 return 0; 183 return 0;
184 } 184 }
185 185
186 void HTMLFrameOwnerElement::setWidget(PassRefPtr<Widget> widget) 186 void HTMLFrameOwnerElement::setWidget(PassRefPtr<Widget> widget)
187 { 187 {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 // FIXME: In this case the LocalFrame will have finished loading before 266 // FIXME: In this case the LocalFrame will have finished loading before
267 // it's being added to the child list. It would be a good idea to 267 // it's being added to the child list. It would be a good idea to
268 // create the child first, then invoke the loader separately. 268 // create the child first, then invoke the loader separately.
269 if (childFrame->loader().state() == FrameStateComplete && !childFrame->loade r().policyDocumentLoader()) 269 if (childFrame->loader().state() == FrameStateComplete && !childFrame->loade r().policyDocumentLoader())
270 childFrame->loader().checkCompleted(); 270 childFrame->loader().checkCompleted();
271 return true; 271 return true;
272 } 272 }
273 273
274 274
275 } // namespace WebCore 275 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLFrameOwnerElement.h ('k') | Source/web/WebLocalFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698