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

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

Issue 219903002: Revert 170347 "Convert HTMLFrameOwnerElement and FocusController..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/1917/
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 | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/LocalFrame.cpp ('k') | Source/core/html/HTMLFrameOwnerElement.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Simon Hausmann (hausmann@kde.org) 4 * (C) 2000 Simon Hausmann (hausmann@kde.org)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // Support for <frame src="javascript:string"> 84 // Support for <frame src="javascript:string">
85 KURL scriptURL; 85 KURL scriptURL;
86 KURL url = document().completeURL(m_URL); 86 KURL url = document().completeURL(m_URL);
87 if (protocolIsJavaScript(m_URL)) { 87 if (protocolIsJavaScript(m_URL)) {
88 scriptURL = url; 88 scriptURL = url;
89 url = blankURL(); 89 url = blankURL();
90 } 90 }
91 91
92 if (!loadOrRedirectSubframe(url, m_frameName, lockBackForwardList)) 92 if (!loadOrRedirectSubframe(url, m_frameName, lockBackForwardList))
93 return; 93 return;
94 if (!contentFrame() || scriptURL.isEmpty() || !contentFrame()->isLocalFrame( )) 94 if (!contentFrame() || scriptURL.isEmpty())
95 return; 95 return;
96 toLocalFrame(contentFrame())->script().executeScriptIfJavaScriptURL(scriptUR L); 96 contentFrame()->script().executeScriptIfJavaScriptURL(scriptURL);
97 } 97 }
98 98
99 void HTMLFrameElementBase::parseAttribute(const QualifiedName& name, const Atomi cString& value) 99 void HTMLFrameElementBase::parseAttribute(const QualifiedName& name, const Atomi cString& value)
100 { 100 {
101 if (name == srcdocAttr) 101 if (name == srcdocAttr)
102 setLocation("about:srcdoc"); 102 setLocation("about:srcdoc");
103 else if (name == srcAttr && !fastHasAttribute(srcdocAttr)) 103 else if (name == srcAttr && !fastHasAttribute(srcdocAttr))
104 setLocation(stripLeadingAndTrailingHTMLSpaces(value)); 104 setLocation(stripLeadingAndTrailingHTMLSpaces(value));
105 else if (isIdAttributeName(name)) { 105 else if (isIdAttributeName(name)) {
106 // Important to call through to base for the id attribute so the hasID b it gets set. 106 // Important to call through to base for the id attribute so the hasID b it gets set.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 return; 152 return;
153 153
154 setNameAndOpenURL(); 154 setNameAndOpenURL();
155 } 155 }
156 156
157 void HTMLFrameElementBase::attach(const AttachContext& context) 157 void HTMLFrameElementBase::attach(const AttachContext& context)
158 { 158 {
159 HTMLFrameOwnerElement::attach(context); 159 HTMLFrameOwnerElement::attach(context);
160 160
161 if (RenderPart* part = renderPart()) { 161 if (RenderPart* part = renderPart()) {
162 if (Frame* frame = contentFrame()) { 162 if (LocalFrame* frame = contentFrame())
163 if (frame->isLocalFrame()) 163 part->setWidget(frame->view());
164 part->setWidget(toLocalFrame(frame)->view());
165 }
166 } 164 }
167 } 165 }
168 166
169 KURL HTMLFrameElementBase::location() const 167 KURL HTMLFrameElementBase::location() const
170 { 168 {
171 if (fastHasAttribute(srcdocAttr)) 169 if (fastHasAttribute(srcdocAttr))
172 return KURL(ParsedURLString, "about:srcdoc"); 170 return KURL(ParsedURLString, "about:srcdoc");
173 return document().completeURL(getAttribute(srcAttr)); 171 return document().completeURL(getAttribute(srcAttr));
174 } 172 }
175 173
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 221
224 int HTMLFrameElementBase::height() 222 int HTMLFrameElementBase::height()
225 { 223 {
226 document().updateLayoutIgnorePendingStylesheets(); 224 document().updateLayoutIgnorePendingStylesheets();
227 if (!renderBox()) 225 if (!renderBox())
228 return 0; 226 return 0;
229 return renderBox()->height(); 227 return renderBox()->height();
230 } 228 }
231 229
232 } // namespace WebCore 230 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/frame/LocalFrame.cpp ('k') | Source/core/html/HTMLFrameOwnerElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698