Attach (recommended) or Link to PDF file here:
https://www.canada.ca/content/dam/ircc/migration/ircc/english/pdf/kits/forms/eimm5669e.pdf
[eimm5669e.pdf](https://github.com/mozilla/pdf.js/files/7225677/eimm5669e.2.pdf)

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

Steps to reproduce the problem:
1. Look at the bottom of page 2

borderDims = getBorderDims(this.ui[$getExtra]());
      uiW += borderDims.w;
      uiH += borderDims.h;
      if (this.caption) {
        const { w, h, isBroken } = this.caption[$getExtra](availableSpace);
        
        
        if (isBroken && this[$getSubformParent]()[$isThereMoreWidth]()) {
          this[$popPara]();
          return HTMLResult.FAILURE;
        }
        width = w;
        height = h;
        switch (this.caption.placement) {
          case "left":
          case "right":
          case "inline":
            width += uiW;
            break;
          case "top":
          case "bottom":
            height += uiH;
            break;
        }
      } else {
        width = uiW;
        height = uiH;
      }
      if (width && this.w === "") {
        width += marginH;