[prev in list] [next in list] [prev in thread] [next in thread] 

List:       webkit-unassigned
Subject:    [Webkit-unassigned] [Bug 20543] SVG should use the new Gradient
From:       bugzilla-daemon () webkit ! org
Date:       2008-09-30 20:56:32
Message-ID: 20080930205632.4D499D2660C () gamma ! macosforge ! org
[Download RAW message or body]

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


eric@webkit.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #23953|review?                     |review-
               Flag|                            |




------- Comment #9 from eric@webkit.org  2008-09-30 13:56 PDT -------
(From update of attachment 23953)
I have mixed feelings about this change.  CG has no concept of "Spread Method",
so if/when we ever decide to implement that obscure part of SVG (which I've yet
to see a single SVG depend on), we'll need to write a "spread method"
implementation on top of GraphicsContext functions or on top of CG functions.

So if we have to write one generic implementation (for the currently
most-popular port of WebKit) then it makes me wonder if we'll want to use that
implementation for all other ports.

enum GradientSpreadMethod {
 129         SPREADMETHOD_PAD = 1,
 130         SPREADMETHOD_REFLECT = 2,
 131         SPREADMETHOD_REPEAT = 3
 132     };

This should follow the CamelCase naming convention of all other enums in that
file.

SpreadMethodPad
SpreadMethodRepeat
SpreadMethodReflect

 74         GradientSpreadMethod spreadMethod;

That needs to be initialized to something.

 459         if (spreadMethod())
That should never be false!  Since spreadMethod() == 0 is not a valid value.

No default is needed here:
167         default:
 168             gradient.setSpread(QGradient::PadSpread);
 169             break;

I think this change is overall OK.  I think we'll end up crossing the "how to
write a CG implementation" bridge when we come to it.  And when we do write a
CG implementation of this we'll think about generalizing said implementation.


-- 
Configure bugmail: https://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.
_______________________________________________
webkit-unassigned mailing list
webkit-unassigned@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-unassigned
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic