Backed out 3 changesets (bug 1549812) for rc4 failures at testAccessibleCarets.js. CLOSED TREE
authorBrindusan Cristian <cbrindusan@mozilla.com>
Fri, 17 May 2019 19:31:09 +0300
changeset 536245 c81a6ac1b8941c4e2d3e596e9f172f8d255ac721
parent 536244 43baeaf538692336539ed241b32f25a9a8f1b69a
child 536248 05f5984efd9136891c9b1eba52e1f56b2e976761
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1549812
milestone68.0a1
backs out00afc705d4eef04a1d71cea44953d0ba232a3794
cbc5c04bd3e4fb6cbfa04dc02f3f1e3cfd6c05a1
ac4a070f110542b267763a0544a6e13912170d8c
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 3 changesets (bug 1549812) for rc4 failures at testAccessibleCarets.js. CLOSED TREE Backed out changeset 00afc705d4ee (bug 1549812) Backed out changeset cbc5c04bd3e4 (bug 1549812) Backed out changeset ac4a070f1105 (bug 1549812)
layout/base/AccessibleCaretManager.cpp
layout/base/PresShell.cpp
layout/generic/nsGfxScrollFrame.cpp
--- a/layout/base/AccessibleCaretManager.cpp
+++ b/layout/base/AccessibleCaretManager.cpp
@@ -581,21 +581,16 @@ nsresult AccessibleCaretManager::SelectW
 }
 
 void AccessibleCaretManager::OnScrollStart() {
   AC_LOG("%s", __FUNCTION__);
 
   AutoRestore<bool> saveAllowFlushingLayout(mAllowFlushingLayout);
   mAllowFlushingLayout = false;
 
-  Maybe<PresShell::AutoAssertNoFlush> assert;
-  if (mPresShell) {
-    assert.emplace(*mPresShell);
-  }
-
   mIsScrollStarted = true;
 
   if (mFirstCaret->IsLogicallyVisible() || mSecondCaret->IsLogicallyVisible()) {
     // Dispatch the event only if one of the carets is logically visible like in
     // HideCarets().
     DispatchCaretStateChangedEvent(CaretChangedReason::Scroll);
   }
 }
