Bug 1462497 - Part 2: Invalidate the new caret frame in subdocuments, since it will result in a new nsDisplayWrapList being created. r?miko
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
--- 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);