Bug 1409931: nsImageControlFrame can also be using a <map> element. r?xidorn draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 20 Oct 2017 12:00:49 +0200
changeset 683864 53242956c7854b8b0933557dcb812b79390549f4
parent 683863 d1e995c8640a191cd127e87273ec96cb2fabffa9
child 736737 81cb2eb7e245a07a75c0d8b2ebb0989fd67d3205
push id85474
push userbmo:emilio@crisal.io
push dateFri, 20 Oct 2017 10:02:12 +0000
reviewersxidorn
bugs1409931
milestone58.0a1
Bug 1409931: nsImageControlFrame can also be using a <map> element. r?xidorn This goes with a crashtest, as soon as I get a usable build. MozReview-Commit-ID: LqmPWoJZ7AJ
layout/base/ServoRestyleManager.cpp
--- a/layout/base/ServoRestyleManager.cpp
+++ b/layout/base/ServoRestyleManager.cpp
@@ -779,17 +779,18 @@ ServoRestyleManager::ProcessPostTraversa
   // Grab the change hint from Servo.
   bool wasRestyled;
   nsChangeHint changeHint =
     static_cast<nsChangeHint>(Servo_TakeChangeHint(aElement, &wasRestyled));
 
   // We should really fix the weird primary frame mapping for image maps
   // (bug 135040)...
   if (styleFrame && styleFrame->GetContent() != aElement) {
-    MOZ_ASSERT(styleFrame->IsImageFrame());
+    MOZ_ASSERT(styleFrame->IsImageFrame() ||
+               styleFrame->IsImageControlFrame());
     styleFrame = nullptr;
   }
 
   // Handle lazy frame construction by posting a reconstruct for any lazily-
   // constructed roots.
   if (aElement->HasFlag(NODE_NEEDS_FRAME)) {
     changeHint |= nsChangeHint_ReconstructFrame;
     MOZ_ASSERT(!styleFrame);