mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
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:
parent
a349f887cd
commit
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;
|
||||
|
Loading…
Reference in New Issue
Block a user