Changeset 140123 in webkit
- Timestamp:
- Jan 18, 2013 4:15:29 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r140121 r140123 1 2013-01-18 Eugene Klyuchnikov <eustas.bug@gmail.com> 2 3 Web Inspector: Timeline: nest time/timeEnd records when possible (in glue-mode) 4 https://bugs.webkit.org/show_bug.cgi?id=100114 5 6 Reviewed by Pavel Feldman. 7 8 Changed test to adopt new gluing rules. 9 10 * inspector/timeline/timeline-time.html: Updated test. 11 1 12 2013-01-18 Zan Dobersek <zdobersek@igalia.com> 2 13 -
trunk/LayoutTests/inspector/timeline/timeline-time.html
r133863 r140123 49 49 { 50 50 var root = presentationModel.rootRecord(); 51 InspectorTest.assertEquals( 5, root.children.length);51 InspectorTest.assertEquals(4, root.children.length); 52 52 53 53 var time1 = root.children[1]; 54 54 InspectorTest.assertEquals("Time", time1.type); 55 InspectorTest.assertEquals( 1, time1.children.length);56 var timeEnd1 = time1.children[ 0];55 InspectorTest.assertEquals(2, time1.children.length); 56 var timeEnd1 = time1.children[1]; 57 57 InspectorTest.assertEquals("TimeEnd", timeEnd1.type); 58 58 InspectorTest.assertEquals(time1, timeEnd1.timeRecord); 59 59 InspectorTest.assertEquals(timeEnd1, time1.timeEndRecord); 60 60 61 var time2 = root.children[3];61 var time2 = time1.children[0]; 62 62 InspectorTest.assertEquals("Time", time2.type); 63 63 InspectorTest.assertEquals(1, time2.children.length); -
trunk/Source/WebCore/ChangeLog
r140122 r140123 1 2013-01-18 Eugene Klyuchnikov <eustas.bug@gmail.com> 2 3 Web Inspector: Timeline: nest time/timeEnd records when possible (in glue-mode) 4 https://bugs.webkit.org/show_bug.cgi?id=100114 5 6 Reviewed by Pavel Feldman. 7 8 Nesting time/timeEnd intervals will provide a better overview on 9 what is happening. 10 11 * inspector/front-end/TimelinePresentationModel.js: Added logic that 12 reparents "time" record when "timeEnd" arrives. 13 1 14 2013-01-18 Pavel Feldman <pfeldman@chromium.org> 2 15 -
trunk/Source/WebCore/inspector/front-end/TimelinePresentationModel.js
r138244 r140123 263 263 this._requestAnimationFrameRecords = {}; 264 264 this._timeRecords = {}; 265 this._timeRecordStack = []; 265 266 this._frames = []; 266 267 this._minimumRecordTime = -1; … … 586 587 587 588 case recordTypes.Time: 588 presentationModel._timeRecords[record.data["message"]] = this; 589 var message = record.data["message"]; 590 var oldReference = presentationModel._timeRecords[message]; 591 if (oldReference) 592 break; 593 presentationModel._timeRecords[message] = this; 594 if (origin) 595 presentationModel._timeRecordStack.push(this); 589 596 break; 590 597 … … 599 606 this.intervalDuration = intervalDuration; 600 607 timeRecord.intervalDuration = intervalDuration; 608 if (!origin) 609 break; 610 var recordStack = presentationModel._timeRecordStack; 611 recordStack.splice(recordStack.indexOf(timeRecord), 1); 612 for (var index = recordStack.length; index; --index) { 613 var openRecord = recordStack[index - 1]; 614 if (openRecord.startTime > timeRecord.startTime) 615 continue; 616 function compareStartTime(value, record) 617 { 618 return value < record.startTime ? -1 : 1; 619 } 620 timeRecord.parent.children.splice(timeRecord.parent.children.indexOf(timeRecord)); 621 openRecord.children.splice(insertionIndexForObjectInListSortedByFunction(timeRecord.startTime, openRecord.children, compareStartTime), 0, timeRecord); 622 break; 623 } 601 624 } 602 625 break;
Note: See TracChangeset
for help on using the changeset viewer.