WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
49830
WebKit2: Add Trackpoint driver hack to support IBM trackpads
https://bugs.webkit.org/show_bug.cgi?id=49830
Summary
WebKit2: Add Trackpoint driver hack to support IBM trackpads
Sam Weinig
Reported
2010-11-19 14:03:00 PST
We need to add the Trackpoint driver hack to support IBM trackpads that we had in WebKit1.
Attachments
[PATCH] Fix
(11.66 KB, patch)
2011-03-24 12:30 PDT
,
Brian Weinstein
aroben
: review+
Details
Formatted Diff
Diff
[PATCH] Fix v2
(13.97 KB, patch)
2011-03-24 13:35 PDT
,
Brian Weinstein
aroben
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Sam Weinig
Comment 1
2010-11-29 09:29:49 PST
<
rdar://problem/8705951
>
Brian Weinstein
Comment 2
2011-03-24 12:30:39 PDT
Created
attachment 86809
[details]
[PATCH] Fix
Adam Roben (:aroben)
Comment 3
2011-03-24 12:37:47 PDT
Comment on
attachment 86809
[details]
[PATCH] Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=86809&action=review
> Source/WebKit2/UIProcess/win/WebView.cpp:294 > + // trackpoint scrollbars, so the WebView will receive WM_VSCROLl and WM_HSCROLL messages.
They aren't "trackpoint scrollbars", they're just normal Windows scrollbars. WM_VSCROLl should be WM_VSCROLL.
> Source/WebKit2/UIProcess/win/WebView.cpp:742 > + const TCHAR trackPointKeys[][50] = { TEXT("Software\\Lenovo\\TrackPoint"), > + TEXT("Software\\Lenovo\\UltraNav"), > + TEXT("Software\\Alps\\Apoint\\TrackPoint"), > + TEXT("Software\\Synaptics\\SynTPEnh\\UltraNavUSB"), > + TEXT("Software\\Synaptics\\SynTPEnh\\UltraNavPS2") };
I'd put the first key on its own line, and put the closing brace and semicolon on their own line. I think a better type for trackPointKeys would be: const wchar_t* trackPointKeys[]. You should use L instead of TEXT().
> Source/WebKit2/UIProcess/win/WebView.cpp:744 > + for (int i = 0; i < 5; ++i) {
WTF_ARRAY_LENGTH
> Source/WebKit2/UIProcess/win/WebView.cpp:746 > + int readKeyResult = ::RegOpenKeyEx(HKEY_CURRENT_USER, trackPointKeys[i], 0, KEY_READ, &trackPointKey);
You should use ::RegOpenKeyExW.
> Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm:336 > +void WebPage::scrollBy(uint32_t scrollDirection, uint32_t scrollGranularity) > +{ > + scroll(m_page.get(), static_cast<ScrollDirection>(scrollDirection), static_cast<ScrollGranularity>(scrollGranularity)); > +}
Why is this code duplicated in WebPageMac and WebPageWin? Just put it in WebPage.cpp. We should probably check that the uint32_ts we get are in the correct range. You could use helper functions to do that (like toScrollDirection and toScrollGranularity).
Early Warning System Bot
Comment 4
2011-03-24 12:42:38 PDT
Attachment 86809
[details]
did not build on qt: Build output:
http://queues.webkit.org/results/8235541
Brian Weinstein
Comment 5
2011-03-24 13:35:27 PDT
Created
attachment 86821
[details]
[PATCH] Fix v2
Adam Roben (:aroben)
Comment 6
2011-03-24 13:38:00 PDT
Comment on
attachment 86821
[details]
[PATCH] Fix v2 View in context:
https://bugs.webkit.org/attachment.cgi?id=86821&action=review
> Source/WebKit2/UIProcess/win/WebView.cpp:294 > + // scrollbars, so the WebView will receive WM_VSCROLl and WM_HSCROLL messages.
WM_VSCROLl should be WM_VSCROLL.
> Source/WebKit2/UIProcess/win/WebView.cpp:746 > + for (int i = 0; i < WTF_ARRAY_LENGTH(trackPointKeys); ++i) {
i should be a size_t.
Brian Weinstein
Comment 7
2011-03-24 13:48:22 PDT
Landed in
r81895
.
Darin Adler
Comment 8
2011-03-24 17:44:50 PDT
Comment on
attachment 86809
[details]
[PATCH] Fix This breaks the Qt build by adding scrollBy but not implementing it for Qt. Probably same for GTK.
Brian Weinstein
Comment 9
2011-03-24 18:15:41 PDT
(In reply to
comment #8
)
> (From update of
attachment 86809
[details]
) > This breaks the Qt build by adding scrollBy but not implementing it for Qt. Probably same for GTK.
The second patch I uploaded and landed put scrollBy in a cross-platform location and seemed to build fine on Qt. Thanks for catching that though!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug