Observatory strong mode fixes: fix some int/double mismatches.

Change-Id: I22db86e2ecd579c165536a1178ff9eba6963735a
Reviewed-on: https://dart-review.googlesource.com/57381
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This commit is contained in:
Paul Berry 2018-05-30 18:10:21 +00:00 committed by commit-bot@chromium.org
parent 7fc88c494b
commit bfeb80a0c9
2 changed files with 3 additions and 3 deletions

View file

@ -151,7 +151,7 @@ class VirtualCollectionElement extends HtmlElement implements Renderable {
final rect = _header.getBoundingClientRect();
_header.classes.add('attached');
_viewport.style.top = '${rect.height}px';
final width = _header.children.fold(0, _foldWidth);
final width = _header.children.fold(0.0, _foldWidth);
_buffer.style.minWidth = '${width}px';
}
_itemHeight = _buffer.children[0].getBoundingClientRect().height;

View file

@ -255,8 +255,8 @@ class HeapMapElement extends HtmlElement implements Renderable {
var pages = _fragmentation['pages'];
_status = 'Loaded $startPage of ${pages.length} pages';
_r.dirty();
var startY = startPage * _pageHeight;
var endY = startY + _pageHeight;
var startY = (startPage * _pageHeight).round();
var endY = startY + _pageHeight.round();
if (startPage >= pages.length || endY > _fragmentationData.height) {
return;
}