<rdar://problem/10350775> REGRESSION (r97032): Slider thumb is not drawn
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Oct 2011 21:41:01 +0000 (21:41 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Oct 2011 21:41:01 +0000 (21:41 +0000)
https://bugs.webkit.org/show_bug.cgi?id=70891

Reviewed by Anders Carlsson.

* platform/mac/ThemeMac.mm:
(WebCore::ThemeMac::ensuredView): Set the WebCoreFlippedView’s size, because NSSliderCell
always shrinks the slider thumb to fit in the control view’s bounds.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSliderThumb): Removed workaround code no longer needed after
r97032.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@98520 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/mac/ThemeMac.mm
Source/WebCore/rendering/RenderThemeMac.mm

index b7f5b42a7985a0f64c51eec6612f229a571ade66..42c302cf02b1112d362bfe537e81a25facf7b99f 100644 (file)
@@ -1,3 +1,17 @@
+2011-10-26  Dan Bernstein  <mitz@apple.com>
+
+        <rdar://problem/10350775> REGRESSION (r97032): Slider thumb is not drawn
+        https://bugs.webkit.org/show_bug.cgi?id=70891
+
+        Reviewed by Anders Carlsson.
+
+        * platform/mac/ThemeMac.mm:
+        (WebCore::ThemeMac::ensuredView): Set the WebCoreFlippedView’s size, because NSSliderCell
+        always shrinks the slider thumb to fit in the control view’s bounds.
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::paintSliderThumb): Removed workaround code no longer needed after
+        r97032.
+
 2011-10-26  Chris Rogers  <crogers@google.com>
 
         Add AudioSourceProviderClient and setFormat() method so we can know audio stream format
index 480354df91a85e6211222788569904f2e07d48f0..e765d260920eddbc1df17e63bac492172f4c6333 100644 (file)
@@ -557,7 +557,8 @@ NSView *ThemeMac::ensuredView(ScrollView* scrollView)
     
     // Use a fake flipped view.
     static NSView *flippedView = [[WebCoreFlippedView alloc] init];
-    
+    [flippedView setFrameSize:scrollView->contentsSize()];
+
     return flippedView;
 }
     
index 445f02d3b2730b45cbcdda4fd34ff7213bbe2d6b..6999a3a10b67ea915ab3906cdc796346d2fbfb8b 100644 (file)
@@ -1394,20 +1394,7 @@ bool RenderThemeMac::paintSliderThumb(RenderObject* o, const PaintInfo& paintInf
         paintInfo.context->scale(FloatSize(zoomLevel, zoomLevel));
         paintInfo.context->translate(-unzoomedRect.x(), -unzoomedRect.y());
     }
-    
-#if PLATFORM(MAC)
-    // Workaround for <rdar://problem/9421781>.
-    if (!o->view()->frameView()->documentView()) {
-        paintInfo.context->translate(0, unzoomedRect.y());
-        paintInfo.context->scale(FloatSize(1, -1));
-        paintInfo.context->translate(0, -(unzoomedRect.y() + unzoomedRect.height()));
-    }
-#elif PLATFORM(CHROMIUM)
-    paintInfo.context->translate(0, unzoomedRect.y());
-    paintInfo.context->scale(FloatSize(1, -1));
-    paintInfo.context->translate(0, -(unzoomedRect.y() + unzoomedRect.height()));
-#endif
-    
+
     [sliderThumbCell drawInteriorWithFrame:unzoomedRect inView:documentViewFor(o)];
     [sliderThumbCell setControlView:nil];