diff options
| author | Steve Block <steveblock@google.com> | 2009-12-17 10:00:51 -0800 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2009-12-17 10:00:51 -0800 |
| commit | bc0688665b65cce4fec4a58f289e8fbac55af976 (patch) | |
| tree | 36882563e661afd21008ad31d761f1e5a170f9eb /WebCore/rendering/RenderThemeWin.cpp | |
| parent | 9443700060dfd3b488a3bdf30cfa547135478a7f (diff) | |
| parent | b880d713c04257ca40abfef97c300afdead423b8 (diff) | |
| download | external_webkit-bc0688665b65cce4fec4a58f289e8fbac55af976.zip external_webkit-bc0688665b65cce4fec4a58f289e8fbac55af976.tar.gz external_webkit-bc0688665b65cce4fec4a58f289e8fbac55af976.tar.bz2 | |
am b880d713: am 643ca787: Merge webkit.org at r51976 : Initial merge by git.
Merge commit 'b880d713c04257ca40abfef97c300afdead423b8'
* commit 'b880d713c04257ca40abfef97c300afdead423b8':
Merge webkit.org at r51976 : Initial merge by git.
Diffstat (limited to 'WebCore/rendering/RenderThemeWin.cpp')
| -rw-r--r-- | WebCore/rendering/RenderThemeWin.cpp | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/WebCore/rendering/RenderThemeWin.cpp b/WebCore/rendering/RenderThemeWin.cpp index 92bfd03..52afbd6 100644 --- a/WebCore/rendering/RenderThemeWin.cpp +++ b/WebCore/rendering/RenderThemeWin.cpp @@ -819,7 +819,7 @@ bool RenderThemeWin::paintSearchFieldCancelButton(RenderObject* o, const RenderO static Image* cancelImage = Image::loadPlatformResource("searchCancel").releaseRef(); static Image* cancelPressedImage = Image::loadPlatformResource("searchCancelPressed").releaseRef(); - paintInfo.context->drawImage(isPressed(o) ? cancelPressedImage : cancelImage, bounds); + paintInfo.context->drawImage(isPressed(o) ? cancelPressedImage : cancelImage, o->style()->colorSpace(), bounds); return false; } @@ -868,7 +868,7 @@ bool RenderThemeWin::paintSearchFieldResultsDecoration(RenderObject* o, const Re bounds.setY(parentBox.y() + (parentBox.height() - bounds.height() + 1) / 2); static Image* magnifierImage = Image::loadPlatformResource("searchMagnifier").releaseRef(); - paintInfo.context->drawImage(magnifierImage, bounds); + paintInfo.context->drawImage(magnifierImage, o->style()->colorSpace(), bounds); return false; } @@ -904,7 +904,7 @@ bool RenderThemeWin::paintSearchFieldResultsButton(RenderObject* o, const Render bounds.setY(parentBox.y() + (parentBox.height() - bounds.height() + 1) / 2); static Image* magnifierImage = Image::loadPlatformResource("searchMagnifierResults").releaseRef(); - paintInfo.context->drawImage(magnifierImage, bounds); + paintInfo.context->drawImage(magnifierImage, o->style()->colorSpace(), bounds); return false; } @@ -955,6 +955,23 @@ Color RenderThemeWin::systemColor(int cssValueId) const } #if ENABLE(VIDEO) + +bool RenderThemeWin::shouldRenderMediaControlPart(ControlPart part, Element* element) +{ + if (part == MediaToggleClosedCaptionsButtonPart) { + // We rely on QuickTime to render captions so only enable the button for a video element. +#if SAFARI_THEME_VERSION >= 4 + if (!element->hasTagName(videoTag)) + return false; +#else + return false; +#endif + } + + return RenderTheme::shouldRenderMediaControlPart(part, element); +} + + bool RenderThemeWin::paintMediaFullscreenButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r) { return RenderMediaControls::paintMediaControlsPart(MediaFullscreenButton, o, paintInfo, r); @@ -989,6 +1006,12 @@ bool RenderThemeWin::paintMediaSliderThumb(RenderObject* o, const RenderObject:: { return RenderMediaControls::paintMediaControlsPart(MediaSliderThumb, o, paintInfo, r); } + +bool RenderThemeWin::paintMediaToggleClosedCaptionsButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r) +{ + return RenderMediaControls::paintMediaControlsPart(MediaShowClosedCaptionsButton, o, paintInfo, r); +} + #endif } |
