Commit cf2359ea authored by jbauman@chromium.org's avatar jbauman@chromium.org

Fix autofill popup size

This should tell the window its correct size, instead of the size expanded to be at least 64 pixels on each side.

BUG=286609,320974

Review URL: https://codereview.chromium.org/87383002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238284 0039d316-1c4b-4281-b951-d872f2087c98
parent 42b0eced
......@@ -134,7 +134,8 @@ RemoteRootWindowHostWin::RemoteRootWindowHostWin(const gfx::Rect& bounds)
: remote_window_(NULL),
host_(NULL),
ignore_mouse_moves_until_set_cursor_ack_(false),
event_flags_(0) {
event_flags_(0),
window_size_(aura::RootWindowHost::GetNativeScreenSize()) {
prop_.reset(new ui::ViewProp(NULL, kRootWindowHostWinKey, this));
}
......@@ -324,11 +325,11 @@ void RemoteRootWindowHostWin::ToggleFullScreen() {
}
gfx::Rect RemoteRootWindowHostWin::GetBounds() const {
gfx::Rect r(gfx::Point(0, 0), aura::RootWindowHost::GetNativeScreenSize());
return r;
return gfx::Rect(window_size_);
}
void RemoteRootWindowHostWin::SetBounds(const gfx::Rect& bounds) {
window_size_ = bounds.size();
delegate_->OnHostResized(bounds.size());
}
......
......@@ -262,6 +262,9 @@ class AURA_EXPORT RemoteRootWindowHostWin : public RootWindowHost {
// description of SetEventFlags().
uint32 event_flags_;
// Current size of this root window.
gfx::Size window_size_;
DISALLOW_COPY_AND_ASSIGN(RemoteRootWindowHostWin);
};
......
......@@ -835,7 +835,7 @@ void RootWindow::OnHostResized(const gfx::Size& size) {
// The layer, and the observers should be notified of the
// transformed size of the root window.
UpdateRootWindowSize(size);
UpdateRootWindowSize(host_->GetBounds().size());
FOR_EACH_OBSERVER(RootWindowObserver, observers_,
OnRootWindowHostResized(this));
}
......
......@@ -433,6 +433,8 @@ void DesktopRootWindowHostWin::ToggleFullScreen() {
gfx::Rect DesktopRootWindowHostWin::GetBounds() const {
// Match the logic in HWNDMessageHandler::ClientAreaSizeChanged().
if (IsMinimized())
return gfx::Rect();
gfx::Rect bounds(WidgetSizeIsClientSize() ?
message_handler_->GetClientAreaBoundsInScreen() :
message_handler_->GetWindowBoundsInScreen());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment