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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv
ed. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv
ed. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 // -------------------------------------------------------------------------- | 213 // -------------------------------------------------------------------------- |
214 // not part of the DOM | 214 // not part of the DOM |
215 // -------------------------------------------------------------------------- | 215 // -------------------------------------------------------------------------- |
216 | 216 |
217 void HTMLDocument::addItemToMap(HashCountedSet<AtomicString>& map, const AtomicS
tring& name) | 217 void HTMLDocument::addItemToMap(HashCountedSet<AtomicString>& map, const AtomicS
tring& name) |
218 { | 218 { |
219 if (name.isEmpty()) | 219 if (name.isEmpty()) |
220 return; | 220 return; |
221 map.add(name); | 221 map.add(name); |
222 if (Frame* f = frame()) | 222 if (Frame* f = frame()) |
223 f->script()->namedItemAdded(this, name); | 223 f->script().namedItemAdded(this, name); |
224 } | 224 } |
225 | 225 |
226 void HTMLDocument::removeItemFromMap(HashCountedSet<AtomicString>& map, const At
omicString& name) | 226 void HTMLDocument::removeItemFromMap(HashCountedSet<AtomicString>& map, const At
omicString& name) |
227 { | 227 { |
228 if (name.isEmpty()) | 228 if (name.isEmpty()) |
229 return; | 229 return; |
230 map.remove(name); | 230 map.remove(name); |
231 if (Frame* f = frame()) | 231 if (Frame* f = frame()) |
232 f->script()->namedItemRemoved(this, name); | 232 f->script().namedItemRemoved(this, name); |
233 } | 233 } |
234 | 234 |
235 void HTMLDocument::addNamedItem(const AtomicString& name) | 235 void HTMLDocument::addNamedItem(const AtomicString& name) |
236 { | 236 { |
237 addItemToMap(m_namedItemCounts, name); | 237 addItemToMap(m_namedItemCounts, name); |
238 } | 238 } |
239 | 239 |
240 void HTMLDocument::removeNamedItem(const AtomicString& name) | 240 void HTMLDocument::removeNamedItem(const AtomicString& name) |
241 { | 241 { |
242 removeItemFromMap(m_namedItemCounts, name); | 242 removeItemFromMap(m_namedItemCounts, name); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 } | 320 } |
321 | 321 |
322 void HTMLDocument::clear() | 322 void HTMLDocument::clear() |
323 { | 323 { |
324 // FIXME: This does nothing, and that seems unlikely to be correct. | 324 // FIXME: This does nothing, and that seems unlikely to be correct. |
325 // We've long had a comment saying that IE doesn't support this. | 325 // We've long had a comment saying that IE doesn't support this. |
326 // But I do see it in the documentation for Mozilla. | 326 // But I do see it in the documentation for Mozilla. |
327 } | 327 } |
328 | 328 |
329 } | 329 } |
OLD | NEW |