Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Unified Diff: Source/WebCore/rendering/RenderThemeMac.mm

Issue 8758009: Merge 100408 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/912/
Patch Set: '' Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/platform/gtk/RenderThemeGtk.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « Source/WebCore/platform/gtk/RenderThemeGtk.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698