- Revision
- 127168
- Author
- [email protected]
- Date
- 2012-08-30 11:53:02 -0700 (Thu, 30 Aug 2012)
Log Message
[Chromium] The CC button is not painted
https://bugs.webkit.org/show_bug.cgi?id=95395
Reviewed by Eric Carlson.
Source/WebCore:
The actual Chromium resource for the CC button was not used by the Chromium theme.
Existing track rendering tests will be rebaselined and contain the new CC button.
* rendering/RenderMediaControlsChromium.cpp:
(WebCore::paintMediaClosedCaptionsButton): Added for proper painting of the resource.
(WebCore):
(WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
Changed to call paintMediaClosedCaptionsButton when the control is the CC button.
* rendering/RenderThemeChromiumSkia.cpp:
(WebCore::RenderThemeChromiumSkia::paintMediaToggleClosedCaptionsButton):
Implemented proper behaviour.
(WebCore):
* rendering/RenderThemeChromiumSkia.h:
(RenderThemeChromiumSkia):
LayoutTests:
No new tests, the existing ones will need to be rebaselined and include the CC button.
* platform/chromium/TestExpectations: Marked tests failing accordingly for rebaselining.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (127167 => 127168)
--- trunk/LayoutTests/ChangeLog 2012-08-30 18:45:03 UTC (rev 127167)
+++ trunk/LayoutTests/ChangeLog 2012-08-30 18:53:02 UTC (rev 127168)
@@ -1,3 +1,14 @@
+2012-08-30 Victor Carbune <[email protected]>
+
+ [Chromium] The CC button is not painted
+ https://bugs.webkit.org/show_bug.cgi?id=95395
+
+ Reviewed by Eric Carlson.
+
+ No new tests, the existing ones will need to be rebaselined and include the CC button.
+
+ * platform/chromium/TestExpectations: Marked tests failing accordingly for rebaselining.
+
2012-08-30 Jessie Berlin <[email protected]>
Assertion failure in MessagePort::contextDestroyed in
Modified: trunk/LayoutTests/platform/chromium/TestExpectations (127167 => 127168)
--- trunk/LayoutTests/platform/chromium/TestExpectations 2012-08-30 18:45:03 UTC (rev 127167)
+++ trunk/LayoutTests/platform/chromium/TestExpectations 2012-08-30 18:53:02 UTC (rev 127168)
@@ -3612,6 +3612,10 @@
BUGWK95101 SNOWLEOPARD : fast/text/atsui-bidi-control.html = PASS TIMEOUT
+// These need new baselines: both new tests and new CC button has just been added.
+BUGWK95395 : media/track/track-cue-rendering-horizontal.html = IMAGE+TEXT
+BUGWK95395 : media/track/track-cue-rendering-vertical.html = IMAGE+TEXT
+
// Failing due to sub-pixel layout.
BUGWK95136 : fast/css/sticky/sticky-left-percentage.html = IMAGE
BUGWK95136 WIN LINUX : fast/css/sticky/sticky-writing-mode-vertical-lr.html = IMAGE
Modified: trunk/Source/WebCore/ChangeLog (127167 => 127168)
--- trunk/Source/WebCore/ChangeLog 2012-08-30 18:45:03 UTC (rev 127167)
+++ trunk/Source/WebCore/ChangeLog 2012-08-30 18:53:02 UTC (rev 127168)
@@ -1,3 +1,26 @@
+2012-08-30 Victor Carbune <[email protected]>
+
+ [Chromium] The CC button is not painted
+ https://bugs.webkit.org/show_bug.cgi?id=95395
+
+ Reviewed by Eric Carlson.
+
+ The actual Chromium resource for the CC button was not used by the Chromium theme.
+
+ Existing track rendering tests will be rebaselined and contain the new CC button.
+
+ * rendering/RenderMediaControlsChromium.cpp:
+ (WebCore::paintMediaClosedCaptionsButton): Added for proper painting of the resource.
+ (WebCore):
+ (WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
+ Changed to call paintMediaClosedCaptionsButton when the control is the CC button.
+ * rendering/RenderThemeChromiumSkia.cpp:
+ (WebCore::RenderThemeChromiumSkia::paintMediaToggleClosedCaptionsButton):
+ Implemented proper behaviour.
+ (WebCore):
+ * rendering/RenderThemeChromiumSkia.h:
+ (RenderThemeChromiumSkia):
+
2012-08-30 Tommy Widenflycht <[email protected]>
MediaStream API: Introduce MediaConstraints
Modified: trunk/Source/WebCore/rendering/RenderMediaControlsChromium.cpp (127167 => 127168)
--- trunk/Source/WebCore/rendering/RenderMediaControlsChromium.cpp 2012-08-30 18:45:03 UTC (rev 127167)
+++ trunk/Source/WebCore/rendering/RenderMediaControlsChromium.cpp 2012-08-30 18:53:02 UTC (rev 127168)
@@ -327,6 +327,17 @@
return paintMediaButton(paintInfo.context, rect, mediaFullscreenButton);
}
+static bool paintMediaClosedCaptionsButton(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
+{
+ HTMLMediaElement* mediaElement = toParentMediaElement(object);
+ if (!mediaElement)
+ return false;
+
+ static Image* mediaClosedCaptionButton = platformResource("mediaplayerClosedCaption");
+ return paintMediaButton(paintInfo.context, rect, mediaClosedCaptionButton);
+}
+
+
bool RenderMediaControlsChromium::paintMediaControlsPart(MediaControlElementType part, RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
{
switch (part) {
@@ -336,6 +347,8 @@
case MediaPauseButton:
case MediaPlayButton:
return paintMediaPlayButton(object, paintInfo, rect);
+ case MediaShowClosedCaptionsButton:
+ return paintMediaClosedCaptionsButton(object, paintInfo, rect);
case MediaSlider:
return paintMediaSlider(object, paintInfo, rect);
case MediaSliderThumb:
@@ -360,7 +373,6 @@
case MediaRewindButton:
case MediaReturnToRealtimeButton:
case MediaStatusDisplay:
- case MediaShowClosedCaptionsButton:
case MediaHideClosedCaptionsButton:
case MediaTextTrackDisplayContainer:
case MediaTextTrackDisplay:
Modified: trunk/Source/WebCore/rendering/RenderThemeChromiumSkia.cpp (127167 => 127168)
--- trunk/Source/WebCore/rendering/RenderThemeChromiumSkia.cpp 2012-08-30 18:45:03 UTC (rev 127167)
+++ trunk/Source/WebCore/rendering/RenderThemeChromiumSkia.cpp 2012-08-30 18:53:02 UTC (rev 127168)
@@ -434,6 +434,18 @@
#endif
}
+bool RenderThemeChromiumSkia::paintMediaToggleClosedCaptionsButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
+{
+#if ENABLE(VIDEO_TRACK)
+ return RenderMediaControlsChromium::paintMediaControlsPart(MediaShowClosedCaptionsButton, o, paintInfo, r);
+#else
+ UNUSED_PARAM(object);
+ UNUSED_PARAM(paintInfo);
+ UNUSED_PARAM(rect);
+ return false;
+#endif
+}
+
bool RenderThemeChromiumSkia::paintMediaVolumeSliderThumb(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
{
#if ENABLE(VIDEO)
Modified: trunk/Source/WebCore/rendering/RenderThemeChromiumSkia.h (127167 => 127168)
--- trunk/Source/WebCore/rendering/RenderThemeChromiumSkia.h 2012-08-30 18:45:03 UTC (rev 127167)
+++ trunk/Source/WebCore/rendering/RenderThemeChromiumSkia.h 2012-08-30 18:53:02 UTC (rev 127168)
@@ -98,6 +98,7 @@
virtual bool paintMediaVolumeSliderTrack(RenderObject*, const PaintInfo&, const IntRect&);
virtual void adjustSliderThumbSize(RenderStyle*, Element*) const;
virtual bool paintMediaSliderThumb(RenderObject*, const PaintInfo&, const IntRect&);
+ virtual bool paintMediaToggleClosedCaptionsButton(RenderObject*, const PaintInfo&, const IntRect&);
virtual bool paintMediaVolumeSliderThumb(RenderObject*, const PaintInfo&, const IntRect&);
virtual bool paintMediaPlayButton(RenderObject*, const PaintInfo&, const IntRect&);
virtual bool paintMediaMuteButton(RenderObject*, const PaintInfo&, const IntRect&);