https://bugs.webkit.org/show_bug.cgi?id=83844
Patch by Sailesh Agrawal <sail@chromium.org> on 2012-04-12
Reviewed by James Robinson.
On Mountain Lion overlay scrollbars have a new expanded mode. In expanded mode the scrolllbar is slightly wider which causes the tickmarks to look incorrect. Fix was to explicitly enter expanded mode to get the correct look.
Screenshots:
broken: http://i.imgur.com/PDKYH.png
fixed: http://i.imgur.com/utp0Y.png
* platform/chromium/ScrollbarThemeChromiumMac.mm:
(WebCore::ScrollbarThemeChromiumMac::paint): Called setExpanded if API is available.
* platform/mac/NSScrollerImpDetails.h: Exposed the isExpanded: API.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114088
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-04-12 Sailesh Agrawal <sail@chromium.org>
+
+ Chromium: Fix scrollbar tickmark drawing on Mountain Lion
+ https://bugs.webkit.org/show_bug.cgi?id=83844
+
+ Reviewed by James Robinson.
+
+ On Mountain Lion overlay scrollbars have a new expanded mode. In expanded mode the scrolllbar is slightly wider which causes the tickmarks to look incorrect. Fix was to explicitly enter expanded mode to get the correct look.
+ Screenshots:
+ broken: http://i.imgur.com/PDKYH.png
+ fixed: http://i.imgur.com/utp0Y.png
+
+ * platform/chromium/ScrollbarThemeChromiumMac.mm:
+ (WebCore::ScrollbarThemeChromiumMac::paint): Called setExpanded if API is available.
+ * platform/mac/NSScrollerImpDetails.h: Exposed the isExpanded: API.
+
2012-04-12 Kent Tamura <tkent@chromium.org>
LocalizedDateICU should ignore timezones
CGFloat oldKnobAlpha = 0;
CGFloat oldTrackAlpha = 0;
+ BOOL oldIsExpanded = NO;
bool hasTickmarks = tickmarks.size() > 0 && scrollbar->orientation() == VerticalScrollbar;
ScrollbarPainter scrollbarPainter = painterForScrollbar(scrollbar);
if (hasTickmarks) {
[scrollbarPainter setKnobAlpha:1.0];
oldTrackAlpha = [scrollbarPainter trackAlpha];
[scrollbarPainter setTrackAlpha:1.0];
+ if ([scrollbarPainter respondsToSelector:@selector(setExpanded:)]) {
+ oldIsExpanded = [scrollbarPainter isExpanded];
+ [scrollbarPainter setExpanded:YES];
+ }
}
GraphicsContextStateSaver stateSaver(*context);
if (hasTickmarks) {
[scrollbarPainter setKnobAlpha:oldKnobAlpha];
[scrollbarPainter setTrackAlpha:oldTrackAlpha];
+ if ([scrollbarPainter respondsToSelector:@selector(setExpanded:)])
+ [scrollbarPainter setExpanded:oldIsExpanded];
}
return true;
- (void)setKnobProportion:(CGFloat)proportion;
- (void)setKnobStyle:(NSScrollerKnobStyle)knobStyle;
- (void)setExpanded:(BOOL)expanded;
+- (BOOL)isExpanded;
- (void)setDelegate:(id)delegate;
- (void)setUiStateTransitionProgress:(CGFloat)uiStateTransitionProgress;
- (BOOL)isHorizontal;