[Webkit-unassigned] [Bug 137442] New: There are wrong condition checking on GraphicsContext::roundToDevicePixels

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 6 00:34:27 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=137442

           Summary: There are wrong condition checking on
                    GraphicsContext::roundToDevicePixels
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: byeongha.cho at samsung.com


There are wrong condition checking on GraphicsContext::roundToDevicePixels() of GraphicsContextCairo.cpp.

I think this is copy and paste mistake.

    // We must ensure width and height are at least 1 (or -1) when
    // we're given float values in the range between 0 and 1 (or -1 and 0).
    double width = frect.width();
    double height = frect.height();
    cairo_user_to_device_distance(cr, &width, &height);
    if (width > -1 && width < 0)
        width = -1;
    else if (width > 0 && width < 1)
        width = 1;
    else
        width = round(width);
    if (height > -1 && width < 0) //'width' should be replaced with 'height'.
        height = -1;
    else if (height > 0 && height < 1)
        height = 1;
    else
        height = round(height);

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list