[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9
eric at webkit.org
eric at webkit.org
Thu Feb 4 21:31:09 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 88f782d67feed2ed07b836f2eab9197ed1aeb781
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Jan 28 16:28:41 2010 +0000
2010-01-28 Alexander Pavlov <apavlov at chromium.org>
Reviewed by Pavel Feldman.
Use platform-specific monospace fonts in the Web Inspector
Move the OS version detection code into the frontend,
add custom CSS monospace styles for known platforms.
https://bugs.webkit.org/show_bug.cgi?id=34040
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::platform):
* inspector/front-end/BreakpointsSidebarPane.js:
(WebInspector.BreakpointsSidebarPane.prototype._appendBreakpointElement):
* inspector/front-end/DatabaseQueryView.js:
(WebInspector.DatabaseQueryView):
* inspector/front-end/InspectorBackendStub.js:
(.WebInspector.InspectorBackendStub.prototype.releaseWrapperObjectGroup):
(.WebInspector.InspectorBackendStub.prototype.setInjectedScriptSource):
* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame.prototype._createConditionElement):
* inspector/front-end/inspector.css:
* inspector/front-end/inspector.html:
* inspector/front-end/inspector.js:
(WebInspector.URLRegExp.i.get platform):
(WebInspector._detectPlatform):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54001 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 88db4a1..442b9e9 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,30 @@
+2010-01-28 Alexander Pavlov <apavlov at chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Use platform-specific monospace fonts in the Web Inspector
+
+ Move the OS version detection code into the frontend,
+ add custom CSS monospace styles for known platforms.
+ https://bugs.webkit.org/show_bug.cgi?id=34040
+
+ * inspector/InspectorFrontendHost.cpp:
+ (WebCore::InspectorFrontendHost::platform):
+ * inspector/front-end/BreakpointsSidebarPane.js:
+ (WebInspector.BreakpointsSidebarPane.prototype._appendBreakpointElement):
+ * inspector/front-end/DatabaseQueryView.js:
+ (WebInspector.DatabaseQueryView):
+ * inspector/front-end/InspectorBackendStub.js:
+ (.WebInspector.InspectorBackendStub.prototype.releaseWrapperObjectGroup):
+ (.WebInspector.InspectorBackendStub.prototype.setInjectedScriptSource):
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype._createConditionElement):
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.html:
+ * inspector/front-end/inspector.js:
+ (WebInspector.URLRegExp.i.get platform):
+ (WebInspector._detectPlatform):
+
2010-01-28 Mikhail Naganov <mnaganov at chromium.org>
Reviewed by Timothy Hatcher.
diff --git a/WebCore/inspector/InspectorFrontendHost.cpp b/WebCore/inspector/InspectorFrontendHost.cpp
index 2e235ab..1aeb1d7 100644
--- a/WebCore/inspector/InspectorFrontendHost.cpp
+++ b/WebCore/inspector/InspectorFrontendHost.cpp
@@ -121,13 +121,11 @@ String InspectorFrontendHost::hiddenPanels()
const String& InspectorFrontendHost::platform() const
{
#if PLATFORM(MAC)
-#ifdef BUILDING_ON_TIGER
- DEFINE_STATIC_LOCAL(const String, platform, ("mac-tiger"));
-#else
- DEFINE_STATIC_LOCAL(const String, platform, ("mac-leopard"));
-#endif
+ DEFINE_STATIC_LOCAL(const String, platform, ("mac"));
#elif OS(WINDOWS)
DEFINE_STATIC_LOCAL(const String, platform, ("windows"));
+#elif OS(LINUX)
+ DEFINE_STATIC_LOCAL(const String, platform, ("linux"));
#else
DEFINE_STATIC_LOCAL(const String, platform, ("unknown"));
#endif
diff --git a/WebCore/inspector/front-end/BreakpointsSidebarPane.js b/WebCore/inspector/front-end/BreakpointsSidebarPane.js
index 9d4fe55..8865f0b 100644
--- a/WebCore/inspector/front-end/BreakpointsSidebarPane.js
+++ b/WebCore/inspector/front-end/BreakpointsSidebarPane.js
@@ -99,7 +99,7 @@ WebInspector.BreakpointsSidebarPane.prototype = {
var sourceTextElement = document.createElement("div");
sourceTextElement.textContent = breakpoint.sourceText;
- sourceTextElement.className = "source-text";
+ sourceTextElement.className = "source-text monospace";
breakpointElement.appendChild(sourceTextElement);
var currentElement = this.listElement.firstChild;
diff --git a/WebCore/inspector/front-end/DatabaseQueryView.js b/WebCore/inspector/front-end/DatabaseQueryView.js
index 61b236c..2656842 100644
--- a/WebCore/inspector/front-end/DatabaseQueryView.js
+++ b/WebCore/inspector/front-end/DatabaseQueryView.js
@@ -31,6 +31,7 @@ WebInspector.DatabaseQueryView = function(database)
this.element.addStyleClass("storage-view");
this.element.addStyleClass("query");
+ this.element.addStyleClass("monospace");
this.element.tabIndex = 0;
this.element.addEventListener("selectstart", this._selectStart.bind(this), false);
diff --git a/WebCore/inspector/front-end/InspectorBackendStub.js b/WebCore/inspector/front-end/InspectorBackendStub.js
index 0b455cb..5ddb74a 100644
--- a/WebCore/inspector/front-end/InspectorBackendStub.js
+++ b/WebCore/inspector/front-end/InspectorBackendStub.js
@@ -265,6 +265,10 @@ WebInspector.InspectorBackendStub.prototype = {
releaseWrapperObjectGroup: function()
{
+ },
+
+ setInjectedScriptSource: function()
+ {
}
}
diff --git a/WebCore/inspector/front-end/SourceFrame.js b/WebCore/inspector/front-end/SourceFrame.js
index 9b4e952..8508722 100644
--- a/WebCore/inspector/front-end/SourceFrame.js
+++ b/WebCore/inspector/front-end/SourceFrame.js
@@ -376,6 +376,7 @@ WebInspector.SourceFrame.prototype = {
var editorElement = document.createElement("input");
editorElement.id = "source-breakpoint-condition";
+ editorElement.className = "monospace";
editorElement.type = "text"
conditionElement.appendChild(editorElement);
this._conditionEditorElement = editorElement;
diff --git a/WebCore/inspector/front-end/inspector.css b/WebCore/inspector/front-end/inspector.css
index e6c73cc..1477f97 100644
--- a/WebCore/inspector/front-end/inspector.css
+++ b/WebCore/inspector/front-end/inspector.css
@@ -495,6 +495,29 @@ body.drawer-visible #drawer {
background: none;
}
+.monospace {
+ font-size: 10px;
+ font-family: monospace;
+}
+
+body.platform-mac-tiger .monospace, body.platform-mac-leopard .monospace,
+body.platform-mac-tiger .source-code, body.platform-mac-leopard .source-code {
+ font-size: 10px;
+ font-family: Monaco, monospace;
+}
+
+body.platform-mac-snowleopard .monospace,
+body.platform-mac-snowleopard .source-code {
+ font-size: 11px;
+ font-family: Menlo, monospace;
+}
+
+body.platform-windows .monospace, body.platform-windows-vista-or-later .monospace,
+body.platform-windows .source-code, body.platform-windows-vista-or-later .source-code {
+ font-size: 12px;
+ font-family: Consolas, Lucida Console, monospace;
+}
+
#console-messages {
position: absolute;
z-index: 0;
@@ -502,8 +525,6 @@ body.drawer-visible #drawer {
left: 0;
right: 0;
bottom: 23px;
- font-size: initial;
- font-family: monospace;
padding: 2px 0;
overflow-y: overlay;
word-wrap: break-word;
@@ -1098,15 +1119,10 @@ body.drawer-visible #drawer {
.source-code {
font-family: monospace;
- font-size: medium;
+ font-size: 10px;
white-space: pre-wrap;
}
-body.platform-windows .source-code {
- font-family: Consolas, Lucida Console, monospace;
- font-size: 12px;
-}
-
.outline-disclosure li {
padding: 0 0 0 14px;
margin-top: 1px;
@@ -2123,8 +2139,6 @@ body.inactive .data-grid th.sort-ascending, body.inactive .data-grid th.sort-des
}
.storage-view.query {
- font-size: initial;
- font-family: monospace;
padding: 2px 0;
overflow-y: overlay;
overflow-x: hidden;
@@ -3787,7 +3801,6 @@ ol.breakpoint-list {
}
.breakpoint-list .source-text {
- font-family: monospace;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
@@ -3821,7 +3834,6 @@ ol.breakpoint-list {
}
#source-breakpoint-condition {
- font-family: monospace;
margin: 0;
border: 1px inset rgb(190, 190, 190) !important;
width: 100%;
diff --git a/WebCore/inspector/front-end/inspector.html b/WebCore/inspector/front-end/inspector.html
index a866003..e66dc6b 100644
--- a/WebCore/inspector/front-end/inspector.html
+++ b/WebCore/inspector/front-end/inspector.html
@@ -133,7 +133,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<div id="main-status-bar" class="status-bar"><div id="anchored-status-bar-items"><button id="dock-status-bar-item" class="status-bar-item"><div class="glyph"></div><div class="glyph shadow"></div></button><button id="console-status-bar-item" class="status-bar-item"><div class="glyph"></div><div class="glyph shadow"></div></button><button id="changes-status-bar-item" class="status-bar-item hidden"></button><div id="count-items"><div id="changes-count" class="hidden"></div><div id="error-warning-count" class="hidden"></div></div></div></div>
</div>
<div id="drawer">
- <div id="console-view"><div id="console-messages"><div id="console-prompt" spellcheck="false"><br></div></div></div>
+ <div id="console-view"><div id="console-messages" class="monospace"><div id="console-prompt" spellcheck="false"><br></div></div></div>
<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>
</div>
</body>
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index 7d3d1fc..ca763dc 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -55,6 +55,13 @@ var WebInspector = {
cookieDomains: {},
missingLocalizedStrings: {},
pendingDispatches: 0,
+ OS: {
+ Windows: "windows",
+ WindowsVistaOrLater: "windows-vista-or-later",
+ MacTiger: "mac-tiger",
+ MacLeopard: "mac-leopard",
+ MacSnowLeopard: "mac-snowleopard"
+ },
// RegExp groups:
// 1 - scheme
@@ -67,11 +74,39 @@ var WebInspector = {
get platform()
{
if (!("_platform" in this))
- this._platform = InspectorFrontendHost.platform();
+ this._platform = this._detectPlatform();
return this._platform;
},
+ _detectPlatform: function()
+ {
+ const userAgent = navigator.userAgent;
+ var nativePlatform = InspectorFrontendHost.platform();
+
+ if (nativePlatform === "windows") {
+ var match = userAgent.match(/Windows NT (\d+)\.(?:\d+)/);
+ if (match && match[1] >= 6)
+ return WebInspector.OS.WindowsVistaOrLater;
+ return WebInspector.OS.Windows;
+ } else if (nativePlatform === "mac") {
+ var match = userAgent.match(/Mac OS X\s*(?:(\d+)_(\d+)_(?:\d+))?/);
+ if (!match || match[1] != 10)
+ return WebInspector.OS.MacLeopard;
+ switch (Number(match[2])) {
+ case 4:
+ return WebInspector.OS.MacTiger;
+ case 5:
+ return WebInspector.OS.MacLeopard;
+ case 6:
+ return WebInspector.OS.MacSnowLeopard;
+ }
+ return WebInspector.OS.MacLeopard;
+ }
+
+ return nativePlatform;
+ },
+
get port()
{
if (!("_port" in this))
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list