Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Unified Diff: third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineFrameModel.js

Issue 2486853002: Timeline: remove TimelineModel inferred properties from TracingModel.Event (Closed)
Patch Set: addressed comments and rebased Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineFrameModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineFrameModel.js b/third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineFrameModel.js
index cfc5d766ccc19fc4523cbc3874765b2ec8f0c01a..392e5af5cd0201713f60e3d04732fa13b3c203e4 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineFrameModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineFrameModel.js
@@ -339,7 +339,7 @@ WebInspector.TimelineFrameModel = class {
if (event.name === eventNames.BeginMainThreadFrame && event.args['data'] && event.args['data']['frameId'])
this._framePendingCommit.mainFrameId = event.args['data']['frameId'];
- if (event.name === eventNames.Paint && event.args['data']['layerId'] && event.picture && this._target)
+ if (event.name === eventNames.Paint && event.args['data']['layerId'] && WebInspector.TimelineData.forEvent(event).picture && this._target)
this._framePendingCommit.paints.push(new WebInspector.LayerPaintEvent(event, this._target));
if (event.name === eventNames.CompositeLayers && event.args['layerTreeId'] === this._layerTreeId)
this.handleCompositeLayers();
@@ -508,7 +508,8 @@ WebInspector.LayerPaintEvent = class {
* @return {!Promise<?{rect: !Array<number>, serializedPicture: string}>}
*/
picturePromise() {
- return this._event.picture.objectPromise().then(result => {
+ var picture = WebInspector.TimelineData.forEvent(this._event).picture;
+ return picture.objectPromise().then(result => {
if (!result)
return null;
var rect = result['params'] && result['params']['layer_rect'];

Powered by Google App Engine
This is Rietveld 408576698