RESOLVED FIXED 34322
Web Inspector: REGRESSION(r54001): Web inspector monospace font is wrong on some versions of Mac OS X
https://bugs.webkit.org/show_bug.cgi?id=34322
Summary Web Inspector: REGRESSION(r54001): Web inspector monospace font is wrong on s...
Mark Rowe (bdash)
Reported 2010-01-29 03:11:30 PST
On Mac OS X 10.6 the monospace font in the inspector is Monaco rather than Menlo as expected. This regression was caused by <http://trac.webkit.org/changeset/54001>, which introduced JavaScript code to detect that Mac OS X version and uses that information to choose which monospace font should be used. However, the manner in which it parses the Mac OS X version is broken. It assumes that Mac OS X version numbers always have three components, which is clearly not the case. The code also makes the strange decision that if the user agent string is from a version of Mac OS X it is not familiar with that it must be running on 10.5. It’s not at all clear to me why the inspector is attempting to detect platforms from JavaScript like this. The inspector was already set up to use the correct platform-specific monospace fonts by configuring the default fixed-width font and size before creating the inspector’s WebView (see <http://trac.webkit.org/browser/trunk/WebKit/mac/WebCoreSupport/WebInspectorClient.mm#L189> for example).
Attachments
[PATCH] Fix MacOS X version detection (in userAgent can have 2 or 3 segments) (1.74 KB, patch)
2010-01-29 07:18 PST, Alexander Pavlov (apavlov)
no flags
Mark Rowe (bdash)
Comment 1 2010-01-29 03:23:51 PST
Alexander Pavlov (apavlov)
Comment 2 2010-01-29 07:18:39 PST
Created attachment 47716 [details] [PATCH] Fix MacOS X version detection (in userAgent can have 2 or 3 segments)
WebKit Commit Bot
Comment 3 2010-01-29 09:22:30 PST
Comment on attachment 47716 [details] [PATCH] Fix MacOS X version detection (in userAgent can have 2 or 3 segments) Clearing flags on attachment: 47716 Committed r54067: <http://trac.webkit.org/changeset/54067>
WebKit Commit Bot
Comment 4 2010-01-29 09:22:37 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.