summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-07 20:37:20 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-07 20:37:20 +0000
commit3da08d22d0e1c1482d475861252f1bc0edec5acf (patch)
tree4c55c7a63da90137b27833dc3e7fc1117d18782e
parent96be97648dc2730bc33612fcb1aca848b668e540 (diff)
downloadchromium_src-3da08d22d0e1c1482d475861252f1bc0edec5acf.zip
chromium_src-3da08d22d0e1c1482d475861252f1bc0edec5acf.tar.gz
chromium_src-3da08d22d0e1c1482d475861252f1bc0edec5acf.tar.bz2
Fix the painting issue observed with windowed NPAPI Flash plugins when we switch away from a tab which has an instance of
the plugin and switch back to it. When we switch back to the tab with the plugin, the flash RVHWA window becomes visible. The code which runs in the visible notification handler runs through the plugin cutout rects calculation, which basically tries to remove areas where the plugin should not paint from its clip region. In this case the cutout rects comes out as empty and the clip region in the plugin window moves structure is NULL. We end up setting the window region to NULL which basically causes the plugin window to become useless. Fix is to not mess with the window region of the plugin if the cutout rects are empty. BUG=341564 R=cpu@chromium.org, cpu TBR=jam Review URL: https://codereview.chromium.org/140753008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249763 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/browser/renderer_host/render_widget_host_view_aura.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 43f4636..14d8219 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -205,7 +205,10 @@ BOOL CALLBACK SetCutoutRectsCallback(HWND window, LPARAM param) {
cutout_rects.push_back(offset_cutout);
}
gfx::SubtractRectanglesFromRegion(hrgn, cutout_rects);
- SetWindowRgn(window, hrgn, TRUE);
+ // If we don't have any cutout rects then no point in messing with the
+ // window region.
+ if (cutout_rects.size())
+ SetWindowRgn(window, hrgn, TRUE);
}
return TRUE;
}