Attach (recommended) or Link to PDF file here:
[imm5710f(1).pdf](https://github.com/mozilla/pdf.js/files/6924738/imm5710f.1.pdf)

Configuration:
- Web browser and its version: Firefox nightly
- Operating system and its version: Debian

Steps to reproduce the problem:
1. Open the pdf on page 3 
2. See the 2 fields after `DÉTAILS DU TRAVAIL PRÉVU AU CANADA`

What went wrong? (add screenshot)
![image](https://user-images.githubusercontent.com/5641725/128031365-84b17d62-f805-43d1-9d05-e2b535efa3ef.png)

/* Copyright 2021 Mozilla Foundation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import {
  $extra,
  $flushHTML,
  $getSubformParent,
  $getTemplateRoot,
  $isSplittable,
  $isThereMoreWidth,
} from "./xfa_object.js";
import { measureToString } from "./html_utils.js";
/**
 * How layout works ?
 *
 * A container has an initial space (with a width and a height) to fit in,
 * which means that once all the children have been added then
 * the total width/height must be lower than the given ones in