Fix an off-by-one and rounding error with screenshot comments.
Review Request #1526 — Created April 21, 2010 and submitted — Latest diff uploaded
Fix an off-by-one and rounding error with screenshot comments. We had a few positioning issues with screenshot comments that would cause them to be positioned incorrectly. First, the math used to figure out the position of the comments would often be given numbers like 200.5. We now make sure to round these down. Second, we still had an off-by-one. A comment that was created at 0,0 would be saved as being at 1,1. We now make sure to account for this math in all cases.
Clicked on the screenshot at 0,0 (with the help of some debug output from Firebug). Created a comment. Saved it. Saw that it was saving at 0,0 instead of 1,1. Reloaded the page and saw that it was at 0,0 and not 1,1. This was caught by the new Selenium test suite.