Title: [104860] trunk/Source/WebCore
- Revision
- 104860
- Author
- [email protected]
- Date
- 2012-01-12 14:18:07 -0800 (Thu, 12 Jan 2012)
Log Message
https://bugs.webkit.org/show_bug.cgi?id=76209
Support expanded scrollbars
-and corresponding-
<rdar://problem/10527734>
Reviewed by Sam Weinig.
All this really requires is leaving the proper amount of space for the
expanded width.
* platform/mac/NSScrollerImpDetails.h:
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::supportsExpandedScrollbars):
(WebCore::ScrollbarThemeMac::scrollbarThickness):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (104859 => 104860)
--- trunk/Source/WebCore/ChangeLog 2012-01-12 22:15:50 UTC (rev 104859)
+++ trunk/Source/WebCore/ChangeLog 2012-01-12 22:18:07 UTC (rev 104860)
@@ -1,3 +1,19 @@
+2012-01-12 Beth Dakin <[email protected]>
+
+ https://bugs.webkit.org/show_bug.cgi?id=76209
+ Support expanded scrollbars
+ -and corresponding-
+ <rdar://problem/10527734>
+
+ Reviewed by Sam Weinig.
+
+ All this really requires is leaving the proper amount of space for the
+ expanded width.
+ * platform/mac/NSScrollerImpDetails.h:
+ * platform/mac/ScrollbarThemeMac.mm:
+ (WebCore::supportsExpandedScrollbars):
+ (WebCore::ScrollbarThemeMac::scrollbarThickness):
+
2011-12-12 Jer Noble <[email protected]>
WebAudio: Enable USE_CONCATENATED_IMPULSE_RESPONSES on Mac port.
Modified: trunk/Source/WebCore/platform/mac/NSScrollerImpDetails.h (104859 => 104860)
--- trunk/Source/WebCore/platform/mac/NSScrollerImpDetails.h 2012-01-12 22:15:50 UTC (rev 104859)
+++ trunk/Source/WebCore/platform/mac/NSScrollerImpDetails.h 2012-01-12 22:18:07 UTC (rev 104860)
@@ -61,6 +61,7 @@
- (void)setDoubleValue:(double)doubleValue;
- (void)setKnobProportion:(CGFloat)proportion;
- (void)setKnobStyle:(NSScrollerKnobStyle)knobStyle;
+- (void)setExpanded:(BOOL)expanded;
- (void)setDelegate:(id)delegate;
- (void)setUiStateTransitionProgress:(CGFloat)uiStateTransitionProgress;
- (BOOL)isHorizontal;
Modified: trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm (104859 => 104860)
--- trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm 2012-01-12 22:15:50 UTC (rev 104859)
+++ trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm 2012-01-12 22:18:07 UTC (rev 104860)
@@ -133,6 +133,13 @@
static ScrollbarButtonsPlacement gButtonPlacement = ScrollbarButtonsDoubleEnd;
+static bool supportsExpandedScrollbars()
+{
+ // FIXME: This is temporary until all platforms that support ScrollbarPainter support this part of the API.
+ static bool globalSupportsExpandedScrollbars = [NSClassFromString(@"NSScrollerImp") instancesRespondToSelector:@selector(isExpanded)];
+ return globalSupportsExpandedScrollbars;
+}
+
static void updateArrowPlacement()
{
if (isScrollbarOverlayAPIAvailable())
@@ -222,6 +229,8 @@
{
if (isScrollbarOverlayAPIAvailable()) {
ScrollbarPainter scrollbarPainter = [NSClassFromString(@"NSScrollerImp") scrollerImpWithStyle:recommendedScrollerStyle() controlSize:controlSize horizontal:NO replacingScrollerImp:nil];
+ if (supportsExpandedScrollbars())
+ [scrollbarPainter setExpanded:YES];
return [scrollbarPainter trackBoxWidth];
} else
return cScrollbarThickness[controlSize];
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes