Bug 1379505: Account for the page frame in UpdateStyleOfOwnedAnonBoxes. r=heycam draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Mon, 10 Jul 2017 10:16:19 +0200
changeset 607469 f936e37dfe095928201bc771648cb0c83ff6351f
parent 607468 34fe793e4c4db9813343589ad9fc4a7f0f8883a7
child 607470 e7fb3632804f13bc0e8b531ca137c1954481aada
push id67985
push userbmo:emilio+bugs@crisal.io
push dateWed, 12 Jul 2017 08:36:44 +0000
reviewersheycam
bugs1379505
milestone56.0a1
Bug 1379505: Account for the page frame in UpdateStyleOfOwnedAnonBoxes. r=heycam MozReview-Commit-ID: L2ouruOMmIq
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -10206,17 +10206,17 @@ nsFrame::BoxMetrics() const
 }
 
 void
 nsIFrame::UpdateStyleOfChildAnonBox(nsIFrame* aChildFrame,
                                     ServoRestyleState& aRestyleState)
 {
   MOZ_ASSERT(aChildFrame->GetParent() == this,
              "This should only be used for children!");
-  MOZ_ASSERT((!GetContent() && IsViewportFrame()) ||
+  MOZ_ASSERT(!GetContent() || !aChildFrame->GetContent() ||
              aChildFrame->GetContent() == GetContent(),
              "What content node is it a frame for?");
   MOZ_ASSERT(!aChildFrame->GetPrevContinuation(),
              "Only first continuations should end up here");
 
   // We could force the caller to pass in the pseudo, since some callers know it
   // statically...  But this API is a bit nicer.
   nsIAtom* pseudo = aChildFrame->StyleContext()->GetPseudo();