Title: [242604] trunk/Source/WebInspectorUI
Revision
242604
Author
[email protected]
Date
2019-03-07 11:24:23 -0800 (Thu, 07 Mar 2019)

Log Message

Web Inspector: REGRESSION(r242118): WI.ScopeBar missing background
https://bugs.webkit.org/show_bug.cgi?id=195299

Reviewed by Joseph Pecoraro.

Rework the way `color`, `background-color`, and `border-color` are set for `WI.ScopeBar` to
use CSS variables instead. Divides the variables into three categories:
 - default: these are the values that the `WI.ScopeBar` would use normally
 - override: these are values that take precidence over the default (e.g. set by other elements)
    - falls back to default when no value is set
 - actual: this is the resulting value that will be used when displaying
    - this way, other elements can "mirror" the styling of the `WI.ScopeBar`

* UserInterface/Views/ScopeBar.css:
(.scope-bar):
(.scope-bar > li):
(.scope-bar > li::before):
(.scope-bar > li:matches(.selected, :hover)):
(.scope-bar > li:not(.selected):hover::after):
(.scope-bar > li.selected:active::after):
(.scope-bar > li.multiple > select):
(body[dir=ltr] .scope-bar > li.multiple > select):
(body[dir=rtl] .scope-bar > li.multiple > select):
(.scope-bar > li.multiple:not(.selected) > select): Added.
(.scope-bar > li.multiple > .arrows):
(.scope-bar > li::before): Deleted.
(.scope-bar.default-item-selected > li.multiple.selected::before): Deleted.
(.scope-bar > li:matches(.selected, :hover)::before): Deleted.
(.scope-bar > li.selected:active::before): Deleted.
(.scope-bar > li.multiple.selected > select): Deleted.
(body[dir=ltr] .scope-bar > li.multiple > .arrows): Deleted.
(body[dir=rtl] .scope-bar > li.multiple > .arrows): Deleted.
(.scope-bar > li.multiple:matches(.selected, :hover, :active) > .arrows): Deleted.
(.scope-bar > li:matches(.selected, :active)): Deleted.
(@media (prefers-color-scheme: dark)): Deleted.
Switch to using `::after` since `::before` is more commonly used.

* UserInterface/Views/MultipleScopeBarItem.js:
(WI.MultipleScopeBarItem.prototype._handleMouseDown):
Drive-by: fix the <select> alignment by re-firing the "mousedown" event on it.

* UserInterface/Views/AuditTestGroupContentView.js:
(WI.AuditTestGroupContentView.prototype.layout):
* UserInterface/Views/AuditTestGroupContentView.css:
(.content-view.audit-test-group > header > nav > .scope-bar > li):
(.content-view.audit-test-group > header > nav > .scope-bar > li:not(:hover, .selected)):
(.content-view.audit-test-group > header > nav > .scope-bar > li > img): Added.
(.content-view.audit-test-group > header > nav > .scope-bar > li.pass > img): Added.
(.content-view.audit-test-group > header > nav > .scope-bar > li.warn > img): Added.
(.content-view.audit-test-group > header > nav > .scope-bar > li.fail > img): Added.
(.content-view.audit-test-group > header > nav > .scope-bar > li.error > img): Added.
(.content-view.audit-test-group > header > nav > .scope-bar > li.unsupported > img): Added.
(.content-view.audit-test-group > section > .audit-test-case:first-child, .content-view.audit-test-group > section > .audit-test-case.filtered ~ .audit-test-case:not(.filtered), .content-view.audit-test-group > section > .audit-test-group + .audit-test-case, .content-view.audit-test-group > section > .audit-test-case + .audit-test-group): Added.
(.content-view.audit-test-group > section > .audit-test-case:not(.filtered) ~ .audit-test-case:not(.filtered)): Added.
(.content-view.audit-test-group > header > nav > .scope-bar > li::before): Deleted.
(.content-view.audit-test-group > header > nav > .scope-bar > li.pass::before): Deleted.
(.content-view.audit-test-group > header > nav > .scope-bar > li.warn::before): Deleted.
(.content-view.audit-test-group > header > nav > .scope-bar > li.fail::before): Deleted.
(.content-view.audit-test-group > header > nav > .scope-bar > li.error::before): Deleted.
(.content-view.audit-test-group > header > nav > .scope-bar > li.unsupported::before): Deleted.
(.content-view.audit-test-group > section > .audit-test-case:first-child, .content-view.audit-test-group > section > .audit-test-group + .audit-test-case, .content-view.audit-test-group > section > .audit-test-case + .audit-test-group): Deleted.
Replace the `::before` image with an actual `<img>` now that the `WI.ScopeBar` itself uses
a pseudo-element for the background styling.

