Bug 34269 - Web Inspector: Use platform-specific fonts for SourceFrame contents
: Web Inspector: Use platform-specific fonts for SourceFrame contents
Status: RESOLVED FIXED
: WebKit
Web Inspector (Deprecated)
: 528+ (Nightly build)
: All All
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2010-01-28 08:50 PST by
Modified: 2010-01-29 06:11 PST (History)


Attachments
[PATCH] Proposed solution (4.53 KB, patch)
2010-01-29 05:22 PST, Alexander Pavlov (apavlov)
no flags Review Patch | Details | Formatted Diff | Diff
[PATCH] Comments addressed (4.15 KB, patch)
2010-01-29 05:56 PST, Alexander Pavlov (apavlov)
pfeldman: review+
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2010-01-28 08:50:33 PST
SourceFrame contents should use the same platform-specific fonts as those defined in https://bugs.webkit.org/show_bug.cgi?id=34040
------- Comment #1 From 2010-01-29 05:22:11 PST -------
Created an attachment (id=47706) [details]
[PATCH] Proposed solution
------- Comment #2 From 2010-01-29 05:28:23 PST -------
(From update of attachment 47706 [details])
>      this._textModel = textModel;
>      this._textModel.changeListener = this._textChanged.bind(this);
> +    if (!WebInspector.TextEditor.PlatformFonts) {
> +        WebInspector.TextEditor.PlatformFonts = {};
> +        WebInspector.TextEditor.PlatformFonts[WebInspector.OS.Windows] = {size: 12, face: "Lucida Console"};
> +        WebInspector.TextEditor.PlatformFonts[WebInspector.OS.WindowsVistaOrLater] = {size: 12, face: "Courier"};
> +        WebInspector.TextEditor.PlatformFonts[WebInspector.OS.MacSnowLeopard] = {size: 11, face: "Menlo"};
> +        WebInspector.TextEditor.PlatformFonts[WebInspector.OS.MacLeopard] = {size: 10, face: "Monaco"};
> +        WebInspector.TextEditor.PlatformFonts[WebInspector.OS.MacTiger] = {size: 10, face: "Monaco"};
> +    }
> +

should this be defined in init font?


> +    this._isMac = platform === WebInspector.OS.MacTiger || platform === WebInspector.OS.MacLeopard || platform === WebInspector.OS.MacSnowLeopard;
>  

indexOf("mac") === 0?


> +            const fontMetrics = WebInspector.TextEditor.PlatformFonts[platform] || {size: 10, face: "monospace"};

fontInfo?
------- Comment #3 From 2010-01-29 05:56:44 PST -------
Created an attachment (id=47708) [details]
[PATCH] Comments addressed
------- Comment #4 From 2010-01-29 06:11:12 PST -------
Committing to http://svn.webkit.org/repository/webkit/trunk ...
    M    WebCore/ChangeLog
    M    WebCore/inspector/front-end/TextEditor.js
    M    WebCore/inspector/front-end/inspector.js
Committed r54059