Changeset 70479 in webkit


Ignore:
Timestamp:
Oct 25, 2010 12:49:43 PM (14 years ago)
Author:
bweinstein@apple.com
Message:

Control + Mousewheel shouldn't be handled in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=48253

Reviewed by Adam Roben.

Don't handle a wheel event if Control is pressed, pass the message back to DefWindowProc.

  • UIProcess/win/WebView.cpp:

(WebKit::WebView::onWheelEvent):

Location:
trunk/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit2/ChangeLog

    r70467 r70479  
     12010-10-25  Brian Weinstein  <bweinstein@apple.com>
     2
     3        Reviewed by Adam Roben.
     4
     5        Control + Mousewheel shouldn't be handled in WebKit2
     6        https://bugs.webkit.org/show_bug.cgi?id=48253
     7       
     8        Don't handle a wheel event if Control is pressed, pass the message back to DefWindowProc.
     9
     10        * UIProcess/win/WebView.cpp:
     11        (WebKit::WebView::onWheelEvent):
     12
    1132010-10-25  Sam Weinig  <sam@webkit.org>
    214
  • trunk/WebKit2/UIProcess/win/WebView.cpp

    r70362 r70479  
    315315LRESULT WebView::onWheelEvent(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, bool& handled)
    316316{
    317     // Ctrl+Mouse wheel doesn't ever go into WebCore.  It is used to
    318     // zoom instead (Mac zooms the whole Desktop, but Windows browsers trigger their
    319     // own local zoom modes for Ctrl+wheel).
    320     /*
    321     if (wParam & MK_CONTROL) {
    322         short delta = static_cast<short>(HIWORD(wParam));
    323         if (delta < 0)
    324             m_page->makeTextSmaller(0);
    325         else
    326             m_page->makeTextLarger(0);
    327 
    328         handled = true;
     317    WebWheelEvent wheelEvent = WebEventFactory::createWebWheelEvent(hWnd, message, wParam, lParam);
     318    if (wheelEvent.controlKey()) {
     319        // We do not want WebKit to handle Control + Wheel, this should be handled by the client application
     320        // to zoom the page.
     321        handled = false;
    329322        return 0;
    330323    }
    331     */
    332 
    333     WebWheelEvent wheelEvent = WebEventFactory::createWebWheelEvent(hWnd, message, wParam, lParam);
     324
    334325    m_page->handleWheelEvent(wheelEvent);
    335326
Note: See TracChangeset for help on using the changeset viewer.