Bug 1288946 - Propagate the mParentFrame from the nested GetInsertionPrevSibling call -- it may be a continuation. r=heycam a=lizzard
authorMats Palmgren <mats@mozilla.com>
Thu, 18 Aug 2016 18:21:26 +0200
changeset 347783 938357e8d2546003e4dbb7a5158ca75ca48ac757
parent 347782 4998add2cdadd31a8a3c106a231731edd8216b52
child 347784 ba8075cd3fb917e38d90669c29c97a683fbf8b21
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam, lizzard
bugs1288946
milestone50.0a2
Bug 1288946 - Propagate the mParentFrame from the nested GetInsertionPrevSibling call -- it may be a continuation. r=heycam a=lizzard
layout/base/nsCSSFrameConstructor.cpp
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -6757,17 +6757,21 @@ nsCSSFrameConstructor::GetInsertionPrevS
         nsIContent* parent = child->GetParent();
         aInsertion->mParentFrame =
           ::GetAdjustedParentFrame(aInsertion->mParentFrame,
                                    aInsertion->mParentFrame->GetType(),
                                    parent);
         InsertionPoint fakeInsertion(aInsertion->mParentFrame, parent);
         nsIFrame* result = GetInsertionPrevSibling(&fakeInsertion, child, aIsAppend,
                                                    aIsRangeInsertSafe, nullptr, nullptr);
-        MOZ_ASSERT(aInsertion->mParentFrame == fakeInsertion.mParentFrame);
+        MOZ_ASSERT(aInsertion->mParentFrame->GetContent() ==
+                   fakeInsertion.mParentFrame->GetContent());
+        // fakeInsertion.mParentFrame may now be a continuation of the frame
+        // we started with in the ctor above.
+        aInsertion->mParentFrame = fakeInsertion.mParentFrame;
         return result;
       }
 
       prevSibling = nextSibling->GetPrevSibling();
     }
 
     if (nextSibling) {
       aInsertion->mParentFrame = nextSibling->GetParent()->GetContentInsertionFrame();