Title: [147468] trunk
Revision
147468
Author
[email protected]
Date
2013-04-02 11:18:48 -0700 (Tue, 02 Apr 2013)

Log Message

Web Inspector: [Timeline] warning markers are not propagated to coalesced records
https://bugs.webkit.org/show_bug.cgi?id=113789

Reviewed by Pavel Feldman.

Source/WebCore:

Test: inspector/timeline/timeline-coalescing.html

* inspector/front-end/TimelinePresentationModel.js: set childHasWarning on coalescing record if the record it replaces had warnings.
(WebInspector.TimelinePresentationModel.prototype._replaceWithCoalescedRecord):

LayoutTests:

* inspector/timeline/timeline-coalescing-expected.txt: Added.
* inspector/timeline/timeline-coalescing.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (147467 => 147468)


--- trunk/LayoutTests/ChangeLog	2013-04-02 18:17:10 UTC (rev 147467)
+++ trunk/LayoutTests/ChangeLog	2013-04-02 18:18:48 UTC (rev 147468)
@@ -1,3 +1,13 @@
+2013-04-02  Andrey Kosyakov  <[email protected]>
+
+        Web Inspector: [Timeline] warning markers are not propagated to coalesced records
+        https://bugs.webkit.org/show_bug.cgi?id=113789
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/timeline/timeline-coalescing-expected.txt: Added.
+        * inspector/timeline/timeline-coalescing.html: Added.
+
 2013-04-02  Yury Semikhatsky  <[email protected]>
 
         Web Inspector: memory instrumentation for external strings is broken

Added: trunk/LayoutTests/inspector/timeline/timeline-coalescing-expected.txt (0 => 147468)


--- trunk/LayoutTests/inspector/timeline/timeline-coalescing-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/inspector/timeline/timeline-coalescing-expected.txt	2013-04-02 18:18:48 UTC (rev 147468)
@@ -0,0 +1,11 @@
+Test timeline records coalescing
+
+Root
+----> Layout
+--------> Layout
+--------> Layout
+--------> Layout
+----> Layout
+coalesced record's hasWarning: undefined
+coalesced record's childHasWarning: true
+

Added: trunk/LayoutTests/inspector/timeline/timeline-coalescing.html (0 => 147468)


--- trunk/LayoutTests/inspector/timeline/timeline-coalescing.html	                        (rev 0)
+++ trunk/LayoutTests/inspector/timeline/timeline-coalescing.html	2013-04-02 18:18:48 UTC (rev 147468)
@@ -0,0 +1,49 @@
+<html>
+<head>
+<script src=""
+<script src=""
+<script>
+
+function test()
+{
+    WebInspector.showPanel("timeline");
+
+    var records = [
+        {"startTime": 1000.000,"data":{},"endTime":1099.999,"type":"Program","children":[
+            {"startTime":1000.001, "endTime":1099.9,"type":"Layout","frameId":"2","data":{},
+            "stackTrace": [
+                {"functionName":"func","url":"http://example.com","lineNumber":42,"columnNumber":1}
+            ]}
+        ]},
+        {"startTime":1100.000,"data":{},"endTime":1199.999,"type":"Program","children":[
+            {"startTime":1100.001, "endTime":1199.9,"type":"Layout","frameId":"2","data":{}}
+        ]},
+        {"startTime":1200.000,"data":{},"endTime":1299.999,"type":"Program","children":[
+            {"startTime":1200.001, "endTime":1299.9,"type":"Layout","frameId":"2","data":{}}
+        ]},
+        {"startTime":1300.000,"data":{},"endTime":1399.999,"type":"Program","children":[
+            {"startTime":1301.001, "endTime":1399.9,"type":"Layout","frameId":"2","data":{}}
+        ]},
+    ];
+
+    var model = WebInspector.panels.timeline._model;
+    var presentationModel = WebInspector.panels.timeline._presentationModel;
+
+    records.forEach(model._addRecord, model);
+    InspectorTest.dumpTimelineRecord(presentationModel.rootRecord());
+    var coalesced = presentationModel.rootRecord().children[0];
+    InspectorTest.addResult("coalesced record's hasWarning: " + coalesced.hasWarning);
+    InspectorTest.addResult("coalesced record's childHasWarning: " + coalesced.childHasWarning);
+    InspectorTest.completeTest();
+}
+
+</script>
+</head>
+
+<body _onload_="runTest()">
+<p>
+Test timeline records coalescing</a>
+</p>
+
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (147467 => 147468)


--- trunk/Source/WebCore/ChangeLog	2013-04-02 18:17:10 UTC (rev 147467)
+++ trunk/Source/WebCore/ChangeLog	2013-04-02 18:18:48 UTC (rev 147468)
@@ -1,3 +1,15 @@
+2013-04-02  Andrey Kosyakov  <[email protected]>
+
+        Web Inspector: [Timeline] warning markers are not propagated to coalesced records
+        https://bugs.webkit.org/show_bug.cgi?id=113789
+
+        Reviewed by Pavel Feldman.
+
+        Test: inspector/timeline/timeline-coalescing.html
+
+        * inspector/front-end/TimelinePresentationModel.js: set childHasWarning on coalescing record if the record it replaces had warnings.
+        (WebInspector.TimelinePresentationModel.prototype._replaceWithCoalescedRecord):
+
 2013-04-02  Yury Semikhatsky  <[email protected]>
 
         Web Inspector: memory instrumentation for external strings is broken

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


--- trunk/Source/WebCore/inspector/front-end/TimelinePresentationModel.js	2013-04-02 18:17:10 UTC (rev 147467)
+++ trunk/Source/WebCore/inspector/front-end/TimelinePresentationModel.js	2013-04-02 18:18:48 UTC (rev 147468)
@@ -438,6 +438,8 @@
         coalescedRecord._children.push(record);
         record.parent = coalescedRecord;
         coalescedRecord.calculateAggregatedStats();
+        if (record.hasWarning || record.childHasWarning)
+            coalescedRecord.childHasWarning = true;
 
         coalescedRecord.parent = parent;
         parent._children[parent._children.indexOf(record)] = coalescedRecord;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to