RESOLVED FIXED 65145
SVG and HTML editing have conflicting inline isWhitespace functions
https://bugs.webkit.org/show_bug.cgi?id=65145
Summary SVG and HTML editing have conflicting inline isWhitespace functions
Darin Adler
Reported 2011-07-25 15:55:32 PDT
There is a function named isWhitespace in SVG and another in HTML Editing. Both are in the WebCore namespace, both are inline, but they have different contents.
Attachments
Patch (16.90 KB, patch)
2011-08-17 16:24 PDT, Darin Adler
no flags
Dirk Schulze
Comment 1 2011-07-25 23:26:42 PDT
Thats correct. Do you want to rename one of the functions? What is the problem? As long as you do not include SVGParserUtills.h into headers it should work.
Darin Adler
Comment 2 2011-07-26 14:30:57 PDT
(In reply to comment #1) > Thats correct. Do you want to rename one of the functions? Yes. > What is the problem? As long as you do not include SVGParserUtills.h into headers it should work. There are two problems: 1) It's not good for us two have two different functions with the same name that do similar but different things. Even if these functions were guaranteed never to conflict, it's a recipe for confusion. 1) Even though this currently works, it is not guaranteed to work. These functions are marked inline, but do not have internal linkage. The C++ standard does not allow two different functions with the same name with external linkage and different definitions. One thing that keeps this from being a practical problem right now is that the SVG function takes a const UChar& instead of a UChar so the functions are distinct. But that's actually a mistake. It's not good to have the function take a const UChar&. I have a patch that fixes it by renaming the SVG parser utilities functions. I think you’ll probably like that patch.
Darin Adler
Comment 3 2011-08-17 16:24:24 PDT
Nikolas Zimmermann
Comment 4 2011-08-18 00:33:46 PDT
Comment on attachment 104273 [details] Patch Looks reasonable, r=me.
WebKit Review Bot
Comment 5 2011-08-18 05:25:19 PDT
Comment on attachment 104273 [details] Patch Clearing flags on attachment: 104273 Committed r93300: <http://trac.webkit.org/changeset/93300>
WebKit Review Bot
Comment 6 2011-08-18 05:25:24 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.