Skip to content

Commit ff3a538

Browse files
authored
Merge pull request #13635 from calixteman/1718037
XFA - Fix width of a container with lr-tb layout (bug 1718037)
2 parents 03dff1c + b261446 commit ff3a538

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

src/core/xfa/layout.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,14 @@ function addHTML(node, html, bbox) {
112112
extra.height = Math.max(extra.height, extra.prevHeight + h);
113113
} else {
114114
const [, , w, h] = bbox;
115-
extra.width = Math.max(extra.width, extra.currentWidth);
116115
extra.currentWidth = w;
117116
extra.prevHeight = extra.height;
118117
extra.height += h;
119118

120119
// The element has been added on a new line so switch to line mode now.
121120
extra.attempt = 0;
122121
}
122+
extra.width = Math.max(extra.width, extra.currentWidth);
123123
break;
124124
case "rl-row":
125125
case "row": {

test/pdfs/xfa_bug1718037.pdf.link

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
https://bugzilla.mozilla.org/attachment.cgi?id=9228741

test/test_manifest.json

+8
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,14 @@
946946
"enableXfa": true,
947947
"type": "eq"
948948
},
949+
{ "id": "xfa_bug1718037",
950+
"file": "pdfs/xfa_bug1718037.pdf",
951+
"md5": "a0b53d50e9faed9d57950a5159d5da12",
952+
"link": true,
953+
"rounds": 1,
954+
"enableXfa": true,
955+
"type": "eq"
956+
},
949957
{ "id": "xfa_bug1717681",
950958
"file": "pdfs/xfa_bug1717681.pdf",
951959
"md5": "435b1eae7e017b1a932fe204d1ba8be5",

0 commit comments

Comments
 (0)