Title: [118773] branches/chromium/1132/Source/WebCore/platform/chromium/PopupContainer.cpp
- Revision
- 118773
- Author
- [email protected]
- Date
- 2012-05-29 07:09:58 -0700 (Tue, 29 May 2012)
Log Message
Merge 118768 - [Chromium] [Regression] SELECT popup misplaced when there is not enough vertical space
https://bugs.webkit.org/show_bug.cgi?id=87735
Reviewed by Kent Tamura.
This change fixes the obsolete WebWidget Y-repositioning code for the insufficient vertical space case, not removed in r113418.
No new tests, as popups are not testable in Chromium.
* platform/chromium/PopupContainer.cpp:
(WebCore::PopupContainer::layoutAndCalculateWidgetRect):
[email protected]
Review URL: https://chromiumcodereview.appspot.com/10442063
Modified Paths
Diff
Modified: branches/chromium/1132/Source/WebCore/platform/chromium/PopupContainer.cpp (118772 => 118773)
--- branches/chromium/1132/Source/WebCore/platform/chromium/PopupContainer.cpp 2012-05-29 14:00:34 UTC (rev 118772)
+++ branches/chromium/1132/Source/WebCore/platform/chromium/PopupContainer.cpp 2012-05-29 14:09:58 UTC (rev 118773)
@@ -185,13 +185,10 @@
else
m_listBox->setMaxHeight(spaceBelow);
layoutAndGetRTLOffset();
- // Our height has changed, so recompute only Y axis of widgetRect.
- // We don't have to recompute X axis, so we only replace Y axis
- // in widgetRect.
- IntRect frameInScreen = chromeClient->rootViewToScreen(frameRect());
- widgetRectInScreen.setY(frameInScreen.y());
- widgetRectInScreen.setHeight(frameInScreen.height());
- // And move upwards if necessary.
+ // Container height may have changed in layoutAndGetRTLOffset(),
+ // so set the WebWidget height to the container height.
+ widgetRectInScreen.setHeight(height());
+ // Move WebWidget upwards if necessary.
if (spaceAbove > spaceBelow)
widgetRectInScreen.move(0, -(widgetRectInScreen.height() + targetControlHeight));
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes