Summary: | DatasetDOMStringMap::item and ::contains copies attribute name string | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Emil A Eklund <eae> | ||||
Component: | DOM | Assignee: | Emil A Eklund <eae> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Enhancement | CC: | abarth, commit-queue, dglazkov, mitz, sam | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Emil A Eklund
2011-03-02 19:02:59 PST
Created attachment 84510 [details]
Patch
Comment on attachment 84510 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=84510&action=review Ask abarth to take a gander, I am not very well-versed in character encodings and the challenges sorrounding them. I am just scared of them :) > Source/WebCore/dom/DatasetDOMStringMap.cpp:-80 > - String convertedName = convertAttributeNameToPropertyName(attributeName); Do we still need this helper? > Source/WebCore/dom/DatasetDOMStringMap.cpp:95 > + if (attribute[a] == '-' && a + 1 < attributeLength && attribute[a + 1] != '-') > + wordBoundary = true; > + else { > + if ((wordBoundary ? toASCIIUpper(attribute[a]) : attribute[a]) != property[p]) > + return false; > + p++; > + wordBoundary = false; > + } > + a++; Will this still work with non-ASCII characters? Comment on attachment 84510 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=84510&action=review >> Source/WebCore/dom/DatasetDOMStringMap.cpp:-80 >> - String convertedName = convertAttributeNameToPropertyName(attributeName); > > Do we still need this helper? Yeah, at least for now. It's used in one more place. >> Source/WebCore/dom/DatasetDOMStringMap.cpp:95 >> + a++; > > Will this still work with non-ASCII characters? No, but then again neither will convertAttributeNameToPropertyName. Comment on attachment 84510 [details]
Patch
alrighty.
The commit-queue encountered the following flaky tests while processing attachment 84510 [details]: http/tests/inspector/console-websocket-error.html bug 57392 (authors: pfeldman@chromium.org and yutak@chromium.org) The commit-queue is continuing to process your patch. Comment on attachment 84510 [details] Patch Clearing flags on attachment: 84510 Committed r82332: <http://trac.webkit.org/changeset/82332> All reviewed patches have been landed. Closing bug. |