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, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2006, 2008, 2009 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 27 matching lines...) Expand all Loading... |
38 #include "core/loader/FrameLoader.h" | 38 #include "core/loader/FrameLoader.h" |
39 #include "core/page/FocusController.h" | 39 #include "core/page/FocusController.h" |
40 #include "core/page/Page.h" | 40 #include "core/page/Page.h" |
41 | 41 |
42 namespace blink { | 42 namespace blink { |
43 | 43 |
44 using namespace HTMLNames; | 44 using namespace HTMLNames; |
45 | 45 |
46 HTMLFrameElementBase::HTMLFrameElementBase(const QualifiedName& tagName, Documen
t& document) | 46 HTMLFrameElementBase::HTMLFrameElementBase(const QualifiedName& tagName, Documen
t& document) |
47 : HTMLFrameOwnerElement(tagName, document) | 47 : HTMLFrameOwnerElement(tagName, document) |
48 , m_scrolling(ScrollbarAuto) | |
49 , m_marginWidth(-1) | |
50 , m_marginHeight(-1) | |
51 { | 48 { |
52 } | 49 } |
53 | 50 |
54 bool HTMLFrameElementBase::isURLAllowed() const | 51 bool HTMLFrameElementBase::isURLAllowed() const |
55 { | 52 { |
56 if (m_URL.isEmpty()) | 53 if (m_URL.isEmpty()) |
57 return true; | 54 return true; |
58 | 55 |
59 const KURL& completeURL = document().completeURL(m_URL); | 56 const KURL& completeURL = document().completeURL(m_URL); |
60 | 57 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 setLocation(stripLeadingAndTrailingHTMLSpaces(value)); | 109 setLocation(stripLeadingAndTrailingHTMLSpaces(value)); |
113 } else if (name == idAttr) { | 110 } else if (name == idAttr) { |
114 // Important to call through to base for the id attribute so the hasID b
it gets set. | 111 // Important to call through to base for the id attribute so the hasID b
it gets set. |
115 HTMLFrameOwnerElement::parseAttribute(name, value); | 112 HTMLFrameOwnerElement::parseAttribute(name, value); |
116 m_frameName = value; | 113 m_frameName = value; |
117 } else if (name == nameAttr) { | 114 } else if (name == nameAttr) { |
118 m_frameName = value; | 115 m_frameName = value; |
119 // FIXME: If we are already attached, this doesn't actually change the f
rame's name. | 116 // FIXME: If we are already attached, this doesn't actually change the f
rame's name. |
120 // FIXME: If we are already attached, this doesn't check for frame name | 117 // FIXME: If we are already attached, this doesn't check for frame name |
121 // conflicts and generate a unique frame name. | 118 // conflicts and generate a unique frame name. |
122 } else if (name == marginwidthAttr) { | |
123 m_marginWidth = value.toInt(); | |
124 // FIXME: If we are already attached, this has no effect. | |
125 } else if (name == marginheightAttr) { | |
126 m_marginHeight = value.toInt(); | |
127 // FIXME: If we are already attached, this has no effect. | |
128 } else if (name == scrollingAttr) { | |
129 // Auto and yes both simply mean "allow scrolling." No means "don't allo
w scrolling." | |
130 if (equalIgnoringCase(value, "auto") || equalIgnoringCase(value, "yes")) | |
131 m_scrolling = ScrollbarAuto; | |
132 else if (equalIgnoringCase(value, "no")) | |
133 m_scrolling = ScrollbarAlwaysOff; | |
134 // FIXME: If we are already attached, this has no effect. | |
135 } else if (name == onbeforeunloadAttr) { | 119 } else if (name == onbeforeunloadAttr) { |
136 // FIXME: should <frame> elements have beforeunload handlers? | 120 // FIXME: should <frame> elements have beforeunload handlers? |
137 setAttributeEventListener(EventTypeNames::beforeunload, createAttributeE
ventListener(this, name, value, eventParameterName())); | 121 setAttributeEventListener(EventTypeNames::beforeunload, createAttributeE
ventListener(this, name, value, eventParameterName())); |
138 } else { | 122 } else { |
139 HTMLFrameOwnerElement::parseAttribute(name, value); | 123 HTMLFrameOwnerElement::parseAttribute(name, value); |
140 } | 124 } |
141 } | 125 } |
142 | 126 |
143 void HTMLFrameElementBase::setNameAndOpenURL() | 127 void HTMLFrameElementBase::setNameAndOpenURL() |
144 { | 128 { |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 void HTMLFrameElementBase::defaultEventHandler(Event* event) | 206 void HTMLFrameElementBase::defaultEventHandler(Event* event) |
223 { | 207 { |
224 if (contentFrame() && contentFrame()->isRemoteFrame()) { | 208 if (contentFrame() && contentFrame()->isRemoteFrame()) { |
225 toRemoteFrame(contentFrame())->forwardInputEvent(event); | 209 toRemoteFrame(contentFrame())->forwardInputEvent(event); |
226 return; | 210 return; |
227 } | 211 } |
228 HTMLFrameOwnerElement::defaultEventHandler(event); | 212 HTMLFrameOwnerElement::defaultEventHandler(event); |
229 } | 213 } |
230 | 214 |
231 } // namespace blink | 215 } // namespace blink |
OLD | NEW |