Title: [164604] trunk/Source/WebInspectorUI
- Revision
- 164604
- Author
- [email protected]
- Date
- 2014-02-24 13:15:56 -0800 (Mon, 24 Feb 2014)
Log Message
Give non-Mac platforms a default toolbar background so it isn't just white.
https://bugs.webkit.org/show_bug.cgi?id=129260
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded): Style the boby with platform classes.
* UserInterface/Base/Utilities.js:
(String.prototype.contains): Added.
* UserInterface/Views/Toolbar.css:
(body.docked .toolbar, body:not(.mac-platform) .toolbar): Added. Default toolbar background.
(body.docked.mac-platform.mavericks .toolbar, body.docked.mac-platform.mountain-lion): Added.
(body.mac-platform:not(.docked) .toolbar .item.button > .label): Only apply to Mac.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (164603 => 164604)
--- trunk/Source/WebInspectorUI/ChangeLog 2014-02-24 21:10:50 UTC (rev 164603)
+++ trunk/Source/WebInspectorUI/ChangeLog 2014-02-24 21:15:56 UTC (rev 164604)
@@ -1,3 +1,20 @@
+2014-02-24 Timothy Hatcher <[email protected]>
+
+ Give non-Mac platforms a default toolbar background so it isn't just white.
+
+ https://bugs.webkit.org/show_bug.cgi?id=129260
+
+ Reviewed by Joseph Pecoraro.
+
+ * UserInterface/Base/Main.js:
+ (WebInspector.contentLoaded): Style the boby with platform classes.
+ * UserInterface/Base/Utilities.js:
+ (String.prototype.contains): Added.
+ * UserInterface/Views/Toolbar.css:
+ (body.docked .toolbar, body:not(.mac-platform) .toolbar): Added. Default toolbar background.
+ (body.docked.mac-platform.mavericks .toolbar, body.docked.mac-platform.mountain-lion): Added.
+ (body.mac-platform:not(.docked) .toolbar .item.button > .label): Only apply to Mac.
+
2014-02-24 Diego Pino Garcia <[email protected]>
Web Inspector: Remove single quote characters from Web Inspector _javascript_ files
Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (164603 => 164604)
--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2014-02-24 21:10:50 UTC (rev 164603)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2014-02-24 21:15:56 UTC (rev 164604)
@@ -186,6 +186,17 @@
if (versionMatch && versionMatch[1].indexOf("+") !== -1 && document.styleSheets.length < 10)
document.body.classList.add("nightly-build");
+ // Add platform style classes so the UI can be tweaked per-platform.
+ document.body.classList.add(InspectorFrontendHost.platform() + "-platform");
+
+ if (InspectorFrontendHost.platform() === "mac") {
+ var versionMatch = / Mac OS X (\d+)_(\d+)/.exec(navigator.appVersion);
+ if (versionMatch && versionMatch[1] == 10 && versionMatch[2] == 8)
+ document.body.classList.add("mountain-lion");
+ else if (versionMatch && versionMatch[1] == 10 && versionMatch[2] == 9)
+ document.body.classList.add("mavericks");
+ }
+
this.debuggableType = InspectorFrontendHost.debuggableType() === "web" ? WebInspector.DebuggableType.Web : WebInspector.DebuggableType._javascript_;
document.body.classList.add(this.debuggableType);
Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js (164603 => 164604)
--- trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js 2014-02-24 21:10:50 UTC (rev 164603)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js 2014-02-24 21:15:56 UTC (rev 164604)
@@ -383,6 +383,14 @@
value: Element.prototype.createChild
});
+Object.defineProperty(String.prototype, "contains",
+{
+ value: function(value)
+ {
+ return this.indexOf(value) !== -1;
+ }
+});
+
Object.defineProperty(Array.prototype, "contains",
{
value: function(value)
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/Toolbar.css (164603 => 164604)
--- trunk/Source/WebInspectorUI/UserInterface/Views/Toolbar.css 2014-02-24 21:10:50 UTC (rev 164603)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/Toolbar.css 2014-02-24 21:15:56 UTC (rev 164604)
@@ -53,12 +53,19 @@
height: 32px;
}
-body.docked .toolbar {
+body.docked .toolbar,
+body:not(.mac-platform) .toolbar {
+ background-image: -webkit-linear-gradient(top, rgb(233, 233, 233), rgb(229, 229, 229));
+ box-shadow: inset rgb(252, 252, 252) 0 1px 0;
+}
+
+body.docked.mac-platform.mountain-lion .toolbar,
+body.docked.mac-platform.mavericks .toolbar {
background-image: -webkit-linear-gradient(top, rgb(216, 216, 216), rgb(190, 190, 190));
box-shadow: inset rgba(255, 255, 255, 0.1) 0 1px 0, inset rgba(0, 0, 0, 0.02) 0 -1px 0;
}
-body:not(.docked) .toolbar .item.button > .label {
+body.mac-platform:not(.docked) .toolbar .item.button > .label {
/* We need to disable sub-pixel antialiasing in the toolbar when not docked because the
toolbar is transparent and so is the WebView. */
-webkit-font-smoothing: antialiased;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes