Closed Bug 919263 Opened 6 years ago Closed 6 years ago

<input type=range> — "Assertion failure: typeIsRange || aAttribute == nsGkAtoms::value (why?)"

Categories

(Core :: DOM: Core & HTML, defect, critical)

x86_64
macOS
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla27

People

(Reporter: jruderman, Assigned: jwatt)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, testcase)

Attachments

(3 files)

Attached file testcase
Assertion failure: typeIsRange || aAttribute == nsGkAtoms::value (why?), at layout/forms/nsRangeFrame.cpp:700
Attached file stack
Assignee: nobody → jwatt
Attached patch patchSplinter Review
This assertion is just bogus. We can easily and legitimately get into this state since script can change these attributes immediately after changing the 'type' attribute, in which case the change hints will not have been processed yet, so any frame reconstruction for the type change will not yet have occurred.
Attachment #809337 - Flags: review?(dholbert)
Comment on attachment 809337 [details] [diff] [review]
patch

># HG changeset patch
># Parent 7d0e956bd79a734ed8360eefc58b1338f6eab56b
># User Jonathan Watt <jwatt@jwatt.org>
>Bug 919263 - <input type=range> — "Assertion failure: typeIsRange || aAttribute == nsGkAtoms::value (why?)". r=dholbert

Odd "a^" character there --------^ in commit message - get rid of that.

More importantly, fix the commit message -- "describe the change, not the problem".  Maybe change it to "remove bogus assertion from nsRangeFrame.cpp"?

>diff --git a/layout/forms/nsRangeFrame.cpp b/layout/forms/nsRangeFrame.cpp
>-      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.

s/'input's/<input>'s/
Attachment #809337 - Flags: review?(dholbert) → review+
(In reply to Daniel Holbert [:dholbert] from comment #3)
> >Bug 919263 - <input type=range> — "Assertion failure: typeIsRange || aAttribute == nsGkAtoms::value (why?)". r=dholbert
> 
> Odd "a^" character there --------^ in commit message - get rid of that.

(Hmm, interesting; looks like that only shows up in the "Edit Attachment As Comment" view; it renders as a long dash if I view the patch file directly. Maybe that's a bugzilla bug, then. But anyway, as long as you're fixing the commit message text, might as well swap that out for a friendlier character.)
(For reference, Jesse says the a^ thing is bug 477442.)
https://hg.mozilla.org/mozilla-central/rev/d9c1802e45d9
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in before you can comment on or make changes to this bug.