Bug 77368 - [chromium] Win mock scrollbars appear to overflow by a pixel to the right and bottom
Summary: [chromium] Win mock scrollbars appear to overflow by a pixel to the right and...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Windows 7
: P2 Normal
Assignee: Tony Chang
Depends on:
Blocks: 77789
  Show dependency treegraph
Reported: 2012-01-30 14:01 PST by Tony Chang
Modified: 2012-06-07 17:21 PDT (History)
4 users (show)

See Also:

pixel result with scrollbars (4.21 KB, image/png)
2012-01-30 14:02 PST, Tony Chang
no flags Details
Patch (1.55 KB, patch)
2012-06-07 12:00 PDT, Tony Chang
ojan: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Chang 2012-01-30 14:01:50 PST
I'll upload an pixel result that shows this.  Other platforms don't seem to do this.
Comment 1 Tony Chang 2012-01-30 14:02:28 PST
Created attachment 124596 [details]
pixel result with scrollbars

In the attach image, the scrollbars shouldn't overflow the green boxes.
Comment 2 Tony Chang 2012-01-30 14:02:55 PST
dpranke said he's hoping to work on this this quarter.
Comment 3 Tony Chang 2012-03-19 12:01:55 PDT
I tracked this down since I had another ref test fail.

The bug is here: http://trac.webkit.org/browser/trunk/Tools/DumpRenderTree/chromium/WebThemeEngineDRTWin.cpp#L51

WebRect is defined as a point + width/height.  SkIRect is a left, top, right and bottom edge.  The conversion needs to subtract 1 from the width and the height.

For example, suppose WebRect is at 0, 0 and has a width and height of 10.  This converts to a SkIRect with points at 0, 0, 10, 10, but that's actually a width and height of 11.

This also explains why we don't have right/bottom edges on any of our scrollbars, e.g.:

We'll need to rebaseline many tests, e.g., all textareas and all scrollbars are different.
Comment 4 Tony Chang 2012-06-07 12:00:49 PDT
Created attachment 146351 [details]
Comment 5 Tony Chang 2012-06-07 13:07:05 PDT
Committed r119748: <http://trac.webkit.org/changeset/119748>
Comment 6 Kent Tamura 2012-06-07 17:21:25 PDT
Probably all of rectangles drawn by the mock theme have this issue.
e.g. LayoutTests/platform/chromium-win/fast/forms/number/input-appearance-spinbutton-layer-expected.png