[Webkit-unassigned] [Bug 28128] [Haiku] Modifications on WebCore.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 10 20:22:51 PDT 2009


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





--- Comment #8 from Ryan Leavengood <leavengood at gmail.com>  2009-08-10 20:22:50 PDT ---
(In reply to comment #5)
> (From update of attachment 34417 [details])
> Why virtual?
> #if PLATFORM(HAIKU)
>  175     virtual BBitmap* getBitmap() const;
>  176 #endif
> 
> Seems it should be createBBitmap()?  Or is it actually a getter?  in which case
> it can be just bitmap(), no?

Well all the other platforms seem to use the same pattern for their native
bitmap getters:

#if PLATFORM(MAC)
    // Accessors for native image formats.
    virtual NSImage* getNSImage();
    virtual CFDataRef getTIFFRepresentation();
#endif

#if PLATFORM(CG)
    virtual CGImageRef getCGImageRef();
#endif

#if PLATFORM(WIN)
    virtual bool getHBITMAP(HBITMAP);
    virtual bool getHBITMAPOfSize(HBITMAP, LPSIZE);
#endif

#if PLATFORM(GTK)
    virtual GdkPixbuf* getGdkPixbuf();
#endif

Maybe we just need to move ours up with these, I'm not sure why it is down on
that line.

> We generally don't use "get" in getters:
>  388         pattern    getHaikuStrokeStyle();
> 
> haikuStrokeStyle()
> 
> unless that's createing something in which case it should be create.  It looks
> like it's just returning a stack object though, so it doesn't need "create" in
> the name.

That is generally the philosophy in Haiku's API for getters too, but in this
case this is more of a converter function (to convert WebKit stroke styles into
Haiku stroke styles.) I guess haikuStrokeStyle() would still be OK in this
case. Or to be explicit: convertToHaikuStrokeStyle()?

> Why is this needed?
>  #elif PLATFORM(HAIKU)
>  82     Icon();
> 8183 #endif
> please explain in the ChangeLog.

Declaring a default constructor for a currently unimplemented class?

> Seems like  a bad idea:
>  #elif PLATFORM(HAIKU)
>  127     IntPoint(const BPoint&);
>  128     operator BPoint() const;
> 124129 #endif
> You don't wan implicit conversion of floating point points to integer points.
> 
> Again, probably bad idea:
> #elif PLATFORM(HAIKU)
>  150     IntRect(const BRect&);
>  151     operator BRect() const;
> 147152 #endif
> 
> Again:
>  #if PLATFORM(HAIKU)
>  119     IntSize(const BSize&);
>  120     operator BSize() const;
>  121 #endif
> 
> (this is all assuming that B* are floating point based).

Yes all the B* classes above use floats. I guess it is better to make all these
explicit?

-- 
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