summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/renderer/render_widget.cc6
-rw-r--r--webkit/api/public/WebPlugin.h2
-rw-r--r--webkit/api/src/WebPluginContainerImpl.cpp4
-rw-r--r--webkit/glue/webplugin_impl.cc4
-rw-r--r--webkit/glue/webplugin_impl.h2
-rw-r--r--webkit/tools/layout_tests/test_expectations.txt3
-rw-r--r--webkit/tools/test_shell/test_webview_delegate_win.cc24
7 files changed, 26 insertions, 19 deletions
diff --git a/chrome/renderer/render_widget.cc b/chrome/renderer/render_widget.cc
index cd722ba..6a6c0a4 100644
--- a/chrome/renderer/render_widget.cc
+++ b/chrome/renderer/render_widget.cc
@@ -857,7 +857,11 @@ void RenderWidget::SchedulePluginMove(const WebPluginGeometry& move) {
size_t i = 0;
for (; i < plugin_window_moves_.size(); ++i) {
if (plugin_window_moves_[i].window == move.window) {
- plugin_window_moves_[i] = move;
+ if (move.rects_valid) {
+ plugin_window_moves_[i] = move;
+ } else {
+ plugin_window_moves_[i].visible = move.visible;
+ }
break;
}
}
diff --git a/webkit/api/public/WebPlugin.h b/webkit/api/public/WebPlugin.h
index 616af74..1d0b900 100644
--- a/webkit/api/public/WebPlugin.h
+++ b/webkit/api/public/WebPlugin.h
@@ -54,7 +54,7 @@ namespace WebKit {
// Coordinates are relative to the containing window.
virtual void updateGeometry(
const WebRect& frameRect, const WebRect& clipRect,
- const WebVector<WebRect>& cutOutsRects) = 0;
+ const WebVector<WebRect>& cutOutsRects, bool isVisible) = 0;
virtual void updateFocus(bool) = 0;
virtual void updateVisibility(bool) = 0;
diff --git a/webkit/api/src/WebPluginContainerImpl.cpp b/webkit/api/src/WebPluginContainerImpl.cpp
index 4b14d5b..065d85e 100644
--- a/webkit/api/src/WebPluginContainerImpl.cpp
+++ b/webkit/api/src/WebPluginContainerImpl.cpp
@@ -68,14 +68,14 @@ void WebPluginContainerImpl::setFrameRect(const IntRect& frameRect)
{
Widget::setFrameRect(frameRect);
- if (!parent() || !isVisible())
+ if (!parent())
return;
IntRect windowRect, clipRect;
Vector<IntRect> cutOutRects;
calculateGeometry(frameRect, windowRect, clipRect, cutOutRects);
- m_webPlugin->updateGeometry(windowRect, clipRect, cutOutRects);
+ m_webPlugin->updateGeometry(windowRect, clipRect, cutOutRects, isVisible());
}
void WebPluginContainerImpl::paint(GraphicsContext* gc, const IntRect& damageRect)
diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc
index 397fbd2..d10cf6c 100644
--- a/webkit/glue/webplugin_impl.cc
+++ b/webkit/glue/webplugin_impl.cc
@@ -285,7 +285,7 @@ void WebPluginImpl::paint(WebCanvas* canvas, const WebRect& paint_rect) {
void WebPluginImpl::updateGeometry(
const WebRect& window_rect, const WebRect& clip_rect,
- const WebVector<WebRect>& cutout_rects) {
+ const WebVector<WebRect>& cutout_rects, bool is_visible) {
if (window_) {
WebViewDelegate* view_delegate = GetWebViewDelegate();
if (view_delegate) {
@@ -299,7 +299,7 @@ void WebPluginImpl::updateGeometry(
for (size_t i = 0; i < cutout_rects.size(); ++i)
move.cutout_rects.push_back(cutout_rects[i]);
move.rects_valid = true;
- move.visible = true; // Assume visible or else we wouldn't be here.
+ move.visible = is_visible;
view_delegate->DidMovePlugin(move);
}
diff --git a/webkit/glue/webplugin_impl.h b/webkit/glue/webplugin_impl.h
index 7f98759..ce8ab56 100644
--- a/webkit/glue/webplugin_impl.h
+++ b/webkit/glue/webplugin_impl.h
@@ -88,7 +88,7 @@ class WebPluginImpl : public WebPlugin,
WebKit::WebCanvas* canvas, const WebKit::WebRect& paint_rect);
virtual void updateGeometry(
const WebKit::WebRect& frame_rect, const WebKit::WebRect& clip_rect,
- const WebKit::WebVector<WebKit::WebRect>& cut_outs);
+ const WebKit::WebVector<WebKit::WebRect>& cut_outs, bool is_visible);
virtual void updateFocus(bool focused);
virtual void updateVisibility(bool visible);
virtual bool acceptsInputEvents();
diff --git a/webkit/tools/layout_tests/test_expectations.txt b/webkit/tools/layout_tests/test_expectations.txt
index 40e485a..e4d5e49 100644
--- a/webkit/tools/layout_tests/test_expectations.txt
+++ b/webkit/tools/layout_tests/test_expectations.txt
@@ -2788,9 +2788,6 @@ BUG19766 LINUX : LayoutTests/fast/replaced/width100percent-menulist.html = FAIL
BUG19665 MAC : LayoutTests/platform/mac/editing/input/hangul-enter-confirms-and-sends-keypress.html = FAIL
BUG19665 MAC : LayoutTests/platform/mac/editing/input/kotoeri-enter-to-confirm-and-newline.html = FAIL
-BUG19888 LINUX WIN : LayoutTests/plugins/netscape-plugin-setwindow-size-2.html = FAIL
-BUG19888 WIN : LayoutTests/plugins/netscape-plugin-setwindow-size.html = FAIL
-
// Temporary supression while we investigate.
BUG19842 MAC : LayoutTests/fast/forms/input-type-change2.html = CRASH
diff --git a/webkit/tools/test_shell/test_webview_delegate_win.cc b/webkit/tools/test_shell/test_webview_delegate_win.cc
index fe57540..8c174a4 100644
--- a/webkit/tools/test_shell/test_webview_delegate_win.cc
+++ b/webkit/tools/test_shell/test_webview_delegate_win.cc
@@ -65,16 +65,22 @@ WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
}
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);
-
- // 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