Commit e03fde26 authored by apavlov@chromium.org's avatar apavlov@chromium.org
Browse files

[Chromium] REGRESSION: Popup shrinks because of autocomplete

https://bugs.webkit.org/show_bug.cgi?id=84139
http://code.google.com/p/chromium/issues/detail?id=123432

Source/WebCore:

Do not update the window rect on the wrong client but instead return the popup widget's
new screen coordinates from the refresh() method.

Reviewed by Kent Tamura.

* platform/chromium/PopupContainer.cpp:
(WebCore::PopupContainer::refresh):
* platform/chromium/PopupContainer.h:
(PopupContainer):

Source/WebKit/chromium:

Do not use the PopupContainer's frameRect() to update the popup client's window rect,
since PopupContainer is always positioned at (0, 0) inside the client's window rect,
and the latter one is positioned relative to the screen origin.

Reviewed by Kent Tamura.

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::refreshAutofillPopup):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2b64eec0
2012-04-18 Alexander Pavlov <apavlov@chromium.org>
[Chromium] REGRESSION: Popup shrinks because of autocomplete
https://bugs.webkit.org/show_bug.cgi?id=84139
http://code.google.com/p/chromium/issues/detail?id=123432
Do not update the window rect on the wrong client but instead return the popup widget's
new screen coordinates from the refresh() method.
Reviewed by Kent Tamura.
* platform/chromium/PopupContainer.cpp:
(WebCore::PopupContainer::refresh):
* platform/chromium/PopupContainer.h:
(PopupContainer):
2012-04-18 Simon Fraser <simon.fraser@apple.com>
 
ASSERT when a layer with a foreground layer is in 'paint into ancestor' mode
......@@ -407,7 +407,7 @@ void PopupContainer::showInRect(const IntRect& r, FrameView* v, int index)
showPopup(v);
}
void PopupContainer::refresh(const IntRect& targetControlRect)
IntRect PopupContainer::refresh(const IntRect& targetControlRect)
{
listBox()->setBaseWidth(max(m_originalFrameRect.width() - kBorderSize * 2, 0));
listBox()->updateFromElement();
......@@ -423,14 +423,9 @@ void PopupContainer::refresh(const IntRect& targetControlRect)
if (size() != widgetRectInScreen.size())
resize(widgetRectInScreen.size());
ChromeClientChromium* chromeClient = chromeClientChromium();
if (chromeClient) {
// Update the WebWidget location (which is relative to the screen origin).
if (widgetRectInScreen != chromeClient->windowRect())
chromeClient->setWindowRect(widgetRectInScreen);
}
invalidate();
return widgetRectInScreen;
}
inline bool PopupContainer::isRTL() const
......
......@@ -99,7 +99,7 @@ public:
int selectedIndex() const;
// Refresh the popup values from the PopupMenuClient.
void refresh(const IntRect& targetControlRect);
IntRect refresh(const IntRect& targetControlRect);
// The menu per-item data.
const WTF::Vector<PopupItem*>& popupData() const;
......
2012-04-18 Alexander Pavlov <apavlov@chromium.org>
[Chromium] REGRESSION: Popup shrinks because of autocomplete
https://bugs.webkit.org/show_bug.cgi?id=84139
http://code.google.com/p/chromium/issues/detail?id=123432
Do not use the PopupContainer's frameRect() to update the popup client's window rect,
since PopupContainer is always positioned at (0, 0) inside the client's window rect,
and the latter one is positioned relative to the screen origin.
Reviewed by Kent Tamura.
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::refreshAutofillPopup):
2012-04-17 Rafael Weinstein <rafaelw@chromium.org>
 
[MutationObservers] enable V8RecursionScope debug ASSERT()
......@@ -3064,16 +3064,11 @@ void WebViewImpl::refreshAutofillPopup()
return;
}
IntRect oldBounds = m_autofillPopup->frameRect();
m_autofillPopup->refresh(focusedWebCoreNode()->getPixelSnappedRect());
IntRect newBounds = m_autofillPopup->frameRect();
WebRect newWidgetRect = m_autofillPopup->refresh(focusedWebCoreNode()->getPixelSnappedRect());
// Let's resize the backing window if necessary.
if (oldBounds != newBounds) {
WebPopupMenuImpl* popupMenu =
static_cast<WebPopupMenuImpl*>(m_autofillPopup->client());
if (popupMenu)
popupMenu->client()->setWindowRect(m_chromeClientImpl.rootViewToScreen(newBounds));
}
WebPopupMenuImpl* popupMenu = static_cast<WebPopupMenuImpl*>(m_autofillPopup->client());
if (popupMenu && popupMenu->client()->windowRect() != newWidgetRect)
popupMenu->client()->setWindowRect(newWidgetRect);
}
Node* WebViewImpl::focusedWebCoreNode()
......
Supports Markdown
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