Bug 34322 - Web Inspector: REGRESSION(r54001): Web inspector monospace font is wrong on some versions of Mac OS X
Summary: Web Inspector: REGRESSION(r54001): Web inspector monospace font is wrong on s...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexander Pavlov (apavlov)
URL:
Keywords: InRadar, Regression
Depends on:
Blocks:
 
Reported: 2010-01-29 03:11 PST by Mark Rowe (bdash)
Modified: 2010-01-29 09:22 PST (History)
8 users (show)

See Also:


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 Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Rowe (bdash) 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).
Comment 1 Mark Rowe (bdash) 2010-01-29 03:23:51 PST
<rdar://problem/7590854>
Comment 2 Alexander Pavlov (apavlov) 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)
Comment 3 WebKit Commit Bot 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>
Comment 4 WebKit Commit Bot 2010-01-29 09:22:37 PST
All reviewed patches have been landed.  Closing bug.