| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |