[Webkit-unassigned] [Bug 46052] SVG: Remove "create" methods and use port-specific "add" counterparts

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 11 09:18:00 PDT 2010


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


Dirk Schulze <krit at webkit.org> changed:

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




--- Comment #14 from Dirk Schulze <krit at webkit.org>  2010-10-11 09:18:00 PST ---
(From update of attachment 70431)
View in context: https://bugs.webkit.org/attachment.cgi?id=70431&action=review

I'm not sure if we should add an ASSERT to all toClipPath as well as toPathData if the path is empty. (not sure how platforms implemented it, but they should check the number of segments internally). Maybe we can trust the programmer to never call this functions with a none empty path ;-)

These are just some notes.

> WebCore/platform/graphics/Path.cpp:112
> +void Path::addRoundedRect(const FloatRect& rectangle, const FloatSize& roundingRadii)

You should use rect instead of rectangle for the variable, at least if you change the function name.

> WebCore/platform/graphics/Path.cpp:117
>      float x = rectangle.x();
>      float y = rectangle.y();
>      float width = rectangle.width();
>      float height = rectangle.height();

Why not FloatRect rect(rectangle) so maybe leave the name above.

> WebCore/platform/graphics/Path.cpp:119
>      float rx = roundingRadii.width();
>      float ry = roundingRadii.height();

Can't we use FloatSize radius here?

If we copy all data, we might just use
void Path::addRoundedRect(FloatRect rect, FloatSize roundingRadii) instead of void Path::addRoundedRect(const FloatRect& rectangle, const FloatSize& roundingRadii). What do you think?

> WebCore/platform/graphics/Path.cpp:126
> +    float dx = rx;
> +    float dy = ry;
> +    float halfWidth = width / 2;
> +    float halfHeight = height / 2;

Maybe we can use FloatSize for the 4 values as well.

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