Changeset 133982 in webkit
- Timestamp:
- Nov 8, 2012, 5:33:26 PM (13 years ago)
- Location:
- trunk/Source/WebKit/chromium
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/chromium/ChangeLog
r133963 r133982 1 2012-11-07 Kent Tamura <tkent@chromium.org> 2 3 [Chromium] WebElement::hasHTMLTagName returns true for non-HTML elements 4 https://bugs.webkit.org/show_bug.cgi?id=101537 5 6 Reviewed by Abhishek Arya. 7 8 We should not do ignore-case comparison for tagName, which is always 9 upper-case and createElementNS(xhtmlNS, "INPUT") doesn't create an 10 HTMLInputElement object. We need to check if localName is equal to 11 "input" in this case. 12 13 * src/WebElement.cpp: 14 (WebKit::WebElement::hasHTMLTagName): 15 1 16 2012-11-08 Joshua Bell <jsbell@chromium.org> 2 17 -
trunk/Source/WebKit/chromium/src/WebElement.cpp
r130847 r133982 67 67 bool WebElement::hasHTMLTagName(const WebString& tagName) const 68 68 { 69 // How to create class nodeName localName 70 // createElement('input') HTMLInputElement INPUT input 71 // createElement('INPUT') HTMLInputElement INPUT input 72 // createElementNS(xhtmlNS, 'input') HTMLInputElement INPUT input 73 // createElementNS(xhtmlNS, 'INPUT') HTMLUnknownElement INPUT INPUT 69 74 const Element* element = constUnwrap<Element>(); 70 return HTMLNames::xhtmlNamespaceURI == element->namespaceURI() && e qualIgnoringCase(element->tagName(), String(tagName));75 return HTMLNames::xhtmlNamespaceURI == element->namespaceURI() && element->localName() == String(tagName).lower(); 71 76 } 72 77
Note:
See TracChangeset
for help on using the changeset viewer.