зеркало из https://github.com/mozilla/gecko-dev.git
Bug 261128. Protect scrollframes from dying if the prescontext's container goes away (it's a weak ref). r+sr=dbaron
This commit is contained in:
Родитель
a349f887cd
Коммит
28838b0654
|
@ -1185,11 +1185,13 @@ nsGfxScrollFrameInner::GetScrollbarStylesFromFrame() const
|
|||
result = presContext->GetViewportOverflowOverride();
|
||||
|
||||
nsCOMPtr<nsISupports> container = presContext->GetContainer();
|
||||
if (container) {
|
||||
nsCOMPtr<nsIScrollable> scrollable = do_QueryInterface(container);
|
||||
HandleScrollPref(scrollable, nsIScrollable::ScrollOrientation_X,
|
||||
result.mHorizontal);
|
||||
HandleScrollPref(scrollable, nsIScrollable::ScrollOrientation_Y,
|
||||
result.mVertical);
|
||||
}
|
||||
} else {
|
||||
const nsStyleDisplay *disp = mOuter->GetStyleDisplay();
|
||||
result.mHorizontal = disp->mOverflowX;
|
||||
|
|
|
@ -1185,11 +1185,13 @@ nsGfxScrollFrameInner::GetScrollbarStylesFromFrame() const
|
|||
result = presContext->GetViewportOverflowOverride();
|
||||
|
||||
nsCOMPtr<nsISupports> container = presContext->GetContainer();
|
||||
if (container) {
|
||||
nsCOMPtr<nsIScrollable> scrollable = do_QueryInterface(container);
|
||||
HandleScrollPref(scrollable, nsIScrollable::ScrollOrientation_X,
|
||||
result.mHorizontal);
|
||||
HandleScrollPref(scrollable, nsIScrollable::ScrollOrientation_Y,
|
||||
result.mVertical);
|
||||
}
|
||||
} else {
|
||||
const nsStyleDisplay *disp = mOuter->GetStyleDisplay();
|
||||
result.mHorizontal = disp->mOverflowX;
|
||||
|
|
Загрузка…
Ссылка в новой задаче