Changeset 54059 in webkit
- Timestamp:
- Jan 29, 2010 6:10:54 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r54056 r54059 1 2010-01-29 Alexander Pavlov <apavlov@chromium.org> 2 3 Reviewed by Timothy Hatcher. 4 5 Web Inspector: Source view displays text using wrong fonts 6 https://bugs.webkit.org/show_bug.cgi?id=34269 7 8 * inspector/front-end/TextEditor.js: 9 (WebInspector.TextEditor): 10 (WebInspector.TextEditor.prototype._initFont): 11 * inspector/front-end/inspector.js: 12 1 13 2010-01-29 Philippe Normand <pnormand@igalia.com> 2 14 -
trunk/WebCore/inspector/front-end/TextEditor.js
r54052 r54059 79 79 this._selection = new WebInspector.TextSelectionModel(this._selectionChanged.bind(this)); 80 80 81 this._isMacTiger = platform === "mac-tiger"; 82 this._isMacLeopard = platform === "mac-leopard"; 83 this._isMac = this._isMacTiger || this._isMacLeopard; 84 this._isWin = platform === "windows"; 81 this._isMac = platform && (platform.indexOf("mac") === 0); 85 82 86 83 this._initFont(); … … 949 946 }, 950 947 951 _initFont: function(sansSerif, fontSize) 952 { 948 _initFont: function(sansSerif) 949 { 950 if (!WebInspector.TextEditor.PlatformFonts) { 951 WebInspector.TextEditor.PlatformFonts = {}; 952 WebInspector.TextEditor.PlatformFonts[WebInspector.OS.Windows] = {size: 12, face: "Lucida Console"}; 953 WebInspector.TextEditor.PlatformFonts[WebInspector.OS.WindowsVistaOrLater] = {size: 12, face: "Courier"}; 954 WebInspector.TextEditor.PlatformFonts[WebInspector.OS.MacSnowLeopard] = {size: 11, face: "Menlo"}; 955 WebInspector.TextEditor.PlatformFonts[WebInspector.OS.MacLeopard] = {size: 10, face: "Monaco"}; 956 WebInspector.TextEditor.PlatformFonts[WebInspector.OS.MacTiger] = {size: 10, face: "Monaco"}; 957 } 958 953 959 if (sansSerif) { 954 960 this._isMonospace = false; 955 this._fontSize = fontSize ||11;961 this._fontSize = 11; 956 962 this._font = this._fontSize + "px sans-serif"; 957 963 } else { 958 964 this._isMonospace = true; 959 this._fontSize = fontSize || 10; 960 this._font = this._fontSize + "px monospace"; 961 if (this._isMac) 962 this._font = this._fontSize + "px Monaco"; 963 else if (this._isWin) 964 this._font = (this._fontSize + 1) + "px Courier New"; 965 const platform = WebInspector.platform; 966 const fontInfo = WebInspector.TextEditor.PlatformFonts[platform] || {size: 10, face: "monospace"}; 967 this._fontSize = fontInfo.size; 968 this._font = this._fontSize + "px " + fontInfo.face; 965 969 } 966 970 this._ctx.font = this._font; -
trunk/WebCore/inspector/front-end/inspector.js
r54001 r54059 56 56 missingLocalizedStrings: {}, 57 57 pendingDispatches: 0, 58 OS: {59 Windows: "windows",60 WindowsVistaOrLater: "windows-vista-or-later",61 MacTiger: "mac-tiger",62 MacLeopard: "mac-leopard",63 MacSnowLeopard: "mac-snowleopard"64 },65 58 66 59 // RegExp groups: … … 421 414 } 422 415 } 416 } 417 418 WebInspector.OS = { 419 Windows: "windows", 420 WindowsVistaOrLater: "windows-vista-or-later", 421 MacTiger: "mac-tiger", 422 MacLeopard: "mac-leopard", 423 MacSnowLeopard: "mac-snowleopard" 423 424 } 424 425
Note: See TracChangeset
for help on using the changeset viewer.