OLD | NEW |
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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 && layoutObject() && layoutObject()->
isFrameSet()) { |
187 if (toLayoutFrameSet(renderer())->userResize(toMouseEvent(evt))) { | 187 if (toLayoutFrameSet(layoutObject())->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()) { |
198 // A document using <frameset> likely won't literally have a body, but a
s far as the client is concerned, the frameset is effectively the body. | 198 // A document using <frameset> likely won't literally have a body, but a
s far as the client is concerned, the frameset is effectively the body. |
199 document().frame()->loader().client()->dispatchWillInsertBody(); | 199 document().frame()->loader().client()->dispatchWillInsertBody(); |
200 } | 200 } |
201 return HTMLElement::insertedInto(insertionPoint); | 201 return HTMLElement::insertedInto(insertionPoint); |
202 } | 202 } |
203 | 203 |
204 void HTMLFrameSetElement::willRecalcStyle(StyleRecalcChange) | 204 void HTMLFrameSetElement::willRecalcStyle(StyleRecalcChange) |
205 { | 205 { |
206 if (needsStyleRecalc() && renderer()) { | 206 if (needsStyleRecalc() && layoutObject()) { |
207 renderer()->setNeedsLayoutAndFullPaintInvalidation(); | 207 layoutObject()->setNeedsLayoutAndFullPaintInvalidation(); |
208 clearNeedsStyleRecalc(); | 208 clearNeedsStyleRecalc(); |
209 } | 209 } |
210 } | 210 } |
211 | 211 |
212 LocalDOMWindow* HTMLFrameSetElement::anonymousNamedGetter(const AtomicString& na
me) | 212 LocalDOMWindow* HTMLFrameSetElement::anonymousNamedGetter(const AtomicString& na
me) |
213 { | 213 { |
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 |
OLD | NEW |