[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
eric at webkit.org
eric at webkit.org
Thu Oct 29 20:46:53 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit b331a6603cdd6a104b59433332d0ff0e5518ce43
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Oct 17 15:45:32 2009 +0000
2009-10-17 Alpha Lam <hclam at chromium.org>
Reviewed by Eric Seidel.
[chromium] Video controls not zoomed / transformed correctly
https://bugs.webkit.org/show_bug.cgi?id=30461
Draw the images in the controls scaled.
No new tests. With this change Chromium will pass the following tests:
LayoutTests/media/video-controls-zoomed.html
LayoutTests/media/video-controls-transformed.html
* rendering/RenderMediaControlsChromium.cpp:
(WebCore::paintMediaButton):
Pass along the target rect directly.
(WebCore::RenderMediaControlsChromium::adjustMediaSliderThumbSize):
Adjust the thumb slide applied with the scale factor.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 709f3ae..b3621d0 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2009-10-17 Alpha Lam <hclam at chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [chromium] Video controls not zoomed / transformed correctly
+ https://bugs.webkit.org/show_bug.cgi?id=30461
+
+ Draw the images in the controls scaled.
+
+ No new tests. With this change Chromium will pass the following tests:
+ LayoutTests/media/video-controls-zoomed.html
+ LayoutTests/media/video-controls-transformed.html
+
+ * rendering/RenderMediaControlsChromium.cpp:
+ (WebCore::paintMediaButton):
+ Pass along the target rect directly.
+ (WebCore::RenderMediaControlsChromium::adjustMediaSliderThumbSize):
+ Adjust the thumb slide applied with the scale factor.
+
2009-10-17 Laszlo Gombos <laszlo.1.gombos at nokia.com>
Unreviewed.
diff --git a/WebCore/rendering/RenderMediaControlsChromium.cpp b/WebCore/rendering/RenderMediaControlsChromium.cpp
index c49204c..9d675ea 100644
--- a/WebCore/rendering/RenderMediaControlsChromium.cpp
+++ b/WebCore/rendering/RenderMediaControlsChromium.cpp
@@ -56,12 +56,8 @@ static Image* platformResource(const char* name)
static bool paintMediaButton(GraphicsContext* context, const IntRect& rect, Image* image)
{
- // Create a destination rectangle for the image that is centered in the drawing rectangle, rounded left, and down.
IntRect imageRect = image->rect();
- imageRect.setY(rect.y() + (rect.height() - image->height() + 1) / 2);
- imageRect.setX(rect.x() + (rect.width() - image->width() + 1) / 2);
-
- context->drawImage(image, imageRect);
+ context->drawImage(image, rect);
return true;
}
@@ -278,9 +274,10 @@ void RenderMediaControlsChromium::adjustMediaSliderThumbSize(RenderObject* objec
else if (object->style()->appearance() == MediaVolumeSliderThumbPart)
thumbImage = mediaVolumeSliderThumb;
+ float zoomLevel = object->style()->effectiveZoom();
if (thumbImage) {
- object->style()->setWidth(Length(thumbImage->width(), Fixed));
- object->style()->setHeight(Length(thumbImage->height(), Fixed));
+ object->style()->setWidth(Length(static_cast<int>(thumbImage->width() * zoomLevel), Fixed));
+ object->style()->setHeight(Length(static_cast<int>(thumbImage->height() * zoomLevel), Fixed));
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list