Changeset 163589 in webkit


Ignore:
Timestamp:
Feb 6, 2014 5:55:24 PM (10 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r163558.
http://trac.webkit.org/changeset/163558
https://bugs.webkit.org/show_bug.cgi?id=128350

Breaks scrolling on certain websites (Requested by bfulgham on
#webkit).

  • page/EventHandler.cpp:

(WebCore::EventHandler::handleWheelEvent):

  • page/WheelEventDeltaTracker.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r163586 r163589  
     12014-02-06  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r163558.
     4        http://trac.webkit.org/changeset/163558
     5        https://bugs.webkit.org/show_bug.cgi?id=128350
     6
     7        Breaks scrolling on certain websites (Requested by bfulgham on
     8        #webkit).
     9
     10        * page/EventHandler.cpp:
     11        (WebCore::EventHandler::handleWheelEvent):
     12        * page/WheelEventDeltaTracker.h:
     13
    1142014-02-06  Chris Fleizach  <cfleizach@apple.com>
    215
  • trunk/Source/WebCore/page/EventHandler.cpp

    r163558 r163589  
    11/*
    2  * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2014 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2013 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
    44 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
     
    25292529    // We do another check on the frame view because the event handler can run JS which results in the frame getting destroyed.
    25302530    view = m_frame.view();
    2531    
    2532 #if PLATFORM(MAC)
    2533     if (useLatchedWheelEventElement && m_latchedWheelEventElement == element) {
    2534         bool enclosingFrameIsMainFrame = view ? view->frame().isMainFrame() : false;
    2535 
    2536         // If we are latched, and have nowhere to scroll, treat the scroll event as ended so that we don't
    2537         // cause the scroll to break free of the current scrolling widget.
    2538         if (!enclosingFrameIsMainFrame) {
    2539             bool didHandleWheelEvent = view ? view->wheelEvent(event) : false;
    2540             if (!didHandleWheelEvent) {
    2541                 // If we are just starting a scroll event, and have nowhere left to scroll, allow
    2542                 // the enclosing frame to handle the scroll.
    2543                 didHandleWheelEvent = !m_recentWheelEventDeltaTracker->isFirstWheelEvent();
    2544             }
    2545 
    2546             m_isHandlingWheelEvent = false;
    2547             return didHandleWheelEvent;
    2548         }
    2549 
    2550         if (!m_recentWheelEventDeltaTracker->isFirstWheelEvent()) {
    2551             // When the main frame is our parent, and we have been scrolling within this region, we do not
    2552             // want to have the main frame consume any remaining scroll events. Keep them latched to this
    2553             // element.
    2554             m_isHandlingWheelEvent = false;
    2555             return true;
    2556         }
    2557     }
    2558 #endif
    2559 
    25602531    bool didHandleEvent = view ? view->wheelEvent(event) : false;
    25612532    m_isHandlingWheelEvent = false;
  • trunk/Source/WebCore/page/WheelEventDeltaTracker.h

    r163558 r163589  
    5252
    5353    bool isTrackingDeltas() const { return m_isTrackingDeltas; }
    54     bool isFirstWheelEvent() const { return m_recentWheelEventDeltas.size() <= 1; }
    5554
    5655    void recordWheelEventDelta(const PlatformWheelEvent&);
Note: See TracChangeset for help on using the changeset viewer.