* UserInterface/Views/LogContentView.js:
(WI.LogContentView):
* UserInterface/Views/LogContentView.css:
(.log-scope-bar > li:not(.unread) > .indicator): Added.
(.log-scope-bar > li.unread > .indicator): Added.
(.log-scope-bar > li.unread:hover > .indicator): Added.
(.log-scope-bar > li.unread.errors > .indicator): Added.
(.log-scope-bar > li.unread.warnings > .indicator): Added.
(.log-scope-bar > li.unread.logs > .indicator): Added.
(.log-scope-bar > li.unread::before): Deleted.
(body[dir=ltr] .log-scope-bar > li.unread::before): Deleted.
(body[dir=rtl] .log-scope-bar > li.unread::before): Deleted.
(.log-scope-bar > li.unread:hover::before): Deleted.
(.log-scope-bar > li.unread.errors::before): Deleted.
(.log-scope-bar > li.unread.warnings::before): Deleted.
(.log-scope-bar > li.unread.logs::before): Deleted.
Replace the `::before` unread indicator with an actual `<div>` now that the `WI.ScopeBar`
itself uses a pseudo-element for the background styling.

* UserInterface/Views/TimelineRecordingContentView.css:
(.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected):
(.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected > .multiple): Deleted.
(.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected > .multiple .arrows): Deleted.

* UserInterface/Views/CanvasSidebarPanel.js:
(WI.CanvasSidebarPanel.prototype._updateRecordingScopeBar):
Drive-by: fix typo.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (242603 => 242604)


--- trunk/Source/WebInspectorUI/ChangeLog	2019-03-07 19:16:38 UTC (rev 242603)
+++ trunk/Source/WebInspectorUI/ChangeLog	2019-03-07 19:24:23 UTC (rev 242604)
@@ -1,5 +1,99 @@
 2019-03-07  Devin Rousso  <[email protected]>
 
+        Web Inspector: REGRESSION(r242118): WI.ScopeBar missing background
+        https://bugs.webkit.org/show_bug.cgi?id=195299
+
+        Reviewed by Joseph Pecoraro.
+
+        Rework the way `color`, `background-color`, and `border-color` are set for `WI.ScopeBar` to
+        use CSS variables instead. Divides the variables into three categories:
+         - default: these are the values that the `WI.ScopeBar` would use normally
+         - override: these are values that take precidence over the default (e.g. set by other elements)
+            - falls back to default when no value is set
+         - actual: this is the resulting value that will be used when displaying
+            - this way, other elements can "mirror" the styling of the `WI.ScopeBar`
+
+        * UserInterface/Views/ScopeBar.css:
+        (.scope-bar):
+        (.scope-bar > li):
+        (.scope-bar > li::before):
+        (.scope-bar > li:matches(.selected, :hover)):
+        (.scope-bar > li:not(.selected):hover::after):
+        (.scope-bar > li.selected:active::after):
+        (.scope-bar > li.multiple > select):
+        (body[dir=ltr] .scope-bar > li.multiple > select):
+        (body[dir=rtl] .scope-bar > li.multiple > select):
+        (.scope-bar > li.multiple:not(.selected) > select): Added.
+        (.scope-bar > li.multiple > .arrows):
+        (.scope-bar > li::before): Deleted.
+        (.scope-bar.default-item-selected > li.multiple.selected::before): Deleted.
+        (.scope-bar > li:matches(.selected, :hover)::before): Deleted.
+        (.scope-bar > li.selected:active::before): Deleted.
+        (.scope-bar > li.multiple.selected > select): Deleted.
+        (body[dir=ltr] .scope-bar > li.multiple > .arrows): Deleted.
+        (body[dir=rtl] .scope-bar > li.multiple > .arrows): Deleted.
+        (.scope-bar > li.multiple:matches(.selected, :hover, :active) > .arrows): Deleted.
+        (.scope-bar > li:matches(.selected, :active)): Deleted.
+        (@media (prefers-color-scheme: dark)): Deleted.
+        Switch to using `::after` since `::before` is more commonly used.
+
+        * UserInterface/Views/MultipleScopeBarItem.js:
+        (WI.MultipleScopeBarItem.prototype._handleMouseDown):
+        Drive-by: fix the <select> alignment by re-firing the "mousedown" event on it.
+
+        * UserInterface/Views/AuditTestGroupContentView.js:
+        (WI.AuditTestGroupContentView.prototype.layout):
+        * UserInterface/Views/AuditTestGroupContentView.css:
+        (.content-view.audit-test-group > header > nav > .scope-bar > li):
+        (.content-view.audit-test-group > header > nav > .scope-bar > li:not(:hover, .selected)):
+        (.content-view.audit-test-group > header > nav > .scope-bar > li > img): Added.
+        (.content-view.audit-test-group > header > nav > .scope-bar > li.pass > img): Added.
+        (.content-view.audit-test-group > header > nav > .scope-bar > li.warn > img): Added.
+        (.content-view.audit-test-group > header > nav > .scope-bar > li.fail > img): Added.
+        (.content-view.audit-test-group > header > nav > .scope-bar > li.error > img): Added.
+        (.content-view.audit-test-group > header > nav > .scope-bar > li.unsupported > img): Added.
+        (.content-view.audit-test-group > section > .audit-test-case:first-child, .content-view.audit-test-group > section > .audit-test-case.filtered ~ .audit-test-case:not(.filtered), .content-view.audit-test-group > section > .audit-test-group + .audit-test-case, .content-view.audit-test-group > section > .audit-test-case + .audit-test-group): Added.
+        (.content-view.audit-test-group > section > .audit-test-case:not(.filtered) ~ .audit-test-case:not(.filtered)): Added.
+        (.content-view.audit-test-group > header > nav > .scope-bar > li::before): Deleted.
+        (.content-view.audit-test-group > header > nav > .scope-bar > li.pass::before): Deleted.
+        (.content-view.audit-test-group > header > nav > .scope-bar > li.warn::before): Deleted.
+        (.content-view.audit-test-group > header > nav > .scope-bar > li.fail::before): Deleted.
+        (.content-view.audit-test-group > header > nav > .scope-bar > li.error::before): Deleted.
+        (.content-view.audit-test-group > header > nav > .scope-bar > li.unsupported::before): Deleted.
+        (.content-view.audit-test-group > section > .audit-test-case:first-child, .content-view.audit-test-group > section > .audit-test-group + .audit-test-case, .content-view.audit-test-group > section > .audit-test-case + .audit-test-group): Deleted.
+        Replace the `::before` image with an actual `<img>` now that the `WI.ScopeBar` itself uses
+        a pseudo-element for the background styling.
+
+        * UserInterface/Views/LogContentView.js:
+        (WI.LogContentView):
+        * UserInterface/Views/LogContentView.css:
+        (.log-scope-bar > li:not(.unread) > .indicator): Added.
+        (.log-scope-bar > li.unread > .indicator): Added.
+        (.log-scope-bar > li.unread:hover > .indicator): Added.
+        (.log-scope-bar > li.unread.errors > .indicator): Added.
+        (.log-scope-bar > li.unread.warnings > .indicator): Added.
+        (.log-scope-bar > li.unread.logs > .indicator): Added.
+        (.log-scope-bar > li.unread::before): Deleted.
+        (body[dir=ltr] .log-scope-bar > li.unread::before): Deleted.
+        (body[dir=rtl] .log-scope-bar > li.unread::before): Deleted.
+        (.log-scope-bar > li.unread:hover::before): Deleted.
+        (.log-scope-bar > li.unread.errors::before): Deleted.
+        (.log-scope-bar > li.unread.warnings::before): Deleted.
+        (.log-scope-bar > li.unread.logs::before): Deleted.
+        Replace the `::before` unread indicator with an actual `<div>` now that the `WI.ScopeBar`
+        itself uses a pseudo-element for the background styling.
+
+        * UserInterface/Views/TimelineRecordingContentView.css:
+        (.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected):
+        (.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected > .multiple): Deleted.
+        (.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected > .multiple .arrows): Deleted.
+
+        * UserInterface/Views/CanvasSidebarPanel.js:
+        (WI.CanvasSidebarPanel.prototype._updateRecordingScopeBar):
+        Drive-by: fix typo.
+
+2019-03-07  Devin Rousso  <[email protected]>
+
         Web Inspector: CSS: there should be a way to inline-replace a variable with it's value
         https://bugs.webkit.org/show_bug.cgi?id=195335
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/AuditTestGroupContentView.css (242603 => 242604)


