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

Unified Diff: third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js

Issue 2716683003: DO NOT COMMIT DevTools: reintroduce fullViewportUpdate (Closed)
Patch Set: hopefully clearer api Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js
diff --git a/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js b/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js
index 89ae0cb8d8aa72efdc67e9af54f02d97030c76eb..571a5efedd5670fcfa473e5f75a9e310509619cf 100644
--- a/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js
+++ b/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewport.js
@@ -372,6 +372,13 @@ Console.ConsoleViewport = class {
this.element.scrollTop = 10000000;
}
+ fullViewportInvalidate() {
+ for (var i = 0; i < this._renderedItems.length; ++i)
+ this._renderedItems[i].willHide();
+ this._contentElement.removeChildren();
+ this.invalidate();
+ }
+
/**
* @param {function()} prepare
*/
@@ -379,7 +386,7 @@ Console.ConsoleViewport = class {
var itemsToRender = new Set();
for (var i = this._firstActiveIndex; i <= this._lastActiveIndex; ++i)
itemsToRender.add(this._providerElement(i));
- var willBeHidden = this._renderedItems.filter(item => !itemsToRender.has(item));
+ var willBeHidden = this._renderedItems.filter(item => item.element().parentElement && !itemsToRender.has(item));
for (var i = 0; i < willBeHidden.length; ++i)
willBeHidden[i].willHide();
prepare();
@@ -390,8 +397,8 @@ Console.ConsoleViewport = class {
var anchor = this._contentElement.firstChild;
for (var viewportElement of itemsToRender) {
var element = viewportElement.element();
+ var shouldCallWasShown = !element.parentElement;
if (element !== anchor) {
- var shouldCallWasShown = !element.parentElement;
if (shouldCallWasShown)
wasShown.push(viewportElement);
this._contentElement.insertBefore(element, anchor);
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698