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

Side by Side Diff: Source/devtools/front_end/network/NetworkPanel.js

Issue 718033002: DevTools: NetworkPanel: do not show out-of-range dividers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org>
4 * Copyright (C) 2011 Google Inc. All rights reserved. 4 * Copyright (C) 2011 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 return; 649 return;
650 650
651 if (calculator.startAtZero) { 651 if (calculator.startAtZero) {
652 // If our current sorting method starts at zero, that means it shows all 652 // If our current sorting method starts at zero, that means it shows all
653 // requests starting at the same point, and so onLoad event and DOMC ontent 653 // requests starting at the same point, and so onLoad event and DOMC ontent
654 // event lines really wouldn't make much sense here, so don't render them. 654 // event lines really wouldn't make much sense here, so don't render them.
655 return; 655 return;
656 } 656 }
657 657
658 this._timelineGrid.removeEventDividers(); 658 this._timelineGrid.removeEventDividers();
659 if (this._mainRequestLoadTime !== -1) { 659 var loadTimePercent = calculator.computePercentageFromEventTime(this._ma inRequestLoadTime);
660 var percent = calculator.computePercentageFromEventTime(this._mainRe questLoadTime); 660 if (this._mainRequestLoadTime !== -1 && loadTimePercent >= 0) {
661 661 var loadDivider = createElementWithClass("div", "network-event-divid er-padding");
662 var loadDivider = createElement("div"); 662 loadDivider.createChild("div", "network-event-divider network-red-di vider");
663 loadDivider.className = "network-event-divider network-red-divider"; 663 loadDivider.title = WebInspector.UIString("Load event");
664 664 loadDivider.style.left = loadTimePercent + "%";
665 var loadDividerPadding = createElement("div"); 665 this._timelineGrid.addEventDivider(loadDivider);
666 loadDividerPadding.className = "network-event-divider-padding";
667 loadDividerPadding.title = WebInspector.UIString("Load event");
668 loadDividerPadding.appendChild(loadDivider);
669 loadDividerPadding.style.left = percent + "%";
670 this._timelineGrid.addEventDivider(loadDividerPadding);
671 } 666 }
672 667
673 if (this._mainRequestDOMContentLoadedTime !== -1) { 668 var domLoadTimePrecent = calculator.computePercentageFromEventTime(this. _mainRequestDOMContentLoadedTime);
674 var percent = calculator.computePercentageFromEventTime(this._mainRe questDOMContentLoadedTime); 669 if (this._mainRequestDOMContentLoadedTime !== -1 && domLoadTimePrecent > = 0) {
675 670 var domContentLoadedDivider = createElementWithClass("div", "network -event-divider-padding");
676 var domContentLoadedDivider = createElement("div"); 671 domContentLoadedDivider.createChild("div", "network-event-divider ne twork-blue-divider");
677 domContentLoadedDivider.className = "network-event-divider network-b lue-divider"; 672 domContentLoadedDivider.title = WebInspector.UIString("DOMContentLoa ded event");
678 673 domContentLoadedDivider.style.left = domLoadTimePrecent + "%";
679 var domContentLoadedDividerPadding = createElement("div"); 674 this._timelineGrid.addEventDivider(domContentLoadedDivider);
680 domContentLoadedDividerPadding.className = "network-event-divider-pa dding";
681 domContentLoadedDividerPadding.title = WebInspector.UIString("DOMCon tentLoaded event");
682 domContentLoadedDividerPadding.appendChild(domContentLoadedDivider);
683 domContentLoadedDividerPadding.style.left = percent + "%";
684 this._timelineGrid.addEventDivider(domContentLoadedDividerPadding);
685 } 675 }
686 }, 676 },
687 677
688 _refreshIfNeeded: function() 678 _refreshIfNeeded: function()
689 { 679 {
690 if (this._needsRefresh) 680 if (this._needsRefresh)
691 this.refresh(); 681 this.refresh();
692 }, 682 },
693 683
694 _invalidateAllItems: function() 684 _invalidateAllItems: function()
(...skipping 2617 matching lines...) Expand 10 before | Expand all | Expand 10 after
3312 this._writeProgress.done(); 3302 this._writeProgress.done();
3313 return; 3303 return;
3314 } 3304 }
3315 const chunkSize = 100000; 3305 const chunkSize = 100000;
3316 var text = this._text.substring(this._bytesWritten, this._bytesWritten + chunkSize); 3306 var text = this._text.substring(this._bytesWritten, this._bytesWritten + chunkSize);
3317 this._bytesWritten += text.length; 3307 this._bytesWritten += text.length;
3318 stream.write(text, this._writeNextChunk.bind(this)); 3308 stream.write(text, this._writeNextChunk.bind(this));
3319 this._writeProgress.setWorked(this._bytesWritten); 3309 this._writeProgress.setWorked(this._bytesWritten);
3320 } 3310 }
3321 } 3311 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698