Bug 780692 Part 2.5: Rename GetRootFrameThroughViews to GetNearestFrameContainingPresShell. r=tn
authorDavid Zbarsky <dzbarsky@gmail.com>
Thu, 30 Aug 2012 17:19:26 -0400
changeset 110241 851a00eaa0b71fc285747e77aee9f95030bb6bb0
parent 110240 b4229e48e2232fbb11a0c77535918fe2e4d633df
child 110242 94038167af79185b2d1c0e76370277994e984003
push idunknown
push userunknown
push dateunknown
reviewerstn
bugs780692
milestone18.0a1
Bug 780692 Part 2.5: Rename GetRootFrameThroughViews to GetNearestFrameContainingPresShell. r=tn
layout/base/nsPresShell.cpp
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -5635,17 +5635,17 @@ static PLDHashOperator
 AppendToTouchList(const uint32_t& aKey, nsCOMPtr<nsIDOMTouch>& aData, void *aTouchList)
 {
   nsTArray<nsCOMPtr<nsIDOMTouch> > *touches = static_cast<nsTArray<nsCOMPtr<nsIDOMTouch> > *>(aTouchList);
   aData->mChanged = false;
   touches->AppendElement(aData);
   return PL_DHASH_NEXT;
 }
 
-nsIFrame* GetRootFrameThroughViews(nsIPresShell* aPresShell)
+nsIFrame* GetNearestFrameContainingPresShell(nsIPresShell* aPresShell)
 {
   nsIView* view = aPresShell->GetViewManager()->GetRootView();
   while (view && !view->GetFrame()) {
     view = view->GetParent();
   }
 
   nsIFrame* frame = nullptr;
   if (view) {
@@ -5720,17 +5720,17 @@ PresShell::HandleEvent(nsIFrame        *
       if (presShell != this) {
         nsIFrame* frame = presShell->GetRootFrame();
         if (!frame) {
           if (aEvent->message == NS_QUERY_TEXT_CONTENT ||
               NS_IS_CONTENT_COMMAND_EVENT(aEvent)) {
             return NS_OK;
           }
 
-          frame = GetRootFrameThroughViews(presShell);
+          frame = GetNearestFrameContainingPresShell(presShell);
         }
 
         if (!frame)
           return NS_OK;
 
         nsCOMPtr<nsIPresShell> shell = frame->PresContext()->GetPresShell();
         return shell->HandleEvent(frame, aEvent, true, aEventStatus);
       }
@@ -5750,17 +5750,17 @@ PresShell::HandleEvent(nsIFrame        *
     }
     return NS_OK;
   }
 
   nsIFrame* frame = aFrame;
 
   if (aEvent->eventStructType == NS_TOUCH_EVENT) {
     FlushPendingNotifications(Flush_Layout);
-    frame = GetRootFrameThroughViews(this);
+    frame = GetNearestFrameContainingPresShell(this);
   }
 
   bool dispatchUsingCoordinates = NS_IsEventUsingCoordinates(aEvent);
   if (dispatchUsingCoordinates) {
     NS_WARN_IF_FALSE(frame, "Nothing to handle this event!");
     if (!frame)
       return NS_OK;