RESOLVED FIXED 161216
HTMLAreaElement's coords attributes parsing does not comply with the HTML specification
https://bugs.webkit.org/show_bug.cgi?id=161216
Summary HTMLAreaElement's coords attributes parsing does not comply with the HTML spe...
Chris Dumez
Reported 2016-08-25 15:01:40 PDT
HTMLAreaElement's coords attributes parsing does not comply with the HTML specification: - https://html.spec.whatwg.org/#attr-area-coords
Attachments
Patch (15.76 KB, patch)
2016-08-25 15:08 PDT, Chris Dumez
no flags
Patch (24.23 KB, patch)
2016-08-26 12:09 PDT, Chris Dumez
no flags
Follow-up fixes (3.25 KB, patch)
2016-08-27 21:35 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2016-08-25 15:08:39 PDT
Andreas Kling
Comment 2 2016-08-26 11:00:32 PDT
Comment on attachment 287028 [details] Patch r=me
WebKit Commit Bot
Comment 3 2016-08-26 11:10:48 PDT
Comment on attachment 287028 [details] Patch Clearing flags on attachment: 287028 Committed r205030: <http://trac.webkit.org/changeset/205030>
WebKit Commit Bot
Comment 4 2016-08-26 11:10:55 PDT
All reviewed patches have been landed. Closing bug.
Chris Dumez
Comment 5 2016-08-26 12:09:35 PDT
Reopening to attach new patch.
Chris Dumez
Comment 6 2016-08-26 12:09:38 PDT
Darin Adler
Comment 7 2016-08-26 22:10:27 PDT
Comment on attachment 287128 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=287128&action=review > Source/WebCore/html/parser/HTMLParserIdioms.cpp:229 > +template <typename CharacterType> > +static inline bool isHTMLSpaceOrDelimiter(CharacterType character) > +{ > + return isHTMLSpace(character) || character == ',' || character == ';'; > +} > + > +template <typename CharacterType> > +static inline bool isNumberStart(CharacterType character) > +{ > + return isASCIIDigit(character) || character == '.' || character == '-'; > +} Is a template really needed? I think these could be be written to work on UChar and should work fine for LChar too. > Source/WebCore/html/parser/HTMLParserIdioms.cpp:262 > +Vector<double> parseHTMLListOfOfFloatingPointNumberValues(const String& input) Should take a StringView rather than a String. > Source/WebCore/html/parser/HTMLParserIdioms.cpp:266 > + unsigned length = input.length(); > + if (!length) > + return { }; This won’t be needed if the argument is a StringView.
Chris Dumez
Comment 8 2016-08-27 21:35:33 PDT
Created attachment 287220 [details] Follow-up fixes Patch to take Darin's feedback into consideration.
WebKit Commit Bot
Comment 9 2016-08-27 22:26:27 PDT
Comment on attachment 287220 [details] Follow-up fixes Clearing flags on attachment: 287220 Committed r205095: <http://trac.webkit.org/changeset/205095>
WebKit Commit Bot
Comment 10 2016-08-27 22:26:32 PDT
All reviewed patches have been landed. Closing bug.
Chris Dumez
Comment 11 2016-09-13 09:18:13 PDT
*** Bug 153124 has been marked as a duplicate of this bug. ***
zalan
Comment 12 2023-12-18 08:15:20 PST
*** Bug 155516 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.