cvsblame currently uses layers to popup the cvs checking comments when mousing over a link. unfortunately this doesn't work in non NetscapeClassic browsers, significantly cutting down on usefulness.
Wow, I didn't even realize cvsblame did that!! It's quite slick. The question is, what can the layers be replaced with? My initial thought was a 'title=' attribute in the link, but I don't think tooltips are really up to that task :(
A similar conversion was already done to display the comment popup in tinderbox using DOM stuff. I suspect that approach might work here as well.
the html/dom-standard way is with absolutely positioned divs
I just attached some very rough source, but it works in both IE and Mozilla. The current problems I see with this approach is that it has a DIV for each link (essentially, each change of color in cvsblame, but not quite that limited) which can really add up to a lot of duplicate being transmitted. It also hides the DIV again as soon as the mouse leaves the link. In the current functionality, it's possible to move over to checkin message and click on any links that may be there (like bug XXX).
one thing that I think tinderbox does is construct a sort of skeleton DIV, and then fill in data when the user clicks on a link.. (I could be wrong of course, it might be creating a DIV for each link.. but the skeleton approach would definitely work)
see HTMLElement.offsetLeft, .offsetTop, .offsetWidth, and .offsetHeight in the DOM. Probably .offsetParent, too, if you need to calculate absolute positions.
I've tested this on a recent Mozilla nightly and on IE 5.5 and it seems to work on both of 'em... so, this will probably be the basic idea I use when I dive into bonsai (which is the next step :)... unless of course there's an error I didn't notice. BTW, this second sample solves both of my issues. It mkaes it so there's one <div> per revision and when a link is moused-over it moves that div relative to the link and shows it. It then keeps displaying it until either another rev link is moused over or the page is clicked.
Assignee: tara → jake
Keywords: patch, review
I get the same results with "visibility: hidden"
I discovered a couple minor problems and a major problem with the first patch. The major one was that it didn't work w/IE 5+. The reasoning for this was two-fold. The first was that I did the detection backwards so it thought IE 5 was just another 4- browser. The second reason is where it got ugly. It seems that .offsetTop returns how far down an element is from its parent, not the top of the page. In Mozilla this wasn't a bug deal because the offsetParent for the A tags was in fact the BODY. For some reason, IE made the offsetParent for these same A tags the table cell, so most of the Popups were showing up at the top of the page (because the A was 0 pixels from the top of the table cell). I got around this by adding a loop that keeps adding the offsetTop value until it reaches the BODY. So, Patch v2 has been tested in both Mozilla and IE 5.5 (I've not yet tested 5.0).
Status: NEW → ASSIGNED
r=baloo in IRC Checked In.
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
vrfy fixed 1.25 jake%acutex.net May 30 2001
Status: RESOLVED → VERIFIED
QA Contact: matty → timeless
You need to log in before you can comment on or make changes to this bug.