mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 393459 Can't use <splitter resizeafter="grow"> without a next subling r=Enn sr=bz a=dbaron
This commit is contained in:
parent
8cc64e806a
commit
ac76806bdd
@ -734,10 +734,13 @@ nsSplitterFrameInner::MouseDown(nsIDOMEvent* aMouseEvent)
|
|||||||
// get our index
|
// get our index
|
||||||
nsPresContext* outerPresContext = mOuter->PresContext();
|
nsPresContext* outerPresContext = mOuter->PresContext();
|
||||||
nscoord childIndex = nsFrameNavigator::IndexOf(outerPresContext, mParentBox, mOuter);
|
nscoord childIndex = nsFrameNavigator::IndexOf(outerPresContext, mParentBox, mOuter);
|
||||||
PRInt32 childCount = nsFrameNavigator::CountFrames(outerPresContext, mParentBox);
|
// if it's 0 then stop right here.
|
||||||
|
if (childIndex == 0)
|
||||||
|
return NS_OK;
|
||||||
|
|
||||||
// if it's 0 or the last index then stop right here.
|
PRInt32 childCount = nsFrameNavigator::CountFrames(outerPresContext, mParentBox);
|
||||||
if (childIndex == 0 || childIndex == childCount - 1)
|
// if it's the last index then we need to allow for resizeafter="grow"
|
||||||
|
if (childIndex == childCount - 1 && GetResizeAfter() != Grow)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
nsCOMPtr<nsIRenderingContext> rc;
|
nsCOMPtr<nsIRenderingContext> rc;
|
||||||
|
Loading…
Reference in New Issue
Block a user