From 7911885f43daf2bbe9cf9b1a86b6eed690d65d6b Mon Sep 17 00:00:00 2001 From: "peterl%netscape.com" Date: Wed, 29 Sep 1999 03:36:16 +0000 Subject: [PATCH] manage view visibility better --- layout/forms/nsFormControlFrame.cpp | 2 +- layout/forms/nsListControlFrame.cpp | 2 +- layout/generic/nsFrameFrame.cpp | 4 ++-- layout/html/document/src/nsFrameFrame.cpp | 4 ++-- layout/html/forms/src/nsFormControlFrame.cpp | 2 +- layout/html/forms/src/nsGfxTextControlFrame.cpp | 2 +- layout/html/forms/src/nsListControlFrame.cpp | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/layout/forms/nsFormControlFrame.cpp b/layout/forms/nsFormControlFrame.cpp index 172f7d89d95b..a5ccbf13fee0 100644 --- a/layout/forms/nsFormControlFrame.cpp +++ b/layout/forms/nsFormControlFrame.cpp @@ -202,7 +202,7 @@ nsFormControlFrame::DidReflow(nsIPresContext& aPresContext, if (view) { const nsStyleDisplay* display; GetStyleData(eStyleStruct_Display, ((const nsStyleStruct *&)display)); - nsViewVisibility newVis = NS_STYLE_VISIBILITY_HIDDEN == display->mVisible ? nsViewVisibility_kHide : nsViewVisibility_kShow; + nsViewVisibility newVis = NS_STYLE_VISIBILITY_VISIBLE == display->mVisible ? nsViewVisibility_kShow : nsViewVisibility_kHide; nsViewVisibility oldVis; // only change if different. view->GetVisibility(oldVis); diff --git a/layout/forms/nsListControlFrame.cpp b/layout/forms/nsListControlFrame.cpp index 4d6fbc751845..813bf412044f 100644 --- a/layout/forms/nsListControlFrame.cpp +++ b/layout/forms/nsListControlFrame.cpp @@ -1821,7 +1821,7 @@ nsListControlFrame::SyncViewWithFrame() GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&) disp); if (visibility != disp->mVisible) { - view->SetVisibility(NS_STYLE_VISIBILITY_HIDDEN == disp->mVisible ?nsViewVisibility_kHide:nsViewVisibility_kShow); + view->SetVisibility(NS_STYLE_VISIBILITY_VISIBLE == disp->mVisible ?nsViewVisibility_kShow:nsViewVisibility_kHide); } return NS_OK; diff --git a/layout/generic/nsFrameFrame.cpp b/layout/generic/nsFrameFrame.cpp index fc742922b2c9..1b892ece417a 100644 --- a/layout/generic/nsFrameFrame.cpp +++ b/layout/generic/nsFrameFrame.cpp @@ -726,7 +726,7 @@ nsHTMLFrameInnerFrame::DidReflow(nsIPresContext& aPresContext, if (view) { const nsStyleDisplay* display; GetStyleData(eStyleStruct_Display, ((const nsStyleStruct *&)display)); - nsViewVisibility newVis = NS_STYLE_VISIBILITY_HIDDEN == display->mVisible ? nsViewVisibility_kHide : nsViewVisibility_kShow; + nsViewVisibility newVis = NS_STYLE_VISIBILITY_VISIBLE == display->mVisible ? nsViewVisibility_kShow : nsViewVisibility_kHide; nsViewVisibility oldVis; // only change if different. view->GetVisibility(oldVis); @@ -878,7 +878,7 @@ nsHTMLFrameInnerFrame::CreateWebShell(nsIPresContext& aPresContext, // if the visibility is hidden, reflect that in the view const nsStyleDisplay* display; GetStyleData(eStyleStruct_Display, ((const nsStyleStruct *&)display)); - if (NS_STYLE_VISIBILITY_HIDDEN == display->mVisible) { + if (NS_STYLE_VISIBILITY_VISIBLE != display->mVisible) { view->SetVisibility(nsViewVisibility_kHide); } diff --git a/layout/html/document/src/nsFrameFrame.cpp b/layout/html/document/src/nsFrameFrame.cpp index fc742922b2c9..1b892ece417a 100644 --- a/layout/html/document/src/nsFrameFrame.cpp +++ b/layout/html/document/src/nsFrameFrame.cpp @@ -726,7 +726,7 @@ nsHTMLFrameInnerFrame::DidReflow(nsIPresContext& aPresContext, if (view) { const nsStyleDisplay* display; GetStyleData(eStyleStruct_Display, ((const nsStyleStruct *&)display)); - nsViewVisibility newVis = NS_STYLE_VISIBILITY_HIDDEN == display->mVisible ? nsViewVisibility_kHide : nsViewVisibility_kShow; + nsViewVisibility newVis = NS_STYLE_VISIBILITY_VISIBLE == display->mVisible ? nsViewVisibility_kShow : nsViewVisibility_kHide; nsViewVisibility oldVis; // only change if different. view->GetVisibility(oldVis); @@ -878,7 +878,7 @@ nsHTMLFrameInnerFrame::CreateWebShell(nsIPresContext& aPresContext, // if the visibility is hidden, reflect that in the view const nsStyleDisplay* display; GetStyleData(eStyleStruct_Display, ((const nsStyleStruct *&)display)); - if (NS_STYLE_VISIBILITY_HIDDEN == display->mVisible) { + if (NS_STYLE_VISIBILITY_VISIBLE != display->mVisible) { view->SetVisibility(nsViewVisibility_kHide); } diff --git a/layout/html/forms/src/nsFormControlFrame.cpp b/layout/html/forms/src/nsFormControlFrame.cpp index 172f7d89d95b..a5ccbf13fee0 100644 --- a/layout/html/forms/src/nsFormControlFrame.cpp +++ b/layout/html/forms/src/nsFormControlFrame.cpp @@ -202,7 +202,7 @@ nsFormControlFrame::DidReflow(nsIPresContext& aPresContext, if (view) { const nsStyleDisplay* display; GetStyleData(eStyleStruct_Display, ((const nsStyleStruct *&)display)); - nsViewVisibility newVis = NS_STYLE_VISIBILITY_HIDDEN == display->mVisible ? nsViewVisibility_kHide : nsViewVisibility_kShow; + nsViewVisibility newVis = NS_STYLE_VISIBILITY_VISIBLE == display->mVisible ? nsViewVisibility_kShow : nsViewVisibility_kHide; nsViewVisibility oldVis; // only change if different. view->GetVisibility(oldVis); diff --git a/layout/html/forms/src/nsGfxTextControlFrame.cpp b/layout/html/forms/src/nsGfxTextControlFrame.cpp index d0440b58789a..7351f1234ff4 100644 --- a/layout/html/forms/src/nsGfxTextControlFrame.cpp +++ b/layout/html/forms/src/nsGfxTextControlFrame.cpp @@ -856,7 +856,7 @@ nsGfxTextControlFrame::CreateWebShell(nsIPresContext& aPresContext, // if the visibility is hidden, reflect that in the view const nsStyleDisplay* display; GetStyleData(eStyleStruct_Display, ((const nsStyleStruct *&)display)); - if (NS_STYLE_VISIBILITY_HIDDEN == display->mVisible) { + if (NS_STYLE_VISIBILITY_VISIBLE != display->mVisible) { view->SetVisibility(nsViewVisibility_kHide); } diff --git a/layout/html/forms/src/nsListControlFrame.cpp b/layout/html/forms/src/nsListControlFrame.cpp index 4d6fbc751845..813bf412044f 100644 --- a/layout/html/forms/src/nsListControlFrame.cpp +++ b/layout/html/forms/src/nsListControlFrame.cpp @@ -1821,7 +1821,7 @@ nsListControlFrame::SyncViewWithFrame() GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&) disp); if (visibility != disp->mVisible) { - view->SetVisibility(NS_STYLE_VISIBILITY_HIDDEN == disp->mVisible ?nsViewVisibility_kHide:nsViewVisibility_kShow); + view->SetVisibility(NS_STYLE_VISIBILITY_VISIBLE == disp->mVisible ?nsViewVisibility_kShow:nsViewVisibility_kHide); } return NS_OK;