Title: [262397] trunk/Source/WebInspectorUI
Revision
262397
Author
nvasil...@apple.com
Date
2020-06-01 15:19:50 -0700 (Mon, 01 Jun 2020)

Log Message

Web Inspector: Timelines: Edit button has wrong outline
https://bugs.webkit.org/show_bug.cgi?id=211105
<rdar://problem/62475815>

Reviewed by Devin Rousso.

* UserInterface/Views/ButtonNavigationItem.css:
(.navigation-bar .item.button.text-only:focus):
Add `.text-only` to the selector to make specificity higher than of the button selector.

* UserInterface/Views/RadioButtonNavigationItem.css:
(.navigation-bar .item.radio.button.text-only:focus):
Add `.text-only` to the selector to make specificity higher than of the button selector.

(.navigation-bar .item.radio.button:not(.text-only)): Deleted.
(.navigation-bar.collapsed .item.radio.button:not(.text-only)): Deleted.
Remove dead code. We only have text-only buttons now.

* UserInterface/Views/RadioButtonNavigationItem.js:
(WI.RadioButtonNavigationItem):
(WI.RadioButtonNavigationItem.prototype.get buttonStyle):
(WI.RadioButtonNavigationItem.prototype.set buttonStyle):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (262396 => 262397)


--- trunk/Source/WebInspectorUI/ChangeLog	2020-06-01 22:15:59 UTC (rev 262396)
+++ trunk/Source/WebInspectorUI/ChangeLog	2020-06-01 22:19:50 UTC (rev 262397)
@@ -1,3 +1,28 @@
+2020-06-01  Nikita Vasilyev  <nvasil...@apple.com>
+
+        Web Inspector: Timelines: Edit button has wrong outline
+        https://bugs.webkit.org/show_bug.cgi?id=211105
+        <rdar://problem/62475815>
+
+        Reviewed by Devin Rousso.
+
+        * UserInterface/Views/ButtonNavigationItem.css:
+        (.navigation-bar .item.button.text-only:focus):
+        Add `.text-only` to the selector to make specificity higher than of the button selector.
+
+        * UserInterface/Views/RadioButtonNavigationItem.css:
+        (.navigation-bar .item.radio.button.text-only:focus):
+        Add `.text-only` to the selector to make specificity higher than of the button selector.
+
+        (.navigation-bar .item.radio.button:not(.text-only)): Deleted.
+        (.navigation-bar.collapsed .item.radio.button:not(.text-only)): Deleted.
+        Remove dead code. We only have text-only buttons now.
+
+        * UserInterface/Views/RadioButtonNavigationItem.js:
+        (WI.RadioButtonNavigationItem):
+        (WI.RadioButtonNavigationItem.prototype.get buttonStyle):
+        (WI.RadioButtonNavigationItem.prototype.set buttonStyle):
+
 2020-05-29  Devin Rousso  <drou...@apple.com>
 
         Web Inspector: Graphics: text editors in Keyframes section don't populate when sidebar is first shown

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ButtonNavigationItem.css (262396 => 262397)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ButtonNavigationItem.css	2020-06-01 22:15:59 UTC (rev 262396)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ButtonNavigationItem.css	2020-06-01 22:19:50 UTC (rev 262397)
@@ -65,6 +65,10 @@
     text-align: center;
 }
 
+.navigation-bar .item.button.text-only:focus {
+    outline-offset: var(--focus-ring-outline-offset);
+}
+
 .navigation-bar .item.button > .glyph {
     color: var(--glyph-color);
     opacity: var(--glyph-opacity);

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/RadioButtonNavigationItem.css (262396 => 262397)


--- trunk/Source/WebInspectorUI/UserInterface/Views/RadioButtonNavigationItem.css	2020-06-01 22:15:59 UTC (rev 262396)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/RadioButtonNavigationItem.css	2020-06-01 22:19:50 UTC (rev 262397)
@@ -23,15 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-.navigation-bar .item.radio.button:not(.text-only) {
-    width: 32px;
-}
-
-.navigation-bar.collapsed .item.radio.button:not(.text-only) {
-    width: 24px;
-}
-
-.navigation-bar .item.radio.button:focus {
+.navigation-bar .item.radio.button.text-only:focus {
     outline-offset: -1px;
 }
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/RadioButtonNavigationItem.js (262396 => 262397)


--- trunk/Source/WebInspectorUI/UserInterface/Views/RadioButtonNavigationItem.js	2020-06-01 22:15:59 UTC (rev 262396)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/RadioButtonNavigationItem.js	2020-06-01 22:19:50 UTC (rev 262397)
@@ -28,6 +28,8 @@
     constructor(identifier, toolTip, image, imageWidth, imageHeight)
     {
         super(identifier, toolTip, image, imageWidth, imageHeight, "tab");
+
+        console.assert(this.buttonStyle === WI.ButtonNavigationItem.Style.Text);
     }
 
     // Public
@@ -60,6 +62,19 @@
         this.element.classList.toggle(WI.RadioButtonNavigationItem.ActiveStyleClassName, flag);
     }
 
+    get buttonStyle()
+    {
+        return super.buttonStyle;
+    }
+
+    set buttonStyle(newButtonStyle)
+    {
+        if (newButtonStyle !== WI.ButtonNavigationItem.Style.Text)
+            return;
+
+        super.buttonStyle = newButtonStyle;
+    }
+
     // Protected
 
     get additionalClassNames()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to