Commit 7b77d7cf authored by yurys@chromium.org's avatar yurys@chromium.org

Remove TimelinePresentationModel.Record.childHasWarning

The functionlity is already supported by presentation record.

BUG=None
R=loislo@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175265 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent f99bf6b3
...@@ -341,7 +341,7 @@ WebInspector.TimelineFlameChartDataProvider.prototype = { ...@@ -341,7 +341,7 @@ WebInspector.TimelineFlameChartDataProvider.prototype = {
} }
} }
if (record.warnings() || record.childHasWarnings()) { if (record.warnings()) {
context.save(); context.save();
context.rect(barX, barY, barWidth, this.barHeight()); context.rect(barX, barY, barWidth, this.barHeight());
...@@ -367,7 +367,7 @@ WebInspector.TimelineFlameChartDataProvider.prototype = { ...@@ -367,7 +367,7 @@ WebInspector.TimelineFlameChartDataProvider.prototype = {
forceDecoration: function(entryIndex) forceDecoration: function(entryIndex)
{ {
var record = this._records[entryIndex]; var record = this._records[entryIndex];
return record.childHasWarnings() || !!record.warnings(); return !!record.warnings();
}, },
/** /**
......
...@@ -662,11 +662,6 @@ WebInspector.TimelineModel.Record.prototype = { ...@@ -662,11 +662,6 @@ WebInspector.TimelineModel.Record.prototype = {
*/ */
warnings: function() { }, warnings: function() { },
/**
* @return {boolean}
*/
childHasWarnings: function() { },
/** /**
* @param {!RegExp} regExp * @param {!RegExp} regExp
* @return {boolean} * @return {boolean}
...@@ -930,13 +925,9 @@ WebInspector.TimelineModel.RecordImpl.prototype = { ...@@ -930,13 +925,9 @@ WebInspector.TimelineModel.RecordImpl.prototype = {
*/ */
addWarning: function(message) addWarning: function(message)
{ {
if (this._warnings) if (!this._warnings)
this._warnings.push(message); this._warnings = [];
else { this._warnings.push(message);
this._warnings = [message];
for (var parent = this.parent; parent && !parent._childHasWarnings; parent = parent.parent)
parent._childHasWarnings = true;
}
}, },
/** /**
...@@ -947,14 +938,6 @@ WebInspector.TimelineModel.RecordImpl.prototype = { ...@@ -947,14 +938,6 @@ WebInspector.TimelineModel.RecordImpl.prototype = {
return this._warnings; return this._warnings;
}, },
/**
* @return {boolean}
*/
childHasWarnings: function()
{
return !!this._childHasWarnings;
},
/** /**
* @param {!RegExp} regExp * @param {!RegExp} regExp
* @return {boolean} * @return {boolean}
......
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