| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Intel Inc. All rights reserved. | 3 * Copyright (C) 2012 Intel Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 822 */ | 822 */ |
| 823 _highlightQuad: function(rowElement) | 823 _highlightQuad: function(rowElement) |
| 824 { | 824 { |
| 825 if (!rowElement || !rowElement.row) | 825 if (!rowElement || !rowElement.row) |
| 826 return false; | 826 return false; |
| 827 var record = rowElement.row._record.record(); | 827 var record = rowElement.row._record.record(); |
| 828 if (this._highlightedQuadRecord === record) | 828 if (this._highlightedQuadRecord === record) |
| 829 return true; | 829 return true; |
| 830 this._highlightedQuadRecord = record; | 830 this._highlightedQuadRecord = record; |
| 831 | 831 |
| 832 var quad = null; | 832 var quad = record.highlightQuad(); |
| 833 var recordTypes = WebInspector.TimelineModel.RecordType; | |
| 834 switch(record.type()) { | |
| 835 case recordTypes.Layout: | |
| 836 quad = record.data().root; | |
| 837 break; | |
| 838 case recordTypes.Paint: | |
| 839 quad = record.data().clip; | |
| 840 break; | |
| 841 default: | |
| 842 return false; | |
| 843 } | |
| 844 if (!quad) | 833 if (!quad) |
| 845 return false; | 834 return false; |
| 846 record.target().domAgent().highlightQuad(quad, WebInspector.Color.PageHi
ghlight.Content.toProtocolRGBA(), WebInspector.Color.PageHighlight.ContentOutlin
e.toProtocolRGBA()); | 835 record.target().domAgent().highlightQuad(quad, WebInspector.Color.PageHi
ghlight.Content.toProtocolRGBA(), WebInspector.Color.PageHighlight.ContentOutlin
e.toProtocolRGBA()); |
| 847 return true; | 836 return true; |
| 848 }, | 837 }, |
| 849 | 838 |
| 850 _hideQuadHighlight: function() | 839 _hideQuadHighlight: function() |
| 851 { | 840 { |
| 852 if (this._highlightedQuadRecord) { | 841 if (this._highlightedQuadRecord) { |
| 853 this._highlightedQuadRecord.target().domAgent().hideHighlight(); | 842 this._highlightedQuadRecord.target().domAgent().hideHighlight(); |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1299 this._element.classList.remove("hidden"); | 1288 this._element.classList.remove("hidden"); |
| 1300 } else | 1289 } else |
| 1301 this._element.classList.add("hidden"); | 1290 this._element.classList.add("hidden"); |
| 1302 }, | 1291 }, |
| 1303 | 1292 |
| 1304 _dispose: function() | 1293 _dispose: function() |
| 1305 { | 1294 { |
| 1306 this._element.remove(); | 1295 this._element.remove(); |
| 1307 } | 1296 } |
| 1308 } | 1297 } |
| OLD | NEW |