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 340411 1014491000f8a3c4cdc43f9e7afd7b510337f9e7
parent 340410 92075384c442661b019e02bb088241bf4e4e3541
child 340412 7f2fa6e2e0bb1b47a9897ce191a0684adf18d0ac
push id6327
push userkwierso@gmail.com
push dateMon, 22 Aug 2016 18:13:39 +0000
treeherdermozilla-beta@e6d6eb0ce3c4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam, lizzard
bugs1288946
milestone49.0
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
@@ -6739,17 +6739,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();