Changeset 92248 in webkit
- Timestamp:
- Aug 2, 2011, 5:02:01 PM (14 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r92247 r92248 1 2011-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 1 18 2011-08-02 Mark Pilgrim <pilgrim@chromium.org> 2 19 -
trunk/Source/WebCore/platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h
r92238 r92248 62 62 int wkScrollbarMinimumThumbLength(WKScrollbarPainterRef); 63 63 void wkScrollbarPainterSetDelegate(WKScrollbarPainterRef, id scrollbarPainterDelegate); 64 void wkScrollbarPainterSetEnabled(WKScrollbarPainterRef, bool enabled);65 64 CGFloat wkScrollbarPainterTrackAlpha(WKScrollbarPainterRef); 66 65 WKScrollbarPainterRef wkMakeScrollbarPainter(int controlSize, bool isHorizontal); -
trunk/Source/WebCore/platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm
r92238 r92248 188 188 } 189 189 190 void wkScrollbarPainterSetEnabled(WKScrollbarPainterRef painter, bool enabled)191 {192 [painter setEnabled:enabled];193 }194 195 190 CGFloat wkScrollbarPainterTrackAlpha(WKScrollbarPainterRef painter) 196 191 { -
trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.h
r92238 r92248 41 41 virtual ~ScrollbarThemeChromiumMac(); 42 42 43 virtual void updateEnabledState(Scrollbar*);44 45 43 virtual bool paint(Scrollbar*, GraphicsContext* context, const IntRect& damageRect); 46 44 … … 49 47 virtual bool supportsControlTints() const { return true; } 50 48 virtual bool usesOverlayScrollbars() const; 51 virtual void updateScrollbarOverlayStyle(Scrollbar*);52 49 53 50 virtual double initialAutoscrollTimerDelay(); … … 70 67 virtual IntRect trackRect(Scrollbar*, bool painting = false); 71 68 72 virtual int maxOverlapBetweenPages() { return 40; }73 74 69 virtual int minimumThumbLength(Scrollbar*); 75 70 -
trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.mm
r92238 r92248 164 164 WKScrollbarPainterRef scrollbarPainter = wkMakeScrollbarPainter(scrollbar->controlSize(), isHorizontal); 165 165 scrollbarMap()->add(scrollbar, scrollbarPainter); 166 updateEnabledState(scrollbar);167 updateScrollbarOverlayStyle(scrollbar);168 166 } 169 167 … … 176 174 { 177 175 scrollbarMap()->set(scrollbar, newPainter); 178 updateEnabledState(scrollbar);179 updateScrollbarOverlayStyle(scrollbar);180 176 } 181 177 … … 223 219 else 224 220 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 }244 221 } 245 222 … … 448 425 } 449 426 427 static 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 450 439 static PlatformBridge::ThemePaintState scrollbarStateToThemeState(Scrollbar* scrollbar) { 451 440 if (!scrollbar->enabled()) … … 457 446 458 447 return PlatformBridge::StateActive; 459 }460 461 void ScrollbarThemeChromiumMac::updateEnabledState(Scrollbar* scrollbar)462 {463 if (isScrollbarOverlayAPIAvailable()) {464 wkScrollbarPainterSetEnabled(scrollbarMap()->get(scrollbar).get(), scrollbar->enabled());465 }466 448 } 467 449 … … 496 478 #endif 497 479 480 wkSetScrollbarPainterKnobStyle(painterForScrollbar(scrollbar), toScrollbarPainterKnobStyle(scrollbar->scrollableArea()->scrollbarOverlayStyle())); 481 498 482 GraphicsContextStateSaver stateSaver(*context); 499 483 context->clip(damageRect);
Note:
See TracChangeset
for help on using the changeset viewer.