Summary: | Update DOMTokenList.replace() to match the latest DOM specification | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||
Component: | DOM | Assignee: | Chris Dumez <cdumez> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | achristensen, annevk, benjamin, buildbot, cdumez, cmarcelo, commit-queue, darin, dbates, esprehn+autocc, ggaren, gyuyoung.kim, rniwa, sam | ||||||
Priority: | P2 | Keywords: | WebExposed | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Chris Dumez
2017-04-27 12:48:21 PDT
Created attachment 308450 [details]
Patch
Attachment 308450 [details] did not pass style-queue:
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:566: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:567: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:570: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:571: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:572: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:573: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:574: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:575: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:601: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:604: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:607: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:609: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:643: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:645: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:647: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:650: More than one command on the same line [whitespace/newline] [4]
Total errors found: 16 in 8 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 308450 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=308450&action=review > Source/WebCore/html/DOMTokenList.cpp:181 > + tokens.removeFirstMatching(matchesItemOrReplacement, index + 1); Do we only want to remove the first one? Can the lists have duplicate values? Can we test this? Can we assert that there aren't duplicates? Comment on attachment 308450 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=308450&action=review >> Source/WebCore/html/DOMTokenList.cpp:181 >> + tokens.removeFirstMatching(matchesItemOrReplacement, index + 1); > > Do we only want to remove the first one? Can the lists have duplicate values? Can we test this? Can we assert that there aren't duplicates? I can assert, yes. a DOMTokenList is meant to wrap an ordered set as per the spec, so there should be no duplicate. Created attachment 308490 [details]
Patch
(In reply to Chris Dumez from comment #4) > Comment on attachment 308450 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=308450&action=review > > >> Source/WebCore/html/DOMTokenList.cpp:181 > >> + tokens.removeFirstMatching(matchesItemOrReplacement, index + 1); > > > > Do we only want to remove the first one? Can the lists have duplicate values? Can we test this? Can we assert that there aren't duplicates? > > I can assert, yes. a DOMTokenList is meant to wrap an ordered set as per the > spec, so there should be no duplicate. I added assertions in this latest iteration. Attachment 308490 [details] did not pass style-queue:
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:566: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:567: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:570: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:571: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:572: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:573: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:574: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:575: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:601: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:604: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:607: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:609: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:643: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:645: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:647: More than one command on the same line [whitespace/newline] [4]
ERROR: Tools/TestWebKitAPI/Tests/WTF/Vector.cpp:650: More than one command on the same line [whitespace/newline] [4]
Total errors found: 16 in 8 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 308490 [details] Patch Clearing flags on attachment: 308490 Committed r215943: <http://trac.webkit.org/changeset/215943> All reviewed patches have been landed. Closing bug. |