Bug 1462497 - Part 2: Invalidate the new caret frame in subdocuments, since it will result in a new nsDisplayWrapList being created. r=miko,mstange
authorMatt Woodrow <mwoodrow@mozilla.com>
Wed, 23 May 2018 10:59:53 +1200
changeset 419335 1386a8847bbb0ee94210720163428eaf29ab0706
parent 419334 965f3e29cc4a5781ccdbbe8482fefe807a75ed39
child 419336 7fc66c715a0f155c5d8aa3b8320f8ab535bf2f2e
push id64318
push usermwoodrow@mozilla.com
push dateTue, 22 May 2018 23:08:41 +0000
treeherderautoland@39cb4d5f6602 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmiko, mstange
bugs1462497
milestone62.0a1
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
Bug 1462497 - Part 2: Invalidate the new caret frame in subdocuments, since it will result in a new nsDisplayWrapList being created. r=miko,mstange 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);