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

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

Issue 33523002: Have Frame::script() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 2 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/HTMLFormElement.cpp ('k') | Source/core/html/HTMLMediaElement.cpp » ('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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 KURL url = document().completeURL(m_URL); 87 KURL url = document().completeURL(m_URL);
88 if (protocolIsJavaScript(m_URL)) { 88 if (protocolIsJavaScript(m_URL)) {
89 scriptURL = url; 89 scriptURL = url;
90 url = blankURL(); 90 url = blankURL();
91 } 91 }
92 92
93 if (!loadOrRedirectSubframe(url, m_frameName, lockBackForwardList)) 93 if (!loadOrRedirectSubframe(url, m_frameName, lockBackForwardList))
94 return; 94 return;
95 if (!contentFrame() || scriptURL.isEmpty()) 95 if (!contentFrame() || scriptURL.isEmpty())
96 return; 96 return;
97 contentFrame()->script()->executeScriptIfJavaScriptURL(scriptURL); 97 contentFrame()->script().executeScriptIfJavaScriptURL(scriptURL);
98 } 98 }
99 99
100 void HTMLFrameElementBase::parseAttribute(const QualifiedName& name, const Atomi cString& value) 100 void HTMLFrameElementBase::parseAttribute(const QualifiedName& name, const Atomi cString& value)
101 { 101 {
102 if (name == srcdocAttr) 102 if (name == srcdocAttr)
103 setLocation("about:srcdoc"); 103 setLocation("about:srcdoc");
104 else if (name == srcAttr && !fastHasAttribute(srcdocAttr)) 104 else if (name == srcAttr && !fastHasAttribute(srcdocAttr))
105 setLocation(stripLeadingAndTrailingHTMLSpaces(value)); 105 setLocation(stripLeadingAndTrailingHTMLSpaces(value));
106 else if (isIdAttributeName(name)) { 106 else if (isIdAttributeName(name)) {
107 // Important to call through to base for the id attribute so the hasID b it gets set. 107 // Important to call through to base for the id attribute so the hasID b it gets set.
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 220
221 int HTMLFrameElementBase::height() 221 int HTMLFrameElementBase::height()
222 { 222 {
223 document().updateLayoutIgnorePendingStylesheets(); 223 document().updateLayoutIgnorePendingStylesheets();
224 if (!renderBox()) 224 if (!renderBox())
225 return 0; 225 return 0;
226 return renderBox()->height(); 226 return renderBox()->height();
227 } 227 }
228 228
229 } // namespace WebCore 229 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLFormElement.cpp ('k') | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698