@@ -603,21 +598,16 @@ void AccessibleCaretManager::OnScrollSta
 void AccessibleCaretManager::OnScrollEnd() {
   if (mLastUpdateCaretMode != GetCaretMode()) {
     return;
   }
 
   AutoRestore<bool> saveAllowFlushingLayout(mAllowFlushingLayout);
   mAllowFlushingLayout = false;
 
-  Maybe<PresShell::AutoAssertNoFlush> assert;
-  if (mPresShell) {
-    assert.emplace(*mPresShell);
-  }
-
   mIsScrollStarted = false;
 
   if (GetCaretMode() == CaretMode::Cursor) {
     if (!mFirstCaret->IsLogicallyVisible()) {
       // If the caret is hidden (Appearance::None) due to blur, no
       // need to update it.
       return;
     }
@@ -638,21 +628,16 @@ void AccessibleCaretManager::OnScrollEnd
 void AccessibleCaretManager::OnScrollPositionChanged() {
   if (mLastUpdateCaretMode != GetCaretMode()) {
     return;
   }
 
   AutoRestore<bool> saveAllowFlushingLayout(mAllowFlushingLayout);
   mAllowFlushingLayout = false;
 
-  Maybe<PresShell::AutoAssertNoFlush> assert;
-  if (mPresShell) {
-    assert.emplace(*mPresShell);
-  }
-
   if (mFirstCaret->IsLogicallyVisible() || mSecondCaret->IsLogicallyVisible()) {
     if (mIsScrollStarted) {
       // We don't want extra CaretStateChangedEvents dispatched when user is
       // scrolling the page.
       AC_LOG("%s: UpdateCarets(RespectOldAppearance | DispatchNoEvent)",
              __FUNCTION__);
       UpdateCarets({UpdateCaretsHint::RespectOldAppearance,
                     UpdateCaretsHint::DispatchNoEvent});
@@ -666,21 +651,16 @@ void AccessibleCaretManager::OnScrollPos
 void AccessibleCaretManager::OnReflow() {
   if (mLastUpdateCaretMode != GetCaretMode()) {
     return;
   }
 
   AutoRestore<bool> saveAllowFlushingLayout(mAllowFlushingLayout);
   mAllowFlushingLayout = false;
 
-  Maybe<PresShell::AutoAssertNoFlush> assert;
-  if (mPresShell) {
-    assert.emplace(*mPresShell);
-  }
-
   if (mFirstCaret->IsLogicallyVisible() || mSecondCaret->IsLogicallyVisible()) {
     AC_LOG("%s: UpdateCarets(RespectOldAppearance)", __FUNCTION__);
     UpdateCarets(UpdateCaretsHint::RespectOldAppearance);
   }
 }
 
 void AccessibleCaretManager::OnBlur() {
   AC_LOG("%s: HideCarets()", __FUNCTION__);
@@ -1369,12 +1349,12 @@ void AccessibleCaretManager::DispatchCar
 
   event->SetTrusted(true);
   event->WidgetEventPtr()->mFlags.mOnlyChromeDispatch = true;
 
   AC_LOG("%s: reason %" PRIu32 ", collapsed %d, caretVisible %" PRIu32,
          __FUNCTION__, static_cast<uint32_t>(init.mReason), init.mCollapsed,
          static_cast<uint32_t>(init.mCaretVisible));
 
-  (new AsyncEventDispatcher(doc, event))->PostDOMEvent();
+  (new AsyncEventDispatcher(doc, event))->RunDOMEventWhenSafe();
 }
 
 }  // namespace mozilla
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -3578,24 +3578,18 @@ bool PresShell::ScrollFrameRectIntoView(
 
       targetRect -= sf->GetScrolledFrame()->GetPosition();
       if (!(aScrollFlags & ScrollFlags::IgnoreMarginAndPadding)) {
         nsMargin scrollPadding = sf->GetScrollPadding();
         targetRect.Inflate(scrollPadding);
         targetRect = targetRect.Intersect(sf->GetScrolledRect());
       }
 
-      {
-        AutoWeakFrame wf(container);
-        ScrollToShowRect(this, sf, targetRect, aVertical, aHorizontal,
-                         aScrollFlags);
-        if (!wf.IsAlive()) {
-          return didScroll;
-        }
-      }
+      ScrollToShowRect(this, sf, targetRect, aVertical, aHorizontal,
+                       aScrollFlags);
 
       nsPoint newPosition = sf->LastScrollDestination();
       // If the scroll position increased, that means our content moved up,
       // so our rect's offset should decrease
       rect += oldPosition - newPosition;
 
       if (oldPosition != newPosition) {
         didScroll = true;
@@ -9052,18 +9046,18 @@ void PresShell::WillDoReflow() {
   mPresContext->FlushFontFeatureValues();
 
   mLastReflowStart = GetPerformanceNowUnclamped();
 }
 
 void PresShell::DidDoReflow(bool aInterruptible) {
   HandlePostedReflowCallbacks(aInterruptible);
 
-  AutoAssertNoFlush noReentrantFlush(*this);
-  if (nsCOMPtr<nsIDocShell> docShell = mPresContext->GetDocShell()) {
+  nsCOMPtr<nsIDocShell> docShell = mPresContext->GetDocShell();
+  if (docShell) {
     DOMHighResTimeStamp now = GetPerformanceNowUnclamped();
     docShell->NotifyReflowObservers(aInterruptible, mLastReflowStart, now);
   }
 
   if (!mPresContext->HasPendingInterrupt()) {
     mDocument->ScheduleResizeObserversNotification();
   }
 
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -2912,18 +2912,16 @@ void ScrollFrameHelper::ScrollToImpl(nsP
     mScrolledFrame->UpdateOverflow();
 
     // Update the overflow for the outer so that we recompute scrollbars.
     mOuter->UpdateOverflow();
   }
 
   ScheduleSyntheticMouseMove();
 
-  PresShell::AutoAssertNoFlush noFlush(*mOuter->PresShell());
-
   {  // scope the AutoScrollbarRepaintSuppression
     AutoScrollbarRepaintSuppression repaintSuppression(this, !schedulePaint);
     AutoWeakFrame weakFrame(mOuter);
     UpdateScrollbarPosition();
     if (!weakFrame.IsAlive()) {
       return;
     }
   }
@@ -2943,17 +2941,18 @@ void ScrollFrameHelper::ScrollToImpl(nsP
     }
   }
 
   // notify the listeners.
   for (uint32_t i = 0; i < mListeners.Length(); i++) {
     mListeners[i]->ScrollPositionDidChange(pt.x, pt.y);
   }
 
-  if (nsCOMPtr<nsIDocShell> docShell = presContext->GetDocShell()) {
+  nsCOMPtr<nsIDocShell> docShell = presContext->GetDocShell();
+  if (docShell) {
     docShell->NotifyScrollObservers();
   }
 }
 
 static Maybe<int32_t> MaxZIndexInList(nsDisplayList* aList,
                                       nsDisplayListBuilder* aBuilder) {
   Maybe<int32_t> maxZIndex = Nothing();
   for (nsDisplayItem* item = aList->GetBottom(); item;