--- trunk/Source/WebInspectorUI/UserInterface/Views/AuditTestGroupContentView.css	2019-03-07 19:16:38 UTC (rev 242603)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/AuditTestGroupContentView.css	2019-03-07 19:24:23 UTC (rev 242604)
@@ -79,13 +79,11 @@
 }
 
 .content-view.audit-test-group > header > nav > .scope-bar > li {
-    display: inline-flex;
-    align-items: center;
     margin: 0 3px;
 }
 
 .content-view.audit-test-group > header > nav > .scope-bar > li:not(:hover, .selected) {
-    border: 1px solid var(--selected-background-color-unfocused);
+    --scope-bar-border-color-override: var(--selected-background-color-unfocused);
 }
 
 .content-view.audit-test-group > header > nav > .scope-bar > li:last-child {
@@ -92,30 +90,31 @@
     -webkit-margin-end: 0;
 }
 
-.content-view.audit-test-group > header > nav > .scope-bar > li::before {
+.content-view.audit-test-group > header > nav > .scope-bar > li > img {
     width: 16px;
     height: 16px;
-    margin-top: 1px;
+    margin-top: 2px;
     -webkit-margin-end: 4px;
+    vertical-align: -4px;
 }
 
-.content-view.audit-test-group > header > nav > .scope-bar > li.pass::before {
+.content-view.audit-test-group > header > nav > .scope-bar > li.pass > img {
     content: url(../Images/AuditTestPass.svg);
 }
 
-.content-view.audit-test-group > header > nav > .scope-bar > li.warn::before {
+.content-view.audit-test-group > header > nav > .scope-bar > li.warn > img {
     content: url(../Images/AuditTestWarn.svg);
 }
 
-.content-view.audit-test-group > header > nav > .scope-bar > li.fail::before {
+.content-view.audit-test-group > header > nav > .scope-bar > li.fail > img {
     content: url(../Images/AuditTestFail.svg);
 }
 
-.content-view.audit-test-group > header > nav > .scope-bar > li.error::before {
+.content-view.audit-test-group > header > nav > .scope-bar > li.error > img {
     content: url(../Images/AuditTestError.svg);
 }
 
-.content-view.audit-test-group > header > nav > .scope-bar > li.unsupported::before {
+.content-view.audit-test-group > header > nav > .scope-bar > li.unsupported > img {
     content: url(../Images/AuditTestUnsupported.svg);
 }
 
@@ -136,11 +135,16 @@
 }
 
 .content-view.audit-test-group > section > .audit-test-case:first-child,
+.content-view.audit-test-group > section > .audit-test-case.filtered ~ .audit-test-case:not(.filtered),
 .content-view.audit-test-group > section > .audit-test-group + .audit-test-case,
 .content-view.audit-test-group > section > .audit-test-case + .audit-test-group {
     margin-top: var(--audit-test-vertical-space);
 }
 
+.content-view.audit-test-group > section > .audit-test-case:not(.filtered) ~ .audit-test-case:not(.filtered) {
+    margin-top: unset;
+}
+
 .content-view.audit-test-group > section > .audit-test-case:last-child {
     margin-bottom: var(--audit-test-vertical-space);
 }

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/AuditTestGroupContentView.js (242603 => 242604)


--- trunk/Source/WebInspectorUI/UserInterface/Views/AuditTestGroupContentView.js	2019-03-07 19:16:38 UTC (rev 242603)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/AuditTestGroupContentView.js	2019-03-07 19:24:23 UTC (rev 242604)
@@ -119,6 +119,9 @@
                     independent: true,
                 });
                 scopeBarItem.selected = true;
+
+                scopeBarItem.element.insertBefore(document.createElement("img"), scopeBarItem.element.firstChild);
+
                 scopeBarItems.push(scopeBarItem);
             };
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CanvasSidebarPanel.js (242603 => 242604)


--- trunk/Source/WebInspectorUI/UserInterface/Views/CanvasSidebarPanel.js	2019-03-07 19:16:38 UTC (rev 242603)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CanvasSidebarPanel.js	2019-03-07 19:24:23 UTC (rev 242604)
@@ -515,7 +515,7 @@
             scopeBarItems.unshift(this._placeholderScopeBarItem);
         }
 
-        this._scopeBar = new WI.ScopeBar("canvas-recordinga-scope-bar", scopeBarItems, selectedScopeBarItem, true);
+        this._scopeBar = new WI.ScopeBar("canvas-recording-scope-bar", scopeBarItems, selectedScopeBarItem, true);
         this._scopeBar.addEventListener(WI.ScopeBar.Event.SelectionChanged, this._scopeBarSelectionChanged, this);
         this._recordingNavigationBar.insertNavigationItem(this._scopeBar, 0);
     }

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.css (242603 => 242604)


--- trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.css	2019-03-07 19:16:38 UTC (rev 242603)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.css	2019-03-07 19:24:23 UTC (rev 242604)
@@ -23,46 +23,34 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-.log-scope-bar > li.unread::before {
-    content: '';
+.log-scope-bar > li:not(.unread) > .indicator {
+    display: none;
+}
+
+.log-scope-bar > li.unread > .indicator {
     display: inline-block;
-    vertical-align: baseline;
-
-    margin-left: -10px;
-    margin-right: 2px;
     width: 8px;
     height: 8px;
-
+    animation: unread-background-pulse 1.5s ease-in-out infinite alternate-reverse;
     -webkit-clip-path: circle(50% at 50% 50%);
-    animation: unread-background-pulse 1.5s ease-in-out infinite alternate-reverse;
 
-    --unread-indicator-margin-start: -10px;
-    --unread-indicator-margin-end: 2px;
+    -webkit-margin-start: -10px;
+    -webkit-margin-end: 2px;
 }
 
-body[dir=ltr] .log-scope-bar > li.unread::before {
-    margin-left: var(--unread-indicator-margin-start);
-    margin-right: var(--unread-indicator-margin-end);
-}
-
-body[dir=rtl] .log-scope-bar > li.unread::before {
-    margin-left: var(--unread-indicator-margin-end);
-    margin-right: var(--unread-indicator-margin-start);
-}
-
-.log-scope-bar > li.unread:hover::before {
+.log-scope-bar > li.unread:hover > .indicator {
     visibility: hidden;
 }
 
-.log-scope-bar > li.unread.errors::before {
+.log-scope-bar > li.unread.errors > .indicator {
     background-color: hsl(0, 95%, 72%);
 }
 
-.log-scope-bar > li.unread.warnings::before {
+.log-scope-bar > li.unread.warnings > .indicator {
     background-color: hsl(48, 98%, 51%);
 }
 
-.log-scope-bar > li.unread.logs::before {
+.log-scope-bar > li.unread.logs > .indicator {
     background-color: hsl(213, 92%, 77%);
 }
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js (242603 => 242604)


--- trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js	2019-03-07 19:16:38 UTC (rev 242603)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js	2019-03-07 19:24:23 UTC (rev 242604)
@@ -91,6 +91,11 @@
             new WI.ScopeBarItem(WI.LogContentView.Scopes.Debugs, WI.UIString("Debugs"), {className: "debugs", hidden: true}),
         ];
 
+        for (let scopeBarItem of scopeBarItems) {
+            let indicatorElement = scopeBarItem.element.insertBefore(document.createElement("div"), scopeBarItem.element.firstChild);
+            indicatorElement.className = "indicator";
+        }
+
         this._scopeBar = new WI.ScopeBar("log-scope-bar", scopeBarItems, scopeBarItems[0]);
         this._scopeBar.addEventListener(WI.ScopeBar.Event.SelectionChanged, this._scopeBarSelectionDidChange, this);
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/MultipleScopeBarItem.js (242603 => 242604)


--- trunk/Source/WebInspectorUI/UserInterface/Views/MultipleScopeBarItem.js	2019-03-07 19:16:38 UTC (rev 242603)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/MultipleScopeBarItem.js	2019-03-07 19:24:23 UTC (rev 242604)
@@ -171,10 +171,20 @@
         if (event.button !== 0)
             return;
 
+        if (event.__original)
+            return;
+
         // Only support click to select when the item is not selected yet.
-        // Clicking when selected will cause the menu it appear instead.
-        if (this._element.classList.contains("selected"))
+        // Clicking when selected will cause the menu to appear instead.
+        if (this._element.classList.contains("selected")) {
+            let newEvent = new event.constructor(event.type, event);
+            newEvent.__original = event;
+
+            event.stop();
+
+            this._selectElement.dispatchEvent(newEvent);
             return;
+        }
 
         this.selected = true;
     }

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ScopeBar.css (242603 => 242604)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ScopeBar.css	2019-03-07 19:16:38 UTC (rev 242603)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ScopeBar.css	2019-03-07 19:24:23 UTC (rev 242604)
@@ -26,6 +26,10 @@
 .scope-bar {
     padding: 0 3px;
     overflow: hidden;
+
+    --scope-bar-text-color-default: var(--text-color);
+    --scope-bar-background-color-default: unset;
+    --scope-bar-border-color-default: unset;
 }
 
 .scope-bar > li {
@@ -36,39 +40,39 @@
     padding: 2px 9px 4px;
     font-size: 11px;
     line-height: 11px;
-    color: hsl(0, 0%, 18%);
+    color: var(--scope-bar-text-color);
     text-align: center;
+
+    --scope-bar-text-color: var(--scope-bar-text-color-override, var(--scope-bar-text-color-default));
+    --scope-bar-background-color: var(--scope-bar-background-color-override, var(--scope-bar-background-color-default));
+    --scope-bar-border-color: var(--scope-bar-border-color-override, var(--scope-bar-border-color-default));
 }
 
-.scope-bar > li::before {
+.scope-bar > li::after {
     position: absolute;
     content: "";
     left: 0;
     top: 0;
-    width: 100%;
-    height: 100%;
+    z-index: -1;
+    width: calc(100% - 2px);
+    height: calc(100% - 2px);
+    background-color: var(--scope-bar-background-color);
+    border: 1px solid var(--scope-bar-border-color);
     border-radius: 3px;
     opacity: var(--glyph-opacity);
-    z-index: -1;
 }
 
-.scope-bar.default-item-selected > li.multiple.selected::before {
-    display: none;
-}
-
 .scope-bar > li:matches(.selected, :hover) {
-    color: var(--selected-foreground-color);
+    --scope-bar-text-color-default: var(--selected-foreground-color);
+    --scope-bar-background-color-default: var(--glyph-color-active);
+    --scope-bar-border-color-default: var(--glyph-color-active);
 }
 
-.scope-bar > li:matches(.selected, :hover)::before {
-    background-color: var(--glyph-color-active);
-}
-
-.scope-bar > li:not(.selected):hover::before {
+.scope-bar > li:not(.selected):hover::after {
     opacity: 0.5;
 }
 
-.scope-bar > li.selected:active::before {
+.scope-bar > li.selected:active::after {
     filter: brightness(0.8);
 }
 
@@ -77,29 +81,25 @@
 }
 
 .scope-bar > li.multiple > select {
-    display: none;
+    position: absolute;
+    top: 1px;
+    width: 0;
+    height: 0;
+    margin: 0;
     opacity: 0;
-
- /* Positioned so the text in the menu aligns with the content text. */
-    position: absolute;
-    top: -5px;
-    left: -4px;
-    right: 0;
-    bottom: 0;
+    pointer-events: none;
 }
 
 body[dir=ltr] .scope-bar > li.multiple > select {
-    top: -5px;
-    left: -4px;
+    left: 1px;
 }
 
 body[dir=rtl] .scope-bar > li.multiple > select {
-    top: -6px;
-    left: -10px;
+    right: 1px;
 }
 
-.scope-bar > li.multiple.selected > select {
-    display: block;
+.scope-bar > li.multiple:not(.selected) > select {
+    display: none;
 }
 
 .scope-bar > li.multiple > .arrows {
@@ -109,27 +109,5 @@
     vertical-align: -2px;
     margin-top: -1px;
     margin-bottom: -1px;
-    --scope-bar-select-arrows-margin-start: 6px;
+    -webkit-margin-start: 6px;
 }
-
-body[dir=ltr] .scope-bar > li.multiple > .arrows {
-    margin-left: var(--scope-bar-select-arrows-margin-start);
-}
-
-body[dir=rtl] .scope-bar > li.multiple > .arrows {
-    margin-right: var(--scope-bar-select-arrows-margin-start);
-}
-
-.scope-bar > li.multiple:matches(.selected, :hover, :active) > .arrows {
-    color: var(--selected-foreground-color);
-}
-
-.scope-bar > li:matches(.selected, :active) {
-    transition-duration: 75ms;
-}
-
-@media (prefers-color-scheme: dark) {
-    .scope-bar > li {
-        color: var(--text-color);
-    }
-}

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.css (242603 => 242604)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.css	2019-03-07 19:16:38 UTC (rev 242603)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.css	2019-03-07 19:24:23 UTC (rev 242604)
@@ -53,15 +53,12 @@
     border-bottom: 1px solid var(--border-color);
 }
 
-.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected > .multiple {
-    background-color: transparent;
-    color: var(--text-color);
+.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected {
+    --scope-bar-text-color-override: var(--text-color);
+    --scope-bar-background-color-override: transparent;
+    --scope-bar-border-color-override: transparent;
 }
 
-.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected > .multiple .arrows {
-    color: var(--text-color);
-}
-
 .content-view.timeline-recording > .content-browser .recording-progress {
     position: absolute;
     left: 0;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to