Commit afc77d66 authored by Jeremy Roman's avatar Jeremy Roman Committed by Commit Bot

Use ASCII case conversion for WebElement::HasHTMLTagName.

Unicode case conversion is slower and incorrect.
Besides, all strings passed here today are ASCII.

Bug: 627682
Change-Id: Ie2f5777599c62879e3e3460e7cbd516010c56792
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1574790Reviewed-by: default avatarHayato Ito <hayato@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#652653}
parent b46030d2
......@@ -81,7 +81,7 @@ bool WebElement::HasHTMLTagName(const WebString& tag_name) const {
// createElementNS(xhtmlNS, 'INPUT') HTMLUnknownElement INPUT INPUT
const Element* element = ConstUnwrap<Element>();
return html_names::xhtmlNamespaceURI == element->namespaceURI() &&
element->localName() == String(tag_name).DeprecatedLower();
element->localName() == String(tag_name).LowerASCII();
}
bool WebElement::HasAttribute(const WebString& attr_name) const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment