| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 ASSERT(isHTMLImageElement(curr)); | 74 ASSERT(isHTMLImageElement(curr)); |
| 75 | 75 |
| 76 // The HTMLImageElement's useMap() value includes the '#' symbol at the
beginning, | 76 // The HTMLImageElement's useMap() value includes the '#' symbol at the
beginning, |
| 77 // which has to be stripped off. | 77 // which has to be stripped off. |
| 78 HTMLImageElement& imageElement = toHTMLImageElement(*curr); | 78 HTMLImageElement& imageElement = toHTMLImageElement(*curr); |
| 79 String useMapName = imageElement.getAttribute(usemapAttr).string().subst
ring(1); | 79 String useMapName = imageElement.getAttribute(usemapAttr).string().subst
ring(1); |
| 80 if (equalIgnoringCase(useMapName, m_name)) | 80 if (equalIgnoringCase(useMapName, m_name)) |
| 81 return &imageElement; | 81 return &imageElement; |
| 82 } | 82 } |
| 83 | 83 |
| 84 return 0; | 84 return nullptr; |
| 85 } | 85 } |
| 86 | 86 |
| 87 void HTMLMapElement::parseAttribute(const QualifiedName& name, const AtomicStrin
g& value) | 87 void HTMLMapElement::parseAttribute(const QualifiedName& name, const AtomicStrin
g& value) |
| 88 { | 88 { |
| 89 // FIXME: This logic seems wrong for XML documents. | 89 // FIXME: This logic seems wrong for XML documents. |
| 90 // Either the id or name will be used depending on the order the attributes
are parsed. | 90 // Either the id or name will be used depending on the order the attributes
are parsed. |
| 91 | 91 |
| 92 if (isIdAttributeName(name) || name == nameAttr) { | 92 if (isIdAttributeName(name) || name == nameAttr) { |
| 93 if (isIdAttributeName(name)) { | 93 if (isIdAttributeName(name)) { |
| 94 // Call base class so that hasID bit gets set. | 94 // Call base class so that hasID bit gets set. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 124 } | 124 } |
| 125 | 125 |
| 126 void HTMLMapElement::removedFrom(ContainerNode* insertionPoint) | 126 void HTMLMapElement::removedFrom(ContainerNode* insertionPoint) |
| 127 { | 127 { |
| 128 if (insertionPoint->inDocument()) | 128 if (insertionPoint->inDocument()) |
| 129 treeScope().removeImageMap(this); | 129 treeScope().removeImageMap(this); |
| 130 HTMLElement::removedFrom(insertionPoint); | 130 HTMLElement::removedFrom(insertionPoint); |
| 131 } | 131 } |
| 132 | 132 |
| 133 } | 133 } |
| OLD | NEW |