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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 } else | 109 } else |
110 m_borderSet = false; | 110 m_borderSet = false; |
111 } else if (name == bordercolorAttr) | 111 } else if (name == bordercolorAttr) |
112 m_borderColorSet = !value.isEmpty(); | 112 m_borderColorSet = !value.isEmpty(); |
113 else if (name == onloadAttr) | 113 else if (name == onloadAttr) |
114 document().setWindowAttributeEventListener(EventTypeNames::load, createA
ttributeEventListener(document().frame(), name, value)); | 114 document().setWindowAttributeEventListener(EventTypeNames::load, createA
ttributeEventListener(document().frame(), name, value)); |
115 else if (name == onbeforeunloadAttr) | 115 else if (name == onbeforeunloadAttr) |
116 document().setWindowAttributeEventListener(EventTypeNames::beforeunload,
createAttributeEventListener(document().frame(), name, value)); | 116 document().setWindowAttributeEventListener(EventTypeNames::beforeunload,
createAttributeEventListener(document().frame(), name, value)); |
117 else if (name == onunloadAttr) | 117 else if (name == onunloadAttr) |
118 document().setWindowAttributeEventListener(EventTypeNames::unload, creat
eAttributeEventListener(document().frame(), name, value)); | 118 document().setWindowAttributeEventListener(EventTypeNames::unload, creat
eAttributeEventListener(document().frame(), name, value)); |
| 119 else if (name == onpagehideAttr) |
| 120 document().setWindowAttributeEventListener(EventTypeNames::pagehide, cre
ateAttributeEventListener(document().frame(), name, value)); |
| 121 else if (name == onpageshowAttr) |
| 122 document().setWindowAttributeEventListener(EventTypeNames::pageshow, cre
ateAttributeEventListener(document().frame(), name, value)); |
119 else if (name == onblurAttr) | 123 else if (name == onblurAttr) |
120 document().setWindowAttributeEventListener(EventTypeNames::blur, createA
ttributeEventListener(document().frame(), name, value)); | 124 document().setWindowAttributeEventListener(EventTypeNames::blur, createA
ttributeEventListener(document().frame(), name, value)); |
121 else if (name == onerrorAttr) | 125 else if (name == onerrorAttr) |
122 document().setWindowAttributeEventListener(EventTypeNames::error, create
AttributeEventListener(document().frame(), name, value)); | 126 document().setWindowAttributeEventListener(EventTypeNames::error, create
AttributeEventListener(document().frame(), name, value)); |
123 else if (name == onfocusAttr) | 127 else if (name == onfocusAttr) |
124 document().setWindowAttributeEventListener(EventTypeNames::focus, create
AttributeEventListener(document().frame(), name, value)); | 128 document().setWindowAttributeEventListener(EventTypeNames::focus, create
AttributeEventListener(document().frame(), name, value)); |
125 else if (name == onfocusinAttr) | 129 else if (name == onfocusinAttr) |
126 document().setWindowAttributeEventListener(EventTypeNames::focusin, crea
teAttributeEventListener(document().frame(), name, value)); | 130 document().setWindowAttributeEventListener(EventTypeNames::focusin, crea
teAttributeEventListener(document().frame(), name, value)); |
127 else if (name == onfocusoutAttr) | 131 else if (name == onfocusoutAttr) |
128 document().setWindowAttributeEventListener(EventTypeNames::focusout, cre
ateAttributeEventListener(document().frame(), name, value)); | 132 document().setWindowAttributeEventListener(EventTypeNames::focusout, cre
ateAttributeEventListener(document().frame(), name, value)); |
129 #if ENABLE(ORIENTATION_EVENTS) | 133 #if ENABLE(ORIENTATION_EVENTS) |
130 else if (name == onorientationchangeAttr) | 134 else if (name == onorientationchangeAttr) |
131 document().setWindowAttributeEventListener(EventTypeNames::orientationch
ange, createAttributeEventListener(document().frame(), name, value)); | 135 document().setWindowAttributeEventListener(EventTypeNames::orientationch
ange, createAttributeEventListener(document().frame(), name, value)); |
132 #endif | 136 #endif |
133 else if (name == onhashchangeAttr) | 137 else if (name == onhashchangeAttr) |
134 document().setWindowAttributeEventListener(EventTypeNames::hashchange, c
reateAttributeEventListener(document().frame(), name, value)); | 138 document().setWindowAttributeEventListener(EventTypeNames::hashchange, c
reateAttributeEventListener(document().frame(), name, value)); |
| 139 else if (name == onmessageAttr) |
| 140 document().setWindowAttributeEventListener(EventTypeNames::message, crea
teAttributeEventListener(document().frame(), name, value)); |
135 else if (name == onresizeAttr) | 141 else if (name == onresizeAttr) |
136 document().setWindowAttributeEventListener(EventTypeNames::resize, creat
eAttributeEventListener(document().frame(), name, value)); | 142 document().setWindowAttributeEventListener(EventTypeNames::resize, creat
eAttributeEventListener(document().frame(), name, value)); |
137 else if (name == onscrollAttr) | 143 else if (name == onscrollAttr) |
138 document().setWindowAttributeEventListener(EventTypeNames::scroll, creat
eAttributeEventListener(document().frame(), name, value)); | 144 document().setWindowAttributeEventListener(EventTypeNames::scroll, creat
eAttributeEventListener(document().frame(), name, value)); |
139 else if (name == onstorageAttr) | 145 else if (name == onstorageAttr) |
140 document().setWindowAttributeEventListener(EventTypeNames::storage, crea
teAttributeEventListener(document().frame(), name, value)); | 146 document().setWindowAttributeEventListener(EventTypeNames::storage, crea
teAttributeEventListener(document().frame(), name, value)); |
141 else if (name == ononlineAttr) | 147 else if (name == ononlineAttr) |
142 document().setWindowAttributeEventListener(EventTypeNames::online, creat
eAttributeEventListener(document().frame(), name, value)); | 148 document().setWindowAttributeEventListener(EventTypeNames::online, creat
eAttributeEventListener(document().frame(), name, value)); |
143 else if (name == onofflineAttr) | 149 else if (name == onofflineAttr) |
144 document().setWindowAttributeEventListener(EventTypeNames::offline, crea
teAttributeEventListener(document().frame(), name, value)); | 150 document().setWindowAttributeEventListener(EventTypeNames::offline, crea
teAttributeEventListener(document().frame(), name, value)); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 Node* frameNode = children()->namedItem(name); | 226 Node* frameNode = children()->namedItem(name); |
221 if (!frameNode || !frameNode->hasTagName(HTMLNames::frameTag)) | 227 if (!frameNode || !frameNode->hasTagName(HTMLNames::frameTag)) |
222 return 0; | 228 return 0; |
223 Document* document = toHTMLFrameElement(frameNode)->contentDocument(); | 229 Document* document = toHTMLFrameElement(frameNode)->contentDocument(); |
224 if (!document || !document->frame()) | 230 if (!document || !document->frame()) |
225 return 0; | 231 return 0; |
226 return document->domWindow(); | 232 return document->domWindow(); |
227 } | 233 } |
228 | 234 |
229 } // namespace WebCore | 235 } // namespace WebCore |
OLD | NEW |