Bug 55143 - Web Inspector: Huge fonts in font preview
Summary: Web Inspector: Huge fonts in font preview
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:
Depends on:
Blocks:
 
Reported: 2011-02-24 07:03 PST by Alexander Pavlov (apavlov)
Modified: 2011-02-25 05:36 PST (History)
10 users (show)

See Also:


Attachments
[PATCH] Suggested fix (6.31 KB, patch)
2011-02-24 07:33 PST, Alexander Pavlov (apavlov)
pfeldman: review-
Details | Formatted Diff | Diff
[PATCH] Comments addressed (6.44 KB, patch)
2011-02-24 08:38 PST, Alexander Pavlov (apavlov)
pfeldman: review-
Details | Formatted Diff | Diff
[PATCH] Magic removed (6.30 KB, patch)
2011-02-25 04:16 PST, Alexander Pavlov (apavlov)
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pavlov (apavlov) 2011-02-24 07:03:07 PST
1. Go to http://pleasingfungus.com/
2. Open the inspector
3. Open the resource tab
4. Select flixelfont.ttf

The font is HUGE! If the inspector window is resized, the font goes back to an appropriate size.

Upstreaming http://code.google.com/p/chromium/issues/detail?id=46731
Comment 1 Alexander Pavlov (apavlov) 2011-02-24 07:33:00 PST
Created attachment 83653 [details]
[PATCH] Suggested fix
Comment 2 Pavel Feldman 2011-02-24 07:43:56 PST
Comment on attachment 83653 [details]
[PATCH] Suggested fix

View in context: https://bugs.webkit.org/attachment.cgi?id=83653&action=review

> Source/WebCore/inspector/front-end/FontView.js:56
> +        var uniqueFontName = "WebInspectorFontPreview" + WebInspector.FontView._nextFontId();

Nit: No need for a method here, just inline it.

> Source/WebCore/inspector/front-end/FontView.js:93
> +        var display = element.style.display;

You should encapsulate font metrics and use dummy element added to body, positioned absolutely, behind the screen.
Comment 3 Alexander Pavlov (apavlov) 2011-02-24 08:38:35 PST
Created attachment 83663 [details]
[PATCH] Comments addressed
Comment 4 Pavel Feldman 2011-02-25 02:56:52 PST
Comment on attachment 83663 [details]
[PATCH] Comments addressed

View in context: https://bugs.webkit.org/attachment.cgi?id=83663&action=review

> Source/WebCore/inspector/front-end/FontView.js:129
> +        if (firstRun)

This is magic, r- for this.
Comment 5 Alexander Pavlov (apavlov) 2011-02-25 04:16:10 PST
Created attachment 83793 [details]
[PATCH] Magic removed
Comment 6 Alexander Pavlov (apavlov) 2011-02-25 05:36:14 PST
Committing to http://svn.webkit.org/repository/webkit/trunk ...
        M       Source/WebCore/ChangeLog
        M       Source/WebCore/inspector/front-end/FontView.js
Committed r79677