Skip to content

Commit

Permalink
Merge pull request #13635 from calixteman/1718037
Browse files Browse the repository at this point in the history
XFA - Fix width of a container with lr-tb layout (bug 1718037)
  • Loading branch information
calixteman authored Jun 28, 2021
2 parents 03dff1c + b261446 commit ff3a538
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/xfa/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ function addHTML(node, html, bbox) {
extra.height = Math.max(extra.height, extra.prevHeight + h);
} else {
const [, , w, h] = bbox;
extra.width = Math.max(extra.width, extra.currentWidth);
extra.currentWidth = w;
extra.prevHeight = extra.height;
extra.height += h;

// The element has been added on a new line so switch to line mode now.
extra.attempt = 0;
}
extra.width = Math.max(extra.width, extra.currentWidth);
break;
case "rl-row":
case "row": {
Expand Down
1 change: 1 addition & 0 deletions test/pdfs/xfa_bug1718037.pdf.link
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://bugzilla.mozilla.org/attachment.cgi?id=9228741
8 changes: 8 additions & 0 deletions test/test_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,14 @@
"enableXfa": true,
"type": "eq"
},
{ "id": "xfa_bug1718037",
"file": "pdfs/xfa_bug1718037.pdf",
"md5": "a0b53d50e9faed9d57950a5159d5da12",
"link": true,
"rounds": 1,
"enableXfa": true,
"type": "eq"
},
{ "id": "xfa_bug1717681",
"file": "pdfs/xfa_bug1717681.pdf",
"md5": "435b1eae7e017b1a932fe204d1ba8be5",
Expand Down

0 comments on commit ff3a538

Please sign in to comment.