Bug 3829 - GW: Several additions to KWQColor
Summary: GW: Several additions to KWQColor
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P4 Enhancement
Assignee: Eric Seidel (no email)
URL:
Keywords:
Depends on:
Blocks: 3250
  Show dependency treegraph
 
Reported: 2005-07-02 20:45 PDT by Eric Seidel (no email)
Modified: 2005-07-07 01:19 PDT (History)
0 users

See Also:


Attachments
necessary additions to KWQColor (4.51 KB, patch)
2005-07-02 20:46 PDT, Eric Seidel (no email)
mjs: review-
Details | Formatted Diff | Diff
Per mjs and my talks -- a much larger patch, making cgColor, nsColor free functions. (21.41 KB, patch)
2005-07-05 02:59 PDT, Eric Seidel (no email)
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2005-07-02 20:45:49 PDT
This patch includes several additions to KWQColor:

CIColor support (when WebKit is linked against CoreImage)
CIColor *getCIColor() const;

qRed, qGreen, qBlue support
explicit QColor(const QString &) -- performs expected css color input (like KDE does)
void getRgbaF(float *, float *, float *, float *) const; -- matching QT4
Comment 1 Eric Seidel (no email) 2005-07-02 20:46:30 PDT
Created attachment 2768 [details]
necessary additions to KWQColor
Comment 2 Maciej Stachowiak 2005-07-03 01:16:43 PDT
Comment on attachment 2768 [details]
necessary additions to KWQColor

> +bool parseHexColor(const QString &name, QRgb &rgb) {

No need to make this a member function, suggest just making it a vanilla static
function (maybe inline since it is used exactly once).

Also, don't put the open brace on the line with the function prototype (this
occurs elsehwere in the file as well).

I suggest making the CGColor conversion a free function, and moving hte CIColor
conversion out of this file entirely to avoid requiring an SVG_SUPPORT ifdef.
Comment 3 Maciej Stachowiak 2005-07-03 01:43:27 PDT
Comment on attachment 2768 [details]
necessary additions to KWQColor

> +bool parseHexColor(const QString &name, QRgb &rgb) {

No need to make this a member function, suggest just making it a vanilla static
function (maybe inline since it is used exactly once).

Also, don't put the open brace on the line with the function prototype (this
occurs elsehwere in the file as well).

I suggest making the CGColor conversion a free function, and moving hte CIColor
conversion out of this file entirely to avoid requiring an SVG_SUPPORT ifdef.
Comment 4 Eric Seidel (no email) 2005-07-05 02:59:01 PDT
Created attachment 2802 [details]
Per mjs and my talks -- a much larger patch, making cgColor, nsColor free functions.
Comment 5 Maciej Stachowiak 2005-07-07 00:37:07 PDT
Comment on attachment 2802 [details]
Per mjs and my talks -- a much larger patch, making cgColor, nsColor free functions.

r=me