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

Side by Side Diff: webkit/glue/plugins/webplugin_delegate_impl_gtk.cc

Issue 159689: linux: don't call NPP_SetWindow if the width/height is <= 0 (Closed)
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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/glue/plugins/webplugin_delegate_impl.h" 5 #include "webkit/glue/plugins/webplugin_delegate_impl.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include <gtk/gtk.h> 10 #include <gtk/gtk.h>
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 308
309 void WebPluginDelegateImpl::WindowedSetWindow() { 309 void WebPluginDelegateImpl::WindowedSetWindow() {
310 if (!instance_) 310 if (!instance_)
311 return; 311 return;
312 312
313 if (!windowed_handle_) { 313 if (!windowed_handle_) {
314 NOTREACHED(); 314 NOTREACHED();
315 return; 315 return;
316 } 316 }
317 317
318 // See https://bugzilla.mozilla.org/show_bug.cgi?id=108347
319 // If we call NPP_SetWindow with a <= 0 width or height, problems arise in
320 // Flash (and possibly other plugins).
321 // TODO(piman): the Mozilla code suggests that for the Java plugin, we should
322 // still call NPP_SetWindow in that case. We need to verify that.
323 if (window_rect_.width() <= 0 || window_rect_.height() <= 0) {
324 return;
325 }
326
318 instance()->set_window_handle(windowed_handle_); 327 instance()->set_window_handle(windowed_handle_);
319 328
320 DCHECK(!instance()->windowless()); 329 DCHECK(!instance()->windowless());
321 330
322 window_.clipRect.top = clip_rect_.y(); 331 window_.clipRect.top = clip_rect_.y();
323 window_.clipRect.left = clip_rect_.x(); 332 window_.clipRect.left = clip_rect_.x();
324 window_.clipRect.bottom = clip_rect_.y() + clip_rect_.height(); 333 window_.clipRect.bottom = clip_rect_.y() + clip_rect_.height();
325 window_.clipRect.right = clip_rect_.x() + clip_rect_.width(); 334 window_.clipRect.right = clip_rect_.x() + clip_rect_.width();
326 window_.height = window_rect_.height(); 335 window_.height = window_rect_.height();
327 window_.width = window_rect_.width(); 336 window_.width = window_rect_.width();
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 return stream; 853 return stream;
845 } 854 }
846 855
847 void WebPluginDelegateImpl::URLRequestRouted(const std::string&url, 856 void WebPluginDelegateImpl::URLRequestRouted(const std::string&url,
848 bool notify_needed, 857 bool notify_needed,
849 intptr_t notify_data) { 858 intptr_t notify_data) {
850 if (notify_needed) { 859 if (notify_needed) {
851 instance()->SetURLLoadData(GURL(url.c_str()), notify_data); 860 instance()->SetURLLoadData(GURL(url.c_str()), notify_data);
852 } 861 }
853 } 862 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698