summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-10 18:20:08 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-10 18:20:08 +0000
commit82f0a9d963da1181b004ae3ac41f1c304067bacb (patch)
treec62014fc1c0ca47338e69ca14719fa4ace8a97c4
parent47a9ef2082e80a06a0aac0c19a2f7857dbd22fb2 (diff)
downloadchromium_src-82f0a9d963da1181b004ae3ac41f1c304067bacb.zip
chromium_src-82f0a9d963da1181b004ae3ac41f1c304067bacb.tar.gz
chromium_src-82f0a9d963da1181b004ae3ac41f1c304067bacb.tar.bz2
Merge 249763 "Fix the painting issue observed with windowed NPAP..."
> 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 TBR=ananta@chromium.org Review URL: https://codereview.chromium.org/159113002 git-svn-id: svn://svn.chromium.org/chrome/branches/1750/src@250155 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 7f4da87..4101a78 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -202,7 +202,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;
}