Commit e45bc1a4 authored by pfeldman@chromium.org's avatar pfeldman@chromium.org

DevTools: follow up to r168290, fix presentation model properties.

R=apavlov@chromium.org

Review URL: https://codereview.chromium.org/185553006

git-svn-id: svn://svn.chromium.org/blink/trunk@168302 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent f2153a6f
......@@ -9,7 +9,7 @@ function test()
var panel = WebInspector.panel("timeline");
var model = panel._model;
InspectorTest.assertTrue(!model._clientInitiatedRecording, "timeline is being recorded");
InspectorTest.assertTrue(!model.records.length, "timeline has already been recorded");
InspectorTest.assertTrue(!model.records().length, "timeline has already been recorded");
WebInspector.showPanel("console");
InspectorTest.runWhenPageLoads(step1);
......@@ -18,7 +18,7 @@ function test()
function step1()
{
InspectorTest.assertTrue(!model._clientInitiatedRecording, "timeline started recording");
InspectorTest.assertTrue(!model.records.length, "timeline has been recorded");
InspectorTest.assertTrue(!model.records().length, "timeline has been recorded");
WebInspector.showPanel("timeline");
InspectorTest.runWhenPageLoads(step2);
......@@ -27,7 +27,7 @@ function test()
function step2()
{
InspectorTest.assertTrue(model.records.length, "timeline should have been recorded");
InspectorTest.assertTrue(model.records().length, "timeline should have been recorded");
InspectorTest.assertTrue(!model._clientInitiatedRecording, "timeline recording should have finished");
InspectorTest.completeTest();
}
......
......@@ -504,7 +504,7 @@ WebInspector.TimelineView.prototype = {
var record = recordsInWindow[i];
if (i < startIndex) {
var lastChildIndex = i + record.visibleChildrenCount;
var lastChildIndex = i + record.visibleChildrenCount();
if (lastChildIndex >= startIndex && lastChildIndex < endIndex) {
var expandElement = new WebInspector.TimelineExpandableElement(this._expandElements);
var positions = this._calculator.computeBarGraphWindowPosition(record);
......@@ -1231,12 +1231,12 @@ WebInspector.TimelineExpandableElement.prototype = {
_update: function(record, index, left, width)
{
const rowHeight = WebInspector.TimelinePanel.rowHeight;
if (record.visibleChildrenCount || record.expandable) {
if (record.visibleChildrenCount() || record.expandable()) {
this._element.style.top = index * rowHeight + "px";
this._element.style.left = left + "px";
this._element.style.width = Math.max(12, width + 25) + "px";
if (!record.collapsed()) {
this._element.style.height = (record.visibleChildrenCount + 1) * rowHeight + "px";
this._element.style.height = (record.visibleChildrenCount() + 1) * rowHeight + "px";
this._element.classList.add("timeline-expandable-expanded");
this._element.classList.remove("timeline-expandable-collapsed");
} else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment