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 15 matching lines...) Expand all Loading... |
26 | 26 |
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/HTMLDimension.h" | |
37 #include "core/html/HTMLFrameElement.h" | 36 #include "core/html/HTMLFrameElement.h" |
38 #include "core/loader/FrameLoaderClient.h" | 37 #include "core/loader/FrameLoaderClient.h" |
39 #include "core/page/Frame.h" | 38 #include "core/page/Frame.h" |
| 39 #include "core/platform/Length.h" |
40 #include "core/rendering/RenderFrameSet.h" | 40 #include "core/rendering/RenderFrameSet.h" |
41 | 41 |
42 namespace WebCore { | 42 namespace WebCore { |
43 | 43 |
44 using namespace HTMLNames; | 44 using namespace HTMLNames; |
45 | 45 |
46 HTMLFrameSetElement::HTMLFrameSetElement(const QualifiedName& tagName, Document*
document) | 46 HTMLFrameSetElement::HTMLFrameSetElement(const QualifiedName& tagName, Document*
document) |
47 : HTMLElement(tagName, document) | 47 : HTMLElement(tagName, document) |
48 , m_border(6) | 48 , m_border(6) |
49 , m_borderSet(false) | 49 , m_borderSet(false) |
(...skipping 24 matching lines...) Expand all Loading... |
74 if (name == bordercolorAttr) | 74 if (name == bordercolorAttr) |
75 addHTMLColorToStyle(style, CSSPropertyBorderColor, value); | 75 addHTMLColorToStyle(style, CSSPropertyBorderColor, value); |
76 else | 76 else |
77 HTMLElement::collectStyleForPresentationAttribute(name, value, style); | 77 HTMLElement::collectStyleForPresentationAttribute(name, value, style); |
78 } | 78 } |
79 | 79 |
80 void HTMLFrameSetElement::parseAttribute(const QualifiedName& name, const Atomic
String& value) | 80 void HTMLFrameSetElement::parseAttribute(const QualifiedName& name, const Atomic
String& value) |
81 { | 81 { |
82 if (name == rowsAttr) { | 82 if (name == rowsAttr) { |
83 if (!value.isNull()) { | 83 if (!value.isNull()) { |
84 m_rowLengths = parseListOfDimensions(value.string()); | 84 m_rowLengths = parseFrameSetListOfDimensions(value.string()); |
85 setNeedsStyleRecalc(); | 85 setNeedsStyleRecalc(); |
86 } | 86 } |
87 } else if (name == colsAttr) { | 87 } else if (name == colsAttr) { |
88 if (!value.isNull()) { | 88 if (!value.isNull()) { |
89 m_colLengths = parseListOfDimensions(value.string()); | 89 m_colLengths = parseFrameSetListOfDimensions(value.string()); |
90 setNeedsStyleRecalc(); | 90 setNeedsStyleRecalc(); |
91 } | 91 } |
92 } else if (name == frameborderAttr) { | 92 } else if (name == frameborderAttr) { |
93 if (!value.isNull()) { | 93 if (!value.isNull()) { |
94 if (equalIgnoringCase(value, "no") || equalIgnoringCase(value, "0"))
{ | 94 if (equalIgnoringCase(value, "no") || equalIgnoringCase(value, "0"))
{ |
95 m_frameborder = false; | 95 m_frameborder = false; |
96 m_frameborderSet = true; | 96 m_frameborderSet = true; |
97 } else if (equalIgnoringCase(value, "yes") || equalIgnoringCase(valu
e, "1")) { | 97 } else if (equalIgnoringCase(value, "yes") || equalIgnoringCase(valu
e, "1")) { |
98 m_frameborderSet = true; | 98 m_frameborderSet = true; |
99 } | 99 } |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 Node* frameNode = children()->namedItem(name); | 219 Node* frameNode = children()->namedItem(name); |
220 if (!frameNode || !frameNode->hasTagName(HTMLNames::frameTag)) | 220 if (!frameNode || !frameNode->hasTagName(HTMLNames::frameTag)) |
221 return 0; | 221 return 0; |
222 Document* document = static_cast<HTMLFrameElement*>(frameNode)->contentDocum
ent(); | 222 Document* document = static_cast<HTMLFrameElement*>(frameNode)->contentDocum
ent(); |
223 if (!document || !document->frame()) | 223 if (!document || !document->frame()) |
224 return 0; | 224 return 0; |
225 return document->domWindow(); | 225 return document->domWindow(); |
226 } | 226 } |
227 | 227 |
228 } // namespace WebCore | 228 } // namespace WebCore |
OLD | NEW |