Closed Bug 944198 Opened 11 years ago Closed 11 years ago

Assertion failure after removing type attribute from <input type="color">

Categories

(Core :: Layout: Form Controls, defect)

defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: jruderman, Assigned: MatsPalmgren_bugz)

References

Details

(Keywords: assertion, testcase)

Attachments

(3 files, 1 obsolete file)

Attached file testcase
Assertion failure: !color.IsEmpty() (Content node's GetValue() should return a valid color string (the default color, in case no valid color is set)), at layout/forms/nsColorControlFrame.cpp:106
Attached file stack (lldb)
Attached patch fix+test (obsolete) — Splinter Review
Assignee: nobody → matspal
Attachment #8339749 - Flags: review?(bzbarsky)
Comment on attachment 8339749 [details] [diff] [review]
fix+test

>+  // still a color control, which can happen if the type attribute was

s/which can happen/which might not be the case/

r=me
Attachment #8339749 - Flags: review?(bzbarsky) → review+
Comment on attachment 8339749 [details] [diff] [review]
fix+test

Review of attachment 8339749 [details] [diff] [review]:
-----------------------------------------------------------------

r+ for me, even if I wasn't asked for a review ;)
Sorry for missing this case when I implemented this :( and thanks for fixing it :)

::: layout/forms/nsColorControlFrame.cpp
@@ +12,5 @@
>  #include "nsGkAtoms.h"
>  #include "nsIDOMHTMLInputElement.h"
>  #include "nsIDOMNode.h"
>  #include "nsStyleSet.h"
> +#include "nsIFormControl.h"

Minor remark: I made this alphabetically ordered and I would prefer to keep ordered.
Attachment #8339749 - Flags: review+
Attachment #8339749 - Attachment is obsolete: true
Attachment #8340066 - Flags: review+
Keywords: checkin-needed
OS: Mac OS X → All
Hardware: x86_64 → All
(In reply to Arnaud Bienner from comment #4)
> Sorry for missing this case when I implemented this

No worries, I'm pretty sure I would have made the same mistake if I had
written this handler.  Which makes me wonder if it might be worth the
time to do a brief audit of mutation handlers on other elements for
the same kind of problem...
https://hg.mozilla.org/mozilla-central/rev/ca4c295c9454
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: