[Chromium] Calendar Picker: Popup position is wrong when there are
authortkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Apr 2012 07:40:30 +0000 (07:40 +0000)
committertkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Apr 2012 07:40:30 +0000 (07:40 +0000)
commit143f93b8cfe118e7df3ae4dacd5291c87e8b6d6c
treebf6e517bc47f826500f62389271a7b496e39a565
parent9e77b414290e16348502d8f9def7c9f74bfa38f8
[Chromium] Calendar Picker: Popup position is wrong when there are
no enough space below the target date field
https://bugs.webkit.org/show_bug.cgi?id=84007

Reviewed by Hajime Morita.

The popup was detached from the origin element because
calendarPicker.js resizes its window. To fix this bug, we move the
window position vertically when it is resized.

No new tests. This is not testable in WebKit.

* src/WebPagePopupImpl.cpp:
(WebKit::PagePopupChromeClient::setWindowRect):
If this request is just a resize and m_isPutAboveOrigin is true,
update the vertical position so that the popup attaches to the
origin rectangle.
(WebKit::WebPagePopupImpl::WebPagePopupImpl):
Initialize m_isPutAboveOrigin with false.
(WebKit::WebPagePopupImpl::init): Set m_isPutAboveOrigin true.
* src/WebPagePopupImpl.h:
(WebPagePopupImpl): Add m_isPutAboveOrigin.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114357 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WebPagePopupImpl.cpp
Source/WebKit/chromium/src/WebPagePopupImpl.h