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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 163 |
164 // -------------------------------------------------------------------------- | 164 // -------------------------------------------------------------------------- |
165 // not part of the DOM | 165 // not part of the DOM |
166 // -------------------------------------------------------------------------- | 166 // -------------------------------------------------------------------------- |
167 | 167 |
168 void HTMLDocument::addItemToMap(HashCountedSet<AtomicString>& map, const AtomicS
tring& name) | 168 void HTMLDocument::addItemToMap(HashCountedSet<AtomicString>& map, const AtomicS
tring& name) |
169 { | 169 { |
170 if (name.isEmpty()) | 170 if (name.isEmpty()) |
171 return; | 171 return; |
172 map.add(name); | 172 map.add(name); |
| 173 if (LocalFrame* f = frame()) |
| 174 f->script().namedItemAdded(this, name); |
173 } | 175 } |
174 | 176 |
175 void HTMLDocument::removeItemFromMap(HashCountedSet<AtomicString>& map, const At
omicString& name) | 177 void HTMLDocument::removeItemFromMap(HashCountedSet<AtomicString>& map, const At
omicString& name) |
176 { | 178 { |
177 if (name.isEmpty()) | 179 if (name.isEmpty()) |
178 return; | 180 return; |
179 map.remove(name); | 181 map.remove(name); |
| 182 if (LocalFrame* f = frame()) |
| 183 f->script().namedItemRemoved(this, name); |
180 } | 184 } |
181 | 185 |
182 void HTMLDocument::addNamedItem(const AtomicString& name) | 186 void HTMLDocument::addNamedItem(const AtomicString& name) |
183 { | 187 { |
184 addItemToMap(m_namedItemCounts, name); | 188 addItemToMap(m_namedItemCounts, name); |
185 } | 189 } |
186 | 190 |
187 void HTMLDocument::removeNamedItem(const AtomicString& name) | 191 void HTMLDocument::removeNamedItem(const AtomicString& name) |
188 { | 192 { |
189 removeItemFromMap(m_namedItemCounts, name); | 193 removeItemFromMap(m_namedItemCounts, name); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 } | 233 } |
230 | 234 |
231 bool HTMLDocument::isCaseSensitiveAttribute(const QualifiedName& attributeName) | 235 bool HTMLDocument::isCaseSensitiveAttribute(const QualifiedName& attributeName) |
232 { | 236 { |
233 static HashSet<StringImpl*>* htmlCaseInsensitiveAttributesSet = createHtmlCa
seInsensitiveAttributesSet(); | 237 static HashSet<StringImpl*>* htmlCaseInsensitiveAttributesSet = createHtmlCa
seInsensitiveAttributesSet(); |
234 bool isPossibleHTMLAttr = !attributeName.hasPrefix() && (attributeName.names
paceURI() == nullAtom); | 238 bool isPossibleHTMLAttr = !attributeName.hasPrefix() && (attributeName.names
paceURI() == nullAtom); |
235 return !isPossibleHTMLAttr || !htmlCaseInsensitiveAttributesSet->contains(at
tributeName.localName().impl()); | 239 return !isPossibleHTMLAttr || !htmlCaseInsensitiveAttributesSet->contains(at
tributeName.localName().impl()); |
236 } | 240 } |
237 | 241 |
238 } // namespace blink | 242 } // namespace blink |
OLD | NEW |