Bug 123810

Summary: Avoid invalid cairo matrix when drawing surfaces too small
Product: WebKit Reporter: Cidorvan Leite <cidorvan.leite>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, d-r, mrobinson, noam, sergio
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Cidorvan Leite 2013-11-05 10:33:06 PST
Avoid invalid cairo matrix when drawing surfaces too small
Comment 1 Cidorvan Leite 2013-11-06 09:21:37 PST
Created attachment 216184 [details]
Patch
Comment 2 Martin Robinson 2013-11-07 10:48:25 PST
Comment on attachment 216184 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=216184&action=review

Thanks! One small nit in the patch.

> Source/WebCore/platform/graphics/cairo/PlatformContextCairo.cpp:164
>      FloatRect srcRect = originalSrcRect;
>  
> +    // Avoid invalid cairo matrix with small values.
> +    if (std::fabs(destRect.width()) < 0.5f || std::fabs(destRect.height()) < 0.5f)
> +        return;
> +

Please move this above the definition of srcRect, as srcRect is only used afterward.
Comment 3 Cidorvan Leite 2013-11-07 10:57:13 PST
Created attachment 216314 [details]
Patch
Comment 4 WebKit Commit Bot 2013-11-07 12:09:15 PST
Comment on attachment 216314 [details]
Patch

Clearing flags on attachment: 216314

Committed r158861: <http://trac.webkit.org/changeset/158861>
Comment 5 WebKit Commit Bot 2013-11-07 12:09:18 PST
All reviewed patches have been landed.  Closing bug.