| 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 | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights |
| 5 * reserved. | 5 * reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 // -------------------------------------------------------------------------- | 147 // -------------------------------------------------------------------------- |
| 148 // not part of the DOM | 148 // not part of the DOM |
| 149 // -------------------------------------------------------------------------- | 149 // -------------------------------------------------------------------------- |
| 150 | 150 |
| 151 void HTMLDocument::AddItemToMap(HashCountedSet<AtomicString>& map, | 151 void HTMLDocument::AddItemToMap(HashCountedSet<AtomicString>& map, |
| 152 const AtomicString& name) { | 152 const AtomicString& name) { |
| 153 if (name.IsEmpty()) | 153 if (name.IsEmpty()) |
| 154 return; | 154 return; |
| 155 map.insert(name); | 155 map.insert(name); |
| 156 if (LocalFrame* f = GetFrame()) { | 156 if (LocalFrame* f = GetFrame()) { |
| 157 f->Script() | 157 f->GetScriptController() |
| 158 .WindowProxy(DOMWrapperWorld::MainWorld()) | 158 .WindowProxy(DOMWrapperWorld::MainWorld()) |
| 159 ->NamedItemAdded(this, name); | 159 ->NamedItemAdded(this, name); |
| 160 } | 160 } |
| 161 } | 161 } |
| 162 | 162 |
| 163 void HTMLDocument::RemoveItemFromMap(HashCountedSet<AtomicString>& map, | 163 void HTMLDocument::RemoveItemFromMap(HashCountedSet<AtomicString>& map, |
| 164 const AtomicString& name) { | 164 const AtomicString& name) { |
| 165 if (name.IsEmpty()) | 165 if (name.IsEmpty()) |
| 166 return; | 166 return; |
| 167 map.erase(name); | 167 map.erase(name); |
| 168 if (LocalFrame* f = GetFrame()) { | 168 if (LocalFrame* f = GetFrame()) { |
| 169 f->Script() | 169 f->GetScriptController() |
| 170 .WindowProxy(DOMWrapperWorld::MainWorld()) | 170 .WindowProxy(DOMWrapperWorld::MainWorld()) |
| 171 ->NamedItemRemoved(this, name); | 171 ->NamedItemRemoved(this, name); |
| 172 } | 172 } |
| 173 } | 173 } |
| 174 | 174 |
| 175 void HTMLDocument::AddNamedItem(const AtomicString& name) { | 175 void HTMLDocument::AddNamedItem(const AtomicString& name) { |
| 176 AddItemToMap(named_item_counts_, name); | 176 AddItemToMap(named_item_counts_, name); |
| 177 } | 177 } |
| 178 | 178 |
| 179 void HTMLDocument::RemoveNamedItem(const AtomicString& name) { | 179 void HTMLDocument::RemoveNamedItem(const AtomicString& name) { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 static HashSet<StringImpl*>* html_case_insensitive_attributes_set = | 221 static HashSet<StringImpl*>* html_case_insensitive_attributes_set = |
| 222 CreateHtmlCaseInsensitiveAttributesSet(); | 222 CreateHtmlCaseInsensitiveAttributesSet(); |
| 223 bool is_possible_html_attr = !attribute_name.HasPrefix() && | 223 bool is_possible_html_attr = !attribute_name.HasPrefix() && |
| 224 (attribute_name.NamespaceURI() == g_null_atom); | 224 (attribute_name.NamespaceURI() == g_null_atom); |
| 225 return !is_possible_html_attr || | 225 return !is_possible_html_attr || |
| 226 !html_case_insensitive_attributes_set->Contains( | 226 !html_case_insensitive_attributes_set->Contains( |
| 227 attribute_name.LocalName().Impl()); | 227 attribute_name.LocalName().Impl()); |
| 228 } | 228 } |
| 229 | 229 |
| 230 } // namespace blink | 230 } // namespace blink |
| OLD | NEW |