зеркало из https://github.com/mozilla/gecko-dev.git
manage view visibility better
This commit is contained in:
Родитель
60b2bd4053
Коммит
7911885f43
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче