Bug 1462497 - Part 2: Invalidate the new caret frame in subdocuments, since it will result in a new nsDisplayWrapList being created. r=miko, r=mstange, a=RyanVM
☠☠ backed out by 0f95c023462e ☠ ☠
authorMatt Woodrow <mwoodrow@mozilla.com>
Wed, 23 May 2018 10:59:53 +1200
changeset 470897 3dcce8353e134e2ccacc1cb03aa3adff5e22e173
parent 470896 21f67c8e36fb517a2eb617334322f96ecd365813
child 470898 e8836b424826088cd4f502103d07cec300a85a28
push id9257
push userryanvm@gmail.com
push dateThu, 24 May 2018 15:49:59 +0000
treeherdermozilla-beta@5277d1553fd2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmiko, mstange, RyanVM
bugs1462497
milestone61.0
Bug 1462497 - Part 2: Invalidate the new caret frame in subdocuments, since it will result in a new nsDisplayWrapList being created. r=miko, r=mstange, a=RyanVM nsDisplayListBuilder::DisplayCaret returning true means that we set canSkipWrapList to true, and then we build an nsDisplayWrapList. We need to make sure we're invalidated for this changing in nesting level to be handled. MozReview-Commit-ID: 4j3WIJDcHtI
layout/generic/nsSubDocumentFrame.cpp
--- a/layout/generic/nsSubDocumentFrame.cpp
+++ b/layout/generic/nsSubDocumentFrame.cpp
@@ -457,16 +457,19 @@ nsSubDocumentFrame::BuildDisplayList(nsD
       aBuilder->RebuildAllItemsInCurrentSubtree();
       // Mark the old caret frame as invalid so that we remove the
       // old nsDisplayCaret. We don't mark the current frame as invalid
       // since we want the nsDisplaySubdocument to retain it's place
       // in the retained display list.
       if (mPreviousCaret) {
         aBuilder->MarkFrameModifiedDuringBuilding(mPreviousCaret);
       }
+      if (aBuilder->GetCaretFrame()) {
+        aBuilder->MarkFrameModifiedDuringBuilding(aBuilder->GetCaretFrame());
+      }
     }
     mPreviousCaret = aBuilder->GetCaretFrame();
   }
 
   nsDisplayList childItems;
 
   {
     DisplayListClipState::AutoSaveRestore nestedClipState(aBuilder);