Title: [239705] trunk/Source/WebInspectorUI
Revision
239705
Author
[email protected]
Date
2019-01-07 15:22:10 -0800 (Mon, 07 Jan 2019)

Log Message

Web Inspector: Audit: run arrow shouldn't be visible when running tests
https://bugs.webkit.org/show_bug.cgi?id=192209
<rdar://problem/46423615>

Reviewed by Brian Burg.

* UserInterface/Views/AuditTreeElement.js:
(WI.AuditTreeElement.prototype.onattach):
(WI.AuditTreeElement.prototype.ondetach):
(WI.AuditTreeElement.prototype._updateLevel):
(WI.AuditTreeElement.prototype._handleAuditManagerTestScheduled): Added.
(WI.AuditTreeElement.prototype._handleAuditManagerTestCompleted): Added.
* UserInterface/Views/AuditTreeElement.css: Added.
(.tree-outline .item.audit:matches(.test-case, .test-group):not(.manager-active) > .status:hover > img): Added.
(.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Added.
(.tree-outline .item.audit:matches(.test-case, .test-group) > .status:hover > img): Deleted.
(.tree-outline .item.audit.test-group.expanded > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (239704 => 239705)


--- trunk/Source/WebInspectorUI/ChangeLog	2019-01-07 23:15:59 UTC (rev 239704)
+++ trunk/Source/WebInspectorUI/ChangeLog	2019-01-07 23:22:10 UTC (rev 239705)
@@ -1,5 +1,25 @@
 2019-01-07  Devin Rousso  <[email protected]>
 
+        Web Inspector: Audit: run arrow shouldn't be visible when running tests
+        https://bugs.webkit.org/show_bug.cgi?id=192209
+        <rdar://problem/46423615>
+
+        Reviewed by Brian Burg.
+
+        * UserInterface/Views/AuditTreeElement.js:
+        (WI.AuditTreeElement.prototype.onattach):
+        (WI.AuditTreeElement.prototype.ondetach):
+        (WI.AuditTreeElement.prototype._updateLevel):
+        (WI.AuditTreeElement.prototype._handleAuditManagerTestScheduled): Added.
+        (WI.AuditTreeElement.prototype._handleAuditManagerTestCompleted): Added.
+        * UserInterface/Views/AuditTreeElement.css: Added.
+        (.tree-outline .item.audit:matches(.test-case, .test-group):not(.manager-active) > .status:hover > img): Added.
+        (.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Added.
+        (.tree-outline .item.audit:matches(.test-case, .test-group) > .status:hover > img): Deleted.
+        (.tree-outline .item.audit.test-group.expanded > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Deleted.
+
+2019-01-07  Devin Rousso  <[email protected]>
+
         Web Inspector: extend XHR breakpoints to work with fetch
         https://bugs.webkit.org/show_bug.cgi?id=185843
         <rdar://problem/40431027>

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/AuditTreeElement.css (239704 => 239705)


--- trunk/Source/WebInspectorUI/UserInterface/Views/AuditTreeElement.css	2019-01-07 23:15:59 UTC (rev 239704)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/AuditTreeElement.css	2019-01-07 23:22:10 UTC (rev 239705)
@@ -35,7 +35,7 @@
     height: 100%;
 }
 
-.tree-outline .item.audit:matches(.test-case, .test-group) > .status:hover > img {
+.tree-outline .item.audit:matches(.test-case, .test-group):not(.manager-active) > .status:hover > img {
     width: 75%;
     height: 75%;
     margin: 0 auto;
@@ -47,6 +47,7 @@
     opacity: 0;
 }
 
+.tree-outline .item.audit.manager-active > .status > img.show-on-hover,
 .tree-outline .item.audit.test-group.expanded > .status:hover > :not(img),
 .tree-outline .item.audit.test-group-result.expanded > .status {
     display: none;

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/AuditTreeElement.js (239704 => 239705)


--- trunk/Source/WebInspectorUI/UserInterface/Views/AuditTreeElement.js	2019-01-07 23:15:59 UTC (rev 239704)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/AuditTreeElement.js	2019-01-07 23:22:10 UTC (rev 239705)
@@ -67,6 +67,9 @@
                 this.representedObject.addEventListener(WI.AuditTestBase.Event.Scheduled, this._handleTestCaseScheduled, this);
             else if (this.representedObject instanceof WI.AuditTestGroup)
                 this.representedObject.addEventListener(WI.AuditTestBase.Event.Scheduled, this._handleTestGroupScheduled, this);
+
+            WI.auditManager.addEventListener(WI.AuditManager.Event.TestScheduled, this._handleAuditManagerTestScheduled, this);
+            WI.auditManager.addEventListener(WI.AuditManager.Event.TestCompleted, this._handleAuditManagerTestCompleted, this);
         }
 
         if (this._expandedSetting && this._expandedSetting.value)
@@ -77,6 +80,7 @@
 
     ondetach()
     {
+        WI.auditManager.removeEventListener(null, null, this);
         this.representedObject.removeEventListener(null, null, this);
 
         super.ondetach();
@@ -170,7 +174,7 @@
 
     _updateLevel()
     {
-        let className = "show-on-hover";
+        let className = "";
 
         let result = this.representedObject.result;
         if (result) {
@@ -187,12 +191,16 @@
         }
 
         this.status = document.createElement("img");
-        this.status.classList.add(className);
 
         if (this.representedObject instanceof WI.AuditTestCase || this.representedObject instanceof WI.AuditTestGroup) {
             this.status.title = WI.UIString("Start");
             this.status.addEventListener("click", this._handleStatusClick.bind(this));
+
+            if (!className)
+                className = "show-on-hover";
         }
+
+        this.status.classList.add(className);
     }
 
     _showRunningSpinner()
@@ -265,6 +273,16 @@
         this._showRunningProgress();
     }
 
+    _handleAuditManagerTestScheduled(event)
+    {
+        this.addClassName("manager-active");
+    }
+
+    _handleAuditManagerTestCompleted(event)
+    {
+        this.removeClassName("manager-active");
+    }
+
     _handleStatusClick(event)
     {
         this._start();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to