Title: [126765] trunk/Source/WebCore
Revision
126765
Author
[email protected]
Date
2012-08-27 08:46:15 -0700 (Mon, 27 Aug 2012)

Log Message

Web Inspector: display a dimmed warning icon on a timeline record if it has children with warning
https://bugs.webkit.org/show_bug.cgi?id=95087

Reviewed by Yury Semikhatsky.

Propagate warning from child timeline records to the top, display a dimmed warning icons for records
that have children with warnings.

* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelineRecordListRow.prototype.update):
* inspector/front-end/TimelinePresentationModel.js:
(WebInspector.TimelinePresentationModel.Record):
(WebInspector.TimelinePresentationModel.Record.prototype.get aggregatedStats):
(WebInspector.TimelinePresentationModel.Record.prototype.setHasWarning):
* inspector/front-end/timelinePanel.css:
(.timeline-tree-item.child-warning::after):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (126764 => 126765)


--- trunk/Source/WebCore/ChangeLog	2012-08-27 15:43:23 UTC (rev 126764)
+++ trunk/Source/WebCore/ChangeLog	2012-08-27 15:46:15 UTC (rev 126765)
@@ -1,3 +1,22 @@
+2012-08-27  Andrey Kosyakov  <[email protected]>
+
+        Web Inspector: display a dimmed warning icon on a timeline record if it has children with warning
+        https://bugs.webkit.org/show_bug.cgi?id=95087
+
+        Reviewed by Yury Semikhatsky.
+
+        Propagate warning from child timeline records to the top, display a dimmed warning icons for records
+        that have children with warnings.
+
+        * inspector/front-end/TimelinePanel.js:
+        (WebInspector.TimelineRecordListRow.prototype.update):
+        * inspector/front-end/TimelinePresentationModel.js:
+        (WebInspector.TimelinePresentationModel.Record):
+        (WebInspector.TimelinePresentationModel.Record.prototype.get aggregatedStats):
+        (WebInspector.TimelinePresentationModel.Record.prototype.setHasWarning):
+        * inspector/front-end/timelinePanel.css:
+        (.timeline-tree-item.child-warning::after):
+
 2012-08-27  Vsevolod Vlasov  <[email protected]>
 
         Web Inspector: Debugger should break on failed assertions in Break on exceptions mode.

Modified: trunk/Source/WebCore/inspector/front-end/TimelinePanel.js (126764 => 126765)


--- trunk/Source/WebCore/inspector/front-end/TimelinePanel.js	2012-08-27 15:43:23 UTC (rev 126764)
+++ trunk/Source/WebCore/inspector/front-end/TimelinePanel.js	2012-08-27 15:46:15 UTC (rev 126765)
@@ -1117,6 +1117,8 @@
             this.element.addStyleClass("even");
         if (record.hasWarning)
             this.element.addStyleClass("warning");
+        else if (record.childHasWarning)
+            this.element.addStyleClass("child-warning");
 
         this._typeElement.textContent = record.title;
 

Modified: trunk/Source/WebCore/inspector/front-end/TimelinePresentationModel.js (126764 => 126765)


--- trunk/Source/WebCore/inspector/front-end/TimelinePresentationModel.js	2012-08-27 15:43:23 UTC (rev 126764)
+++ trunk/Source/WebCore/inspector/front-end/TimelinePresentationModel.js	2012-08-27 15:46:15 UTC (rev 126765)
@@ -544,7 +544,7 @@
         if (invalidateLayoutRecord)
             this.callSiteStackTrace = invalidateLayoutRecord.stackTrace || invalidateLayoutRecord.callSiteStackTrace;
         if (this.stackTrace)
-            this.hasWarning = true;
+            this.setHasWarning();
         presentationModel._lastInvalidateLayout[this.frameId] = null;
         break;
     }
@@ -926,6 +926,13 @@
     get aggregatedStats()
     {
         return this._aggregatedStats;
+    },
+
+    setHasWarning: function()
+    {
+        this.hasWarning = true;
+        for (var parent = this.parent; parent && !parent.childHasWarning; parent = parent.parent)
+            parent.childHasWarning = true;
     }
 }
 

Modified: trunk/Source/WebCore/inspector/front-end/timelinePanel.css (126764 => 126765)


--- trunk/Source/WebCore/inspector/front-end/timelinePanel.css	2012-08-27 15:43:23 UTC (rev 126764)
+++ trunk/Source/WebCore/inspector/front-end/timelinePanel.css	2012-08-27 15:46:15 UTC (rev 126765)
@@ -271,12 +271,17 @@
     background-color: rgba(0, 0, 0, 0.05);
 }
 
-.timeline-tree-item.warning::after {
+.timeline-tree-item.warning::after,
+.timeline-tree-item.child-warning::after {
     content: url(Images/warningIcon.png);
     float: right;
     padding-top: 1px;
 }
 
+.timeline-tree-item.child-warning::after {
+    opacity: 0.5;
+}
+
 .timeline-tree-item .data.dimmed {
     color: rgba(0, 0, 0, 0.7);
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to