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 24 matching lines...) Expand all Loading... |
35 #include "core/html/HTMLDimension.h" | 35 #include "core/html/HTMLDimension.h" |
36 #include "core/html/HTMLFrameElement.h" | 36 #include "core/html/HTMLFrameElement.h" |
37 #include "core/loader/FrameLoaderClient.h" | 37 #include "core/loader/FrameLoaderClient.h" |
38 #include "core/frame/Frame.h" | 38 #include "core/frame/Frame.h" |
39 #include "core/rendering/RenderFrameSet.h" | 39 #include "core/rendering/RenderFrameSet.h" |
40 | 40 |
41 namespace WebCore { | 41 namespace WebCore { |
42 | 42 |
43 using namespace HTMLNames; | 43 using namespace HTMLNames; |
44 | 44 |
45 HTMLFrameSetElement::HTMLFrameSetElement(const QualifiedName& tagName, Document&
document) | 45 HTMLFrameSetElement::HTMLFrameSetElement(Document& document) |
46 : HTMLElement(tagName, document) | 46 : HTMLElement(framesetTag, document) |
47 , m_border(6) | 47 , m_border(6) |
48 , m_borderSet(false) | 48 , m_borderSet(false) |
49 , m_borderColorSet(false) | 49 , m_borderColorSet(false) |
50 , m_frameborder(true) | 50 , m_frameborder(true) |
51 , m_frameborderSet(false) | 51 , m_frameborderSet(false) |
52 , m_noresize(false) | 52 , m_noresize(false) |
53 { | 53 { |
54 ASSERT(hasTagName(framesetTag)); | |
55 ScriptWrappable::init(this); | 54 ScriptWrappable::init(this); |
56 setHasCustomStyleCallbacks(); | 55 setHasCustomStyleCallbacks(); |
57 } | 56 } |
58 | 57 |
59 PassRefPtr<HTMLFrameSetElement> HTMLFrameSetElement::create(const QualifiedName&
tagName, Document& document) | 58 PassRefPtr<HTMLFrameSetElement> HTMLFrameSetElement::create(Document& document) |
60 { | 59 { |
61 return adoptRef(new HTMLFrameSetElement(tagName, document)); | 60 return adoptRef(new HTMLFrameSetElement(document)); |
62 } | 61 } |
63 | 62 |
64 bool HTMLFrameSetElement::isPresentationAttribute(const QualifiedName& name) con
st | 63 bool HTMLFrameSetElement::isPresentationAttribute(const QualifiedName& name) con
st |
65 { | 64 { |
66 if (name == bordercolorAttr) | 65 if (name == bordercolorAttr) |
67 return true; | 66 return true; |
68 return HTMLElement::isPresentationAttribute(name); | 67 return HTMLElement::isPresentationAttribute(name); |
69 } | 68 } |
70 | 69 |
71 void HTMLFrameSetElement::collectStyleForPresentationAttribute(const QualifiedNa
me& name, const AtomicString& value, MutableStylePropertySet* style) | 70 void HTMLFrameSetElement::collectStyleForPresentationAttribute(const QualifiedNa
me& name, const AtomicString& value, MutableStylePropertySet* style) |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 Node* frameNode = children()->namedItem(name); | 225 Node* frameNode = children()->namedItem(name); |
227 if (!frameNode || !frameNode->hasTagName(HTMLNames::frameTag)) | 226 if (!frameNode || !frameNode->hasTagName(HTMLNames::frameTag)) |
228 return 0; | 227 return 0; |
229 Document* document = toHTMLFrameElement(frameNode)->contentDocument(); | 228 Document* document = toHTMLFrameElement(frameNode)->contentDocument(); |
230 if (!document || !document->frame()) | 229 if (!document || !document->frame()) |
231 return 0; | 230 return 0; |
232 return document->domWindow(); | 231 return document->domWindow(); |
233 } | 232 } |
234 | 233 |
235 } // namespace WebCore | 234 } // namespace WebCore |
OLD | NEW |