This backs out the previous patch and just check to see if it is also a

listControlFrame to see if it should set the visibility to false in
nsContainerFrame
Bug 92333 r=dcone sr=attinasi a=asa adt=jaime
This commit is contained in:
rods%netscape.com 2002-04-05 12:13:23 +00:00
Родитель 083b5b8143
Коммит f689da2c74
7 изменённых файлов: 6 добавлений и 33 удалений

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

@ -577,14 +577,15 @@ nsContainerFrame::SyncFrameViewAfterReflow(nsIPresContext* aPresContext,
NS_RELEASE(widget);
}
else {
// If it's a scroll frame, then hide the view. This means that
// If it's a scroll frame or a list control frame which is derived from the scrollframe,
// then hide the view. This means that
// child elements can't override their parent's visibility, but
// it's not practical to leave it visible in all cases because
// the scrollbars will be showing
nsIAtom* frameType;
aFrame->GetFrameType(&frameType);
if (frameType == nsLayoutAtoms::scrollFrame) {
if (frameType == nsLayoutAtoms::scrollFrame || frameType == nsLayoutAtoms::listControlFrame) {
viewIsVisible = PR_FALSE;
} else {

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

@ -577,14 +577,15 @@ nsContainerFrame::SyncFrameViewAfterReflow(nsIPresContext* aPresContext,
NS_RELEASE(widget);
}
else {
// If it's a scroll frame, then hide the view. This means that
// If it's a scroll frame or a list control frame which is derived from the scrollframe,
// then hide the view. This means that
// child elements can't override their parent's visibility, but
// it's not practical to leave it visible in all cases because
// the scrollbars will be showing
nsIAtom* frameType;
aFrame->GetFrameType(&frameType);
if (frameType == nsLayoutAtoms::scrollFrame) {
if (frameType == nsLayoutAtoms::scrollFrame || frameType == nsLayoutAtoms::listControlFrame) {
viewIsVisible = PR_FALSE;
} else {

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

@ -176,11 +176,6 @@ public:
NS_IMETHOD GetScrollbarVisibility(PRBool *aVerticalVisible,
PRBool *aHorizontalVisible) const = 0;
/**
* Set the visible (disables the scrollbars when the are hidden)
*/
NS_IMETHOD SetScrollbarVisibility(PRBool aVerticalVisible,
PRBool aHorizontalVisible) = 0;
/**
* Set the properties describing how scrolling can be performed
* in this scrollable.

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

@ -345,15 +345,6 @@ NS_IMETHODIMP nsScrollPortView::GetScrollbarVisibility(PRBool *aVerticalVisible,
return NS_OK;
}
NS_IMETHODIMP nsScrollPortView::SetScrollbarVisibility(PRBool aVerticalVisible,
PRBool aHorizontalVisible)
{
NS_WARNING("Attempt to set scrollbars visibility this is not xp!");
return NS_OK;
}
void nsScrollPortView::AdjustChildWidgets(nsScrollPortView *aScrolling, nsView *aView, nscoord aDx, nscoord aDy, float scale)
{

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

@ -75,8 +75,6 @@ public:
NS_IMETHOD GetControlInsets(nsMargin &aInsets) const;
NS_IMETHOD GetScrollbarVisibility(PRBool *aVerticalVisible,
PRBool *aHorizontalVisible) const;
NS_IMETHOD SetScrollbarVisibility(PRBool aVerticalVisible,
PRBool aHorizontalVisible);
NS_IMETHOD SetScrollProperties(PRUint32 aProperties);
NS_IMETHOD GetScrollProperties(PRUint32 *aProperties);
NS_IMETHOD SetLineHeight(nscoord aHeight);

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

@ -1389,17 +1389,6 @@ NS_IMETHODIMP nsScrollingView::GetScrollbarVisibility(PRBool *aVerticalVisible,
return NS_OK;
}
// must also disable them or they get turned back on
NS_IMETHODIMP nsScrollingView::SetScrollbarVisibility(PRBool aVerticalVisible,
PRBool aHorizontalVisible)
{
((ScrollBarView *)mHScrollBarView)->SetEnabled(aHorizontalVisible);
((ScrollBarView *)mVScrollBarView)->SetEnabled(aVerticalVisible);
mHScrollBarView->SetVisibility(aHorizontalVisible?nsViewVisibility_kShow:nsViewVisibility_kHide);
mVScrollBarView->SetVisibility(aVerticalVisible?nsViewVisibility_kShow:nsViewVisibility_kHide);
return NS_OK;
}
void nsScrollingView::AdjustChildWidgets(nsScrollingView *aScrolling, nsView *aView,
nscoord aDx, nscoord aDy, float scale)
{

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

@ -89,8 +89,6 @@ public:
NS_IMETHOD GetControlInsets(nsMargin &aInsets) const;
NS_IMETHOD GetScrollbarVisibility(PRBool *aVerticalVisible,
PRBool *aHorizontalVisible) const;
NS_IMETHOD SetScrollbarVisibility(PRBool aVerticalVisible,
PRBool aHorizontalVisible);
NS_IMETHOD SetScrollProperties(PRUint32 aProperties);
NS_IMETHOD GetScrollProperties(PRUint32 *aProperties);
NS_IMETHOD SetLineHeight(nscoord aHeight);