Changeset 91146 in webkit


Ignore:
Timestamp:
Jul 15, 2011 10:15:36 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

Overlay scrollbars in overflow areas no longer pulse when revealed
https://bugs.webkit.org/show_bug.cgi?id=64606
<rdar://problem/9390674>

Patch by Tim Horton <timothy_horton@apple.com> on 2011-07-15
Reviewed by Simon Fraser.

Ensure that the state of the scrollbar implementation is kept in sync
with WebCore's internal representation. Previously, we synchronized them
at paint time, causing pulsing to be skipped due to the scrollbars being
disabled.

Source/WebKit/mac:

  • WebCoreSupport/WebSystemInterface.mm:

(InitWebCoreSystemInterface):

Source/WebKit2:

  • WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:

(InitWebCoreSystemInterface):

Location:
trunk/Source
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/WebCore.exp.in

    r91134 r91146  
    14721472_wkScrollbarPainterPaint
    14731473_wkScrollbarPainterSetDelegate
     1474_wkScrollbarPainterSetEnabled
    14741475_wkScrollbarPainterSetOverlayState
    14751476_wkScrollbarPainterTrackAlpha
  • trunk/Source/WebCore/platform/ScrollView.cpp

    r91064 r91146  
    894894
    895895    if (platformWidget()) {
     896        notifyPageThatContentAreaWillPaint();
    896897        platformRepaintContentRectangle(paintRect, now);
    897898        return;
  • trunk/Source/WebCore/platform/Scrollbar.cpp

    r85615 r91146  
    460460        return;
    461461    m_enabled = e;
     462    theme()->updateEnabledState(this);
    462463    invalidate();
    463464}
  • trunk/Source/WebCore/platform/ScrollbarTheme.h

    r84767 r91146  
    4242    ScrollbarTheme() { }
    4343    virtual ~ScrollbarTheme() {};
     44
     45    virtual void updateEnabledState(Scrollbar*) { };
    4446
    4547    virtual bool paint(Scrollbar*, GraphicsContext*, const IntRect& /*damageRect*/) { return false; }
  • trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.h

    r85501 r91146  
    3939    ScrollbarThemeMac();
    4040    virtual ~ScrollbarThemeMac();
     41
     42    virtual void updateEnabledState(Scrollbar*);
    4143
    4244    virtual bool paint(Scrollbar*, GraphicsContext* context, const IntRect& damageRect);
  • trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm

    r88364 r91146  
    161161    WKScrollbarPainterRef scrollbarPainter = wkMakeScrollbarPainter(scrollbar->controlSize(), isHorizontal);
    162162    scrollbarMap()->add(scrollbar, scrollbarPainter);
     163    updateEnabledState(scrollbar);
    163164#else
    164165    scrollbarMap()->add(scrollbar);
     
    175176{
    176177    scrollbarMap()->set(scrollbar, newPainter);
     178    updateEnabledState(scrollbar);
    177179}
    178180
     
    445447#endif
    446448
     449void ScrollbarThemeMac::updateEnabledState(Scrollbar* scrollbar)
     450{
     451#if USE(WK_SCROLLBAR_PAINTER)
     452    wkScrollbarPainterSetEnabled(scrollbarMap()->get(scrollbar).get(), scrollbar->enabled());
     453#endif
     454}
     455
    447456bool ScrollbarThemeMac::paint(Scrollbar* scrollbar, GraphicsContext* context, const IntRect& damageRect)
    448457{
  • trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h

    r90087 r91146  
    247247extern WKScrollbarPainterRef (*wkMakeScrollbarReplacementPainter)(WKScrollbarPainterRef oldPainter, int newStyle, int controlSize, bool isHorizontal);
    248248extern void (*wkScrollbarPainterSetDelegate)(WKScrollbarPainterRef, id scrollbarPainterDelegate);
     249extern void (*wkScrollbarPainterSetEnabled)(WKScrollbarPainterRef, bool enabled);
    249250extern void (*wkScrollbarPainterPaint)(WKScrollbarPainterRef, bool enabled, double value, CGFloat proportion, CGRect frameRect);
    250251extern void (*wkScrollbarPainterForceFlashScrollers)(WKScrollbarPainterControllerRef);
  • trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm

    r90087 r91146  
    127127WKScrollbarPainterRef (*wkMakeScrollbarReplacementPainter)(WKScrollbarPainterRef oldPainter, int newStyle, int controlSize, bool isHorizontal);
    128128void (*wkScrollbarPainterSetDelegate)(WKScrollbarPainterRef, id scrollbarPainterDelegate);
     129void (*wkScrollbarPainterSetEnabled)(WKScrollbarPainterRef, bool enabled);
    129130void (*wkScrollbarPainterPaint)(WKScrollbarPainterRef, bool enabled, double value, CGFloat proportion, CGRect frameRect);
    130131void (*wkScrollbarPainterForceFlashScrollers)(WKScrollbarPainterControllerRef);
  • trunk/Source/WebKit/mac/ChangeLog

    r91134 r91146  
     12011-07-15  Tim Horton  <timothy_horton@apple.com>
     2
     3        Overlay scrollbars in overflow areas no longer pulse when revealed
     4        https://bugs.webkit.org/show_bug.cgi?id=64606
     5        <rdar://problem/9390674>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Ensure that the state of the scrollbar implementation is kept in sync
     10        with WebCore's internal representation. Previously, we synchronized them
     11        at paint time, causing pulsing to be skipped due to the scrollbars being
     12        disabled.
     13
     14        * WebCoreSupport/WebSystemInterface.mm:
     15        (InitWebCoreSystemInterface):
     16
    1172011-07-15  Andy Estes  <aestes@apple.com>
    218
  • trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm

    r90087 r91146  
    124124    INIT(MakeScrollbarPainter);
    125125    INIT(ScrollbarPainterSetDelegate);
     126    INIT(ScrollbarPainterSetEnabled);
    126127    INIT(ScrollbarPainterPaint);
    127128    INIT(ScrollbarPainterForceFlashScrollers);
  • trunk/Source/WebKit2/ChangeLog

    r91137 r91146  
     12011-07-15  Tim Horton  <timothy_horton@apple.com>
     2
     3        Overlay scrollbars in overflow areas no longer pulse when revealed
     4        https://bugs.webkit.org/show_bug.cgi?id=64606
     5        <rdar://problem/9390674>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Ensure that the state of the scrollbar implementation is kept in sync
     10        with WebCore's internal representation. Previously, we synchronized them
     11        at paint time, causing pulsing to be skipped due to the scrollbars being
     12        disabled.
     13
     14        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
     15        (InitWebCoreSystemInterface):
     16
    1172011-07-15  Simon Fraser  <simon.fraser@apple.com>
    218
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm

    r90087 r91146  
    114114        INIT(MakeScrollbarPainter);
    115115        INIT(ScrollbarPainterSetDelegate);
     116        INIT(ScrollbarPainterSetEnabled);
    116117        INIT(ScrollbarPainterPaint);
    117118        INIT(ScrollbarPainterForceFlashScrollers);
Note: See TracChangeset for help on using the changeset viewer.