Skip to content

Commit

Permalink
Bug 807174 - Drop-down list used inside a frameset document renders o…
Browse files Browse the repository at this point in the history
…utside the frame. r=roc a=lsblakk
  • Loading branch information
MatsPalmgren committed Nov 5, 2012
1 parent 69167a8 commit c79fb6b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions layout/forms/nsComboboxControlFrame.cpp
Expand Up @@ -653,11 +653,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 {
Expand Down

0 comments on commit c79fb6b

Please sign in to comment.