diff options
author | pinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-21 18:54:19 +0000 |
---|---|---|
committer | pinkerton@google.com <pinkerton@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-21 18:54:19 +0000 |
commit | c04b6367950900e19ced8d89393d3b870fd837b8 (patch) | |
tree | beb0a0a6a0d2cd60c0d456c0fd4b94cfb4c4b518 /chrome | |
parent | 0eb9f434fb019da43b97c81d7e314885d43af0f9 (diff) | |
download | chromium_src-c04b6367950900e19ced8d89393d3b870fd837b8.zip chromium_src-c04b6367950900e19ced8d89393d3b870fd837b8.tar.gz chromium_src-c04b6367950900e19ced8d89393d3b870fd837b8.tar.bz2 |
Plumb WebCore's windowResizerRect() through glue and renderer. Enables Mac scrollbars to not overlap the in-window resizer widget.
Review URL: http://codereview.chromium.org/11353
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5831 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/resource_message_filter.cc | 6 | ||||
-rw-r--r-- | chrome/browser/resource_message_filter.h | 1 | ||||
-rw-r--r-- | chrome/common/render_messages_internal.h | 8 | ||||
-rw-r--r-- | chrome/renderer/render_widget.cc | 5 | ||||
-rw-r--r-- | chrome/renderer/render_widget.h | 1 |
5 files changed, 20 insertions, 1 deletions
diff --git a/chrome/browser/resource_message_filter.cc b/chrome/browser/resource_message_filter.cc index f31cf41..7a91075 100644 --- a/chrome/browser/resource_message_filter.cc +++ b/chrome/browser/resource_message_filter.cc @@ -139,6 +139,7 @@ bool ResourceMessageFilter::OnMessageReceived(const IPC::Message& message) { OnClipboardReadHTML) IPC_MESSAGE_HANDLER(ViewHostMsg_GetWindowRect, OnGetWindowRect) IPC_MESSAGE_HANDLER(ViewHostMsg_GetRootWindowRect, OnGetRootWindowRect) + IPC_MESSAGE_HANDLER(ViewHostMsg_GetRootWindowResizerRect, OnGetRootWindowResizerRect) IPC_MESSAGE_HANDLER(ViewHostMsg_GetMimeTypeFromExtension, OnGetMimeTypeFromExtension) IPC_MESSAGE_HANDLER(ViewHostMsg_GetMimeTypeFromFile, @@ -464,6 +465,11 @@ void ResourceMessageFilter::OnGetRootWindowRect(HWND window, gfx::Rect *rect) { *rect = window_rect; } +void ResourceMessageFilter::OnGetRootWindowResizerRect(HWND window, gfx::Rect *rect) { + RECT window_rect = {0}; + *rect = window_rect; +} + void ResourceMessageFilter::OnGetMimeTypeFromExtension( const std::wstring& ext, std::string* mime_type) { net::GetMimeTypeFromExtension(ext, mime_type); diff --git a/chrome/browser/resource_message_filter.h b/chrome/browser/resource_message_filter.h index 4630cdb..0fd3cce 100644 --- a/chrome/browser/resource_message_filter.h +++ b/chrome/browser/resource_message_filter.h @@ -129,6 +129,7 @@ class ResourceMessageFilter : public IPC::ChannelProxy::MessageFilter, void OnClipboardReadHTML(std::wstring* markup, GURL* src_url); void OnGetWindowRect(HWND window, gfx::Rect *rect); void OnGetRootWindowRect(HWND window, gfx::Rect *rect); + void OnGetRootWindowResizerRect(HWND window, gfx::Rect *rect); void OnGetMimeTypeFromExtension(const std::wstring& ext, std::string* mime_type); void OnGetMimeTypeFromFile(const std::wstring& file_path, diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h index 02e910d..0d4076c 100644 --- a/chrome/common/render_messages_internal.h +++ b/chrome/common/render_messages_internal.h @@ -1069,11 +1069,17 @@ IPC_BEGIN_MESSAGES(ViewHost, 2) IPC_MESSAGE_ROUTED1(ViewHostMsg_UnloadListenerChanged, bool /* has_listener */) - // Returns the window location of the window this widget is embeded in. + // Returns the window location of the window this widget is embeded. IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_GetRootWindowRect, HWND /* window */, gfx::Rect /* Out: Window location */) + // Returns the resizer box location in the window this widget is embeded. + // Important for Mac OS X, but not Win or Linux. + IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_GetRootWindowResizerRect, + HWND /* window */, + gfx::Rect /* Out: Window location */) + // Queries the browser for suggestion for autofill in a form input field. IPC_MESSAGE_ROUTED4(ViewHostMsg_QueryFormFieldAutofill, std::wstring /* field name */, diff --git a/chrome/renderer/render_widget.cc b/chrome/renderer/render_widget.cc index 4c00b27..c94f769 100644 --- a/chrome/renderer/render_widget.cc +++ b/chrome/renderer/render_widget.cc @@ -657,6 +657,11 @@ void RenderWidget::GetRootWindowRect(WebWidget* webwidget, gfx::Rect* rect) { Send(new ViewHostMsg_GetRootWindowRect(routing_id_, host_window_, rect)); } +void RenderWidget::GetRootWindowResizerRect(WebWidget* webwidget, + gfx::Rect* rect) { + Send(new ViewHostMsg_GetRootWindowResizerRect(routing_id_, host_window_, rect)); +} + void RenderWidget::OnImeSetInputMode(bool is_active) { // To prevent this renderer process from sending unnecessary IPC messages to // a browser process, we permit the renderer process to send IPC messages diff --git a/chrome/renderer/render_widget.h b/chrome/renderer/render_widget.h index 55e4d7e..e3a750e 100644 --- a/chrome/renderer/render_widget.h +++ b/chrome/renderer/render_widget.h @@ -76,6 +76,7 @@ class RenderWidget : public IPC::Channel::Listener, virtual void GetWindowRect(WebWidget* webwidget, gfx::Rect* rect); virtual void SetWindowRect(WebWidget* webwidget, const gfx::Rect& rect); virtual void GetRootWindowRect(WebWidget* webwidget, gfx::Rect* rect); + virtual void GetRootWindowResizerRect(WebWidget* webwidget, gfx::Rect* rect); virtual void DidMove(WebWidget* webwidget, const WebPluginGeometry& move); virtual void RunModal(WebWidget* webwidget) {} virtual bool IsHidden() { return is_hidden_; } |