Bug 63882 - [wx] Select controls with small quantity of options incorrectly draw scrollbars larger then the control itself (and other scrollbar oddities)
Summary: [wx] Select controls with small quantity of options incorrectly draw scrollba...
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kevin Ollivier
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-03 16:46 PDT by Malcolm MacLeod
Modified: 2023-02-04 10:29 PST (History)
3 users (show)

See Also:


Attachments
Patch to correct behaviour (991 bytes, patch)
2011-07-03 16:46 PDT, Malcolm MacLeod
no flags Details | Formatted Diff | Diff
testcase (1.71 KB, text/html)
2011-07-03 16:47 PDT, Malcolm MacLeod
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Malcolm MacLeod 2011-07-03 16:46:29 PDT
Created attachment 99586 [details]
Patch to correct behaviour

When a select has only a few items the scrollbar is rendering larger then the control. For select controls with a large amount of items this is not an issue.
Furthermore e.g. a scrolling div with a small amount of items does not exhibit the same problem.

It seems that this is because the function wxRenderer_DrawScrollbar expects the current, max and step paramaters as pixel values but that in the case of Select objects the ScrollBar object instead uses "item" units internally e.g. a step of 1 item instead of 25 pixels, a maximum of 19 items instead of 300 pixels. These "item" values are passed into wxRenderer_DrawScrollbar as is which then confuses it. Instead these values should be converted into pixels before being passed to wxRenderer_DrawScrollbar.

I am attaching a patch which corrects this behaviour, as well as a small snippet of HTML to reproduce the problem.
Comment 1 Malcolm MacLeod 2011-07-03 16:47:54 PDT
Created attachment 99587 [details]
testcase
Comment 3 Ahmad Saleem 2023-02-04 10:29:57 PST
Wx port is gone. So closing this as "RESOLVED WONTFIX".