зеркало из https://github.com/mozilla/gecko-dev.git
bug 1252, check for null view
This commit is contained in:
Родитель
53b2ee8c89
Коммит
b6dcb4891d
|
@ -711,14 +711,16 @@ nsHTMLFrameInnerFrame::DidReflow(nsIPresContext& aPresContext,
|
|||
if (NS_FRAME_REFLOW_FINISHED == aStatus) {
|
||||
nsIView* view = nsnull;
|
||||
GetView(&view);
|
||||
const nsStyleDisplay* display;
|
||||
GetStyleData(eStyleStruct_Display, ((const nsStyleStruct *&)display));
|
||||
nsViewVisibility newVis = NS_STYLE_VISIBILITY_HIDDEN == display->mVisible ? nsViewVisibility_kHide : nsViewVisibility_kShow;
|
||||
nsViewVisibility oldVis;
|
||||
// only change if different.
|
||||
view->GetVisibility(oldVis);
|
||||
if (newVis != oldVis)
|
||||
view->SetVisibility(newVis);
|
||||
if (view) {
|
||||
const nsStyleDisplay* display;
|
||||
GetStyleData(eStyleStruct_Display, ((const nsStyleStruct *&)display));
|
||||
nsViewVisibility newVis = NS_STYLE_VISIBILITY_HIDDEN == display->mVisible ? nsViewVisibility_kHide : nsViewVisibility_kShow;
|
||||
nsViewVisibility oldVis;
|
||||
// only change if different.
|
||||
view->GetVisibility(oldVis);
|
||||
if (newVis != oldVis)
|
||||
view->SetVisibility(newVis);
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
|
|
@ -711,14 +711,16 @@ nsHTMLFrameInnerFrame::DidReflow(nsIPresContext& aPresContext,
|
|||
if (NS_FRAME_REFLOW_FINISHED == aStatus) {
|
||||
nsIView* view = nsnull;
|
||||
GetView(&view);
|
||||
const nsStyleDisplay* display;
|
||||
GetStyleData(eStyleStruct_Display, ((const nsStyleStruct *&)display));
|
||||
nsViewVisibility newVis = NS_STYLE_VISIBILITY_HIDDEN == display->mVisible ? nsViewVisibility_kHide : nsViewVisibility_kShow;
|
||||
nsViewVisibility oldVis;
|
||||
// only change if different.
|
||||
view->GetVisibility(oldVis);
|
||||
if (newVis != oldVis)
|
||||
view->SetVisibility(newVis);
|
||||
if (view) {
|
||||
const nsStyleDisplay* display;
|
||||
GetStyleData(eStyleStruct_Display, ((const nsStyleStruct *&)display));
|
||||
nsViewVisibility newVis = NS_STYLE_VISIBILITY_HIDDEN == display->mVisible ? nsViewVisibility_kHide : nsViewVisibility_kShow;
|
||||
nsViewVisibility oldVis;
|
||||
// only change if different.
|
||||
view->GetVisibility(oldVis);
|
||||
if (newVis != oldVis)
|
||||
view->SetVisibility(newVis);
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
|
Загрузка…
Ссылка в новой задаче