Index: Source/WebCore/rendering/RenderThemeMac.mm |
=================================================================== |
--- Source/WebCore/rendering/RenderThemeMac.mm (revision 101562) |
+++ Source/WebCore/rendering/RenderThemeMac.mm (working copy) |
@@ -1781,10 +1781,9 @@ |
if (!mediaNode || (!mediaNode->hasTagName(videoTag) && !mediaNode->hasTagName(audioTag))) |
return false; |
- if (MediaControlMuteButtonElement* btn = static_cast<MediaControlMuteButtonElement*>(node)) { |
+ if (node->isMediaControlElement()) { |
LocalCurrentGraphicsContext localContext(paintInfo.context); |
- wkDrawMediaUIPart(btn->displayType(), mediaControllerTheme(), localContext.cgContext(), r, getMediaUIPartStateFlags(node)); |
- |
+ wkDrawMediaUIPart(mediaControlElementType(node), mediaControllerTheme(), localContext.cgContext(), r, getMediaUIPartStateFlags(node)); |
} |
return false; |
} |
@@ -1796,9 +1795,9 @@ |
if (!mediaNode || (!mediaNode->hasTagName(videoTag) && !mediaNode->hasTagName(audioTag))) |
return false; |
- if (MediaControlPlayButtonElement* btn = static_cast<MediaControlPlayButtonElement*>(node)) { |
+ if (node->isMediaControlElement()) { |
LocalCurrentGraphicsContext localContext(paintInfo.context); |
- wkDrawMediaUIPart(btn->displayType(), mediaControllerTheme(), localContext.cgContext(), r, getMediaUIPartStateFlags(node)); |
+ wkDrawMediaUIPart(mediaControlElementType(node), mediaControllerTheme(), localContext.cgContext(), r, getMediaUIPartStateFlags(node)); |
} |
return false; |
} |
@@ -1888,17 +1887,14 @@ |
bool RenderThemeMac::paintMediaToggleClosedCaptionsButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r) |
{ |
- HTMLInputElement* node = static_cast<HTMLInputElement*>(o->node()); |
+ Node* node = o->node(); |
if (!node) |
return false; |
- |
- MediaControlToggleClosedCaptionsButtonElement* btn = static_cast<MediaControlToggleClosedCaptionsButtonElement*>(node); |
- if (!btn) |
+ if (!node->isMediaControlElement()) |
return false; |
LocalCurrentGraphicsContext localContext(paintInfo.context); |
- wkDrawMediaUIPart(btn->displayType(), mediaControllerTheme(), localContext.cgContext(), r, getMediaUIPartStateFlags(node)); |
- |
+ wkDrawMediaUIPart(mediaControlElementType(node), mediaControllerTheme(), localContext.cgContext(), r, getMediaUIPartStateFlags(node)); |
return false; |
} |