Web Inspector: Dark Mode: Layers tab background should be dark
authornvasilyev@apple.com <nvasilyev@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 Jul 2018 00:30:09 +0000 (00:30 +0000)
committernvasilyev@apple.com <nvasilyev@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 Jul 2018 00:30:09 +0000 (00:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=187660
<rdar://problem/42179616>

Reviewed by Brian Burg.

* UserInterface/Views/Layers3DContentView.js:
(WI.Layers3DContentView.prototype.initialLayout):
* UserInterface/Views/Variables.css:
(:root):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234076 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/Layers3DContentView.js
Source/WebInspectorUI/UserInterface/Views/Variables.css

index 20ec0f6..5fe4f4a 100644 (file)
@@ -1,3 +1,16 @@
+2018-07-20  Nikita Vasilyev  <nvasilyev@apple.com>
+
+        Web Inspector: Dark Mode: Layers tab background should be dark
+        https://bugs.webkit.org/show_bug.cgi?id=187660
+        <rdar://problem/42179616>
+
+        Reviewed by Brian Burg.
+
+        * UserInterface/Views/Layers3DContentView.js:
+        (WI.Layers3DContentView.prototype.initialLayout):
+        * UserInterface/Views/Variables.css:
+        (:root):
+
 2018-07-19  Ross Kirsling  <ross.kirsling@sony.com>
 
         Web Inspector: Layers visualization shouldn't select on mousedown
index 3d38f74..57f3484 100644 (file)
@@ -143,7 +143,8 @@ WI.Layers3DContentView = class Layers3DContentView extends WI.ContentView
         super.initialLayout();
 
         this._renderer = new THREE.WebGLRenderer({antialias: true});
-        this._renderer.setClearColor("white");
+        const backgroundColor = window.getComputedStyle(document.documentElement).getPropertyValue("--background-color-content").trim();
+        this._renderer.setClearColor(backgroundColor);
         this._renderer.setSize(this.element.offsetWidth, this.element.offsetHeight);
 
         this._camera = new THREE.PerspectiveCamera(45, this.element.offsetWidth / this.element.offsetHeight, 1, 100000);
index e5f09a7..94f380e 100644 (file)
@@ -32,6 +32,8 @@
     --z-index-glass-pane-for-drag: 2048;
     --z-index-uncaught-exception-sheet: 4096;
 
+    --background-color-content: white;
+
     --selected-foreground-color: white;
     --selected-secondary-text-color: hsla(0, 100%, 100%, 0.7);
     --selected-background-color: hsl(212, 92%, 54%);