Changeset 92248 in webkit


Ignore:
Timestamp:
Aug 2, 2011 5:02:01 PM (13 years ago)
Author:
zmo@google.com
Message:

Unreviewed, rolling out r92238.
http://trac.webkit.org/changeset/92238
https://bugs.webkit.org/show_bug.cgi?id=65555

fail fast/events/scrollbar-double-click.html on Mac

  • platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h:
  • platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm:
  • platform/chromium/ScrollbarThemeChromiumMac.h:
  • platform/chromium/ScrollbarThemeChromiumMac.mm:

(WebCore::ScrollbarThemeChromiumMac::registerScrollbar):
(WebCore::ScrollbarThemeChromiumMac::setNewPainterForScrollbar):
(WebCore::toScrollbarPainterKnobStyle):
(WebCore::ScrollbarThemeChromiumMac::paint):

Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r92247 r92248  
     12011-08-02  Zhenyao Mo  <zmo@google.com>
     2
     3        Unreviewed, rolling out r92238.
     4        http://trac.webkit.org/changeset/92238
     5        https://bugs.webkit.org/show_bug.cgi?id=65555
     6
     7        fail fast/events/scrollbar-double-click.html on Mac
     8
     9        * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h:
     10        * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm:
     11        * platform/chromium/ScrollbarThemeChromiumMac.h:
     12        * platform/chromium/ScrollbarThemeChromiumMac.mm:
     13        (WebCore::ScrollbarThemeChromiumMac::registerScrollbar):
     14        (WebCore::ScrollbarThemeChromiumMac::setNewPainterForScrollbar):
     15        (WebCore::toScrollbarPainterKnobStyle):
     16        (WebCore::ScrollbarThemeChromiumMac::paint):
     17
    1182011-08-02  Mark Pilgrim  <pilgrim@chromium.org>
    219
  • trunk/Source/WebCore/platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h

    r92238 r92248  
    6262int wkScrollbarMinimumThumbLength(WKScrollbarPainterRef);
    6363void wkScrollbarPainterSetDelegate(WKScrollbarPainterRef, id scrollbarPainterDelegate);
    64 void wkScrollbarPainterSetEnabled(WKScrollbarPainterRef, bool enabled);
    6564CGFloat wkScrollbarPainterTrackAlpha(WKScrollbarPainterRef);
    6665WKScrollbarPainterRef wkMakeScrollbarPainter(int controlSize, bool isHorizontal);
  • trunk/Source/WebCore/platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm

    r92238 r92248  
    188188}
    189189
    190 void wkScrollbarPainterSetEnabled(WKScrollbarPainterRef painter, bool enabled)
    191 {
    192     [painter setEnabled:enabled];
    193 }
    194 
    195190CGFloat wkScrollbarPainterTrackAlpha(WKScrollbarPainterRef painter)
    196191{
  • trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.h

    r92238 r92248  
    4141    virtual ~ScrollbarThemeChromiumMac();
    4242
    43     virtual void updateEnabledState(Scrollbar*);
    44 
    4543    virtual bool paint(Scrollbar*, GraphicsContext* context, const IntRect& damageRect);
    4644
     
    4947    virtual bool supportsControlTints() const { return true; }
    5048    virtual bool usesOverlayScrollbars() const;
    51     virtual void updateScrollbarOverlayStyle(Scrollbar*);
    5249
    5350    virtual double initialAutoscrollTimerDelay();
     
    7067    virtual IntRect trackRect(Scrollbar*, bool painting = false);
    7168
    72     virtual int maxOverlapBetweenPages() { return 40; }
    73 
    7469    virtual int minimumThumbLength(Scrollbar*);
    7570
  • trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.mm

    r92238 r92248  
    164164    WKScrollbarPainterRef scrollbarPainter = wkMakeScrollbarPainter(scrollbar->controlSize(), isHorizontal);
    165165    scrollbarMap()->add(scrollbar, scrollbarPainter);
    166     updateEnabledState(scrollbar);
    167     updateScrollbarOverlayStyle(scrollbar);
    168166}
    169167
     
    176174{
    177175    scrollbarMap()->set(scrollbar, newPainter);
    178     updateEnabledState(scrollbar);
    179     updateScrollbarOverlayStyle(scrollbar);
    180176}
    181177
     
    223219    else
    224220        return false;
    225 }
    226 
    227 static inline wkScrollerKnobStyle toScrollbarPainterKnobStyle(ScrollbarOverlayStyle style)
    228 {
    229     switch (style) {
    230     case ScrollbarOverlayStyleDark:
    231         return wkScrollerKnobStyleDark;
    232     case ScrollbarOverlayStyleLight:
    233         return wkScrollerKnobStyleLight;
    234     default:
    235         return wkScrollerKnobStyleDefault;
    236     }
    237 }
    238 
    239 void ScrollbarThemeChromiumMac::updateScrollbarOverlayStyle(Scrollbar* scrollbar)
    240 {
    241     if (isScrollbarOverlayAPIAvailable()) {
    242         wkSetScrollbarPainterKnobStyle(painterForScrollbar(scrollbar), toScrollbarPainterKnobStyle(scrollbar->scrollableArea()->scrollbarOverlayStyle()));
    243     }
    244221}
    245222
     
    448425}
    449426
     427static inline wkScrollerKnobStyle toScrollbarPainterKnobStyle(ScrollbarOverlayStyle style)
     428{
     429    switch (style) {
     430    case ScrollbarOverlayStyleDark:
     431        return wkScrollerKnobStyleDark;
     432    case ScrollbarOverlayStyleLight:
     433        return wkScrollerKnobStyleLight;
     434    default:
     435        return wkScrollerKnobStyleDefault;
     436    }
     437}
     438
    450439static PlatformBridge::ThemePaintState scrollbarStateToThemeState(Scrollbar* scrollbar) {
    451440    if (!scrollbar->enabled())
     
    457446
    458447    return PlatformBridge::StateActive;
    459 }
    460 
    461 void ScrollbarThemeChromiumMac::updateEnabledState(Scrollbar* scrollbar)
    462 {
    463     if (isScrollbarOverlayAPIAvailable()) {
    464         wkScrollbarPainterSetEnabled(scrollbarMap()->get(scrollbar).get(), scrollbar->enabled());
    465     }
    466448}
    467449
     
    496478#endif
    497479
     480        wkSetScrollbarPainterKnobStyle(painterForScrollbar(scrollbar), toScrollbarPainterKnobStyle(scrollbar->scrollableArea()->scrollbarOverlayStyle()));
     481
    498482        GraphicsContextStateSaver stateSaver(*context);
    499483        context->clip(damageRect);
Note: See TracChangeset for help on using the changeset viewer.