Title: [120171] trunk/Source/WebCore
Revision
120171
Author
[email protected]
Date
2012-06-13 01:19:17 -0700 (Wed, 13 Jun 2012)

Log Message

Change the styling of the Chromium video controls.
https://bugs.webkit.org/show_bug.cgi?id=88297

Patch by Silvia Pfeiffer <[email protected]> on 2012-06-13
Reviewed by Eric Carlson.

No new tests, final patch will contain the rebaselined tests.

The Chrome video controls are receiving a visual update. This patch includes CSS changes,
the removal of the now no longer needed controls background div, and the introduction of
new images for the buttons.

* css/mediaControlsChromium.css:
(audio):
Adjust height of audio controls.
(::-webkit-media-controls):
Use flexbox on media controls shadow DOM.
(audio::-webkit-media-controls-enclosure, video::-webkit-media-controls-enclosure):
Adjust height, max-width, text-indent and box-sizing, and reset padding to 0.
(video::-webkit-media-controls-enclosure):
Use 5px padding only for video controls and adjust height accordingly.
(audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
Use flexbox on panel, adjust bottom alignment, height, background color and border radius.
(audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
Display buttons inline with fixed width and height, vertically centered, no padding and
6px space to next controls element (this will be 15px incl the space in the image).
(audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
Display buttons inline with fixed width and height, vertically centered, no padding and
9px space to next controls element (this will be 15px incl the space in the image).
(audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
Display text as block, without broder, adjusted height, font-family, font-size and 9px space
to next controls element (this will be 15px incl the space in the image).
(audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
Adjust height, padding, background-color, min-wdith and 15px space to next controls element.
(audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
Adjust height, max- and min-width, background-color and 15px space to next controls element.
* html/shadow/MediaControlRootElementChromium.cpp:
(WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
Remove timeline container, which is not necessary any longer because of the use of flexbox.
(WebCore::MediaControlRootElementChromium::create):
Remove timeline container, which is not necessary any longer because of the use of flexbox.
(WebCore::MediaControlRootElementChromium::setMediaController):
Remove timeline container, which is not necessary any longer because of the use of flexbox.
(WebCore::MediaControlRootElementChromium::reset):
Show the timeline instead of the timeline container when resetting.
(WebCore::MediaControlRootElementChromium::reportedError):
Hide the timeline instead of the timeline container when running into an error.
* rendering/RenderMediaControlsChromium.cpp:
(WebCore::paintMediaMuteButton):
Introduce new image resources for the mute button and adjust it based on volume levels.
(WebCore::paintMediaPlayButton):
Introduce new image resources for the play button.
(WebCore::getMediaSliderThumb):
Introduce new image resources for the position slider thumb.
(WebCore::paintMediaVolumeSliderThumb):
Introduce new image resources for the volume slider thumb.
Remove timeline container rendering.
(WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
Add timeline container painting to the "not reached" elements.
(WebCore):
Provide size settings for the position and volume sliders.
(WebCore::RenderMediaControlsChromium::adjustMediaSliderThumbSize):
Calculate correct width and height settings for the new image resources of the position and volume
slider thumbs.
* rendering/RenderThemeChromiumMac.h:
(RenderThemeChromiumMac):
Remove timeline container rendering (i.e. the media controls background).
* rendering/RenderThemeChromiumMac.mm:
Remove timeline container rendering (i.e. the media controls background).
* rendering/RenderThemeChromiumSkia.cpp:
Remove timeline container rendering (i.e. the media controls background).
* rendering/RenderThemeChromiumSkia.h:
(RenderThemeChromiumSkia):
Remove timeline container rendering (i.e. the media controls background).

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (120170 => 120171)


--- trunk/Source/WebCore/ChangeLog	2012-06-13 08:18:10 UTC (rev 120170)
+++ trunk/Source/WebCore/ChangeLog	2012-06-13 08:19:17 UTC (rev 120171)
@@ -1,3 +1,79 @@
+2012-06-13  Silvia Pfeiffer  <[email protected]>
+
+        Change the styling of the Chromium video controls.
+        https://bugs.webkit.org/show_bug.cgi?id=88297
+
+        Reviewed by Eric Carlson.
+
+        No new tests, final patch will contain the rebaselined tests.
+
+        The Chrome video controls are receiving a visual update. This patch includes CSS changes,
+        the removal of the now no longer needed controls background div, and the introduction of
+        new images for the buttons.
+
+        * css/mediaControlsChromium.css:
+        (audio):
+        Adjust height of audio controls.
+        (::-webkit-media-controls):
+        Use flexbox on media controls shadow DOM.
+        (audio::-webkit-media-controls-enclosure, video::-webkit-media-controls-enclosure):
+        Adjust height, max-width, text-indent and box-sizing, and reset padding to 0.
+        (video::-webkit-media-controls-enclosure):
+        Use 5px padding only for video controls and adjust height accordingly.
+        (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
+        Use flexbox on panel, adjust bottom alignment, height, background color and border radius.
+        (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
+        Display buttons inline with fixed width and height, vertically centered, no padding and
+        6px space to next controls element (this will be 15px incl the space in the image).
+        (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
+        Display buttons inline with fixed width and height, vertically centered, no padding and
+        9px space to next controls element (this will be 15px incl the space in the image).
+        (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
+        Display text as block, without broder, adjusted height, font-family, font-size and 9px space
+        to next controls element (this will be 15px incl the space in the image).
+        (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
+        Adjust height, padding, background-color, min-wdith and 15px space to next controls element.
+        (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
+        Adjust height, max- and min-width, background-color and 15px space to next controls element.
+        * html/shadow/MediaControlRootElementChromium.cpp:
+        (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
+        Remove timeline container, which is not necessary any longer because of the use of flexbox.
+        (WebCore::MediaControlRootElementChromium::create):
+        Remove timeline container, which is not necessary any longer because of the use of flexbox.
+        (WebCore::MediaControlRootElementChromium::setMediaController):
+        Remove timeline container, which is not necessary any longer because of the use of flexbox.
+        (WebCore::MediaControlRootElementChromium::reset):
+        Show the timeline instead of the timeline container when resetting.
+        (WebCore::MediaControlRootElementChromium::reportedError):
+        Hide the timeline instead of the timeline container when running into an error.
+        * rendering/RenderMediaControlsChromium.cpp:
+        (WebCore::paintMediaMuteButton):
+        Introduce new image resources for the mute button and adjust it based on volume levels.
+        (WebCore::paintMediaPlayButton):
+        Introduce new image resources for the play button.
+        (WebCore::getMediaSliderThumb):
+        Introduce new image resources for the position slider thumb.
+        (WebCore::paintMediaVolumeSliderThumb):
+        Introduce new image resources for the volume slider thumb.
+        Remove timeline container rendering.
+        (WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
+        Add timeline container painting to the "not reached" elements.
+        (WebCore):
+        Provide size settings for the position and volume sliders.
+        (WebCore::RenderMediaControlsChromium::adjustMediaSliderThumbSize):
+        Calculate correct width and height settings for the new image resources of the position and volume
+        slider thumbs.
+        * rendering/RenderThemeChromiumMac.h:
+        (RenderThemeChromiumMac):
+        Remove timeline container rendering (i.e. the media controls background).
+        * rendering/RenderThemeChromiumMac.mm:
+        Remove timeline container rendering (i.e. the media controls background).
+        * rendering/RenderThemeChromiumSkia.cpp:
+        Remove timeline container rendering (i.e. the media controls background).
+        * rendering/RenderThemeChromiumSkia.h:
+        (RenderThemeChromiumSkia):
+        Remove timeline container rendering (i.e. the media controls background).
+
 2012-06-13  Kinuko Yasuda  <[email protected]>
 
         Unreviewed, fixing English nits suggested by review for r120165.

Modified: trunk/Source/WebCore/css/mediaControlsChromium.css (120170 => 120171)


--- trunk/Source/WebCore/css/mediaControlsChromium.css	2012-06-13 08:18:10 UTC (rev 120170)
+++ trunk/Source/WebCore/css/mediaControlsChromium.css	2012-06-13 08:19:17 UTC (rev 120171)
@@ -31,7 +31,7 @@
 
 audio {
     width: 300px;
-    height: 32px;
+    height: 30px;
 }
 
 audio:-webkit-full-page-media, video:-webkit-full-page-media {
@@ -39,75 +39,78 @@
     max-width: 100%;
 }
 
+::-webkit-media-controls {
+    display: -webkit-box;
+    -webkit-box-orient: vertical;
+    -webkit-box-pack: end;
+    -webkit-box-align: center;
+}
+
 audio::-webkit-media-controls-enclosure, video::-webkit-media-controls-enclosure {
     width: 100%;
-    height: 32px;
+    max-width: 800px;
+    height: 30px;
     bottom: 0;
+    text-indent: 0;
+    padding: 0;
+    box-sizing: border-box;
 }
 
-audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel {
-    -webkit-user-select: none;
-    -webkit-box-pack: end;
-    position: relative;
-    overflow: visible;
-    bottom: 0;
-    width: 100%;
-    height: 32px;
-    z-index: 0;
-    background-color: rgba(0, 0, 0, 0.6);
+video::-webkit-media-controls-enclosure {
+    padding: 0px 5px 5px 5px;
+    height: 35px;
 }
 
-video:-webkit-full-page-media::-webkit-media-controls-panel {
-    bottom: 0px;
-}
-
 audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel {
-    -webkit-box-align: end;
+    display: -webkit-box;
+    -webkit-box-orient: horizontal;
+    -webkit-box-align: center;
+    -webkit-box-pack: center;
+    bottom: auto;
+    height: 30px;
+    background-color: rgba(20, 20, 20, 0.8);
+    border-radius: 5px;
 }
 
 audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button {
     -webkit-appearance: media-mute-button;
-    width: 34px;
-    height: 32px;
+    display: inline;
+    border: none;
+    box-sizing: border-box;
+    width: 35px;
+    height: 30px;
+    line-height: 30px;
+    margin: 0 6px 0 0;
+    padding: 0;
 }
 
 audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button {
     -webkit-appearance: media-play-button;
-    margin: 7px 8px 6px 8px;
-    width: 18px;
-    height: 19px;
+    display: inline;
+    border: none;
+    box-sizing: border-box;
+    width: 30px;
+    height: 30px;
+    line-height: 30px;
+    margin-left: 9px;
+    margin-right: 9px;
+    padding: 0;
 }
 
-audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container {
-    -webkit-appearance: media-timeline-container;
-    -webkit-user-select: none;
-    -webkit-box-orient: horizontal;
-    -webkit-box-align: center;
-    -webkit-box-pack: center;
-    -webkit-box-flex: 1;
-    width: auto;
-    height: 32px;
-
-    border-left: 1px solid rgba(255, 255, 255, 0.2);
-    border-right: 1px solid rgba(255, 255, 255, 0.2);
-}
-
 audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display {
     -webkit-appearance: media-current-time-display;
     -webkit-user-select: none;
-    display: inline;
-
-    overflow: hidden;
+    display: block;
+    border: none;
     cursor: default;
 
-    line-height: 21px;
-    height: 20px;
-    width: 58px;
+    height: 30px;
+    margin: 0 9px 0 0;
+    padding: 0;
 
-    text-align: center;
-    font-family: Arial;
-    font-size: 16px;
-    font-weight: bold;
+    line-height: 30px;
+    font-family: Arial, Helvetica, sans-serif;
+    font-size: 13px;
     color: white;
 
     letter-spacing: normal;
@@ -121,26 +124,22 @@
 audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline {
     -webkit-appearance: media-slider;
     display: -webkit-box;
-    box-sizing: border-box;
     -webkit-box-flex: 1;
-
-    padding: 0px;
-    margin: 0px 6px;
-    height: 18px;
-
-    border-color: rgba(255, 255, 255, 0.2);
-    border-style: solid;
-    border-width: 1px;
-    border-radius: 2px;
-    background-color: rgba(255, 255, 255, 0.08);
-    color: rgb(50, 140, 223);
+    height: 8px;
+    margin: 0 15px 0 0;
+    padding: 0;
+    background-color: transparent;
+    min-width: 25px;
 }
 
 audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider {
     -webkit-appearance: media-volume-slider;
     display: -webkit-box;
     -webkit-box-flex: 1;
-    margin-right: 5px;
-    max-width: 100px;
-    height: 32px;
+    height: 8px;
+    max-width: 70px;
+    margin: 0 15px 0 0;
+    padding: 0;
+    background-color: transparent;
+    min-width: 15px;
 }

Modified: trunk/Source/WebCore/html/shadow/MediaControlRootElementChromium.cpp (120170 => 120171)


--- trunk/Source/WebCore/html/shadow/MediaControlRootElementChromium.cpp	2012-06-13 08:18:10 UTC (rev 120170)
+++ trunk/Source/WebCore/html/shadow/MediaControlRootElementChromium.cpp	2012-06-13 08:19:17 UTC (rev 120171)
@@ -69,7 +69,6 @@
     , m_playButton(0)
     , m_currentTimeDisplay(0)
     , m_timeline(0)
-    , m_timelineContainer(0)
     , m_panelMuteButton(0)
     , m_volumeSlider(0)
 #if ENABLE(FULLSCREEN_MEDIA_CONTROLS)
@@ -110,25 +109,18 @@
     if (ec)
         return 0;
 
-    RefPtr<MediaControlTimelineContainerElement> timelineContainer = MediaControlTimelineContainerElement::create(document);
-
     RefPtr<MediaControlTimelineElement> timeline = MediaControlTimelineElement::create(document, controls.get());
     controls->m_timeline = timeline.get();
-    timelineContainer->appendChild(timeline.release(), ec, true);
+    panel->appendChild(timeline.release(), ec, true);
     if (ec)
         return 0;
 
     RefPtr<MediaControlCurrentTimeDisplayElement> currentTimeDisplay = MediaControlCurrentTimeDisplayElement::create(document);
     controls->m_currentTimeDisplay = currentTimeDisplay.get();
-    timelineContainer->appendChild(currentTimeDisplay.release(), ec, true);
+    panel->appendChild(currentTimeDisplay.release(), ec, true);
     if (ec)
         return 0;
 
-    controls->m_timelineContainer = timelineContainer.get();
-    panel->appendChild(timelineContainer.release(), ec, true);
-    if (ec)
-        return 0;
-
     RefPtr<MediaControlPanelMuteButtonElement> panelMuteButton = MediaControlPanelMuteButtonElement::create(document, controls.get());
     controls->m_panelMuteButton = panelMuteButton.get();
     panel->appendChild(panelMuteButton.release(), ec, true);
@@ -174,8 +166,6 @@
         m_currentTimeDisplay->setMediaController(controller);
     if (m_timeline)
         m_timeline->setMediaController(controller);
-    if (m_timelineContainer)
-        m_timelineContainer->setMediaController(controller);
     if (m_panelMuteButton)
         m_panelMuteButton->setMediaController(controller);
     if (m_volumeSlider)
@@ -227,7 +217,7 @@
 
     float duration = m_mediaController->duration();
     m_timeline->setDuration(duration);
-    m_timelineContainer->show();
+    m_timeline->show();
     m_timeline->setPosition(m_mediaController->currentTime());
     updateTimeDisplay();
 
@@ -287,12 +277,12 @@
     if (!page)
         return;
 
-    m_timelineContainer->hide();
+    m_timeline->hide();
     m_panelMuteButton->hide();
+    m_volumeSlider->hide();
 #if ENABLE(FULLSCREEN_MEDIA_CONTROLS)
     m_fullscreenButton->hide();
 #endif
-    m_volumeSlider->hide();
 }
 
 void MediaControlRootElementChromium::updateStatusDisplay()

Modified: trunk/Source/WebCore/rendering/RenderMediaControlsChromium.cpp (120170 => 120171)


--- trunk/Source/WebCore/rendering/RenderMediaControlsChromium.cpp	2012-06-13 08:18:10 UTC (rev 120170)
+++ trunk/Source/WebCore/rendering/RenderMediaControlsChromium.cpp	2012-06-13 08:19:17 UTC (rev 120171)
@@ -74,14 +74,21 @@
     if (!mediaElement)
       return false;
 
-    static Image* soundFull = platformResource("mediaSoundFull");
-    static Image* soundNone = platformResource("mediaSoundNone");
-    static Image* soundDisabled = platformResource("mediaSoundDisabled");
+    static Image* soundLevel3 = platformResource("mediaplayerSoundLevel3");
+    static Image* soundLevel2 = platformResource("mediaplayerSoundLevel2");
+    static Image* soundLevel1 = platformResource("mediaplayerSoundLevel1");
+    static Image* soundDisabled = platformResource("mediaplayerSoundDisabled");
 
-    if (!hasSource(mediaElement) || !mediaElement->hasAudio())
+    if (!hasSource(mediaElement) || !mediaElement->hasAudio() || mediaElement->muted() || mediaElement->volume() <= 0)
         return paintMediaButton(paintInfo.context, rect, soundDisabled);
 
-    return paintMediaButton(paintInfo.context, rect, mediaElement->muted() ? soundNone: soundFull);
+    if (mediaElement->volume() <= 0.33)
+        return paintMediaButton(paintInfo.context, rect, soundLevel1);
+
+    if (mediaElement->volume() <= 0.66)
+        return paintMediaButton(paintInfo.context, rect, soundLevel2);
+
+    return paintMediaButton(paintInfo.context, rect, soundLevel3);
 }
 
 static bool paintMediaPlayButton(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
@@ -90,9 +97,9 @@
     if (!mediaElement)
         return false;
 
-    static Image* mediaPlay = platformResource("mediaPlay");
-    static Image* mediaPause = platformResource("mediaPause");
-    static Image* mediaPlayDisabled = platformResource("mediaPlayDisabled");
+    static Image* mediaPlay = platformResource("mediaplayerPlay");
+    static Image* mediaPause = platformResource("mediaplayerPause");
+    static Image* mediaPlayDisabled = platformResource("mediaplayerPlayDisabled");
 
     if (!hasSource(mediaElement))
         return paintMediaButton(paintInfo.context, rect, mediaPlayDisabled);
@@ -102,7 +109,7 @@
 
 static Image* getMediaSliderThumb()
 {
-    static Image* mediaSliderThumb = platformResource("mediaSliderThumb");
+    static Image* mediaSliderThumb = platformResource("mediaplayerSliderThumb");
     return mediaSliderThumb;
 }
 
@@ -210,43 +217,10 @@
 
 static bool paintMediaVolumeSliderThumb(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
 {
-    static Image* mediaVolumeSliderThumb = platformResource("mediaVolumeSliderThumb");
+    static Image* mediaVolumeSliderThumb = platformResource("mediaplayerVolumeSliderThumb");
     return paintMediaButton(paintInfo.context, rect, mediaVolumeSliderThumb);
 }
 
-static bool paintMediaTimelineContainer(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
-{
-    HTMLMediaElement* mediaElement = toParentMediaElement(object);
-    if (!mediaElement)
-        return false;
-
-    if (!rect.isEmpty()) {
-        GraphicsContext* context = paintInfo.context;
-        Color originalColor = context->strokeColor();
-        float originalThickness = context->strokeThickness();
-        StrokeStyle originalStyle = context->strokeStyle();
-
-        context->setStrokeStyle(SolidStroke);
-
-        // Draw the left border using CSS defined width and color.
-        context->setStrokeThickness(object->style()->borderLeftWidth());
-        context->setStrokeColor(object->style()->visitedDependentColor(CSSPropertyBorderLeftColor).rgb(), ColorSpaceDeviceRGB);
-        context->drawLine(IntPoint(rect.x() + 1, rect.y()),
-                          IntPoint(rect.x() + 1, rect.y() + rect.height()));
-
-        // Draw the right border using CSS defined width and color.
-        context->setStrokeThickness(object->style()->borderRightWidth());
-        context->setStrokeColor(object->style()->visitedDependentColor(CSSPropertyBorderRightColor).rgb(), ColorSpaceDeviceRGB);
-        context->drawLine(IntPoint(rect.x() + rect.width() - 1, rect.y()),
-                          IntPoint(rect.x() + rect.width() - 1, rect.y() + rect.height()));
-
-        context->setStrokeColor(originalColor, ColorSpaceDeviceRGB);
-        context->setStrokeThickness(originalThickness);
-        context->setStrokeStyle(originalStyle);
-    }
-    return true;
-}
-
 static bool paintMediaFullscreenButton(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
 {
     HTMLMediaElement* mediaElement = toParentMediaElement(object);
@@ -274,8 +248,6 @@
         return paintMediaVolumeSlider(object, paintInfo, rect);
     case MediaVolumeSliderThumb:
         return paintMediaVolumeSliderThumb(object, paintInfo, rect);
-    case MediaTimelineContainer:
-        return paintMediaTimelineContainer(object, paintInfo, rect);
     case MediaEnterFullscreenButton:
     case MediaExitFullscreenButton:
         return paintMediaFullscreenButton(object, paintInfo, rect);
@@ -283,6 +255,7 @@
     case MediaSeekBackButton:
     case MediaSeekForwardButton:
     case MediaVolumeSliderContainer:
+    case MediaTimelineContainer:
     case MediaCurrentTimeDisplay:
     case MediaTimeRemainingDisplay:
     case MediaControlsPanel:
@@ -301,21 +274,33 @@
     return false;
 }
 
+const int mediaSliderThumbWidth = 32;
+const int mediaSliderThumbHeight = 24;
+const int mediaVolumeSliderThumbWidth = 24;
+const int mediaVolumeSliderThumbHeight = 24;
+
 void RenderMediaControlsChromium::adjustMediaSliderThumbSize(RenderStyle* style)
 {
-    static Image* mediaSliderThumb = platformResource("mediaSliderThumb");
-    static Image* mediaVolumeSliderThumb = platformResource("mediaVolumeSliderThumb");
+    static Image* mediaSliderThumb = platformResource("mediaplayerSliderThumb");
+    static Image* mediaVolumeSliderThumb = platformResource("mediaplayerVolumeSliderThumb");
+    int width = 0;
+    int height = 0;
 
     Image* thumbImage = 0;
-    if (style->appearance() == MediaSliderThumbPart)
+    if (style->appearance() == MediaSliderThumbPart) {
         thumbImage = mediaSliderThumb;
-    else if (style->appearance() == MediaVolumeSliderThumbPart)
+        width = mediaSliderThumbWidth;
+        height = mediaSliderThumbHeight;
+    } else if (style->appearance() == MediaVolumeSliderThumbPart) {
         thumbImage = mediaVolumeSliderThumb;
+        width = mediaVolumeSliderThumbWidth;
+        height = mediaVolumeSliderThumbHeight;
+    }
 
     float zoomLevel = style->effectiveZoom();
     if (thumbImage) {
-        style->setWidth(Length(static_cast<int>(thumbImage->width() * zoomLevel), Fixed));
-        style->setHeight(Length(static_cast<int>(thumbImage->height() * zoomLevel), Fixed));
+        style->setWidth(Length(static_cast<int>(width * zoomLevel), Fixed));
+        style->setHeight(Length(static_cast<int>(height * zoomLevel), Fixed));
     }
 }
 

Modified: trunk/Source/WebCore/rendering/RenderThemeChromiumMac.h (120170 => 120171)


--- trunk/Source/WebCore/rendering/RenderThemeChromiumMac.h	2012-06-13 08:18:10 UTC (rev 120170)
+++ trunk/Source/WebCore/rendering/RenderThemeChromiumMac.h	2012-06-13 08:19:17 UTC (rev 120171)
@@ -42,7 +42,6 @@
     virtual bool paintMediaPlayButton(RenderObject*, const PaintInfo&, const IntRect&);
     virtual bool paintMediaMuteButton(RenderObject*, const PaintInfo&, const IntRect&);
     virtual bool paintMediaSliderTrack(RenderObject*, const PaintInfo&, const IntRect&);
-    virtual bool paintMediaControlsBackground(RenderObject*, const PaintInfo&, const IntRect&);
     virtual String extraMediaControlsStyleSheet();
 #if ENABLE(FULLSCREEN_API)
     virtual String extraFullScreenStyleSheet();

Modified: trunk/Source/WebCore/rendering/RenderThemeChromiumMac.mm (120170 => 120171)


--- trunk/Source/WebCore/rendering/RenderThemeChromiumMac.mm	2012-06-13 08:18:10 UTC (rev 120170)
+++ trunk/Source/WebCore/rendering/RenderThemeChromiumMac.mm	2012-06-13 08:19:17 UTC (rev 120171)
@@ -173,11 +173,6 @@
     return RenderMediaControlsChromium::paintMediaControlsPart(MediaSlider, object, paintInfo, rect);
 }
 
-bool RenderThemeChromiumMac::paintMediaControlsBackground(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
-{
-    return RenderMediaControlsChromium::paintMediaControlsPart(MediaTimelineContainer, object, paintInfo, rect);
-}
-
 String RenderThemeChromiumMac::extraMediaControlsStyleSheet()
 {
     return String(mediaControlsChromiumUserAgentStyleSheet, sizeof(mediaControlsChromiumUserAgentStyleSheet));

Modified: trunk/Source/WebCore/rendering/RenderThemeChromiumSkia.cpp (120170 => 120171)


--- trunk/Source/WebCore/rendering/RenderThemeChromiumSkia.cpp	2012-06-13 08:18:10 UTC (rev 120170)
+++ trunk/Source/WebCore/rendering/RenderThemeChromiumSkia.cpp	2012-06-13 08:19:17 UTC (rev 120171)
@@ -378,18 +378,6 @@
     return false;
 }
 
-bool RenderThemeChromiumSkia::paintMediaControlsBackground(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
-{
-#if ENABLE(VIDEO)
-    return RenderMediaControlsChromium::paintMediaControlsPart(MediaTimelineContainer, object, paintInfo, rect);
-#else
-    UNUSED_PARAM(object);
-    UNUSED_PARAM(paintInfo);
-    UNUSED_PARAM(rect);
-    return false;
-#endif
-}
-
 bool RenderThemeChromiumSkia::paintMediaSliderTrack(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
 {
 #if ENABLE(VIDEO)

Modified: trunk/Source/WebCore/rendering/RenderThemeChromiumSkia.h (120170 => 120171)


--- trunk/Source/WebCore/rendering/RenderThemeChromiumSkia.h	2012-06-13 08:18:10 UTC (rev 120170)
+++ trunk/Source/WebCore/rendering/RenderThemeChromiumSkia.h	2012-06-13 08:19:17 UTC (rev 120171)
@@ -91,7 +91,6 @@
         virtual void adjustSearchFieldResultsButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
         virtual bool paintSearchFieldResultsButton(RenderObject*, const PaintInfo&, const IntRect&);
 
-        virtual bool paintMediaControlsBackground(RenderObject*, const PaintInfo&, const IntRect&);
         virtual bool paintMediaSliderTrack(RenderObject*, const PaintInfo&, const IntRect&);
         virtual bool paintMediaVolumeSliderTrack(RenderObject*, const PaintInfo&, const IntRect&);
         virtual void adjustSliderThumbSize(RenderStyle*, Element*) const;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to