Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Issue 2723053002: Use the correct case converter for |localName| and |tagName| (Closed)

Created:
3 years, 9 months ago by Sunny
Modified:
3 years, 9 months ago
Reviewers:
tkent
CC:
blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, blink-reviews-w3ctests_chromium.org, blink-reviews-wtf_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, Mikhail, rwlbuis, sof
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use the correct case converter for |localName| and |tagName| Per spec[1], document.createElement should set |localName| to ASCII lowercase when context object is an HTML document. Now the AtomicString::lower() was used, but it converts characters more than ASCII into lowercase. So we should use AtomicString::lowerASCII() instead. Besides, per spec[2], Element.tagName should be set to ASCII uppercase when context object is in HTML namespace and its node document is an HTML document. Now we are using (Atomic)String::upper() due to lack of ASCII uppercase support. So (Atomic)String::upperASCII() is added to solve this issue, and AtomicString::upper() is removed since it's not used anymore. Tests were changed accordingly [1]: https://dom.spec.whatwg.org/#dom-document-createelement [2]: https://dom.spec.whatwg.org/#dom-element-tagname BUG=685012 Review-Url: https://codereview.chromium.org/2723053002 Cr-Commit-Position: refs/heads/master@{#454059} Committed: https://chromium.googlesource.com/chromium/src/+/1337a0b763dc552f6eeadb17df348429b34a3501

Patch Set 1 #

Total comments: 4

Patch Set 2 : Correct the case converter for |localName| and |tagName| #

Patch Set 3 : Oops... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+113 lines, -167 lines) Patch
D third_party/WebKit/LayoutTests/external/wpt/dom/nodes/Document-createElement-expected.txt View 1 chunk +0 lines, -151 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/dom/nodes/Document-getElementsByTagName-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/dom/nodes/Element-getElementsByTagName-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/dom/nodes/case-expected.txt View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/QualifiedName.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLElement.cpp View 1 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/AtomicString.h View 1 2 1 chunk +7 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/AtomicString.cpp View 1 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/StringImpl.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/StringImpl.cpp View 1 chunk +22 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/StringImplTest.cpp View 1 chunk +57 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/WTFString.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/WTFString.cpp View 1 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (10 generated)
Sunny
Hi tkent@, I got `** Presubmit ERRORS ** check-webkit-style failed third_party/WebKit/Source/wtf/text/StringImpl.h:384: Local variables should never ...
3 years, 9 months ago (2017-03-01 08:56:37 UTC) #2
Sunny
https://codereview.chromium.org/2723053002/diff/1/third_party/WebKit/Source/wtf/text/AtomicString.h File third_party/WebKit/Source/wtf/text/AtomicString.h (right): https://codereview.chromium.org/2723053002/diff/1/third_party/WebKit/Source/wtf/text/AtomicString.h#newcode174 third_party/WebKit/Source/wtf/text/AtomicString.h:174: AtomicString upperASCII() const { return AtomicString(impl()->upperASCII()); } Hi tkent, ...
3 years, 9 months ago (2017-03-01 08:59:25 UTC) #3
tkent
Thank you for fixing it. > check-webkit-style failed > third_party/WebKit/Source/wtf/text/StringImpl.h:384: Local variables should never be ...
3 years, 9 months ago (2017-03-01 12:21:27 UTC) #8
Sunny
On 2017/03/01 12:21:27, tkent wrote: > Thank you for fixing it. > > > check-webkit-style ...
3 years, 9 months ago (2017-03-01 18:03:52 UTC) #10
tkent
lgtm
3 years, 9 months ago (2017-03-01 20:16:41 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2723053002/40001
3 years, 9 months ago (2017-03-01 20:17:23 UTC) #14
commit-bot: I haz the power
3 years, 9 months ago (2017-03-01 22:09:27 UTC) #17
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/1337a0b763dc552f6eeadb17df34...

Powered by Google App Engine
This is Rietveld 408576698