SourceFrame contents should use the same platform-specific fonts as those defined in https://bugs.webkit.org/show_bug.cgi?id=34040
Created attachment 47706 [details] [PATCH] Proposed solution
Comment on attachment 47706 [details] [PATCH] Proposed solution > 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?
Created attachment 47708 [details] [PATCH] Comments addressed
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