[Webkit-unassigned] [Bug 17483] Implement Scrollbars on Windows (Cairo)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 29 09:24:34 PST 2008


http://bugs.webkit.org/show_bug.cgi?id=17483


aroben at apple.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #19440|review?                     |review-
               Flag|                            |




------- Comment #16 from aroben at apple.com  2008-02-29 09:24 PDT -------
(From update of attachment 19440)
+static int cHorizontalWidth = 17;
+static int cHorizontalHeight = 17;
+static int cVerticalWidth = 17;
+static int cVerticalHeight = 17;
+static int cRealButtonLength = 28;
+static int cButtonInset = 14;
+static int cButtonHitInset = 3;

I don't think there's any reason to initialize these if you're just going to
get the real values later.

+    , m_ButtonLength (14)

There shouldn't be a space before the parentheses here.

+    cHorizontalHeight = ::GetSystemMetrics(SM_CYHSCROLL);
+    cHorizontalWidth = ::GetSystemMetrics(SM_CXHSCROLL);
+    cVerticalHeight = ::GetSystemMetrics(SM_CYVSCROLL);
+    cVerticalWidth = ::GetSystemMetrics(SM_CXVSCROLL);
+    cThumbWidth = ::GetSystemMetrics(SM_CXHTHUMB);
+    cThumbHeight = ::GetSystemMetrics(SM_CYVTHUMB);

These should only need to be initialized once (though really we should listen
for WM_SETTINGSCHANGE and refetch the values then, but that's for another day).

+    m_ButtonLength = ::GetSystemMetrics((orientation == VerticalScrollbar) ?
SM_CYVSCROLL : SM_CXHSCROLL);

I think you can just have two more static variables, cHorizontalButtonLength
and cVerticalButtonLength. Then you won't need this new member.

Once these are fixed I think this'll be good to go.


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



More information about the webkit-unassigned mailing list