Bug 1398379 part 1: Make callers of GetRootScrollFrameAsScrollableExternal() use its equivalent non-"External" version instead. r?mats
This is a simplification. GetRootScrollFrameAsScrollableExternal() is just a
wrapper around its non-"External" version, GetRootScrollFrameAsScrollable(), so
we might as well just directly call *that* version. All of the callers here
are inside of libxul, so they don't need the special "External" version.
MozReview-Commit-ID: GGMMDAlJ9xu
--- a/accessible/generic/DocAccessible.cpp
+++ b/accessible/generic/DocAccessible.cpp
@@ -525,17 +525,17 @@ DocAccessible::RelativeBounds(nsIFrame**
nsRect bounds;
while (document) {
nsIPresShell *presShell = document->GetShell();
if (!presShell)
return nsRect();
nsRect scrollPort;
- nsIScrollableFrame* sf = presShell->GetRootScrollFrameAsScrollableExternal();
+ nsIScrollableFrame* sf = presShell->GetRootScrollFrameAsScrollable();
if (sf) {
scrollPort = sf->GetScrollPortRect();
} else {
nsIFrame* rootFrame = presShell->GetRootFrame();
if (!rootFrame)
return nsRect();
scrollPort = rootFrame->GetRect();
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -9140,17 +9140,17 @@ nsDocShell::RestoreFromHistory()
if (!newBounds.IsEmpty() && !newBounds.IsEqualEdges(oldBounds)) {
#ifdef DEBUG_PAGE_CACHE
printf("resize widget(%d, %d, %d, %d)\n", newBounds.x,
newBounds.y, newBounds.width, newBounds.height);
#endif
mContentViewer->SetBounds(newBounds);
} else {
nsIScrollableFrame* rootScrollFrame =
- shell->GetRootScrollFrameAsScrollableExternal();
+ shell->GetRootScrollFrameAsScrollable();
if (rootScrollFrame) {
rootScrollFrame->PostScrolledAreaEventForCurrentArea();
}
}
}
// The FinishRestore call below can kill these, null them out so we don't
// have invalid pointer lying around.
@@ -13585,17 +13585,17 @@ nsDocShell::GetChildOffset(nsIDOMNode* a
}
nsIScrollableFrame*
nsDocShell::GetRootScrollFrame()
{
nsCOMPtr<nsIPresShell> shell = GetPresShell();
NS_ENSURE_TRUE(shell, nullptr);
- return shell->GetRootScrollFrameAsScrollableExternal();
+ return shell->GetRootScrollFrameAsScrollable();
}
NS_IMETHODIMP
nsDocShell::EnsureScriptEnvironment()
{
if (mScriptGlobal) {
return NS_OK;
}