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

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

Issue 15159008: Node::lazyAttach shouldn't lie about being attached (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase again Created 7 years, 7 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/HTMLDialogElement.cpp ('k') | Source/core/html/HTMLObjectElement.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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 if (!SubframeLoadingDisabler::canLoadFrame(this)) 152 if (!SubframeLoadingDisabler::canLoadFrame(this))
153 return; 153 return;
154 154
155 // JavaScript in src=javascript: and beforeonload can access the renderer 155 // JavaScript in src=javascript: and beforeonload can access the renderer
156 // during attribute parsing *before* the normal parser machinery would 156 // during attribute parsing *before* the normal parser machinery would
157 // attach the element. To support this, we lazyAttach here, but only 157 // attach the element. To support this, we lazyAttach here, but only
158 // if we don't already have a renderer (if we're inserted 158 // if we don't already have a renderer (if we're inserted
159 // as part of a DocumentFragment, insertedInto from an earlier element 159 // as part of a DocumentFragment, insertedInto from an earlier element
160 // could have forced a style resolve and already attached us). 160 // could have forced a style resolve and already attached us).
161 if (!renderer()) 161 if (!renderer())
162 lazyAttach(DoNotSetAttached); 162 lazyAttach();
163 setNameAndOpenURL(); 163 setNameAndOpenURL();
164 } 164 }
165 165
166 void HTMLFrameElementBase::attach() 166 void HTMLFrameElementBase::attach()
167 { 167 {
168 HTMLFrameOwnerElement::attach(); 168 HTMLFrameOwnerElement::attach();
169 169
170 if (RenderPart* part = renderPart()) { 170 if (RenderPart* part = renderPart()) {
171 if (Frame* frame = contentFrame()) 171 if (Frame* frame = contentFrame())
172 part->setWidget(frame->view()); 172 part->setWidget(frame->view());
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 224
225 int HTMLFrameElementBase::height() 225 int HTMLFrameElementBase::height()
226 { 226 {
227 document()->updateLayoutIgnorePendingStylesheets(); 227 document()->updateLayoutIgnorePendingStylesheets();
228 if (!renderBox()) 228 if (!renderBox())
229 return 0; 229 return 0;
230 return renderBox()->height(); 230 return renderBox()->height();
231 } 231 }
232 232
233 } // namespace WebCore 233 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLDialogElement.cpp ('k') | Source/core/html/HTMLObjectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698