Bug 1427677: Remove useless frame construction condition. r?bz draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Wed, 03 Jan 2018 05:51:12 +0100
changeset 715218 db0ed9f48af0d2c3f40f8ab8d4046fe5e7384ee6
parent 715217 4550665b80bb393fc1bd62a282b72aa80467bd9d
child 715219 3efa530ceb2477ae5784e050cb4b42e092ec977d
push id94095
push userbmo:emilio@crisal.io
push dateWed, 03 Jan 2018 05:45:02 +0000
reviewersbz
bugs1427677, 1389743
milestone59.0a1
Bug 1427677: Remove useless frame construction condition. r?bz We remove async all the time now since bug 1389743, so this condition just can't happen anymore. MozReview-Commit-ID: LujPaYPwA4G
layout/base/nsCSSFrameConstructor.cpp
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -7374,29 +7374,18 @@ void
 nsCSSFrameConstructor::IssueSingleInsertNofications(nsIContent* aContainer,
                                                     nsIContent* aStartChild,
                                                     nsIContent* aEndChild,
                                                     InsertionKind aInsertionKind)
 {
   for (nsIContent* child = aStartChild;
        child != aEndChild;
        child = child->GetNextSibling()) {
-    if ((child->GetPrimaryFrame() || GetDisplayNoneStyleFor(child) ||
-         GetDisplayContentsStyleFor(child))
-#ifdef MOZ_XUL
-        //  Except listboxes suck, so do NOT skip anything here if
-        //  we plan to notify a listbox.
-        && !MaybeGetListBoxBodyFrame(aContainer, child)
-#endif
-        ) {
-      // Already have a frame or undisplayed entry for this content; a
-      // previous ContentRangeInserted in this loop must have reconstructed
-      // its insertion parent.  Skip it.
-      continue;
-    }
+    MOZ_ASSERT(!child->GetPrimaryFrame() && !GetDisplayNoneStyleFor(child) &&
+               !GetDisplayContentsStyleFor(child));
     // Call ContentRangeInserted with this node.
     ContentRangeInserted(aContainer, child, child->GetNextSibling(),
                          mTempFrameTreeState, aInsertionKind, nullptr);
   }
 }
 
 bool
 nsCSSFrameConstructor::InsertionPoint::IsMultiple() const