Title: [119789] trunk/Source/WebCore
- Revision
- 119789
- Author
- [email protected]
- Date
- 2012-06-07 20:06:23 -0700 (Thu, 07 Jun 2012)
Log Message
[BlackBerry] Show correct fullscreen button image (media controls)
https://bugs.webkit.org/show_bug.cgi?id=88563
Patch by Max Feil <[email protected]> on 2012-06-07
Reviewed by Antonio Gomes.
PR159306: Show "exit" fullscreen button image instead of "enter"
fullscreen button image when in fullscreen mode (HTML5 media
controls).
I am not providing a test due to the simplicity of this patch
and the relative difficulty and maintainability issues associated
with testing how an image is rendered.
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::paintMediaFullscreenButton):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (119788 => 119789)
--- trunk/Source/WebCore/ChangeLog 2012-06-08 02:59:37 UTC (rev 119788)
+++ trunk/Source/WebCore/ChangeLog 2012-06-08 03:06:23 UTC (rev 119789)
@@ -1,3 +1,21 @@
+2012-06-07 Max Feil <[email protected]>
+
+ [BlackBerry] Show correct fullscreen button image (media controls)
+ https://bugs.webkit.org/show_bug.cgi?id=88563
+
+ Reviewed by Antonio Gomes.
+
+ PR159306: Show "exit" fullscreen button image instead of "enter"
+ fullscreen button image when in fullscreen mode (HTML5 media
+ controls).
+
+ I am not providing a test due to the simplicity of this patch
+ and the relative difficulty and maintainability issues associated
+ with testing how an image is rendered.
+
+ * platform/blackberry/RenderThemeBlackBerry.cpp:
+ (WebCore::RenderThemeBlackBerry::paintMediaFullscreenButton):
+
2012-06-07 Noel Gordon <[email protected]>
[chromium] Use WEBPImportPictureRGBX|BGRX to import picture data
Modified: trunk/Source/WebCore/platform/blackberry/RenderThemeBlackBerry.cpp (119788 => 119789)
--- trunk/Source/WebCore/platform/blackberry/RenderThemeBlackBerry.cpp 2012-06-08 02:59:37 UTC (rev 119788)
+++ trunk/Source/WebCore/platform/blackberry/RenderThemeBlackBerry.cpp 2012-06-08 03:06:23 UTC (rev 119789)
@@ -852,12 +852,19 @@
bool RenderThemeBlackBerry::paintMediaFullscreenButton(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
{
#if ENABLE(VIDEO)
- if (!toParentMediaElement(object))
+ HTMLMediaElement* mediaElement = toParentMediaElement(object);
+ if (!mediaElement)
return false;
- static Image* mediaFullscreen = Image::loadPlatformResource("fullscreen").leakRef();
+ static Image* mediaEnterFullscreen = Image::loadPlatformResource("fullscreen").leakRef();
+ static Image* mediaExitFullscreen = Image::loadPlatformResource("exit_fullscreen").leakRef();
- return paintMediaButton(paintInfo.context, rect, mediaFullscreen);
+ Image* buttonImage = mediaEnterFullscreen;
+#if ENABLE(FULLSCREEN_API)
+ if (mediaElement->document()->webkitIsFullScreen() && mediaElement->document()->webkitCurrentFullScreenElement() == mediaElement)
+ buttonImage = mediaExitFullscreen;
+#endif
+ return paintMediaButton(paintInfo.context, rect, buttonImage);
#else
UNUSED_PARAM(object);
UNUSED_PARAM(paintInfo);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes