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

Unified Diff: content/renderer/pepper/renderer_ppapi_host_impl.cc

Issue 183973027: Fix Flash fullscreen context menu target and position. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Avi's comments. Created 6 years, 10 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
Index: content/renderer/pepper/renderer_ppapi_host_impl.cc
diff --git a/content/renderer/pepper/renderer_ppapi_host_impl.cc b/content/renderer/pepper/renderer_ppapi_host_impl.cc
index 5014c9898efe0a74ad2be2ec1cf5d2ace2ee336b..afb5f1264f834c2c3c48e316e127f5a8fd15db12 100644
--- a/content/renderer/pepper/renderer_ppapi_host_impl.cc
+++ b/content/renderer/pepper/renderer_ppapi_host_impl.cc
@@ -203,18 +203,10 @@ gfx::Point RendererPpapiHostImpl::PluginPointToRenderFrame(
PP_Instance instance,
const gfx::Point& pt) const {
PepperPluginInstanceImpl* plugin_instance = GetAndValidateInstance(instance);
- if (!plugin_instance)
+ if (!plugin_instance || plugin_instance->flash_fullscreen()) {
+ // Flash fullscreen is special in that it renders into its own separate,
+ // dedicated window. So, do not offset the point.
return pt;
-
- RenderFrameImpl* render_frame = static_cast<RenderFrameImpl*>(
- GetRenderFrameForInstance(instance));
- if (plugin_instance->view_data().is_fullscreen ||
- plugin_instance->flash_fullscreen()) {
- blink::WebRect window_rect = render_frame->GetRenderWidget()->windowRect();
- blink::WebRect screen_rect =
- render_frame->GetRenderWidget()->screenInfo().rect;
- return gfx::Point(pt.x() - window_rect.x + screen_rect.x,
- pt.y() - window_rect.y + screen_rect.y);
}
return gfx::Point(pt.x() + plugin_instance->view_data().rect.point.x,
pt.y() + plugin_instance->view_data().rect.point.y);

Powered by Google App Engine
This is Rietveld 408576698