Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340841 - Button text unexpectedly wraps in Firefox 4 on some machines
Summary: Button text unexpectedly wraps in Firefox 4 on some machines
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.4 M7   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-24 07:05 EDT by Tim Buschtoens CLA
Modified: 2011-03-24 07:27 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Buschtoens CLA 2011-03-24 07:05:31 EDT
On some machines the div containing the text of the buttons are sometimes too small so that the text wraps. For some reason this is only reproducable on certain machines. We tested others with very similar configuration, but the glitch did not show up.
Comment 1 Tim Buschtoens CLA 2011-03-24 07:13:39 EDT
The reason is that the computeTextSize function returns smaller values (in our test case 72, compared to 74 on the other machine), even with exactly the same font and string. The function uses scrollWidth/scrollHeight, wich only returns whole numbers. Using getBoundingClientRect() returns 72.25 (still 74 on the other machine). When rounding that up with Math.ceil, the text does not wrap anymore. For now using getBoundingClientRect() and Math.ceil solves the issue and works fine on all browser.
Comment 2 Tim Buschtoens CLA 2011-03-24 07:27:48 EDT
Fixed in CVS HEAD.

Since there was one red js-test in IE9, i implented the alternative computation method only for gecko browser.