| 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 16 matching lines...) Expand all  Loading... | 
| 27 #include "CSSPropertyNames.h" | 27 #include "CSSPropertyNames.h" | 
| 28 #include "HTMLNames.h" | 28 #include "HTMLNames.h" | 
| 29 #include "bindings/v8/ScriptEventListener.h" | 29 #include "bindings/v8/ScriptEventListener.h" | 
| 30 #include "core/dom/Document.h" | 30 #include "core/dom/Document.h" | 
| 31 #include "core/dom/Event.h" | 31 #include "core/dom/Event.h" | 
| 32 #include "core/dom/EventNames.h" | 32 #include "core/dom/EventNames.h" | 
| 33 #include "core/dom/MouseEvent.h" | 33 #include "core/dom/MouseEvent.h" | 
| 34 #include "core/dom/NodeRenderingContext.h" | 34 #include "core/dom/NodeRenderingContext.h" | 
| 35 #include "core/html/HTMLCollection.h" | 35 #include "core/html/HTMLCollection.h" | 
| 36 #include "core/html/HTMLFrameElement.h" | 36 #include "core/html/HTMLFrameElement.h" | 
|  | 37 #include "core/loader/FrameLoaderClient.h" | 
|  | 38 #include "core/page/Frame.h" | 
| 37 #include "core/platform/Length.h" | 39 #include "core/platform/Length.h" | 
| 38 #include "core/rendering/RenderFrameSet.h" | 40 #include "core/rendering/RenderFrameSet.h" | 
| 39 | 41 | 
| 40 namespace WebCore { | 42 namespace WebCore { | 
| 41 | 43 | 
| 42 using namespace HTMLNames; | 44 using namespace HTMLNames; | 
| 43 | 45 | 
| 44 HTMLFrameSetElement::HTMLFrameSetElement(const QualifiedName& tagName, Document*
      document) | 46 HTMLFrameSetElement::HTMLFrameSetElement(const QualifiedName& tagName, Document*
      document) | 
| 45     : HTMLElement(tagName, document) | 47     : HTMLElement(tagName, document) | 
| 46     , m_totalRows(1) | 48     , m_totalRows(1) | 
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 190 { | 192 { | 
| 191     if (evt->isMouseEvent() && !m_noresize && renderer() && renderer()->isFrameS
     et()) { | 193     if (evt->isMouseEvent() && !m_noresize && renderer() && renderer()->isFrameS
     et()) { | 
| 192         if (toRenderFrameSet(renderer())->userResize(static_cast<MouseEvent*>(ev
     t))) { | 194         if (toRenderFrameSet(renderer())->userResize(static_cast<MouseEvent*>(ev
     t))) { | 
| 193             evt->setDefaultHandled(); | 195             evt->setDefaultHandled(); | 
| 194             return; | 196             return; | 
| 195         } | 197         } | 
| 196     } | 198     } | 
| 197     HTMLElement::defaultEventHandler(evt); | 199     HTMLElement::defaultEventHandler(evt); | 
| 198 } | 200 } | 
| 199 | 201 | 
|  | 202 Node::InsertionNotificationRequest HTMLFrameSetElement::insertedInto(ContainerNo
     de* insertionPoint) | 
|  | 203 { | 
|  | 204     if (insertionPoint->inDocument() && document()->frame()) { | 
|  | 205         // 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. | 
|  | 206         document()->frame()->loader()->client()->dispatchWillInsertBody(); | 
|  | 207     } | 
|  | 208     return HTMLElement::insertedInto(insertionPoint); | 
|  | 209 } | 
|  | 210 | 
| 200 void HTMLFrameSetElement::willRecalcStyle(StyleChange) | 211 void HTMLFrameSetElement::willRecalcStyle(StyleChange) | 
| 201 { | 212 { | 
| 202     if (needsStyleRecalc() && renderer()) { | 213     if (needsStyleRecalc() && renderer()) { | 
| 203         renderer()->setNeedsLayout(true); | 214         renderer()->setNeedsLayout(true); | 
| 204         clearNeedsStyleRecalc(); | 215         clearNeedsStyleRecalc(); | 
| 205     } | 216     } | 
| 206 } | 217 } | 
| 207 | 218 | 
| 208 DOMWindow* HTMLFrameSetElement::anonymousNamedGetter(const AtomicString& name) | 219 DOMWindow* HTMLFrameSetElement::anonymousNamedGetter(const AtomicString& name) | 
| 209 { | 220 { | 
| 210     Node* frameNode = children()->namedItem(name); | 221     Node* frameNode = children()->namedItem(name); | 
| 211     if (!frameNode || !frameNode->hasTagName(HTMLNames::frameTag)) | 222     if (!frameNode || !frameNode->hasTagName(HTMLNames::frameTag)) | 
| 212         return 0; | 223         return 0; | 
| 213     Document* document = static_cast<HTMLFrameElement*>(frameNode)->contentDocum
     ent(); | 224     Document* document = static_cast<HTMLFrameElement*>(frameNode)->contentDocum
     ent(); | 
| 214     if (!document || !document->frame()) | 225     if (!document || !document->frame()) | 
| 215         return 0; | 226         return 0; | 
| 216     return document->domWindow(); | 227     return document->domWindow(); | 
| 217 } | 228 } | 
| 218 | 229 | 
| 219 } // namespace WebCore | 230 } // namespace WebCore | 
| OLD | NEW | 
|---|