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); |