Bug 293453. Hack scrolled frame NS_FRAME_OUTSIDE_CHILDREN to work around event handling bug. r+sr=bzbarsky,a=asa

This commit is contained in:
roc+%cs.cmu.edu 2005-05-15 23:04:45 +00:00
Родитель 1f9e2c08a1
Коммит 54493db125
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -631,6 +631,9 @@ nsHTMLScrollFrame::PlaceScrollArea(const ScrollReflowState& aState)
PR_MAX(childOverflow.XMost(), aState.mScrollPortRect.width),
PR_MAX(childOverflow.YMost(), aState.mScrollPortRect.height));
mInner.mScrolledFrame->SetRect(childRect);
// XXX hack! force the scrolled frame to think it has overflow
// to avoid problems with incorrect event targeting.
mInner.mScrolledFrame->AddStateBits(NS_FRAME_OUTSIDE_CHILDREN);
nsContainerFrame::SyncFrameViewAfterReflow(mInner.mScrolledFrame->GetPresContext(),
mInner.mScrolledFrame,
@ -2000,6 +2003,9 @@ nsXULScrollFrame::LayoutScrollArea(nsBoxLayoutState& aState, const nsRect& aRect
aState.SetLayoutFlags(oldflags);
childRect = mInner.mScrolledFrame->GetRect();
// XXX hack! force the scrolled frame to think it has overflow
// to avoid problems with incorrect event targeting.
mInner.mScrolledFrame->AddStateBits(NS_FRAME_OUTSIDE_CHILDREN);
// first see what changed
PRBool vertChanged = PR_FALSE;