Bug 1398379 part 1: Make callers of GetRootScrollFrameAsScrollableExternal() use its equivalent non-"External" version instead. r?mats draft
authorDaniel Holbert <dholbert@cs.stanford.edu>
Fri, 08 Sep 2017 16:36:32 -0700
changeset 661734 7db5f6a75d73436ab4b892bac724ed33297b69a1
parent 661716 a85670ee5e959299556b6ad0ef1370743debc43d
child 661735 e03b08ce50a24bbc86b441c29f3bb3c3c49d70cf
push id78868
push userdholbert@mozilla.com
push dateFri, 08 Sep 2017 23:37:23 +0000
reviewersmats
bugs1398379
milestone57.0a1
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
accessible/generic/DocAccessible.cpp
docshell/base/nsDocShell.cpp
--- 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;
   }