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) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved. |
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // Call base class so that hasID bit gets set. | 101 // Call base class so that hasID bit gets set. |
102 HTMLElement::parseAttribute(name, value); | 102 HTMLElement::parseAttribute(name, value); |
103 if (document().isHTMLDocument()) | 103 if (document().isHTMLDocument()) |
104 return; | 104 return; |
105 } | 105 } |
106 if (inDocument()) | 106 if (inDocument()) |
107 treeScope().removeImageMap(this); | 107 treeScope().removeImageMap(this); |
108 String mapName = value; | 108 String mapName = value; |
109 if (mapName[0] == '#') | 109 if (mapName[0] == '#') |
110 mapName = mapName.substring(1); | 110 mapName = mapName.substring(1); |
111 m_name = document().isHTMLDocument() ? mapName.lower() : mapName; | 111 m_name = AtomicString(document().isHTMLDocument() ? mapName.lower() : ma
pName); |
112 if (inDocument()) | 112 if (inDocument()) |
113 treeScope().addImageMap(this); | 113 treeScope().addImageMap(this); |
114 | 114 |
115 return; | 115 return; |
116 } | 116 } |
117 | 117 |
118 HTMLElement::parseAttribute(name, value); | 118 HTMLElement::parseAttribute(name, value); |
119 } | 119 } |
120 | 120 |
121 PassRefPtr<HTMLCollection> HTMLMapElement::areas() | 121 PassRefPtr<HTMLCollection> HTMLMapElement::areas() |
122 { | 122 { |
123 return ensureCachedHTMLCollection(MapAreas); | 123 return ensureCachedHTMLCollection(MapAreas); |
124 } | 124 } |
125 | 125 |
126 Node::InsertionNotificationRequest HTMLMapElement::insertedInto(ContainerNode* i
nsertionPoint) | 126 Node::InsertionNotificationRequest HTMLMapElement::insertedInto(ContainerNode* i
nsertionPoint) |
127 { | 127 { |
128 if (insertionPoint->inDocument()) | 128 if (insertionPoint->inDocument()) |
129 treeScope().addImageMap(this); | 129 treeScope().addImageMap(this); |
130 return HTMLElement::insertedInto(insertionPoint); | 130 return HTMLElement::insertedInto(insertionPoint); |
131 } | 131 } |
132 | 132 |
133 void HTMLMapElement::removedFrom(ContainerNode* insertionPoint) | 133 void HTMLMapElement::removedFrom(ContainerNode* insertionPoint) |
134 { | 134 { |
135 if (insertionPoint->inDocument()) | 135 if (insertionPoint->inDocument()) |
136 treeScope().removeImageMap(this); | 136 treeScope().removeImageMap(this); |
137 HTMLElement::removedFrom(insertionPoint); | 137 HTMLElement::removedFrom(insertionPoint); |
138 } | 138 } |
139 | 139 |
140 } | 140 } |
OLD | NEW |