Merge pull request #21926 from etiennesegonzac/bug-1039445

Bug 1039445 - Preventing a race where the LayoutManager compute a 0 height. r=alive