OLD | NEW |
---|---|
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
101 return; | 101 return; |
102 } | 102 } |
103 widgetNewParentMap().set(child, parent); | 103 widgetNewParentMap().set(child, parent); |
104 } | 104 } |
105 | 105 |
106 HTMLFrameOwnerElement::HTMLFrameOwnerElement(const QualifiedName& tagName, Docum ent& document) | 106 HTMLFrameOwnerElement::HTMLFrameOwnerElement(const QualifiedName& tagName, Docum ent& document) |
107 : HTMLElement(tagName, document) | 107 : HTMLElement(tagName, document) |
108 , m_contentFrame(nullptr) | 108 , m_contentFrame(nullptr) |
109 , m_widget(nullptr) | 109 , m_widget(nullptr) |
110 , m_sandboxFlags(SandboxNone) | 110 , m_sandboxFlags(SandboxNone) |
111 , m_scrollingMode(ScrollbarAuto) | |
112 , m_marginWidth(-1) | |
113 , m_marginHeight(-1) | |
111 { | 114 { |
112 } | 115 } |
113 | 116 |
114 LayoutPart* HTMLFrameOwnerElement::layoutPart() const | 117 LayoutPart* HTMLFrameOwnerElement::layoutPart() const |
115 { | 118 { |
116 // HTMLObjectElement and HTMLEmbedElement may return arbitrary layoutObjects | 119 // HTMLObjectElement and HTMLEmbedElement may return arbitrary layoutObjects |
117 // when using fallback content. | 120 // when using fallback content. |
118 if (!layoutObject() || !layoutObject()->isLayoutPart()) | 121 if (!layoutObject() || !layoutObject()->isLayoutPart()) |
119 return nullptr; | 122 return nullptr; |
120 return toLayoutPart(layoutObject()); | 123 return toLayoutPart(layoutObject()); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
183 | 186 |
184 void HTMLFrameOwnerElement::setSandboxFlags(SandboxFlags flags) | 187 void HTMLFrameOwnerElement::setSandboxFlags(SandboxFlags flags) |
185 { | 188 { |
186 m_sandboxFlags = flags; | 189 m_sandboxFlags = flags; |
187 // Don't notify about updates if contentFrame() is null, for example when | 190 // Don't notify about updates if contentFrame() is null, for example when |
188 // the subframe hasn't been created yet. | 191 // the subframe hasn't been created yet. |
189 if (contentFrame()) | 192 if (contentFrame()) |
190 document().frame()->loader().client()->didChangeSandboxFlags(contentFram e(), flags); | 193 document().frame()->loader().client()->didChangeSandboxFlags(contentFram e(), flags); |
191 } | 194 } |
192 | 195 |
196 void HTMLFrameOwnerElement::setScrollingMode(ScrollbarMode scrollbarMode) | |
197 { | |
198 m_scrollingMode = scrollbarMode; | |
199 // Don't notify about updates if contentFrame() is null, for example when | |
200 // the subframe hasn't been created yet. | |
201 if (contentFrame()) | |
202 document().frame()->loader().client()->didChangeScrollingMode(contentFra me(), scrollbarMode); | |
alexmos
2015/09/02 21:37:05
HTMLPlugInElement also inherits from HTMLFrameOwne
lazyboy
2015/09/15 01:40:32
Since parseAttribute() in HTMLFrameElementBase was
alexmos
2015/09/16 00:36:47
Acknowledged.
| |
203 } | |
204 | |
205 void HTMLFrameOwnerElement::setMarginWidth(int marginWidth) | |
206 { | |
207 m_marginWidth = marginWidth; | |
208 // Don't notify about updates if contentFrame() is null, for example when | |
209 // the subframe hasn't been created yet. | |
210 if (contentFrame()) | |
211 document().frame()->loader().client()->didChangeMarginWidth(contentFrame (), m_marginWidth); | |
212 } | |
213 | |
214 void HTMLFrameOwnerElement::setMarginHeight(int marginHeight) | |
215 { | |
216 m_marginHeight = marginHeight; | |
217 // Don't notify about updates if contentFrame() is null, for example when | |
218 // the subframe hasn't been created yet. | |
219 if (contentFrame()) | |
220 document().frame()->loader().client()->didChangeMarginHeight(contentFram e(), m_marginHeight); | |
221 } | |
222 | |
193 bool HTMLFrameOwnerElement::isKeyboardFocusable() const | 223 bool HTMLFrameOwnerElement::isKeyboardFocusable() const |
194 { | 224 { |
195 return m_contentFrame && HTMLElement::isKeyboardFocusable(); | 225 return m_contentFrame && HTMLElement::isKeyboardFocusable(); |
196 } | 226 } |
197 | 227 |
198 void HTMLFrameOwnerElement::dispatchLoad() | 228 void HTMLFrameOwnerElement::dispatchLoad() |
199 { | 229 { |
200 dispatchEvent(Event::create(EventTypeNames::load)); | 230 dispatchEvent(Event::create(EventTypeNames::load)); |
201 } | 231 } |
202 | 232 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
267 DEFINE_TRACE(HTMLFrameOwnerElement) | 297 DEFINE_TRACE(HTMLFrameOwnerElement) |
268 { | 298 { |
269 visitor->trace(m_contentFrame); | 299 visitor->trace(m_contentFrame); |
270 visitor->trace(m_widget); | 300 visitor->trace(m_widget); |
271 HTMLElement::trace(visitor); | 301 HTMLElement::trace(visitor); |
272 FrameOwner::trace(visitor); | 302 FrameOwner::trace(visitor); |
273 } | 303 } |
274 | 304 |
275 | 305 |
276 } // namespace blink | 306 } // namespace blink |
OLD | NEW |