From c41dbba1c6edce1e743da963540593682d74c4d1 Mon Sep 17 00:00:00 2001 From: "joki%netscape.com" Date: Wed, 3 Mar 1999 01:59:50 +0000 Subject: [PATCH] Fix for frames not resizing. git-svn-id: svn://10.0.0.236/trunk@22676 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsFrameSetFrame.cpp | 5 +++++ mozilla/layout/html/document/src/nsFrameSetFrame.cpp | 5 +++++ mozilla/view/public/nsIView.h | 7 +++++++ mozilla/view/src/nsView.cpp | 6 ++++++ mozilla/view/src/nsView.h | 1 + 5 files changed, 24 insertions(+) diff --git a/mozilla/layout/generic/nsFrameSetFrame.cpp b/mozilla/layout/generic/nsFrameSetFrame.cpp index a5b7539314a..78319ed8609 100644 --- a/mozilla/layout/generic/nsFrameSetFrame.cpp +++ b/mozilla/layout/generic/nsFrameSetFrame.cpp @@ -1341,6 +1341,9 @@ nsHTMLFramesetFrame::StartMouseDrag(nsIPresContext& aPresContext, nsHTMLFrameset NS_RELEASE(viewMan); mDragger = aBorder; + //XXX This should go away! Border should have own view instead + view->SetViewFlags(NS_VIEW_FLAG_DONT_CHECK_CHILDREN); + // can't set it to this event's point - it is not in framesetframe coords mLastDragPoint.MoveTo(NULL_POINT_X, NULL_POINT_Y); @@ -1444,6 +1447,8 @@ nsHTMLFramesetFrame::EndMouseDrag() PRBool ignore; viewMan->GrabMouseEvents(nsnull, ignore); NS_RELEASE(viewMan); + //XXX This should go away! Border should have own view instead + view->ClearViewFlags(NS_VIEW_FLAG_DONT_CHECK_CHILDREN); } } gDragInProgress = PR_FALSE; diff --git a/mozilla/layout/html/document/src/nsFrameSetFrame.cpp b/mozilla/layout/html/document/src/nsFrameSetFrame.cpp index a5b7539314a..78319ed8609 100644 --- a/mozilla/layout/html/document/src/nsFrameSetFrame.cpp +++ b/mozilla/layout/html/document/src/nsFrameSetFrame.cpp @@ -1341,6 +1341,9 @@ nsHTMLFramesetFrame::StartMouseDrag(nsIPresContext& aPresContext, nsHTMLFrameset NS_RELEASE(viewMan); mDragger = aBorder; + //XXX This should go away! Border should have own view instead + view->SetViewFlags(NS_VIEW_FLAG_DONT_CHECK_CHILDREN); + // can't set it to this event's point - it is not in framesetframe coords mLastDragPoint.MoveTo(NULL_POINT_X, NULL_POINT_Y); @@ -1444,6 +1447,8 @@ nsHTMLFramesetFrame::EndMouseDrag() PRBool ignore; viewMan->GrabMouseEvents(nsnull, ignore); NS_RELEASE(viewMan); + //XXX This should go away! Border should have own view instead + view->ClearViewFlags(NS_VIEW_FLAG_DONT_CHECK_CHILDREN); } } gDragInProgress = PR_FALSE; diff --git a/mozilla/view/public/nsIView.h b/mozilla/view/public/nsIView.h index cee159c63bd..6fbe7d6b60c 100644 --- a/mozilla/view/public/nsIView.h +++ b/mozilla/view/public/nsIView.h @@ -428,6 +428,13 @@ public: */ NS_IMETHOD SetViewFlags(PRInt32 aFlags) = 0; + /** + * Remove flags from view to allow customization of view behavior during + * event handling + * @param aFlags flags to be removed from view + */ + NS_IMETHOD ClearViewFlags(PRInt32 aFlags) = 0; + private: NS_IMETHOD_(nsrefcnt) AddRef(void) = 0; NS_IMETHOD_(nsrefcnt) Release(void) = 0; diff --git a/mozilla/view/src/nsView.cpp b/mozilla/view/src/nsView.cpp index 4d5fe1a0b67..33593dc31fd 100644 --- a/mozilla/view/src/nsView.cpp +++ b/mozilla/view/src/nsView.cpp @@ -1296,6 +1296,12 @@ NS_IMETHODIMP nsView :: SetViewFlags(PRInt32 aFlags) return NS_OK; } +NS_IMETHODIMP nsView :: ClearViewFlags(PRInt32 aFlags) +{ + mVFlags &= ~aFlags; + return NS_OK; +} + NS_IMETHODIMP nsView :: GetOffsetFromWidget(nscoord *aDx, nscoord *aDy, nsIWidget *&aWidget) { nsIView *ancestor; diff --git a/mozilla/view/src/nsView.h b/mozilla/view/src/nsView.h index cb83285ad55..23900f59e17 100644 --- a/mozilla/view/src/nsView.h +++ b/mozilla/view/src/nsView.h @@ -94,6 +94,7 @@ public: NS_IMETHOD GetWidget(nsIWidget *&aWidget); virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const; NS_IMETHOD SetViewFlags(PRInt32 aFlags); + NS_IMETHOD ClearViewFlags(PRInt32 aFlags); // Helper function to get the view that's associated with a widget static nsIView* GetViewFor(nsIWidget* aWidget);