Web Inspector: Page Weight indicator clears on pages with zero length resources ...
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Mar 2019 20:45:37 +0000 (20:45 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Mar 2019 20:45:37 +0000 (20:45 +0000)
commit7824b022405ab805ef3094c2d749eb911aed47b3
treee19cabd3b4e7bac0da9fe355a251afb1e759ace3
parent3946ce48afcc874eecb8d6d1b6b307210d6b55af
Web Inspector: Page Weight indicator clears on pages with zero length resources (macrumors.com)
https://bugs.webkit.org/show_bug.cgi?id=196170

Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

* UserInterface/Models/DefaultDashboard.js:
(WI.DefaultDashboard.prototype._resourceSizeDidChange):
Catch NaN earlier.

* UserInterface/Models/Resource.js:
(WI.Resource.prototype.updateWithMetrics):
When we receive exact metrics transition the estimated size to zero,
since we won't receive any more updates for the resource.

LayoutTests:

* http/tests/inspector/network/resource-sizes-network.html:
* http/tests/inspector/network/resources/empty.txt: Added.
* platform/mac/http/tests/inspector/network/resource-sizes-network-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243452 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/network/resource-sizes-network.html
LayoutTests/http/tests/inspector/network/resources/empty.txt [new file with mode: 0644]
LayoutTests/platform/mac/http/tests/inspector/network/resource-sizes-network-expected.txt
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/DefaultDashboard.js
Source/WebInspectorUI/UserInterface/Models/Resource.js