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

Unified Diff: Source/web/ContextMenuClientImpl.cpp

Issue 18205009: Introduce isHTMLVideoElement and toHTMLVideoElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 months 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/core/rendering/RenderVideo.cpp ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/ContextMenuClientImpl.cpp
diff --git a/Source/web/ContextMenuClientImpl.cpp b/Source/web/ContextMenuClientImpl.cpp
index 059e0f9be2a64fad4db6301dac15f49c2ab5a487..c0f957c22dc68f73a22a862ab2583c037a966c28 100644
--- a/Source/web/ContextMenuClientImpl.cpp
+++ b/Source/web/ContextMenuClientImpl.cpp
@@ -54,6 +54,7 @@
#include "core/html/HTMLInputElement.h"
#include "core/html/HTMLMediaElement.h"
#include "core/html/HTMLPlugInImageElement.h"
+#include "core/html/HTMLVideoElement.h"
#include "core/html/MediaError.h"
#include "core/loader/DocumentLoader.h"
#include "core/loader/FrameLoader.h"
@@ -221,7 +222,7 @@ void ContextMenuClientImpl::showContextMenu(const WebCore::ContextMenu* defaultM
// is a media element.
HTMLMediaElement* mediaElement =
toMediaElement(r.innerNonSharedNode());
- if (mediaElement->hasTagName(HTMLNames::videoTag))
+ if (isHTMLVideoElement(mediaElement))
data.mediaType = WebContextMenuData::MediaTypeVideo;
else if (mediaElement->hasTagName(HTMLNames::audioTag))
data.mediaType = WebContextMenuData::MediaTypeAudio;
« no previous file with comments | « Source/core/rendering/RenderVideo.cpp ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698