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

Unified Diff: webkit/tools/test_shell/test_webview_delegate_win.cc

Issue 174513: Add isVisible parameter to WebPlugin::updateGeometry.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 4 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 | « webkit/tools/layout_tests/test_expectations.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_webview_delegate_win.cc
===================================================================
--- webkit/tools/test_shell/test_webview_delegate_win.cc (revision 24434)
+++ webkit/tools/test_shell/test_webview_delegate_win.cc (working copy)
@@ -65,16 +65,22 @@
}
void TestWebViewDelegate::DidMovePlugin(const WebPluginGeometry& move) {
- HRGN hrgn = ::CreateRectRgn(move.clip_rect.x(),
- move.clip_rect.y(),
- move.clip_rect.right(),
- move.clip_rect.bottom());
- gfx::SubtractRectanglesFromRegion(hrgn, move.cutout_rects);
+ unsigned long flags = 0;
- // Note: System will own the hrgn after we call SetWindowRgn,
- // so we don't need to call DeleteObject(hrgn)
- ::SetWindowRgn(move.window, hrgn, FALSE);
- unsigned long flags = 0;
+ if (move.rects_valid) {
+ HRGN hrgn = ::CreateRectRgn(move.clip_rect.x(),
+ move.clip_rect.y(),
+ move.clip_rect.right(),
+ move.clip_rect.bottom());
+ gfx::SubtractRectanglesFromRegion(hrgn, move.cutout_rects);
+
+ // Note: System will own the hrgn after we call SetWindowRgn,
+ // so we don't need to call DeleteObject(hrgn)
+ ::SetWindowRgn(move.window, hrgn, FALSE);
+ } else {
+ flags |= (SWP_NOSIZE | SWP_NOMOVE);
+ }
+
if (move.visible)
flags |= SWP_SHOWWINDOW;
else
« no previous file with comments | « webkit/tools/layout_tests/test_expectations.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698