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

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

Issue 929223003: Move and rename RenderFrame and RenderFrameSet. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « Source/core/html/HTMLFrameElement.cpp ('k') | Source/core/layout/LayoutFrame.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, 2009, 2010 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2006, 2009, 2010 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 15 matching lines...) Expand all
26 26
27 #include "bindings/core/v8/ScriptEventListener.h" 27 #include "bindings/core/v8/ScriptEventListener.h"
28 #include "core/CSSPropertyNames.h" 28 #include "core/CSSPropertyNames.h"
29 #include "core/HTMLNames.h" 29 #include "core/HTMLNames.h"
30 #include "core/dom/Document.h" 30 #include "core/dom/Document.h"
31 #include "core/events/Event.h" 31 #include "core/events/Event.h"
32 #include "core/events/MouseEvent.h" 32 #include "core/events/MouseEvent.h"
33 #include "core/frame/LocalFrame.h" 33 #include "core/frame/LocalFrame.h"
34 #include "core/html/HTMLCollection.h" 34 #include "core/html/HTMLCollection.h"
35 #include "core/html/HTMLFrameElement.h" 35 #include "core/html/HTMLFrameElement.h"
36 #include "core/layout/LayoutFrameSet.h"
36 #include "core/loader/FrameLoaderClient.h" 37 #include "core/loader/FrameLoaderClient.h"
37 #include "core/rendering/RenderFrameSet.h"
38 38
39 namespace blink { 39 namespace blink {
40 40
41 using namespace HTMLNames; 41 using namespace HTMLNames;
42 42
43 inline HTMLFrameSetElement::HTMLFrameSetElement(Document& document) 43 inline HTMLFrameSetElement::HTMLFrameSetElement(Document& document)
44 : HTMLElement(framesetTag, document) 44 : HTMLElement(framesetTag, document)
45 , m_border(6) 45 , m_border(6)
46 , m_borderSet(false) 46 , m_borderSet(false)
47 , m_borderColorSet(false) 47 , m_borderColorSet(false)
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 { 151 {
152 // For compatibility, frames render even when display: none is set. 152 // For compatibility, frames render even when display: none is set.
153 // However, we delay creating a renderer until stylesheets have loaded. 153 // However, we delay creating a renderer until stylesheets have loaded.
154 return style.isStyleAvailable(); 154 return style.isStyleAvailable();
155 } 155 }
156 156
157 LayoutObject* HTMLFrameSetElement::createRenderer(const LayoutStyle& style) 157 LayoutObject* HTMLFrameSetElement::createRenderer(const LayoutStyle& style)
158 { 158 {
159 if (style.hasContent()) 159 if (style.hasContent())
160 return LayoutObject::createObject(this, style); 160 return LayoutObject::createObject(this, style);
161 return new RenderFrameSet(this); 161 return new LayoutFrameSet(this);
162 } 162 }
163 163
164 void HTMLFrameSetElement::attach(const AttachContext& context) 164 void HTMLFrameSetElement::attach(const AttachContext& context)
165 { 165 {
166 // Inherit default settings from parent frameset 166 // Inherit default settings from parent frameset
167 // FIXME: This is not dynamic. 167 // FIXME: This is not dynamic.
168 if (HTMLFrameSetElement* frameset = Traversal<HTMLFrameSetElement>::firstAnc estor(*this)) { 168 if (HTMLFrameSetElement* frameset = Traversal<HTMLFrameSetElement>::firstAnc estor(*this)) {
169 if (!m_frameborderSet) 169 if (!m_frameborderSet)
170 m_frameborder = frameset->hasFrameBorder(); 170 m_frameborder = frameset->hasFrameBorder();
171 if (m_frameborder) { 171 if (m_frameborder) {
172 if (!m_borderSet) 172 if (!m_borderSet)
173 m_border = frameset->border(); 173 m_border = frameset->border();
174 if (!m_borderColorSet) 174 if (!m_borderColorSet)
175 m_borderColorSet = frameset->hasBorderColor(); 175 m_borderColorSet = frameset->hasBorderColor();
176 } 176 }
177 if (!m_noresize) 177 if (!m_noresize)
178 m_noresize = frameset->noResize(); 178 m_noresize = frameset->noResize();
179 } 179 }
180 180
181 HTMLElement::attach(context); 181 HTMLElement::attach(context);
182 } 182 }
183 183
184 void HTMLFrameSetElement::defaultEventHandler(Event* evt) 184 void HTMLFrameSetElement::defaultEventHandler(Event* evt)
185 { 185 {
186 if (evt->isMouseEvent() && !m_noresize && renderer() && renderer()->isFrameS et()) { 186 if (evt->isMouseEvent() && !m_noresize && renderer() && renderer()->isFrameS et()) {
187 if (toRenderFrameSet(renderer())->userResize(toMouseEvent(evt))) { 187 if (toLayoutFrameSet(renderer())->userResize(toMouseEvent(evt))) {
188 evt->setDefaultHandled(); 188 evt->setDefaultHandled();
189 return; 189 return;
190 } 190 }
191 } 191 }
192 HTMLElement::defaultEventHandler(evt); 192 HTMLElement::defaultEventHandler(evt);
193 } 193 }
194 194
195 Node::InsertionNotificationRequest HTMLFrameSetElement::insertedInto(ContainerNo de* insertionPoint) 195 Node::InsertionNotificationRequest HTMLFrameSetElement::insertedInto(ContainerNo de* insertionPoint)
196 { 196 {
197 if (insertionPoint->inDocument() && document().frame()) { 197 if (insertionPoint->inDocument() && document().frame()) {
(...skipping 16 matching lines...) Expand all
214 Element* frameElement = children()->namedItem(name); 214 Element* frameElement = children()->namedItem(name);
215 if (!isHTMLFrameElement(frameElement)) 215 if (!isHTMLFrameElement(frameElement))
216 return nullptr; 216 return nullptr;
217 Document* document = toHTMLFrameElement(frameElement)->contentDocument(); 217 Document* document = toHTMLFrameElement(frameElement)->contentDocument();
218 if (!document || !document->frame()) 218 if (!document || !document->frame())
219 return nullptr; 219 return nullptr;
220 return document->domWindow(); 220 return document->domWindow();
221 } 221 }
222 222
223 } // namespace blink 223 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/HTMLFrameElement.cpp ('k') | Source/core/layout/LayoutFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698