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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui_lazy/FlameChart.js

Issue 2005563002: DevTools: Make sure flamechart vertical scroll stays within the height of contents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1932 matching lines...) Expand 10 before | Expand all | Expand 10 after
1943 this._timeToPixel = totalPixels / this._totalTime; 1943 this._timeToPixel = totalPixels / this._totalTime;
1944 this._pixelToTime = this._totalTime / totalPixels; 1944 this._pixelToTime = this._totalTime / totalPixels;
1945 1945
1946 this._updateScrollBar(); 1946 this._updateScrollBar();
1947 }, 1947 },
1948 1948
1949 _updateHeight: function() 1949 _updateHeight: function()
1950 { 1950 {
1951 this._totalHeight = this._levelToHeight(this._dataProvider.maxStackDepth ()); 1951 this._totalHeight = this._levelToHeight(this._dataProvider.maxStackDepth ());
1952 this._vScrollContent.style.height = this._totalHeight + "px"; 1952 this._vScrollContent.style.height = this._totalHeight + "px";
1953 if (this._scrollTop + this._offsetHeight > this._totalHeight) {
1954 this._scrollTop = Math.max(0, this._totalHeight - this._offsetHeight );
1955 this._vScrollElement.scrollTop = this._scrollTop;
1956 }
1953 }, 1957 },
1954 1958
1955 onResize: function() 1959 onResize: function()
1956 { 1960 {
1957 this._updateScrollBar(); 1961 this._updateScrollBar();
1958 this._updateContentElementSize(); 1962 this._updateContentElementSize();
1959 this.scheduleUpdate(); 1963 this.scheduleUpdate();
1960 }, 1964 },
1961 1965
1962 _updateScrollBar: function() 1966 _updateScrollBar: function()
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
2015 this.update(); 2019 this.update();
2016 }, 2020 },
2017 2021
2018 _enabled: function() 2022 _enabled: function()
2019 { 2023 {
2020 return this._rawTimelineDataLength !== 0; 2024 return this._rawTimelineDataLength !== 0;
2021 }, 2025 },
2022 2026
2023 __proto__: WebInspector.HBox.prototype 2027 __proto__: WebInspector.HBox.prototype
2024 } 2028 }
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