Bug 215083: Account for subclasses in the next-in-flow assertion. r=me a=fix-uplift
authorEmilio Cobos Álvarez <emilio@crisal.io>
Sat, 30 Jun 2018 04:40:31 +0200
changeset 812847 aea3f3457f1531706923b8d4c595a1f271de83da
parent 812846 19766d4c54e3c0ef09caf3c9a7fd3f162e4d5ac6
child 812848 c3b91952c88421846a6ac6abae342c918375f77f
child 812854 9dcd721d8b4e0091e11d6bd2e0edd0b72e8e4569
child 812855 362b864a0b83422d0104399b59b430e93b2bc1e6
child 812886 a8ddbf55c3f87668f6c0c634ae950a23d3fe09a8
push id114688
push userbmo:oriol-bugzilla@hotmail.com
push dateSat, 30 Jun 2018 16:21:51 +0000
reviewersme, fix-uplift
bugs215083
milestone63.0a1
Bug 215083: Account for subclasses in the next-in-flow assertion. r=me a=fix-uplift MozReview-Commit-ID: 2E8Fm4Lxnf8
layout/generic/nsImageFrame.cpp
--- a/layout/generic/nsImageFrame.cpp
+++ b/layout/generic/nsImageFrame.cpp
@@ -288,17 +288,17 @@ SizeIsAvailable(imgIRequest* aRequest)
 }
 
 void
 nsImageFrame::Init(nsIContent* aContent,
                    nsContainerFrame* aParent,
                    nsIFrame* aPrevInFlow)
 {
   MOZ_ASSERT_IF(aPrevInFlow,
-                aPrevInFlow->Type() == LayoutFrameType::Image &&
+                aPrevInFlow->Type() == Type() &&
                 static_cast<nsImageFrame*>(aPrevInFlow)->mKind == mKind);
 
   nsAtomicContainerFrame::Init(aContent, aParent, aPrevInFlow);
 
   mListener = new nsImageListener(this);
 
   if (!gIconLoad)
     LoadIcons(PresContext());