Title: [124924] trunk/Source/WebCore
Revision
124924
Author
[email protected]
Date
2012-08-07 14:54:31 -0700 (Tue, 07 Aug 2012)

Log Message

Knob slot animation is flipped
https://bugs.webkit.org/show_bug.cgi?id=93396

Reviewed by Beth Dakin.

When painting the scrollbar knob slot, use rectForPart: since it correctly takes the expansion transition state into account.

* platform/mac/ScrollbarThemeMac.mm:
(WebCore::scrollbarPainterPaint):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (124923 => 124924)


--- trunk/Source/WebCore/ChangeLog	2012-08-07 21:53:05 UTC (rev 124923)
+++ trunk/Source/WebCore/ChangeLog	2012-08-07 21:54:31 UTC (rev 124924)
@@ -1,3 +1,15 @@
+2012-08-07  Anders Carlsson  <[email protected]>
+
+        Knob slot animation is flipped
+        https://bugs.webkit.org/show_bug.cgi?id=93396
+
+        Reviewed by Beth Dakin.
+
+        When painting the scrollbar knob slot, use rectForPart: since it correctly takes the expansion transition state into account.
+
+        * platform/mac/ScrollbarThemeMac.mm:
+        (WebCore::scrollbarPainterPaint):
+
 2012-08-07  Adrienne Walker  <[email protected]>
 
         50% fixed position coverage slow scroll heuristic is incorrect when invalidations aren't clipped

Modified: trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm (124923 => 124924)


--- trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm	2012-08-07 21:53:05 UTC (rev 124923)
+++ trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm	2012-08-07 21:54:31 UTC (rev 124924)
@@ -484,13 +484,8 @@
     [scrollbarPainter setDoubleValue:value];
     [scrollbarPainter setKnobProportion:proportion];
 
-    // The scrollbar's frameRect includes a side inset for overlay scrollers, so we have to use the 
-    // trackWidth for drawKnobSlotInRect
-    NSRect trackRect;
-    if ([scrollbarPainter isHorizontal])
-        trackRect = NSMakeRect(0, 0, frameRect.size.width, [scrollbarPainter trackWidth]);
-    else
-        trackRect = NSMakeRect(0, 0, [scrollbarPainter trackWidth], frameRect.size.height);
+    // Use rectForPart: here; it will take the expansion transition progress into account.
+    NSRect trackRect = [scrollbarPainter rectForPart:NSScrollerKnobSlot];
     [scrollbarPainter drawKnobSlotInRect:trackRect highlight:NO];
 
     // If the scrollbar is not enabled, then there is nothing to scroll to, and we shouldn't
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to