Closed Bug 329633 Opened 19 years ago Closed 19 years ago

We should not dispatch events on form load

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.0.5, fixed1.8.1)

Attachments

(3 files, 1 obsolete file)

Form construction does not include an xforms-refresh: http://www.w3.org/TR/2005/PER-xforms-20051006/slice4.html#evt-modelConstruct so we should not dispatch events on load.
Attached file Testcase
Attached patch Work in progress (obsolete) — Splinter Review
Hmmm, we might, internally, rely on the xforms-refresh for external instances, and I actually think that the mModel->SetStates() is wrong. The states should be set during the xforms-refresh cycle, not if just Bind() gets called.
Attached patch PatchSplinter Review
This removes the xforms-refresh event on form construction. I've done some minimal testing of external instances, misc. controls, and dynamically changing attributes and inserting elements. It seems to work for me. There is still something wrong with out Reval/Refresh setup, and when the SetStates gets triggered by controls, but that should be fixed on the (long awaited) fix to our entire RRR routine, which is bug 300591.
Assignee: aaronr → allan
Attachment #214320 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #214411 - Flags: review?(aaronr)
Blocks: 326556
Comment on attachment 214411 [details] [diff] [review] Patch its a potentially huge change where I would expect *something* to fail, but Allan is right...everything I tested worked. The only hole I see is things that are added to the model list that aren't bound to an instance node (and thus on the deferred bind list) may not get refreshed during load now. Do we have anything anymore that fits this bill?
Attachment #214411 - Flags: review?(aaronr) → review+
Comment on attachment 214411 [details] [diff] [review] Patch (In reply to comment #4) > (From update of attachment 214411 [details] [diff] [review] [edit]) >The only hole I see is things > that are added to the model list that aren't bound to an instance node (and > thus on the deferred bind list) may not get refreshed during load now. Do we > have anything anymore that fits this bill? I haven't found anything, no.
Attachment #214411 - Flags: review?(smaug)
Comment on attachment 214411 [details] [diff] [review] Patch I wonder if we'll need that aAllStates at some point. But r=me
Attachment #214411 - Flags: review?(smaug) → review+
Checked into trunk.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch
Blocks: 332853
Whiteboard: xf-to-branch
This regressed on trunk
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
This is probably to blame. http://lxr.mozilla.org/seamonkey/source/extensions/xforms/nsXFormsControlStub.cpp#212 I keep getting issues over and over again because it's a bit "transparent" when we are initializing and when we do normal processing. It would be nice with a more explicit process. Repeats also suffer from this.
Attached patch FixSplinter Review
Check for mReadyHandled before sending events. The reason for this problem occuring is that the responsibility for setting the states (and sending the events) was moved from the model to the controls, and I forgot about inhibiting the events on load.
Attachment #219872 - Flags: review?(Olli.Pettay)
Attachment #219872 - Flags: review?(Olli.Pettay) → review+
Attachment #219872 - Flags: review?(aaronr)
Attachment #219872 - Flags: review?(aaronr) → review+
(In reply to comment #10) > Created an attachment (id=219872) [edit] Fixed on trunk. /cvsroot/mozilla/extensions/xforms/nsXFormsModelElement.cpp,v <-- nsXFormsModelElement.cpp new revision: 1.113; previous revision: 1.112
Status: REOPENED → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch
Keywords: fixed1.8.0.5
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: