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

RESOLVED FIXED in mozilla28

Status

()

Core
Layout: Form Controls
--
critical
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: Jesse Ruderman, Assigned: mats)

Tracking

(Blocks: 1 bug, {assertion, testcase})

Trunk
mozilla28
assertion, testcase
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 1 obsolete attachment)

(Reporter)

Description

5 years ago
Created attachment 8339642 [details]
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
(Reporter)

Comment 1

5 years ago
Created attachment 8339643 [details]
stack (lldb)
(Assignee)

Comment 2

5 years ago
Created attachment 8339749 [details] [diff] [review]
fix+test
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 4

5 years ago
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+
(Assignee)

Comment 5

5 years ago
Created attachment 8340066 [details] [diff] [review]
fix+test, v2 (nits fixed)
Attachment #8339749 - Attachment is obsolete: true
Attachment #8340066 - Flags: review+
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
OS: Mac OS X → All
Hardware: x86_64 → All
(Assignee)

Comment 6

5 years ago
(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
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
You need to log in before you can comment on or make changes to this bug.