Chromium Code Reviews| 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, 2011, 2012 Apple Inc. All rights reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2011, 2012 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 75 if (current->getIdAttribute() == m_name) | 75 if (current->getIdAttribute() == m_name) |
| 76 return current; | 76 return current; |
| 77 break; | 77 break; |
| 78 case DocumentNamedItems: | 78 case DocumentNamedItems: |
| 79 // find images, forms, applets, embeds, objects and iframes by name, | 79 // find images, forms, applets, embeds, objects and iframes by name, |
| 80 // applets and object by id, and images by id but only if they have | 80 // applets and object by id, and images by id but only if they have |
| 81 // a name attribute (this very strange rule matches IE) | 81 // a name attribute (this very strange rule matches IE) |
| 82 if (current->hasTagName(formTag) || current->hasTagName(embedTag) || current->hasTagName(iframeTag)) { | 82 if (current->hasTagName(formTag) || current->hasTagName(embedTag) || current->hasTagName(iframeTag)) { |
| 83 if (current->getNameAttribute() == m_name) | 83 if (current->getNameAttribute() == m_name) |
| 84 return current; | 84 return current; |
| 85 } else if (current->hasTagName(appletTag)) { | 85 } else if (current->hasTagName(appletTag) || current->hasTagName(obj ectTag)) { |
|
tkent
2013/10/30 21:43:39
You can remove |#include "...HTMLObjectElement.h"|
Inactive
2013/10/30 22:09:58
Done.
| |
| 86 if (current->getNameAttribute() == m_name || current->getIdAttri bute() == m_name) | 86 if (current->getNameAttribute() == m_name || current->getIdAttri bute() == m_name) |
| 87 return current; | 87 return current; |
| 88 } else if (current->hasTagName(objectTag)) { | |
| 89 if ((current->getNameAttribute() == m_name || current->getIdAttr ibute() == m_name) | |
| 90 && toHTMLObjectElement(current)->isDocNamedItem()) | |
| 91 return current; | |
| 92 } else if (current->hasTagName(imgTag)) { | 88 } else if (current->hasTagName(imgTag)) { |
| 93 if (current->getNameAttribute() == m_name || (current->getIdAttr ibute() == m_name && current->hasName())) | 89 if (current->getNameAttribute() == m_name || (current->getIdAttr ibute() == m_name && current->hasName())) |
| 94 return current; | 90 return current; |
| 95 } | 91 } |
| 96 break; | 92 break; |
| 97 default: | 93 default: |
| 98 ASSERT_NOT_REACHED(); | 94 ASSERT_NOT_REACHED(); |
| 99 } | 95 } |
| 100 } | 96 } |
| 101 | 97 |
| 102 return 0; | 98 return 0; |
| 103 } | 99 } |
| 104 | 100 |
| 105 } | 101 } |
| OLD | NEW |