Bug 169031

Summary: [Cairo] Incorrectly determining height in GraphicsContext::roundToDevicePixels()
Product: WebKit Reporter: Tomas Popela <tpopela>
Component: WebKitGTKAssignee: Tomas Popela <tpopela>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, cgarcia, mcatanzaro
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 104114    
Attachments:
Description Flags
Patch none

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.