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

Unified Diff: Source/devtools/front_end/timeline/TimelineView.js

Issue 326063004: Correctly calculate highlighted quad for tracing based timeline events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months 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: Source/devtools/front_end/timeline/TimelineView.js
diff --git a/Source/devtools/front_end/timeline/TimelineView.js b/Source/devtools/front_end/timeline/TimelineView.js
index 68a7c42233c932a9884f9ae9a0570b27426a601b..8ce63661b6d03d1510a44a754f7af5331c14e810 100644
--- a/Source/devtools/front_end/timeline/TimelineView.js
+++ b/Source/devtools/front_end/timeline/TimelineView.js
@@ -829,18 +829,7 @@ WebInspector.TimelineView.prototype = {
return true;
this._highlightedQuadRecord = record;
- var quad = null;
- var recordTypes = WebInspector.TimelineModel.RecordType;
- switch(record.type()) {
- case recordTypes.Layout:
- quad = record.data().root;
- break;
- case recordTypes.Paint:
- quad = record.data().clip;
- break;
- default:
- return false;
- }
+ var quad = record.highlightQuad();
if (!quad)
return false;
record.target().domAgent().highlightQuad(quad, WebInspector.Color.PageHighlight.Content.toProtocolRGBA(), WebInspector.Color.PageHighlight.ContentOutline.toProtocolRGBA());

Powered by Google App Engine
This is Rietveld 408576698