Bug 123810 - Avoid invalid cairo matrix when drawing surfaces too small
Summary: Avoid invalid cairo matrix when drawing surfaces too small
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-05 10:33 PST by Cidorvan Leite
Modified: 2013-11-07 12:09 PST (History)
5 users (show)

See Also:


Attachments
Patch (4.04 KB, patch)
2013-11-06 09:21 PST, Cidorvan Leite
no flags Details | Formatted Diff | Diff
Patch (4.12 KB, patch)
2013-11-07 10:57 PST, Cidorvan Leite
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.