From a2cdb9f91aab3e545117f104232216abf0444a1f Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 17 Apr 2020 07:22:26 -0400 Subject: Bug 1415843 - Remove an unneeded call to AdjustAppendParentForAfterContent Tag #1375 --- layout/base/nsCSSFrameConstructor.cpp | 46 ----------------------------------- 1 file changed, 46 deletions(-) (limited to 'layout') diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 053351ee1..37d1a2cff 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -7875,8 +7875,6 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer, return; } - nsIContent* container = insertion.mParentFrame->GetContent(); - nsIAtom* frameType = insertion.mParentFrame->GetType(); LAYOUT_PHASE_TEMP_EXIT(); if (MaybeRecreateForFrameset(insertion.mParentFrame, aStartChild, aEndChild)) { @@ -8014,7 +8012,6 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer, return; } - container = insertion.mParentFrame->GetContent(); frameType = insertion.mParentFrame->GetType(); } } @@ -8087,49 +8084,6 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer, } } - // If the parent of our current prevSibling is different from the frame we'll - // actually use as the parent, then the calculated insertion point is now - // invalid and as it is unknown where to insert correctly we append instead - // (bug 341858). - // This can affect our prevSibling and isAppend, but should not have any - // effect on the WipeContainingBlock above, since this should only happen - // when neither parent is a ib-split frame and should not affect whitespace - // handling inside table-related frames (and in fact, can only happen when - // one of the parents is a table wrapper and one is an inner table or when the - // parent is a fieldset or fieldset content frame). So it won't affect the - // {ib} or XUL box cases in WipeContainingBlock(), and the table pseudo - // handling will only be affected by us maybe thinking we're not inserting - // at the beginning, whereas we really are. That would have made us reframe - // unnecessarily, but that's ok. - // XXXbz we should push our frame construction item code up higher, so we - // know what our items are by the time we start figuring out previous - // siblings - if (prevSibling && frameItems.NotEmpty() && - frameItems.FirstChild()->GetParent() != prevSibling->GetParent()) { -#ifdef DEBUG - nsIFrame* frame1 = frameItems.FirstChild()->GetParent(); - nsIFrame* frame2 = prevSibling->GetParent(); - NS_ASSERTION(!IsFramePartOfIBSplit(frame1) && - !IsFramePartOfIBSplit(frame2), - "Neither should be ib-split"); - NS_ASSERTION((frame1->GetType() == nsGkAtoms::tableFrame && - frame2->GetType() == nsGkAtoms::tableWrapperFrame) || - (frame1->GetType() == nsGkAtoms::tableWrapperFrame && - frame2->GetType() == nsGkAtoms::tableFrame) || - frame1->GetType() == nsGkAtoms::fieldSetFrame || - (frame1->GetParent() && - frame1->GetParent()->GetType() == nsGkAtoms::fieldSetFrame), - "Unexpected frame types"); -#endif - isAppend = true; - nsIFrame* appendAfterFrame; - insertion.mParentFrame = - ::AdjustAppendParentForAfterContent(this, container, - frameItems.FirstChild()->GetParent(), - aStartChild, &appendAfterFrame); - prevSibling = ::FindAppendPrevSibling(insertion.mParentFrame, appendAfterFrame); - } - if (haveFirstLineStyle && insertion.mParentFrame == containingBlock && isAppend) { // It's possible that the new frame goes into a first-line // frame. Look at it and see... -- cgit v1.2.3