Closed Bug 74831 Opened 24 years ago Closed 22 years ago

Fix bugs in getting text portion of cell from outliner.

Categories

(Core :: XUL, defect, P3)

defect

Tracking

()

RESOLVED WORKSFORME
Future

People

(Reporter: bugs, Assigned: bugs)

References

Details

Attachments

(2 files)

I need a way of getting the coordinates of the text region of a cell in an outliner. This is required for inline editing, title tips, nice looking drag and drop feedback, etc.
Ben, are you working on this? If so, I'll just assign it to you.
yup, and I have a patch.
Assignee: hyatt → ben
I've attached an initial (rough) attempt at implementing this feature. Comments are coming shortly, but now I have to watch Silence of the Lambs ;)
OK. Comments: - added a method to nsIOutlinerBoxObject & corresponding implementation in nsOutlinerBodyFrame with pass-thru in nsOutlinerBoxObject: |getCoordsForCellItem|. Not the most elegant name. Takes a row, column element type. Returns x,y, w,h for the item. - also fixed some string usage per jag. - the section where the null check was added was a hack to make the outliner not crash on the test case. Dave, if you could look into this and see what actually has to be done to fix this crash, and i'll remove this from my patch. Dave, did you suggest there also be a 'row' type? If so, it's not too hard to add. I've checked in the test case patch so you just need to have an up to date xpfe/components/bookmarks/resources/oTest.xul. (Actually the version in the tree is now more up to date than the attached version) Clicking on a cell should retrieve the cell for the click, and display the rect for the element of the cell clicked on in the console. This function can form the basis of various outliner-related features, such as inline editing, title tips, marquee selection, nice drag and drop feedback, etc.
Status: NEW → ASSIGNED
Keywords: nsbeta1
Target Milestone: --- → mozilla0.9
(1) You need to deal with overflow when computing cell rects. See other column iteration examples... if you don't deal with this, you'll mistakenly extend the cell into the scrollbar's rect. (2) You are adjusting the cell rect by the *row" border padding. That's wrong. You need to first adjust a row rect by its border/padding, and then the cell rect fits inside the adjusted row rect. It also can have border/padding as well as margins. The vertical direction isn't that important, but you need to get the horizontal direction right.
GetImageSize() does not include margins (but it does include border/padding). You need to make sure to add in the image's margins as well.
nav triage team: Marking nsbeta1+ and p2
Keywords: nsbeta1nsbeta1+
Priority: -- → P2
Will push repair of this patch per hyatt's comments into .9.1 to save some time for my other .9 bugs.
Target Milestone: mozilla0.9 → mozilla0.9.1
blocks drop feedback in outliner.
Severity: normal → blocker
Blocks: 72515
nav triage team: As far as we know, bookmarks isn't moving to outliner for 0.9.1. Moving to mozilla0.9.2
Target Milestone: mozilla0.9.1 → mozilla0.9.2
taking this so that i can land it with my outliner drag drop stuffs.
Assignee: ben → pinkerton
Status: ASSIGNED → NEW
Priority: P2 → P1
Target Milestone: mozilla0.9.2 → mozilla0.9.1
sr=, but let's get an XXX in there that cites the known issues (that i specified in the bug).
Is this bug the only one re: editable cells in outliners, tooltips etc, and if so, can we make sure the bug doesn't die with the acceptance of the patch but is renamed and possibly reassigned?
open a new bug for those issues. this is to track the code necessary for those to work one day.
checked in, back to ben to fix the problems. no longer a blocker
Assignee: pinkerton → ben
Severity: blocker → normal
No longer blocks: 72515
Shouldn't this have gone back to m.9.2 after Mike was done with it?
Target Milestone: mozilla0.9.1 → mozilla0.9.2
nav triage: not sure why this has to be in m0.9.2, what feature does this block? we're not moving to outliner on any nav fe features through m0.9.2. moving to m1.0.
Target Milestone: mozilla0.9.2 → mozilla1.0
mail is the primary consumer of this feature. they probably have enough to go on, but the bugs that hyatt mentions might come back to bite xpapps. just be aware.
This bug is blocking the ability to have title tips for cropped texts (bug 32157). This affects important areas such as: subject line, bookmarks in sidebar, folder names, attachment filenames, etc. Shouldn't that be a good reason to get this fixed sooner (target milestone 0.9.3)?
Putting into 0.9.5
Target Milestone: mozilla1.0 → mozilla0.9.5
-> .9.6 for bugfixes.
Target Milestone: mozilla0.9.5 → mozilla0.9.6
Status: NEW → ASSIGNED
Priority: P1 → P2
Priority: P2 → P3
Summary: Need way of getting coordinates of text portion of outliner cell (inline editing, title tips) → Fix bugs in getting text portion of cell from outliner.
Target Milestone: mozilla0.9.6 → mozilla0.9.8
Target Milestone: mozilla0.9.8 → mozilla0.9.9
Target Milestone: mozilla0.9.9 → Future
WFM according to hewitt
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: