[Webkit-unassigned] [Bug 27511] Add WinCE specific platform/graphics files to WebCore

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Aug 9 19:05:40 PDT 2009


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





--- Comment #66 from Yong Li <yong.li at torchmobile.com>  2009-08-09 19:05:39 PDT ---
(In reply to comment #65)
> 
> Probably because "while" was designed for the case when you don't need a loop
> initializer or increment.

where "for" is designed for all the cases, including the case that no condition
check is needed. isn't empty expression better than "true"? :)

> 
> > It should be struct in this case, because it's used by libjpeg, like a C
> > struct.
> 
> > "pub" acts as the base class of jpeg_dest_mgr. Another idea is:
> > 
> > struct JpegDestinationManager: jpeg_destination_mgr
> > {
> > };
> > 
> > What do you think?
> 
> I think that is not good practice if the libjpeg C code expects to access a
> jpeg_destination_mgr struct at offset 0 in this object.  It probably works, but
> passing C++ classes with inheritance into C code to use makes me uneasy.

Using class inheritance can save a reinterpret_cast, and also a weird member
"pub". Only thing I should take care is providing a constructor to zero the
base class memory. Hm..., I find a bug: using fastCalloc to construct
jpeg_dest_mgr is wrong, those Vector members might not be happy with memory
zeroed although it works in reality.

going to update the patch tomorrow.

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