Invalid controls not initialized as invalid

RESOLVED FIXED

Status

Core Graveyard
XForms
RESOLVED FIXED
13 years ago
2 years ago

People

(Reporter: aaronr, Assigned: aaronr)

Tracking

Trunk
x86
Windows 2000

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

1.31 KB, application/xhtml+xml
Details
2.88 KB, patch
aaronr
: review+
smaug
: review+
Details | Diff | Splinter Review
(Assignee)

Description

13 years ago
We've regressed something somewhere.  We aren't running through node validation
anymore during form load.  We still call nsXFormsMDGEngine::Revalidate, but
mChangedNodes in nsXFormsModelElement::Revalidate is empty.  The result is that
if we initialize a field with a value from an invalid type, the control is not
marked invalid.
(Assignee)

Comment 1

13 years ago
Created attachment 182630 [details]
testcase

This testcase initializes the input field with the character "a" but the type
on the bind is "xsd:integer".  I put style in the testcase so that the input
should turn red if invalid.

Comment 2

13 years ago
It has been a while since that has worked I think. The problem comes from bug
284101 I think.

The problem is that validation is never triggered if type information is the
only MIP on the instance node.
Status: NEW → ASSIGNED

Comment 3

13 years ago
Created attachment 183155 [details] [diff] [review]
Patch

This patch triggers type validation after a rebuild.

(it also does adds null check but it's debug-only)
Attachment #183155 - Flags: review?(aaronr)
(Assignee)

Comment 4

13 years ago
Comment on attachment 183155 [details] [diff] [review]
Patch

dandy!
Attachment #183155 - Flags: review?(aaronr) → review+

Updated

13 years ago
Attachment #183155 - Flags: review?(smaug)

Updated

13 years ago
Attachment #183155 - Flags: review?(smaug) → review+

Comment 5

13 years ago
Checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.