Changeset 168049 in webkit


Ignore:
Timestamp:
Apr 30, 2014 3:05:15 PM (10 years ago)
Author:
Beth Dakin
Message:

Always-visible scrollbars continuously repaint after non-momentum scrollling
https://bugs.webkit.org/show_bug.cgi?id=132403
-and corresponding-
<rdar://problem/16553878>

Reviewed by Simon Fraser.

No longer universally opt into presentation value mode whenever the scroll
position changes on the scrolling thread. We really only want it for momentum
scrolls, and this will ensure that we always set it to NO once we have set it to
YES.

  • page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:

(WebCore::ScrollingTreeScrollingNodeMac::handleWheelEvent):
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):

Expose shouldUsePresentationValue.

  • platform/mac/NSScrollerImpDetails.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r168047 r168049  
     12014-04-30  Beth Dakin  <bdakin@apple.com>
     2
     3        Always-visible scrollbars continuously repaint after non-momentum scrollling
     4        https://bugs.webkit.org/show_bug.cgi?id=132403
     5        -and corresponding-
     6        <rdar://problem/16553878>
     7
     8        Reviewed by Simon Fraser.
     9
     10        No longer universally opt into presentation value mode whenever the scroll
     11        position changes on the scrolling thread. We really only want it for momentum
     12        scrolls, and this will ensure that we always set it to NO once we have set it to
     13        YES.
     14        * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
     15        (WebCore::ScrollingTreeScrollingNodeMac::handleWheelEvent):
     16        (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
     17
     18        Expose shouldUsePresentationValue.
     19        * platform/mac/NSScrollerImpDetails.h:
     20
    1212014-04-30  Anders Carlsson  <andersca@apple.com>
    222
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm

    r166517 r168049  
    137137        return;
    138138
     139    if (wheelEvent.momentumPhase() == PlatformWheelEventPhaseBegan) {
     140        [m_verticalScrollbarPainter setUsePresentationValue:YES];
     141        [m_horizontalScrollbarPainter setUsePresentationValue:YES];
     142    }
    139143    if (wheelEvent.momentumPhase() == PlatformWheelEventPhaseEnded || wheelEvent.momentumPhase() == PlatformWheelEventPhaseCancelled) {
    140         // If the wheel event is ending or cancelled, then we can tell the ScrollbarPainter API that we won't
    141         // be updating the position from our scrolling thread anymore for the time being.
    142         if (m_verticalScrollbarPainter)
    143             [m_verticalScrollbarPainter setUsePresentationValue:NO];
    144         if (m_horizontalScrollbarPainter)
    145             [m_horizontalScrollbarPainter setUsePresentationValue:NO];
     144        [m_verticalScrollbarPainter setUsePresentationValue:NO];
     145        [m_horizontalScrollbarPainter setUsePresentationValue:NO];
    146146    }
    147147
     
    372372        [CATransaction lock];
    373373
    374         if (m_verticalScrollbarPainter) {
    375             [m_verticalScrollbarPainter setUsePresentationValue:YES];
     374        if ([m_verticalScrollbarPainter shouldUsePresentationValue]) {
    376375            float presentationValue;
    377376            float overhangAmount;
     
    380379        }
    381380
    382         if (m_horizontalScrollbarPainter) {
    383             [m_horizontalScrollbarPainter setUsePresentationValue:YES];
     381        if ([m_horizontalScrollbarPainter shouldUsePresentationValue]) {
    384382            float presentationValue;
    385383            float overhangAmount;
  • trunk/Source/WebCore/platform/mac/NSScrollerImpDetails.h

    r157253 r168049  
    4141- (void)setDoubleValue:(double)doubleValue;
    4242- (void)setPresentationValue:(double)presentationValue;
     43- (BOOL)shouldUsePresentationValue;
    4344- (void)setUsePresentationValue:(BOOL)usePresentationValue;
    4445- (void)setKnobProportion:(CGFloat)proportion;
Note: See TracChangeset for help on using the changeset viewer.