Backed out changeset 82b31924a8bb (bug 914847) under suspicion of breaking mochitest-metro on a CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Tue, 22 Oct 2013 16:56:04 -0400
changeset 165524 7540c762bb3c3a9203f79f4768ceb0ba4a7aa2a3
parent 165523 9b2cfe9246528c325e66e6eb631613be183b34f6
child 165525 820aa1824ce0e196c2b9fb24adac2bb1c08d4672
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs914847
milestone27.0a1
backs out82b31924a8bb8d730201ed0ea44abee89da0efda
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 82b31924a8bb (bug 914847) under suspicion of breaking mochitest-metro on a CLOSED TREE
layout/base/nsPresShell.cpp
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -5999,30 +5999,16 @@ nsIFrame* GetNearestFrameContainingPresS
 
   nsIFrame* frame = nullptr;
   if (view) {
     frame = view->GetFrame();
   }
 
   return frame;
 }
- 
-static bool
-FlushThrottledStyles(nsIDocument *aDocument, void *aData)
-{
-  nsIPresShell* shell = aDocument->GetShell();
-  if (shell && shell->IsVisible()) {
-    nsPresContext* presContext = shell->GetPresContext();
-    if (presContext) {
-      presContext->TransitionManager()->UpdateAllThrottledStyles();
-    }
-  }
-
-  return true;
-}
 
 nsresult
 PresShell::HandleEvent(nsIFrame* aFrame,
                        WidgetGUIEvent* aEvent,
                        bool aDontRetargetEvents,
                        nsEventStatus* aEventStatus)
 {
   NS_ASSERTION(aFrame, "null frame");
@@ -6111,31 +6097,24 @@ PresShell::HandleEvent(nsIFrame* aFrame,
         delete event;
       }
     }
     return NS_OK;
   }
 
   nsIFrame* frame = aFrame;
 
+  if (aEvent->eventStructType == NS_TOUCH_EVENT) {
+    nsIDocument::UnlockPointer();
+    FlushPendingNotifications(Flush_Layout);
+    frame = GetNearestFrameContainingPresShell(this);
+  }
+
   bool dispatchUsingCoordinates = aEvent->IsUsingCoordinates();
   if (dispatchUsingCoordinates) {
-    if (nsLayoutUtils::AreAsyncAnimationsEnabled() && mDocument) {
-      if (aEvent->eventStructType == NS_TOUCH_EVENT) {
-        nsIDocument::UnlockPointer();
-      }
-      
-      {  // scope for scriptBlocker.
-        nsAutoScriptBlocker scriptBlocker;
-        GetRootPresShell()->GetDocument()->
-          EnumerateSubDocuments(FlushThrottledStyles, nullptr);
-      }
-      frame = GetNearestFrameContainingPresShell(this);
-    }
-
     NS_WARN_IF_FALSE(frame, "Nothing to handle this event!");
     if (!frame)
       return NS_OK;
 
     nsPresContext* framePresContext = frame->PresContext();
     nsPresContext* rootPresContext = framePresContext->GetRootPresContext();
     NS_ASSERTION(rootPresContext == mPresContext->GetRootPresContext(),
                  "How did we end up outside the connected prescontext/viewmanager hierarchy?");