[Webkit-unassigned] [Bug 26988] Haiku-specific files for WebCore

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 20 14:06:19 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=26988





--- Comment #36 from Maxime Simon <simon.maxime at gmail.com>  2009-07-20 14:06:16 PDT ---
(In reply to comment #35)
> (In reply to comment #34)
> > 
> > This is a new style that WebKit is moving to that likely post dates the other
> > implementations, so that's why they use an enum.
> > 
> > For example see https://bugs.webkit.org/show_bug.cgi?id=26695, where this was
> > said when someone was adding a new bool parameter:
> >   We're trying to avoid adding boolean parameters, because they are not very
> >   clear (when reading code like "hitTestResultAtPoint(point, true, false,
> > true)",
> >   what do the booleans mean?). One strategy to replace a boolean parameter is
> > to
> >   use a two-value enum, like this:
> > 
> >   enum HitTestScrollbars { ShouldHitTestScrollbars, DontHitTestScrollbars };
> 
> For what it is worth, I agree with David on this. It definitely makes sense and
> since we are a new port, let's move in a better direction, especially if the
> rest of WebKit is going that way.
> 
> Let's also maybe keep it in mind for the browser code too.
> 
> Regards,
> Ryan

In fact I didn't intend to do the same for the whole project. :)
Using enum instead of booleans seems totally logical to the
understanding of everyone. And I agree with it.
But here the boolean was required by the base class. (Clipboard)

Maxime

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



More information about the webkit-unassigned mailing list