From 54493db125da56a02128e04d91d6c3a4706dae10 Mon Sep 17 00:00:00 2001 From: "roc+%cs.cmu.edu" Date: Sun, 15 May 2005 23:04:45 +0000 Subject: [PATCH] Bug 293453. Hack scrolled frame NS_FRAME_OUTSIDE_CHILDREN to work around event handling bug. r+sr=bzbarsky,a=asa --- layout/generic/nsGfxScrollFrame.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 54758142588..57ba576bb09 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -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;