Changeset 54001 in webkit
- Timestamp:
- Jan 28, 2010 8:28:41 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r53996 r54001 1 2010-01-28 Alexander Pavlov <apavlov@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Use platform-specific monospace fonts in the Web Inspector 6 7 Move the OS version detection code into the frontend, 8 add custom CSS monospace styles for known platforms. 9 https://bugs.webkit.org/show_bug.cgi?id=34040 10 11 * inspector/InspectorFrontendHost.cpp: 12 (WebCore::InspectorFrontendHost::platform): 13 * inspector/front-end/BreakpointsSidebarPane.js: 14 (WebInspector.BreakpointsSidebarPane.prototype._appendBreakpointElement): 15 * inspector/front-end/DatabaseQueryView.js: 16 (WebInspector.DatabaseQueryView): 17 * inspector/front-end/InspectorBackendStub.js: 18 (.WebInspector.InspectorBackendStub.prototype.releaseWrapperObjectGroup): 19 (.WebInspector.InspectorBackendStub.prototype.setInjectedScriptSource): 20 * inspector/front-end/SourceFrame.js: 21 (WebInspector.SourceFrame.prototype._createConditionElement): 22 * inspector/front-end/inspector.css: 23 * inspector/front-end/inspector.html: 24 * inspector/front-end/inspector.js: 25 (WebInspector.URLRegExp.i.get platform): 26 (WebInspector._detectPlatform): 27 1 28 2010-01-28 Mikhail Naganov <mnaganov@chromium.org> 2 29 -
trunk/WebCore/inspector/InspectorFrontendHost.cpp
r53941 r54001 122 122 { 123 123 #if PLATFORM(MAC) 124 #ifdef BUILDING_ON_TIGER 125 DEFINE_STATIC_LOCAL(const String, platform, ("mac-tiger")); 126 #else 127 DEFINE_STATIC_LOCAL(const String, platform, ("mac-leopard")); 128 #endif 124 DEFINE_STATIC_LOCAL(const String, platform, ("mac")); 129 125 #elif OS(WINDOWS) 130 126 DEFINE_STATIC_LOCAL(const String, platform, ("windows")); 127 #elif OS(LINUX) 128 DEFINE_STATIC_LOCAL(const String, platform, ("linux")); 131 129 #else 132 130 DEFINE_STATIC_LOCAL(const String, platform, ("unknown")); -
trunk/WebCore/inspector/front-end/BreakpointsSidebarPane.js
r51528 r54001 100 100 var sourceTextElement = document.createElement("div"); 101 101 sourceTextElement.textContent = breakpoint.sourceText; 102 sourceTextElement.className = "source-text ";102 sourceTextElement.className = "source-text monospace"; 103 103 breakpointElement.appendChild(sourceTextElement); 104 104 -
trunk/WebCore/inspector/front-end/DatabaseQueryView.js
r52099 r54001 32 32 this.element.addStyleClass("storage-view"); 33 33 this.element.addStyleClass("query"); 34 this.element.addStyleClass("monospace"); 34 35 this.element.tabIndex = 0; 35 36 -
trunk/WebCore/inspector/front-end/InspectorBackendStub.js
r53941 r54001 266 266 releaseWrapperObjectGroup: function() 267 267 { 268 }, 269 270 setInjectedScriptSource: function() 271 { 268 272 } 269 273 } -
trunk/WebCore/inspector/front-end/SourceFrame.js
r53941 r54001 377 377 var editorElement = document.createElement("input"); 378 378 editorElement.id = "source-breakpoint-condition"; 379 editorElement.className = "monospace"; 379 380 editorElement.type = "text" 380 381 conditionElement.appendChild(editorElement); -
trunk/WebCore/inspector/front-end/inspector.css
r53996 r54001 496 496 } 497 497 498 .monospace { 499 font-size: 10px; 500 font-family: monospace; 501 } 502 503 body.platform-mac-tiger .monospace, body.platform-mac-leopard .monospace, 504 body.platform-mac-tiger .source-code, body.platform-mac-leopard .source-code { 505 font-size: 10px; 506 font-family: Monaco, monospace; 507 } 508 509 body.platform-mac-snowleopard .monospace, 510 body.platform-mac-snowleopard .source-code { 511 font-size: 11px; 512 font-family: Menlo, monospace; 513 } 514 515 body.platform-windows .monospace, body.platform-windows-vista-or-later .monospace, 516 body.platform-windows .source-code, body.platform-windows-vista-or-later .source-code { 517 font-size: 12px; 518 font-family: Consolas, Lucida Console, monospace; 519 } 520 498 521 #console-messages { 499 522 position: absolute; … … 503 526 right: 0; 504 527 bottom: 23px; 505 font-size: initial;506 font-family: monospace;507 528 padding: 2px 0; 508 529 overflow-y: overlay; … … 1099 1120 .source-code { 1100 1121 font-family: monospace; 1101 font-size: medium;1122 font-size: 10px; 1102 1123 white-space: pre-wrap; 1103 }1104 1105 body.platform-windows .source-code {1106 font-family: Consolas, Lucida Console, monospace;1107 font-size: 12px;1108 1124 } 1109 1125 … … 2124 2140 2125 2141 .storage-view.query { 2126 font-size: initial;2127 font-family: monospace;2128 2142 padding: 2px 0; 2129 2143 overflow-y: overlay; … … 3788 3802 3789 3803 .breakpoint-list .source-text { 3790 font-family: monospace;3791 3804 white-space: nowrap; 3792 3805 text-overflow: ellipsis; … … 3822 3835 3823 3836 #source-breakpoint-condition { 3824 font-family: monospace;3825 3837 margin: 0; 3826 3838 border: 1px inset rgb(190, 190, 190) !important; -
trunk/WebCore/inspector/front-end/inspector.html
r53941 r54001 134 134 </div> 135 135 <div id="drawer"> 136 <div id="console-view"><div id="console-messages" ><div id="console-prompt" spellcheck="false"><br></div></div></div>136 <div id="console-view"><div id="console-messages" class="monospace"><div id="console-prompt" spellcheck="false"><br></div></div></div> 137 137 <div id="drawer-status-bar" class="status-bar"><div id="other-drawer-status-bar-items"><button id="clear-console-status-bar-item" class="status-bar-item"><div class="glyph"></div><div class="glyph shadow"></div></button><div id="console-filter" class="scope-bar status-bar-item"></div></div></div> 138 138 </div> -
trunk/WebCore/inspector/front-end/inspector.js
r53894 r54001 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 }, 58 65 59 66 // RegExp groups: … … 68 75 { 69 76 if (!("_platform" in this)) 70 this._platform = InspectorFrontendHost.platform();77 this._platform = this._detectPlatform(); 71 78 72 79 return this._platform; 80 }, 81 82 _detectPlatform: function() 83 { 84 const userAgent = navigator.userAgent; 85 var nativePlatform = InspectorFrontendHost.platform(); 86 87 if (nativePlatform === "windows") { 88 var match = userAgent.match(/Windows NT (\d+)\.(?:\d+)/); 89 if (match && match[1] >= 6) 90 return WebInspector.OS.WindowsVistaOrLater; 91 return WebInspector.OS.Windows; 92 } else if (nativePlatform === "mac") { 93 var match = userAgent.match(/Mac OS X\s*(?:(\d+)_(\d+)_(?:\d+))?/); 94 if (!match || match[1] != 10) 95 return WebInspector.OS.MacLeopard; 96 switch (Number(match[2])) { 97 case 4: 98 return WebInspector.OS.MacTiger; 99 case 5: 100 return WebInspector.OS.MacLeopard; 101 case 6: 102 return WebInspector.OS.MacSnowLeopard; 103 } 104 return WebInspector.OS.MacLeopard; 105 } 106 107 return nativePlatform; 73 108 }, 74 109
Note: See TracChangeset
for help on using the changeset viewer.