Index: webkit/tools/test_shell/mac/test_webview_delegate.mm |
=================================================================== |
--- webkit/tools/test_shell/mac/test_webview_delegate.mm (revision 26736) |
+++ webkit/tools/test_shell/mac/test_webview_delegate.mm (working copy) |
@@ -112,16 +112,17 @@ |
} |
void TestWebViewDelegate::setWindowRect(const WebRect& rect) { |
- // TODO: Mac window movement |
if (this == shell_->delegate()) { |
- // ignored |
+ setFakeWindowRect(rect); |
} else if (this == shell_->popup_delegate()) { |
popup_bounds_ = rect; // The initial position of the popup. |
} |
} |
WebRect TestWebViewDelegate::rootWindowRect() { |
- if (WebWidgetHost* host = GetWidgetHost()) { |
+ if (using_fake_rect_) { |
+ return getFakeWindowRect(); |
+ } else if (WebWidgetHost* host = GetWidgetHost()) { |
dglazkov
2009/09/23 18:17:14
Early return, no need to use else if, right?
|
NSView *view = host->view_handle(); |
NSRect rect = [[[view window] contentView] frame]; |
return gfx::Rect(NSRectToCGRect(rect)); |