Closed
Bug 331081
Opened 19 years ago
Closed 19 years ago
Nested repeats are not working on trunk
Categories
(Core Graveyard :: XForms, defect)
Core Graveyard
XForms
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: allan, Assigned: smaug)
References
Details
(Keywords: fixed1.8.0.4, fixed1.8.1)
Attachments
(3 files, 1 obsolete file)
(deleted),
application/xhtml+xml
|
Details | |
(deleted),
patch
|
allan
:
review+
aaronr
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
Details | Diff | Splinter Review |
Something has messed up nested repeats on trunk.
Reporter | ||
Comment 1•19 years ago
|
||
Try clicking on f.x. the input with "Value 1.1.1" in it, the inner-most repeat index is not set right. Then clicking on "Value 2.1.1" the second level is not set right either :(
Reporter | ||
Comment 2•19 years ago
|
||
I just tried to run our trunk code on 1_8_0, and it works fine there. So this is confirmed only on trunk. Is it the good old event rewrite? :)
Summary: Nested repeat are not working on trunk → Nested repeats are not working on trunk
Assignee | ||
Comment 3•19 years ago
|
||
This is a bit strange fix, I know. But it fixes the bug, or at least the
test case seems to work in 1.8 and 1.9 with the patch.
Assignee | ||
Comment 4•19 years ago
|
||
I could ofc use 1_8 / 1_8_0 macros too, if I just find the right ones somewhere ;)
Assignee | ||
Comment 5•19 years ago
|
||
(In reply to comment #4)
> I could ofc use 1_8 / 1_8_0 macros too, if I just find the right ones somewhere
> ;)
>
But I really would like to use the same code in branch and trunk if possible.
Reporter | ||
Comment 6•19 years ago
|
||
(In reply to comment #5)
> (In reply to comment #4)
> > I could ofc use 1_8 / 1_8_0 macros too, if I just find the right ones somewhere
> > ;)
> >
> But I really would like to use the same code in branch and trunk if possible.
Yes, please, but if it is not possible, it is not possible. I have to look at the patch next week -- I skimmed it, and yes, it's "bizarre" :|
Assignee | ||
Comment 7•19 years ago
|
||
(In reply to comment #6)
>
> Yes, please, but if it is not possible, it is not possible. I have to look at
> the patch next week -- I skimmed it, and yes, it's "bizarre" :|
>
Well, the patch shows that it is possible. The "bizarreness" comes from the way
how a DOM event is used to create a "stack" of contextcontainer. The code itself is ok, IMO. I've never used events for such thing but I actually like
the idea. Events code is anyway pretty much the only way to access all the
nodes in the document (normal, anonymous and native anonymous).
Assignee | ||
Comment 8•19 years ago
|
||
A better patch. Works in branch and trunk.
Attachment #216781 -
Attachment is obsolete: true
Attachment #216896 -
Flags: review?(allan)
Attachment #216781 -
Flags: review?(allan)
Assignee | ||
Updated•19 years ago
|
Attachment #216896 -
Flags: review?(aaronr)
Reporter | ||
Comment 9•19 years ago
|
||
(In reply to comment #8)
> Created an attachment (id=216896) [edit]
> proposed patch
>
> A better patch. Works in branch and trunk.
It needs comments. What exactly are you doing?
You handle DOMFocusIn in a context container by creating the entire parent-chain and then call setIndex() on all parent repeat from the bottom and up?
(We really need to refactor that repeat code)
Assignee | ||
Comment 10•19 years ago
|
||
(In reply to comment #9)
> (In reply to comment #8)
> > Created an attachment (id=216896) [edit]
> > proposed patch
> >
> > A better patch. Works in branch and trunk.
>
> It needs comments. What exactly are you doing?
>
> You handle DOMFocusIn in a context container by creating the entire
> parent-chain and then call setIndex() on all parent repeat from the bottom and
> up?
Yes. That happens currently in the branch, but not explicitly, but because of
the way HandleDefault works (HandleDefault is called when returning from the
event handling recursion). I'm making that exclicit, so that it works also
with new event handling code (which isn't using recursion, but a loop in this case).
>
> (We really need to refactor that repeat code)
Yes ;)
Comment 11•19 years ago
|
||
Comment on attachment 216896 [details] [diff] [review]
proposed patch
Yes, please add comments as Allan mentioned.
Also, please add NS_ENSURE_ARG(aContextPosition) to nsXFormsContextContainer::GetContextPosition() since it is accessible via interface.
The code makes sense, though. With those, r=me
Attachment #216896 -
Flags: review?(aaronr) → review+
Reporter | ||
Comment 12•19 years ago
|
||
Comment on attachment 216896 [details] [diff] [review]
proposed patch
(In reply to comment #10)
> (In reply to comment #9)
> > (In reply to comment #8)
> > > Created an attachment (id=216896) [edit]
> > > proposed patch
> > >
> > > A better patch. Works in branch and trunk.
> >
> > It needs comments. What exactly are you doing?
> >
> > You handle DOMFocusIn in a context container by creating the entire
> > parent-chain and then call setIndex() on all parent repeat from the bottom and
> > up?
>
> Yes. That happens currently in the branch, but not explicitly, but because of
> the way HandleDefault works (HandleDefault is called when returning from the
> event handling recursion). I'm making that exclicit, so that it works also
> with new event handling code (which isn't using recursion, but a loop in this
> case).
With an explanation of this in the code, r=me
Attachment #216896 -
Flags: review?(allan) → review+
Assignee | ||
Comment 13•19 years ago
|
||
Assignee | ||
Comment 14•19 years ago
|
||
Checking in nsIXFormsRepeatItemElement.idl;
/cvsroot/mozilla/extensions/xforms/nsIXFormsRepeatItemElement.idl,v <-- nsIXFormsRepeatItemElement.idl
new revision: 1.2; previous revision: 1.1
done
Checking in nsXFormsContextContainer.cpp;
/cvsroot/mozilla/extensions/xforms/nsXFormsContextContainer.cpp,v <-- nsXFormsContextContainer.cpp
new revision: 1.19; previous revision: 1.18
done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch
Reporter | ||
Updated•19 years ago
|
Keywords: fixed1.8.0.3,
fixed1.8.1
Reporter | ||
Updated•19 years ago
|
Whiteboard: xf-to-branch
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•