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

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

Issue 118359: Don't call NPP_SetWindow before we have the plugin geometry. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/render_messages.h ('k') | webkit/glue/webplugin.h » ('j') | 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 "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 733
734 if (!windowed_handle_) { 734 if (!windowed_handle_) {
735 NOTREACHED(); 735 NOTREACHED();
736 return; 736 return;
737 } 737 }
738 738
739 instance()->set_window_handle(windowed_handle_); 739 instance()->set_window_handle(windowed_handle_);
740 740
741 DCHECK(!instance()->windowless()); 741 DCHECK(!instance()->windowless());
742 742
743 window_.clipRect.top = clip_rect_.y(); 743 window_.clipRect.top = std::max(0, clip_rect_.y());
744 window_.clipRect.left = clip_rect_.x(); 744 window_.clipRect.left = std::max(0, clip_rect_.x());
745 window_.clipRect.bottom = clip_rect_.y() + clip_rect_.height(); 745 window_.clipRect.bottom = std::max(0, clip_rect_.y() + clip_rect_.height());
746 window_.clipRect.right = clip_rect_.x() + clip_rect_.width(); 746 window_.clipRect.right = std::max(0, clip_rect_.x() + clip_rect_.width());
747 window_.height = window_rect_.height(); 747 window_.height = window_rect_.height();
748 window_.width = window_rect_.width(); 748 window_.width = window_rect_.width();
749 window_.x = 0; 749 window_.x = 0;
750 window_.y = 0; 750 window_.y = 0;
751 751
752 window_.window = windowed_handle_; 752 window_.window = windowed_handle_;
753 window_.type = NPWindowTypeWindow; 753 window_.type = NPWindowTypeWindow;
754 754
755 // Reset this flag before entering the instance in case of side-effects. 755 // Reset this flag before entering the instance in case of side-effects.
756 windowed_did_set_window_ = true; 756 windowed_did_set_window_ = true;
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 1313
1314 // It is ok to pass NULL here to GetCursor as we are not looking for cursor 1314 // It is ok to pass NULL here to GetCursor as we are not looking for cursor
1315 // types defined by Webkit. 1315 // types defined by Webkit.
1316 HCURSOR previous_cursor = 1316 HCURSOR previous_cursor =
1317 g_current_plugin_instance->current_windowless_cursor_.GetCursor(NULL); 1317 g_current_plugin_instance->current_windowless_cursor_.GetCursor(NULL);
1318 1318
1319 g_current_plugin_instance->current_windowless_cursor_.InitFromExternalCursor( 1319 g_current_plugin_instance->current_windowless_cursor_.InitFromExternalCursor(
1320 cursor); 1320 cursor);
1321 return previous_cursor; 1321 return previous_cursor;
1322 } 1322 }
OLDNEW
« no previous file with comments | « chrome/common/render_messages.h ('k') | webkit/glue/webplugin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698