Changeset 49740 in webkit
- Timestamp:
- Oct 17, 2009 8:45:32 AM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r49739 r49740 1 2009-10-17 Alpha Lam <hclam@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 [chromium] Video controls not zoomed / transformed correctly 6 https://bugs.webkit.org/show_bug.cgi?id=30461 7 8 Draw the images in the controls scaled. 9 10 No new tests. With this change Chromium will pass the following tests: 11 LayoutTests/media/video-controls-zoomed.html 12 LayoutTests/media/video-controls-transformed.html 13 14 * rendering/RenderMediaControlsChromium.cpp: 15 (WebCore::paintMediaButton): 16 Pass along the target rect directly. 17 (WebCore::RenderMediaControlsChromium::adjustMediaSliderThumbSize): 18 Adjust the thumb slide applied with the scale factor. 19 1 20 2009-10-17 Laszlo Gombos <laszlo.1.gombos@nokia.com> 2 21 -
trunk/WebCore/rendering/RenderMediaControlsChromium.cpp
r49697 r49740 57 57 static bool paintMediaButton(GraphicsContext* context, const IntRect& rect, Image* image) 58 58 { 59 // Create a destination rectangle for the image that is centered in the drawing rectangle, rounded left, and down.60 59 IntRect imageRect = image->rect(); 61 imageRect.setY(rect.y() + (rect.height() - image->height() + 1) / 2); 62 imageRect.setX(rect.x() + (rect.width() - image->width() + 1) / 2); 63 64 context->drawImage(image, imageRect); 60 context->drawImage(image, rect); 65 61 return true; 66 62 } … … 279 275 thumbImage = mediaVolumeSliderThumb; 280 276 277 float zoomLevel = object->style()->effectiveZoom(); 281 278 if (thumbImage) { 282 object->style()->setWidth(Length( thumbImage->width(), Fixed));283 object->style()->setHeight(Length( thumbImage->height(), Fixed));279 object->style()->setWidth(Length(static_cast<int>(thumbImage->width() * zoomLevel), Fixed)); 280 object->style()->setHeight(Length(static_cast<int>(thumbImage->height() * zoomLevel), Fixed)); 284 281 } 285 282 }
Note: See TracChangeset
for help on using the changeset viewer.