Changeset 40919 in webkit


Ignore:
Timestamp:
Feb 12, 2009 12:18:50 PM (15 years ago)
Author:
hyatt@apple.com
Message:

2009-02-12 David Hyatt <hyatt@apple.com>

Reviewed by Simon Fraser

Fix for https://bugs.webkit.org/show_bug.cgi?id=23912

I have no idea why this broke. As far as I can tell the old code never should have worked in
the first place. Add code to handleWheelEvent that will find an enclosing renderer for a node
in order to attempt a wheel scroll.

  • page/EventHandler.cpp: (WebCore::EventHandler::handleWheelEvent):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r40916 r40919  
     12009-02-12  David Hyatt  <hyatt@apple.com>
     2
     3        Reviewed by Simon Fraser
     4
     5        Fix for https://bugs.webkit.org/show_bug.cgi?id=23912
     6
     7        I have no idea why this broke.  As far as I can tell the old code never should have worked in
     8        the first place.  Add code to handleWheelEvent that will find an enclosing renderer for a node
     9        in order to attempt a wheel scroll.
     10
     11        * page/EventHandler.cpp:
     12        (WebCore::EventHandler::handleWheelEvent):
     13
    1142009-02-12  David Hyatt  <hyatt@apple.com>
    215
  • trunk/WebCore/page/EventHandler.cpp

    r40871 r40919  
    16241624        if (e.isAccepted())
    16251625            return true;
    1626            
    1627         if (node->renderer()) {
     1626       
     1627        // If we don't have a renderer, send the wheel event to the first node we find with a renderer.
     1628        // This is needed for <option> and <optgroup> elements so that <select>s get a wheel scroll.
     1629        while (node && !node->renderer())
     1630            node = node->parent();
     1631       
     1632        if (node && node->renderer()) {
    16281633            // Just break up into two scrolls if we need to.  Diagonal movement on
    16291634            // a MacBook pro is an example of a 2-dimensional mouse wheel event (where both deltaX and deltaY can be set).
Note: See TracChangeset for help on using the changeset viewer.