Closed Bug 331961 Opened 19 years ago Closed 19 years ago

Partial submission "required check" is wrong

Categories

(Core Graveyard :: XForms, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: allan, Assigned: allan)

References

()

Details

(Keywords: fixed1.8.0.4, fixed1.8.1)

Attachments

(2 files)

There is an error in the required checking in the submission handling. It checks for requiredness of the @ref'ed node AND its siblings. This happens both in CanSubmit() and CopyChildren(), so this is wrong for all types of submissions.
Attached file Testcase (deleted) —
Status: NEW → ASSIGNED
Attached patch Patch (deleted) — Splinter Review
Fix by not checking siblings on first run of CopyChildren() and CanSubmit() (by respectively using depth and adding parameter). I also fixes the GetModel() issue mentioned in bug 326452.
Attachment #216520 - Flags: review?(aaronr)
Blocks: 326556
Attachment #216520 - Flags: review?(aaronr) → review+
Attachment #216520 - Flags: review?(smaug)
Comment on attachment 216520 [details] [diff] [review] Patch >+ NS_HIDDEN_(nsresult) CopyChildren(nsIModelElementPrivate* model, nsIDOMNode *source, nsIDOMNode *dest, nsIDOMDocument *destDoc, SubmissionAttachmentArray *, const nsString &cdataElements, PRBool indent, PRUint32 depth); Way too long line. Fix that, r=me
Attachment #216520 - Flags: review?(smaug) → review+
(In reply to comment #3) > (From update of attachment 216520 [details] [diff] [review] [edit]) > > >+ NS_HIDDEN_(nsresult) CopyChildren(nsIModelElementPrivate* model, nsIDOMNode *source, nsIDOMNode *dest, nsIDOMDocument *destDoc, SubmissionAttachmentArray *, const nsString &cdataElements, PRBool indent, PRUint32 depth); > > > Way too long line. Fix that, r=me Please do check the rest of that file... they are all like that :( Not that I like, but then all of them should be fixed.
(In reply to comment #4) > Please do check the rest of that file... they are all like that :( Not that I > like, but then all of them should be fixed. > Well, why don't you fix them ;)
(In reply to comment #5) > (In reply to comment #4) > > Please do check the rest of that file... they are all like that :( Not that I > > like, but then all of them should be fixed. > > > > Well, why don't you fix them ;) /me throws a tortilla after smaug
Checked into trunk
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch
Blocks: 332853
Whiteboard: xf-to-branch
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: