[webkit-reviews] review granted: [Bug 22902] RenderPath clean-up for strokeBoundingBox : [Attachment 26188] Move strokeBBox code to Path 4

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Dec 21 15:14:14 PST 2008


Nikolas Zimmermann <zimmermann at kde.org> has granted 's request for review:
Bug 22902: RenderPath clean-up for strokeBoundingBox
https://bugs.webkit.org/show_bug.cgi?id=22902

Attachment 26188: Move strokeBBox code to Path 4
https://bugs.webkit.org/attachment.cgi?id=26188&action=review

------- Additional Comments from Nikolas Zimmermann <zimmermann at kde.org>
This looks perfectly fine, r=me. Please fix two issues, before landing:

> Index: WebCore/platform/graphics/StrokeStyleApplier.h
> +
> +    protected:
> +	   virtual ~StrokeStyleApplier() {}
Also add a protected constructor: "StrokeStyleApplier() {}" here.

> Index: WebCore/platform/graphics/cg/PathCG.cpp
> +static CGContextRef createScratchContext()
> +{
> +    CGContextRef contextRef = 0;
> +    if (!contextRef) {
> +	   CFMutableDataRef empty = CFDataCreateMutable(NULL, 0);
> +	   CGDataConsumerRef consumer = CGDataConsumerCreateWithCFData(empty);
> +	   contextRef = CGPDFContextCreate(consumer, NULL, NULL);
> +	   CGDataConsumerRelease(consumer);
> +	   CFRelease(empty);
> +
> +	   CGFloat black[4] = {0, 0, 0, 1};
> +	   CGContextSetFillColor(contextRef, black);
> +	   CGContextSetStrokeColor(contextRef, black);
> +    }
> +    return contextRef;
> +}

The if (!contextRef) case should be removed, it's always true.


More information about the webkit-reviews mailing list