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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 if (defaultArea) { | 69 if (defaultArea) { |
70 result.setInnerNode(defaultArea); | 70 result.setInnerNode(defaultArea); |
71 result.setURLElement(defaultArea); | 71 result.setURLElement(defaultArea); |
72 } | 72 } |
73 return defaultArea; | 73 return defaultArea; |
74 } | 74 } |
75 | 75 |
76 HTMLImageElement* HTMLMapElement::imageElement() | 76 HTMLImageElement* HTMLMapElement::imageElement() |
77 { | 77 { |
78 RefPtr<HTMLCollection> images = document().images(); | 78 RefPtr<HTMLCollection> images = document().images(); |
79 for (unsigned i = 0; Node* curr = images->item(i); i++) { | 79 for (unsigned i = 0; Element* curr = images->item(i); i++) { |
80 if (!curr->hasTagName(imgTag)) | 80 if (!curr->hasTagName(imgTag)) |
81 continue; | 81 continue; |
82 | 82 |
83 // The HTMLImageElement's useMap() value includes the '#' symbol at the
beginning, | 83 // The HTMLImageElement's useMap() value includes the '#' symbol at the
beginning, |
84 // which has to be stripped off. | 84 // which has to be stripped off. |
85 HTMLImageElement* imageElement = toHTMLImageElement(curr); | 85 HTMLImageElement* imageElement = toHTMLImageElement(curr); |
86 String useMapName = imageElement->getAttribute(usemapAttr).string().subs
tring(1); | 86 String useMapName = imageElement->getAttribute(usemapAttr).string().subs
tring(1); |
87 if (equalIgnoringCase(useMapName, m_name)) | 87 if (equalIgnoringCase(useMapName, m_name)) |
88 return imageElement; | 88 return imageElement; |
89 } | 89 } |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |