Community
Participate
Working Groups
Running latest from HEAD as of 20110415 Chrome 10.0.648.204 - Change Chrome's zoom to 120% - Open an editor on a file of at least several hundred lines - Go to the bottom of the file, and try selecting something with the mouse -> Selection occurs a couple of lines lower. There seems to be a problem with calculating line height.
Created attachment 193375 [details] Screen shot You can also see the problem looking at the line numbers. This file does have 212 lines, but in the screen shot you can see there are two more lines after the "212" number in the margin. The line numbers aren't matching the lines.
Created attachment 193790 [details] Screenshot I see the same problem on: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.16) Gecko/20110319 (CK-IBM) Firefox/3.6.16 ( .NET CLR 3.5.30729) I opened gitCommand.js. Scrolled to the middle of the file. Then I was trying to select with the mouse the line marked with the red arrow on the screenshot. The line below was selected instead.
There a couple for factors causing this problem. First and more important is that line height is a float number at these zoom levels. We can workaround that by replacing: _getLineHeight: function() { var document = this._frameDocument; var body = document.body; return parseInt(body.style.lineHeight, 10); }, By: _getLineHeight: function() { var document = this._frameDocument; var body = document.body; var lineHeight = parseFloat(body.style.lineHeight); return Math.round(lineHeight); }, Not sure this is enterily correct, maybe Math.ceil is better here. The real height is the height for the line div. The other problem is that, on Chrome, at 120% zoom lines with bold are taller than lines without bold. This can only be fixed with Bug 334910.
Created attachment 194110 [details] Screenshot editing HTML file Another symptom seems to be that the cursor is totally broken when editing HTML files at 120% zoom on chrome. See in this screen shot the cursor is on line 1, but the status line shows the cursor is on line 4. If I start typing the characters appear on line 4. Basically the arrow keys don't seem to move the cursor. At 100% zoom it is fine, and it is fine in FireFox 4.
We fixed a couple problems on the code with CSS pixel versus screen pixel, but the problem with bold fonts will only be fixed when we fix bug 334910. If you remove bold from the CSS file you should be able to use the editor with zoom.
We add support for bold,italic,bold|italic styling without implementing variable line height. Please try the latest. Fixed http://git.eclipse.org/c/e4/org.eclipse.orion.client.git/commit/?id=72cb95a23a0216ca2d89974ea81d212f30da002f
*** Bug 344751 has been marked as a duplicate of this bug. ***
*** Bug 336178 has been marked as a duplicate of this bug. ***