Bug 169031 - [Cairo] Incorrectly determining height in GraphicsContext::roundToDevicePixels()
Summary: [Cairo] Incorrectly determining height in GraphicsContext::roundToDevicePixels()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tomas Popela
URL:
Keywords:
Depends on:
Blocks: 104114
  Show dependency treegraph
 
Reported: 2017-03-01 04:21 PST by Tomas Popela
Modified: 2017-03-08 06:49 PST (History)
3 users (show)

See Also:


Attachments
Patch (1.59 KB, patch)
2017-03-01 04:25 PST, Tomas Popela
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Popela 2017-03-01 04:21:56 PST
Found by Coverity scan:

1. webkitgtk-2.14.5/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:748: original: "width < 0." looks like the original copy.
2. webkitgtk-2.14.5/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:754: copy_paste_error: "width" in "width < 0." looks like a copy-paste error.
3. webkitgtk-2.14.5/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:754: remediation: Should it say "height" instead?
#   752|       else
#   753|           width = round(width);
#   754|->     if (height > -1 && width < 0)
#   755|           height = -1;
#   756|       else if (height > 0 && height < 1)
Comment 1 Tomas Popela 2017-03-01 04:25:36 PST
Created attachment 303062 [details]
Patch
Comment 2 Tomas Popela 2017-03-01 06:20:00 PST
Comment on attachment 303062 [details]
Patch

Clearing flags on attachment: 303062

Committed r213219: <http://trac.webkit.org/changeset/213219>
Comment 3 Tomas Popela 2017-03-01 06:20:08 PST
All reviewed patches have been landed.  Closing bug.