WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
34040
Web Inspector: Use conditional CSS for defining monospace fonts instead of native code in clients.
https://bugs.webkit.org/show_bug.cgi?id=34040
Summary
Web Inspector: Use conditional CSS for defining monospace fonts instead of na...
Pavel Feldman
Reported
2010-01-23 09:59:50 PST
That would allow inspector to define its looks for platforms and would make sure inspectors on all macs look alike (no matter whether it is WebKit/Safari/Chromium/etc.
Attachments
[PATCH] Proposed solution
(11.32 KB, patch)
2010-01-28 06:19 PST
,
Alexander Pavlov (apavlov)
pfeldman
: review-
Details
Formatted Diff
Diff
[PATCH] Comments addressed
(10.23 KB, patch)
2010-01-28 07:57 PST
,
Alexander Pavlov (apavlov)
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Alexander Pavlov (apavlov)
Comment 1
2010-01-28 06:19:29 PST
Created
attachment 47614
[details]
[PATCH] Proposed solution
Pavel Feldman
Comment 2
2010-01-28 06:50:28 PST
Comment on
attachment 47614
[details]
[PATCH] Proposed solution
> > -body.platform-windows .source-code { > - font-family: Consolas, Lucida Console, monospace; > +body.platform-mac-tiger .source-code, body.platform-mac-leopard .source-code { > + font-size: 10px; > + font-family: Monaco, monospace; > +}
Could you group definitions for monospace and source-code?
> if (!("_platform" in this)) > - this._platform = InspectorFrontendHost.platform(); > - > + this._detectPlatform();
I liked the lazy init pattern, should detectPlatform return a value?
> return this._platform; > }, > > + _detectPlatform: function() > + {
> + > + function getOSFromUserAgent(userAgent) > + { > + if (userAgent) { > + var platformInfo = userAgent.match(/\(([^\)]+);\s*([^\)]+);\s*([^\)]+);\s*([^\)]+)\s*\)/); > + if (!platformInfo) > + return; > + return platformInfo[3].trim(); > + } > + return null; > + } > +
I am not really sure whether this is needed. Why not to match Mac/Windows against original user agent?
Alexander Pavlov (apavlov)
Comment 3
2010-01-28 07:57:35 PST
Created
attachment 47619
[details]
[PATCH] Comments addressed
mitz
Comment 4
2010-01-28 08:23:59 PST
Comment on
attachment 47619
[details]
[PATCH] Comments addressed Isn’t this going to result in the wrong font size being used on Mac OS X versions later than 10.6?
WebKit Commit Bot
Comment 5
2010-01-28 08:28:47 PST
Comment on
attachment 47619
[details]
[PATCH] Comments addressed Clearing flags on attachment: 47619 Committed
r54001
: <
http://trac.webkit.org/changeset/54001
>
WebKit Commit Bot
Comment 6
2010-01-28 08:28:54 PST
All reviewed patches have been landed. Closing bug.
Timothy Hatcher
Comment 7
2010-01-28 12:25:54 PST
(In reply to
comment #4
)
> (From update of
attachment 47619
[details]
) > Isn’t this going to result in the wrong font size being used on Mac OS X > versions later than 10.6?
No. body.platform-mac-snowleopard .monospace, body.platform-mac-snowleopard .source-code { font-size: 11px; font-family: Menlo, monospace; }
mitz
Comment 8
2010-01-28 12:28:21 PST
(In reply to
comment #7
)
> (In reply to
comment #4
) > > (From update of
attachment 47619
[details]
[details]) > > Isn’t this going to result in the wrong font size being used on Mac OS X > > versions later than 10.6? > > No. > > body.platform-mac-snowleopard .monospace, > body.platform-mac-snowleopard .source-code { > font-size: 11px; > font-family: Menlo, monospace; > }
I was talking about the earlier version of the patch that sent anything above 10.6 to the “Mac unknown” path, which was resulting in 10px.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug