mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-09 05:14:24 +00:00
Bug 807174 - Drop-down list used inside a frameset document renders outside the frame. r=roc
This commit is contained in:
parent
7d3defab82
commit
d9d4cc8342
@ -644,11 +644,12 @@ nsComboboxControlFrame::GetAvailableDropdownSpace(nscoord* aAbove,
|
||||
}
|
||||
|
||||
nscoord minY;
|
||||
if (!PresContext()->IsChrome()) {
|
||||
nsIFrame* root = PresContext()->PresShell()->GetRootFrame();
|
||||
nsPresContext* pc = PresContext()->GetToplevelContentDocumentPresContext();
|
||||
nsIFrame* root = pc ? pc->PresShell()->GetRootFrame() : nullptr;
|
||||
if (root) {
|
||||
minY = root->GetScreenRectInAppUnits().y;
|
||||
if (mLastDropDownBelowScreenY < root->GetScreenRectInAppUnits().y) {
|
||||
// Don't allow the drop-down to be placed above the top of the root frame.
|
||||
if (mLastDropDownBelowScreenY < minY) {
|
||||
// Don't allow the drop-down to be placed above the content area.
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user