summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell/mac
diff options
context:
space:
mode:
authorcpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-08 23:16:24 +0000
committercpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-08 23:16:24 +0000
commiteb6439387ab5035450035d606f6ff32319c13789 (patch)
tree897f9ffa88d64addd5ed0de10039c3dfc383100a /webkit/tools/test_shell/mac
parent1640ffbff45713748fb31c9bbae46ea47ab6e8e0 (diff)
downloadchromium_src-eb6439387ab5035450035d606f6ff32319c13789.zip
chromium_src-eb6439387ab5035450035d606f6ff32319c13789.tar.gz
chromium_src-eb6439387ab5035450035d606f6ff32319c13789.tar.bz2
Reverting dfisher changes 133386 and 13381
TBR=darin Review URL: http://codereview.chromium.org/58018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13387 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/mac')
-rwxr-xr-xwebkit/tools/test_shell/mac/test_webview_delegate.mm19
-rw-r--r--webkit/tools/test_shell/mac/webview_host.mm9
-rw-r--r--webkit/tools/test_shell/mac/webwidget_host.mm8
3 files changed, 14 insertions, 22 deletions
diff --git a/webkit/tools/test_shell/mac/test_webview_delegate.mm b/webkit/tools/test_shell/mac/test_webview_delegate.mm
index 9ae7a80..039e34f3 100755
--- a/webkit/tools/test_shell/mac/test_webview_delegate.mm
+++ b/webkit/tools/test_shell/mac/test_webview_delegate.mm
@@ -7,15 +7,12 @@
#import <Cocoa/Cocoa.h>
#include "base/sys_string_conversions.h"
#include "base/string_util.h"
-#include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
#include "webkit/glue/webcursor.h"
#include "webkit/glue/webview.h"
#include "webkit/glue/plugins/plugin_list.h"
#include "webkit/glue/plugins/webplugin_delegate_impl.h"
#include "webkit/tools/test_shell/test_shell.h"
-using WebKit::WebRect;
-
// MenuDelegate ----------------------------------------------------------------
// A class for determining whether an item was selected from an HTML select
// control, or if the menu was dismissed without making a selection. If a menu
@@ -124,7 +121,7 @@ void TestWebViewDelegate::Show(WebWidget* webview,
// Display a HTML select menu.
void TestWebViewDelegate::ShowWithItems(
WebWidget* webview,
- const WebRect& bounds,
+ const gfx::Rect& bounds,
int item_height,
int selected_index,
const std::vector<MenuItem>& items) {
@@ -144,9 +141,9 @@ void TestWebViewDelegate::ShowWithItems(
[button selectItemAtIndex:selected_index];
NSView* web_view = shell_->webViewWnd();
NSRect view_rect = [web_view bounds];
- int y_offset = bounds.y + bounds.height;
- NSRect position = NSMakeRect(bounds.x, view_rect.size.height - y_offset,
- bounds.width, bounds.height);
+ int y_offset = bounds.y() + bounds.height();
+ NSRect position = NSMakeRect(bounds.x(), view_rect.size.height - y_offset,
+ bounds.width(), bounds.height());
// Display the menu, and set a flag to determine if something was chosen. If
// nothing was chosen (i.e., the user dismissed the popup by the "ESC" key or
@@ -229,7 +226,7 @@ void TestWebViewDelegate::SetCursor(WebWidget* webwidget,
}
void TestWebViewDelegate::GetWindowRect(WebWidget* webwidget,
- WebRect* out_rect) {
+ gfx::Rect* out_rect) {
DCHECK(out_rect);
if (WebWidgetHost* host = GetHostForWidget(webwidget)) {
NSView *view = host->view_handle();
@@ -239,7 +236,7 @@ void TestWebViewDelegate::GetWindowRect(WebWidget* webwidget,
}
void TestWebViewDelegate::SetWindowRect(WebWidget* webwidget,
- const WebRect& rect) {
+ const gfx::Rect& rect) {
// TODO: Mac window movement
if (webwidget == shell_->webView()) {
// ignored
@@ -250,7 +247,7 @@ void TestWebViewDelegate::SetWindowRect(WebWidget* webwidget,
}
void TestWebViewDelegate::GetRootWindowRect(WebWidget* webwidget,
- WebRect* out_rect) {
+ gfx::Rect* out_rect) {
if (WebWidgetHost* host = GetHostForWidget(webwidget)) {
NSView *view = host->view_handle();
NSRect rect = [[[view window] contentView] frame];
@@ -263,7 +260,7 @@ void TestWebViewDelegate::GetRootWindowRect(WebWidget* webwidget,
@end
void TestWebViewDelegate::GetRootWindowResizerRect(WebWidget* webwidget,
- WebRect* out_rect) {
+ gfx::Rect* out_rect) {
NSRect resize_rect = NSMakeRect(0, 0, 0, 0);
WebWidgetHost* host = GetHostForWidget(webwidget);
// To match the WebKit screen shots, we need the resize area to overlap
diff --git a/webkit/tools/test_shell/mac/webview_host.mm b/webkit/tools/test_shell/mac/webview_host.mm
index 13f8332..7c6c949 100644
--- a/webkit/tools/test_shell/mac/webview_host.mm
+++ b/webkit/tools/test_shell/mac/webview_host.mm
@@ -10,12 +10,9 @@
#include "base/gfx/platform_canvas.h"
#include "base/gfx/rect.h"
#include "base/gfx/size.h"
-#include "third_party/WebKit/WebKit/chromium/public/WebSize.h"
#include "webkit/glue/webview.h"
-using WebKit::WebSize;
-
-// static
+/*static*/
WebViewHost* WebViewHost::Create(NSView* parent_view,
WebViewDelegate* delegate,
const WebPreferences& prefs) {
@@ -34,8 +31,8 @@ WebViewHost* WebViewHost::Create(NSView* parent_view,
[host->view_ release];
host->webwidget_ = WebView::Create(delegate, prefs);
- host->webwidget_->Resize(WebSize(content_rect.size.width,
- content_rect.size.height));
+ host->webwidget_->Resize(gfx::Size(content_rect.size.width,
+ content_rect.size.height));
return host;
}
diff --git a/webkit/tools/test_shell/mac/webwidget_host.mm b/webkit/tools/test_shell/mac/webwidget_host.mm
index a24928a..bccb584 100644
--- a/webkit/tools/test_shell/mac/webwidget_host.mm
+++ b/webkit/tools/test_shell/mac/webwidget_host.mm
@@ -14,7 +14,6 @@
#include "third_party/WebKit/WebKit/chromium/public/mac/WebScreenInfoFactory.h"
#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
#include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h"
-#include "third_party/WebKit/WebKit/chromium/public/WebSize.h"
#include "webkit/glue/webwidget.h"
#include "webkit/tools/test_shell/test_shell.h"
@@ -25,7 +24,6 @@ using WebKit::WebMouseEvent;
using WebKit::WebMouseWheelEvent;
using WebKit::WebScreenInfo;
using WebKit::WebScreenInfoFactory;
-using WebKit::WebSize;
/*static*/
WebWidgetHost* WebWidgetHost::Create(NSView* parent_view,
@@ -41,8 +39,8 @@ WebWidgetHost* WebWidgetHost::Create(NSView* parent_view,
// win_util::SetWindowUserData(host->hwnd_, host);
host->webwidget_ = WebWidget::Create(delegate);
- host->webwidget_->Resize(WebSize(content_rect.size.width,
- content_rect.size.height));
+ host->webwidget_->Resize(gfx::Size(content_rect.size.width,
+ content_rect.size.height));
return host;
}
@@ -227,7 +225,7 @@ WebScreenInfo WebWidgetHost::GetScreenInfo() {
void WebWidgetHost::Resize(const gfx::Rect& rect) {
// Force an entire re-paint. TODO(darin): Maybe reuse this memory buffer.
DiscardBackingStore();
- webwidget_->Resize(WebSize(rect.width(), rect.height()));
+ webwidget_->Resize(gfx::Size(rect.width(), rect.height()));
}
void WebWidgetHost::MouseEvent(NSEvent *event) {