| 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, 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 6 * Copyright (C) 2011 Motorola Mobility. All rights reserved. | 6 * Copyright (C) 2011 Motorola Mobility. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 PassRefPtr<HTMLElement> HTMLElement::create(const QualifiedName& tagName, Docume
nt& document) | 66 PassRefPtr<HTMLElement> HTMLElement::create(const QualifiedName& tagName, Docume
nt& document) |
| 67 { | 67 { |
| 68 return adoptRef(new HTMLElement(tagName, document)); | 68 return adoptRef(new HTMLElement(tagName, document)); |
| 69 } | 69 } |
| 70 | 70 |
| 71 String HTMLElement::nodeName() const | 71 String HTMLElement::nodeName() const |
| 72 { | 72 { |
| 73 // FIXME: Would be nice to have an atomicstring lookup based off uppercase | 73 // FIXME: Would be nice to have an atomicstring lookup based off uppercase |
| 74 // chars that does not have to copy the string on a hit in the hash. | 74 // chars that does not have to copy the string on a hit in the hash. |
| 75 // FIXME: We should have a way to detect XHTML elements and replace the hasP
refix() check with it. | 75 // FIXME: We should have a way to detect XHTML elements and replace the hasP
refix() check with it. |
| 76 if (document().isHTMLDocument() && !tagQName().hasPrefix()) | 76 if (document().isHTMLDocument()) { |
| 77 return tagQName().localNameUpper(); | 77 if (!tagQName().hasPrefix()) |
| 78 return tagQName().localNameUpper(); |
| 79 return Element::nodeName().upper(); |
| 80 } |
| 78 return Element::nodeName(); | 81 return Element::nodeName(); |
| 79 } | 82 } |
| 80 | 83 |
| 81 bool HTMLElement::ieForbidsInsertHTML() const | 84 bool HTMLElement::ieForbidsInsertHTML() const |
| 82 { | 85 { |
| 83 // FIXME: Supposedly IE disallows settting innerHTML, outerHTML | 86 // FIXME: Supposedly IE disallows settting innerHTML, outerHTML |
| 84 // and createContextualFragment on these tags. We have no tests to | 87 // and createContextualFragment on these tags. We have no tests to |
| 85 // verify this however, so this list could be totally wrong. | 88 // verify this however, so this list could be totally wrong. |
| 86 // This list was moved from the previous endTagRequirement() implementation. | 89 // This list was moved from the previous endTagRequirement() implementation. |
| 87 // This is also called from editing and assumed to be the list of tags | 90 // This is also called from editing and assumed to be the list of tags |
| (...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 994 #ifndef NDEBUG | 997 #ifndef NDEBUG |
| 995 | 998 |
| 996 // For use in the debugger | 999 // For use in the debugger |
| 997 void dumpInnerHTML(WebCore::HTMLElement*); | 1000 void dumpInnerHTML(WebCore::HTMLElement*); |
| 998 | 1001 |
| 999 void dumpInnerHTML(WebCore::HTMLElement* element) | 1002 void dumpInnerHTML(WebCore::HTMLElement* element) |
| 1000 { | 1003 { |
| 1001 printf("%s\n", element->innerHTML().ascii().data()); | 1004 printf("%s\n", element->innerHTML().ascii().data()); |
| 1002 } | 1005 } |
| 1003 #endif | 1006 #endif |
| OLD | NEW |