| Index: Source/core/rendering/RenderMediaControlsChromium.cpp
|
| diff --git a/Source/core/rendering/RenderMediaControlsChromium.cpp b/Source/core/rendering/RenderMediaControlsChromium.cpp
|
| index f08f4ce5e48abe17a6d879dafa396f2375e2dca4..09d63cdb3b13188fcf0c56495c076c2ccf8748ff 100644
|
| --- a/Source/core/rendering/RenderMediaControlsChromium.cpp
|
| +++ b/Source/core/rendering/RenderMediaControlsChromium.cpp
|
| @@ -65,7 +65,7 @@ static bool paintMediaButton(GraphicsContext* context, const IntRect& rect, Imag
|
| return true;
|
| }
|
|
|
| -static bool paintMediaMuteButton(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
|
| +static bool paintMediaMuteButton(RenderObject* object, PaintInfo& paintInfo, const IntRect& rect)
|
| {
|
| HTMLMediaElement* mediaElement = toParentMediaElement(object);
|
| if (!mediaElement)
|
| @@ -78,21 +78,21 @@ static bool paintMediaMuteButton(RenderObject* object, const PaintInfo& paintInf
|
| static Image* soundDisabled = platformResource("mediaplayerSoundDisabled");
|
|
|
| if (!hasSource(mediaElement) || !mediaElement->hasAudio())
|
| - return paintMediaButton(paintInfo.context, rect, soundDisabled);
|
| + return paintMediaButton(paintInfo.getContext(), rect, soundDisabled);
|
|
|
| if (mediaElement->muted() || mediaElement->volume() <= 0)
|
| - return paintMediaButton(paintInfo.context, rect, soundLevel0);
|
| + return paintMediaButton(paintInfo.getContext(), rect, soundLevel0);
|
|
|
| if (mediaElement->volume() <= 0.33)
|
| - return paintMediaButton(paintInfo.context, rect, soundLevel1);
|
| + return paintMediaButton(paintInfo.getContext(), rect, soundLevel1);
|
|
|
| if (mediaElement->volume() <= 0.66)
|
| - return paintMediaButton(paintInfo.context, rect, soundLevel2);
|
| + return paintMediaButton(paintInfo.getContext(), rect, soundLevel2);
|
|
|
| - return paintMediaButton(paintInfo.context, rect, soundLevel3);
|
| + return paintMediaButton(paintInfo.getContext(), rect, soundLevel3);
|
| }
|
|
|
| -static bool paintMediaPlayButton(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
|
| +static bool paintMediaPlayButton(RenderObject* object, PaintInfo& paintInfo, const IntRect& rect)
|
| {
|
| HTMLMediaElement* mediaElement = toParentMediaElement(object);
|
| if (!mediaElement)
|
| @@ -103,12 +103,12 @@ static bool paintMediaPlayButton(RenderObject* object, const PaintInfo& paintInf
|
| static Image* mediaPlayDisabled = platformResource("mediaplayerPlayDisabled");
|
|
|
| if (!hasSource(mediaElement))
|
| - return paintMediaButton(paintInfo.context, rect, mediaPlayDisabled);
|
| + return paintMediaButton(paintInfo.getContext(), rect, mediaPlayDisabled);
|
|
|
| - return paintMediaButton(paintInfo.context, rect, mediaElement->canPlay() ? mediaPlay : mediaPause);
|
| + return paintMediaButton(paintInfo.getContext(), rect, mediaElement->canPlay() ? mediaPlay : mediaPause);
|
| }
|
|
|
| -static bool paintMediaOverlayPlayButton(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
|
| +static bool paintMediaOverlayPlayButton(RenderObject* object, PaintInfo& paintInfo, const IntRect& rect)
|
| {
|
| HTMLMediaElement* mediaElement = toParentMediaElement(object);
|
| if (!mediaElement)
|
| @@ -118,7 +118,7 @@ static bool paintMediaOverlayPlayButton(RenderObject* object, const PaintInfo& p
|
| return false;
|
|
|
| static Image* mediaOverlayPlay = platformResource("mediaplayerOverlayPlay");
|
| - return paintMediaButton(paintInfo.context, rect, mediaOverlayPlay);
|
| + return paintMediaButton(paintInfo.getContext(), rect, mediaOverlayPlay);
|
| }
|
|
|
| static Image* getMediaSliderThumb()
|
| @@ -195,14 +195,14 @@ static void paintSliderRangeHighlight(const IntRect& rect, const RenderStyle* st
|
|
|
| const int mediaSliderThumbWidth = 32;
|
|
|
| -static bool paintMediaSlider(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
|
| +static bool paintMediaSlider(RenderObject* object, PaintInfo& paintInfo, const IntRect& rect)
|
| {
|
| HTMLMediaElement* mediaElement = toParentMediaElement(object);
|
| if (!mediaElement)
|
| return false;
|
|
|
| RenderStyle* style = object->style();
|
| - GraphicsContext* context = paintInfo.context;
|
| + GraphicsContext* context = paintInfo.getContext();
|
|
|
| paintRoundedSliderBackground(rect, style, context);
|
|
|
| @@ -247,7 +247,7 @@ static bool paintMediaSlider(RenderObject* object, const PaintInfo& paintInfo, c
|
| return true;
|
| }
|
|
|
| -static bool paintMediaSliderThumb(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
|
| +static bool paintMediaSliderThumb(RenderObject* object, PaintInfo& paintInfo, const IntRect& rect)
|
| {
|
| ASSERT(object->node());
|
| HTMLMediaElement* mediaElement = toParentMediaElement(object->node()->shadowHost());
|
| @@ -258,18 +258,18 @@ static bool paintMediaSliderThumb(RenderObject* object, const PaintInfo& paintIn
|
| return true;
|
|
|
| Image* mediaSliderThumb = getMediaSliderThumb();
|
| - return paintMediaButton(paintInfo.context, rect, mediaSliderThumb);
|
| + return paintMediaButton(paintInfo.getContext(), rect, mediaSliderThumb);
|
| }
|
|
|
| const int mediaVolumeSliderThumbWidth = 24;
|
|
|
| -static bool paintMediaVolumeSlider(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
|
| +static bool paintMediaVolumeSlider(RenderObject* object, PaintInfo& paintInfo, const IntRect& rect)
|
| {
|
| HTMLMediaElement* mediaElement = toParentMediaElement(object);
|
| if (!mediaElement)
|
| return false;
|
|
|
| - GraphicsContext* context = paintInfo.context;
|
| + GraphicsContext* context = paintInfo.getContext();
|
| RenderStyle* style = object->style();
|
|
|
| paintRoundedSliderBackground(rect, style, context);
|
| @@ -300,7 +300,7 @@ static bool paintMediaVolumeSlider(RenderObject* object, const PaintInfo& paintI
|
| return true;
|
| }
|
|
|
| -static bool paintMediaVolumeSliderThumb(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
|
| +static bool paintMediaVolumeSliderThumb(RenderObject* object, PaintInfo& paintInfo, const IntRect& rect)
|
| {
|
| ASSERT(object->node());
|
| HTMLMediaElement* mediaElement = toParentMediaElement(object->node()->shadowHost());
|
| @@ -311,20 +311,20 @@ static bool paintMediaVolumeSliderThumb(RenderObject* object, const PaintInfo& p
|
| return true;
|
|
|
| static Image* mediaVolumeSliderThumb = platformResource("mediaplayerVolumeSliderThumb");
|
| - return paintMediaButton(paintInfo.context, rect, mediaVolumeSliderThumb);
|
| + return paintMediaButton(paintInfo.getContext(), rect, mediaVolumeSliderThumb);
|
| }
|
|
|
| -static bool paintMediaFullscreenButton(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
|
| +static bool paintMediaFullscreenButton(RenderObject* object, PaintInfo& paintInfo, const IntRect& rect)
|
| {
|
| HTMLMediaElement* mediaElement = toParentMediaElement(object);
|
| if (!mediaElement)
|
| return false;
|
|
|
| static Image* mediaFullscreenButton = platformResource("mediaplayerFullscreen");
|
| - return paintMediaButton(paintInfo.context, rect, mediaFullscreenButton);
|
| + return paintMediaButton(paintInfo.getContext(), rect, mediaFullscreenButton);
|
| }
|
|
|
| -static bool paintMediaToggleClosedCaptionsButton(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
|
| +static bool paintMediaToggleClosedCaptionsButton(RenderObject* object, PaintInfo& paintInfo, const IntRect& rect)
|
| {
|
| HTMLMediaElement* mediaElement = toParentMediaElement(object);
|
| if (!mediaElement)
|
| @@ -334,13 +334,13 @@ static bool paintMediaToggleClosedCaptionsButton(RenderObject* object, const Pai
|
| static Image* mediaClosedCaptionButtonDisabled = platformResource("mediaplayerClosedCaptionDisabled");
|
|
|
| if (mediaElement->webkitClosedCaptionsVisible())
|
| - return paintMediaButton(paintInfo.context, rect, mediaClosedCaptionButton);
|
| + return paintMediaButton(paintInfo.getContext(), rect, mediaClosedCaptionButton);
|
|
|
| - return paintMediaButton(paintInfo.context, rect, mediaClosedCaptionButtonDisabled);
|
| + return paintMediaButton(paintInfo.getContext(), rect, mediaClosedCaptionButtonDisabled);
|
| }
|
|
|
|
|
| -bool RenderMediaControlsChromium::paintMediaControlsPart(MediaControlElementType part, RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
|
| +bool RenderMediaControlsChromium::paintMediaControlsPart(MediaControlElementType part, RenderObject* object, PaintInfo& paintInfo, const IntRect& rect)
|
| {
|
| switch (part) {
|
| case MediaMuteButton:
|
|
|