mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-02 03:49:37 +00:00
fix for bug 25073
-r hyatt -a jevering
This commit is contained in:
parent
3990646a0b
commit
da65a61758
@ -743,7 +743,23 @@ nsMenuFrame::Reflow(nsIPresContext* aPresContext,
|
||||
nsresult rv = child->GetNextSibling(&child);
|
||||
NS_ASSERTION(rv == NS_OK,"failed to get next child");
|
||||
}
|
||||
}
|
||||
} else if (aReflowState.reason == eReflowReason_Dirty) {
|
||||
// sometimes incrementals are converted to dirty. This is done in the case just above this. So lets check
|
||||
// to see if this was converted. If it was it will still have a reflow state.
|
||||
if (aReflowState.reflowCommand) {
|
||||
// it was converted so lets see if the next child is this one. If it is then convert it back and
|
||||
// pass it down.
|
||||
nsIFrame* incrementalChild = nsnull;
|
||||
aReflowState.reflowCommand->GetNext(incrementalChild, PR_FALSE);
|
||||
if (incrementalChild == popupChild)
|
||||
{
|
||||
nsHTMLReflowState state(aReflowState);
|
||||
state.reason = eReflowReason_Incremental;
|
||||
return Reflow(aPresContext, aDesiredSize, state, aStatus);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If we're a menulist AND if we're intrinsically sized, then
|
||||
// we need to flow our popup and use its width as our own width.
|
||||
|
@ -682,10 +682,13 @@ nsMenuPopupFrame::SyncViewWithFrame(nsIPresContext* aPresContext,
|
||||
viewManager->MoveViewTo(view, xpos, ypos);
|
||||
viewManager->ResizeView(view, mRect.width, mRect.height);
|
||||
|
||||
nsAutoString shouldDisplay;
|
||||
mContent->GetAttribute(kNameSpaceID_None, nsXULAtoms::menutobedisplayed, shouldDisplay);
|
||||
if ( shouldDisplay.Equals("true") )
|
||||
mContent->SetAttribute(kNameSpaceID_None, nsXULAtoms::menuactive, "true", PR_TRUE);
|
||||
nsAutoString shouldDisplay, menuActive;
|
||||
mContent->GetAttribute(kNameSpaceID_None, nsXULAtoms::menuactive, menuActive);
|
||||
if ( !menuActive.Equals("true") ) {
|
||||
mContent->GetAttribute(kNameSpaceID_None, nsXULAtoms::menutobedisplayed, shouldDisplay);
|
||||
if ( shouldDisplay.Equals("true") )
|
||||
mContent->SetAttribute(kNameSpaceID_None, nsXULAtoms::menuactive, "true", PR_TRUE);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -237,7 +237,23 @@ nsPopupSetFrame::Reflow(nsIPresContext* aPresContext,
|
||||
nsresult rv = child->GetNextSibling(&child);
|
||||
NS_ASSERTION(rv == NS_OK,"failed to get next child");
|
||||
}
|
||||
}
|
||||
} else if (aReflowState.reason == eReflowReason_Dirty) {
|
||||
// sometimes incrementals are converted to dirty. This is done in the case just above this. So lets check
|
||||
// to see if this was converted. If it was it will still have a reflow state.
|
||||
if (aReflowState.reflowCommand) {
|
||||
// it was converted so lets see if the next child is this one. If it is then convert it back and
|
||||
// pass it down.
|
||||
nsIFrame* incrementalChild = nsnull;
|
||||
aReflowState.reflowCommand->GetNext(incrementalChild, PR_FALSE);
|
||||
if (incrementalChild == popupChild)
|
||||
{
|
||||
nsHTMLReflowState state(aReflowState);
|
||||
state.reason = eReflowReason_Incremental;
|
||||
return Reflow(aPresContext, aDesiredSize, state, aStatus);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Handle reflowing our subordinate popup
|
||||
if (popupChild) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user