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

Issue 22803008: setAttributeNode() does not properly normalize case. (Closed)

Created:
7 years, 4 months ago by arpitab_
Modified:
7 years, 4 months ago
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch, adamk+blink_chromium.org, eae
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

setAttributeNode() does not properly normalize case. setAttributeNode() verifies for existing attributes in a case sensitive manner. Thus, it would add another attribute if specified in a case different from the existing one. Instead, like setAttribute(), it too should modify the existing attribute's value. Added a new method: matchesIgnoringCaseForLocalName() which should be called only when trying to do a localname comparison ignoring case. Layout testcase added for verifying the behavior for both html as well as xhtml documents. WebKit changeset: http://trac.webkit.org/changeset/154054 R=eseidel@chromium.org, ojan@chromium.org, esprehn@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=156179

Patch Set 1 #

Total comments: 2

Patch Set 2 : submitting patch with small name changes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -4 lines) Patch
A LayoutTests/fast/dom/Element/setAttributeNode-case-insensitivity.html View 1 chunk +55 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Element/setAttributeNode-case-insensitivity-expected.txt View 1 chunk +16 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Element/setAttributeNode-case-insensitivity-xhtml.xhtml View 1 chunk +30 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/Element/setAttributeNode-case-insensitivity-xhtml-expected.txt View 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/dom/Element.h View 1 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/dom/Element.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/QualifiedName.h View 1 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
arpitab_
7 years, 4 months ago (2013-08-14 06:13:24 UTC) #1
eseidel
Does this behavior make sense to you arv?
7 years, 4 months ago (2013-08-14 06:51:25 UTC) #2
eseidel
7 years, 4 months ago (2013-08-14 06:51:36 UTC) #3
esprehn
Why not just make the regular matches() function have this extra boolean argument? https://codereview.chromium.org/22803008/diff/1/Source/core/dom/Element.h File ...
7 years, 4 months ago (2013-08-14 06:52:57 UTC) #4
arpitab_
On 2013/08/14 06:52:57, esprehn wrote: Thanks for the review esprehn! > Why not just make ...
7 years, 4 months ago (2013-08-14 07:15:54 UTC) #5
arv (Not doing code reviews)
On 2013/08/14 06:51:25, eseidel wrote: > Does this behavior make sense to you arv? This ...
7 years, 4 months ago (2013-08-14 14:50:18 UTC) #6
eseidel
lgtm Wow. XHTML just doens't really matter on the web these days. It's way less ...
7 years, 4 months ago (2013-08-15 21:13:05 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/a.bah@samsung.com/22803008/9001
7 years, 4 months ago (2013-08-15 21:13:13 UTC) #8
commit-bot: I haz the power
7 years, 4 months ago (2013-08-15 23:13:30 UTC) #9
Message was sent while issue was closed.
Change committed as 156179

Powered by Google App Engine
This is Rietveld 408576698