Closed Bug 10469 Opened 21 years ago Closed 21 years ago
[DOGFOOD] Inserting into RDF
_Sequences messes up
Chris, since you mentioned that you would look at this, here's a bug for it. :^) To test, open up the bookmarks window, select a node, and then bring up a context menu and choose "Insert Separator" for example. All types of bad things will happen... random nodes will disappear, etc. If you quit apprunner, re-run it, and re-open the bookmarks window, you'll see a separator right after the node you had selected previously though. David was thinking that RDF_NextVal was getting messed up perhaps, confusing the content model builders in terms of how many children there really are. We need all this to work right before we start playing around with drag&drop.
Upping the priority on this as drag&drop is getting closer. <Yikes!>
Adding bug 13815 as a dependency. We need tree control to properly handle ContentInserted notification before we can work on this...
Summary: Inserting into RDF_Sequences messes up → [DOGFOOD] Inserting into RDF_Sequences messes up
Putting on PDT+ radar
attached test case. to reproduce, load XUL file; you'll see 123 Click "Insert" expected result: 4123 actual result: 3214 Whee!
rjc: wanna try this patch on for size? I removed the aNaturalOrderPos parameter from CreateWidgetItem(), and instead have it compute that parameter if aProperty is an ordinal property. (Otherwise it will just use -1, which means "append it"). The BuildContentFromTemplate() routine now looks at the aNaturalOrderPos parameter for content other than tree items, so will do insertion and removal of content nodes at the correct location. Note that this patch screws up the personal toolbar :-/. (Because it now inserts the template-generated elements -before- the 'hard coded' elements. Eerily, the bookmarks menu is unaffected.) Take a look and let me know what you think of the fix; maybe there is a better way to do this...
I'm going to have to look at the proposed fix in more detail tomorrow. (Sorry, not feeling good enough to think right now.) One thing to consider: we're soon going to be able to have sorts imposed on anything, not just trees. (I'm starting to code up that functionality.) I think that the calculation of the natural order position hint should perhaps be moved out of the generic builder directly into the XULSortService. (Actually, some older code might already be in there, don't recall)
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
fix checked in
Checked with todays build [11-29-09], with win-95. Actually with testcase provided, after clicking Insert button, nothing happens. But I tried to play around with bookmarks as reported explained, and it looks working fine. Hence Marking verified.
You need to log in before you can comment on or make changes to this bug.