Bug 919263 - Remove bogus assertion from nsRangeFrame::AttributeChanged. r=dholbert
authorJonathan Watt <jwatt@jwatt.org>
Tue, 24 Sep 2013 21:29:31 +0100
changeset 162300 d9c1802e45d9db8805af32ae798e53b2777672f5
parent 162299 8533f319940f2bf6f59826b07d93c48074a55e14
child 162301 c5d1d7cfea8bc53bf4c9f36fc053d498e2d129f5
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs919263
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 919263 - Remove bogus assertion from nsRangeFrame::AttributeChanged. r=dholbert
layout/forms/nsRangeFrame.cpp
--- a/layout/forms/nsRangeFrame.cpp
+++ b/layout/forms/nsRangeFrame.cpp
@@ -692,17 +692,18 @@ nsRangeFrame::AttributeChanged(int32_t  
       // already have changed, and if we call UpdateForValueChange()
       // we'll fail the asserts under that call that check the type of our
       // HTMLInputElement. Given that we're changing away from being a range
       // and this frame will shortly be destroyed, there's no point in calling
       // UpdateForValueChange() anyway.
       MOZ_ASSERT(mContent->IsHTML(nsGkAtoms::input), "bad cast");
       bool typeIsRange = static_cast<dom::HTMLInputElement*>(mContent)->GetType() ==
                            NS_FORM_INPUT_RANGE;
-      MOZ_ASSERT(typeIsRange || aAttribute == nsGkAtoms::value, "why?");
+      // If script changed the <input>'s type before setting these attributes
+      // then we don't need to do anything since we are going to be reframed.
       if (typeIsRange) {
         UpdateForValueChange();
       }
     } else if (aAttribute == nsGkAtoms::orient) {
       PresContext()->PresShell()->FrameNeedsReflow(this, nsIPresShell::eResize,
                                                    NS_FRAME_IS_DIRTY);
     }
   }