[webkit-reviews] review granted: [Bug 34779] Need CA_PRINT_TREE functionality on Windows : [Attachment 48453] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 10 10:16:49 PST 2010


Darin Adler <darin at apple.com> has granted Chris Marrin <cmarrin at apple.com>'s
request for review:
Bug 34779: Need CA_PRINT_TREE functionality on Windows
https://bugs.webkit.org/show_bug.cgi?id=34779

Attachment 48453: Patch
https://bugs.webkit.org/attachment.cgi?id=48453&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
> +    CFArrayRef sublayers = CACFLayerGetSublayers(layer());
> +    if (CFArrayGetCount(sublayers) <= index)
> +	   return 0;

If we're checking the range of index and returning 0 rather than calling
CFArrayGetValueAtIndex, then suggest we check for negative numbers too since
the index is signed.

> +    return
layer(reinterpret_cast<CACFLayerRef>(const_cast<void*>(CFArrayGetValueAtIndex(s
ublayers, index))));

This should be static_cast instead of reinterpret_cast since it's a cast from
void*.

> -    bool isTransformLayer() const { return CACFLayerGetClass(layer()) ==
kCACFTransformLayer; }
> +    bool isTransformLayer() const;

Why this change? Is there a problem with it being inlined?

r=me


More information about the webkit-reviews mailing list