2009-06-04 Eric Carlson <eric.carlson@apple.com>
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Jun 2009 21:31:46 +0000 (21:31 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Jun 2009 21:31:46 +0000 (21:31 +0000)
        Reviewed by Simon Fraser.

        <rdar://problem/6854695> Movie controller thumb fails to scale with full page zoom

        Account for zoom level when drawing media controller thumb on Windows.

        * rendering/RenderMediaControls.cpp:
        (WebCore::RenderMediaControls::adjustMediaSliderThumbSize):

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

WebCore/ChangeLog
WebCore/rendering/RenderMediaControls.cpp

index 6ea83f7..10a1049 100644 (file)
@@ -1,3 +1,14 @@
+2009-06-04  Pierre d'Herbemont  <pdherbemont@apple.com>
+
+        Reviewed by Simon Fraser.
+
+        <rdar://problem/6854695> Movie controller thumb fails to scale with full page zoom
+        
+        Account for zoom level when drawing media controller thumb on Windows.
+
+        * rendering/RenderMediaControls.cpp:
+        (WebCore::RenderMediaControls::adjustMediaSliderThumbSize):
+
 2009-06-04  David Hyatt  <hyatt@apple.com>
 
         Reviewed by Sam Weinig.
index 2b0b816..f1ff55f 100644 (file)
@@ -76,8 +76,9 @@ void RenderMediaControls::adjustMediaSliderThumbSize(RenderObject* o)
     if (o->style()->appearance() != MediaSliderThumbPart)
         return;
 
-    o->style()->setWidth(Length(mediaSliderThumbWidth, Fixed));
-    o->style()->setHeight(Length(mediaSliderThumbHeight, Fixed));
+    float zoomLevel = o->style()->effectiveZoom();
+    o->style()->setWidth(Length(static_cast<int>(mediaSliderThumbWidth * zoomLevel), Fixed));
+    o->style()->setHeight(Length(static_cast<int>(mediaSliderThumbHeight * zoomLevel), Fixed));
 }
 
 static HTMLMediaElement* parentMediaElement(RenderObject* o)