[Webkit-unassigned] [Bug 12159] Most of CSSComputedStyleDeclaration, cssparser.cpp, cssstyleselector.cpp should be autogenerated

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 16 07:42:10 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=12159





------- Comment #10 from darin at apple.com  2007-10-16 07:42 PDT -------
(In reply to comment #9)
> (In reply to comment #8)
> 
> > Can we switch to a simpler technique that doesn't involve templates?
> 
>   I thought plain overloading would be unsafe, because missing constructors
> wouldn't be detected - there are already constructors that take int and
> unsigned.

Wow, that's a good point. I had overlooked that.

Maybe we should go back to your original patch, but I have some other ideas
worth considering:

    1) Change the identifier values into an enum, and get rid of the int
constructor. Probably straightforward to do.
    2) For colors, change the constructor to either use a wrapper
(WebCore::Color has an unwanted "invalid" state, and is slightly less efficient
than a plain RGB value, but it might still be OK) or a named constructor like
fromColor.

I don't feel super-strongly about the color one, but I do think that the "int
for identifier" thing is weak and should be changed.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list