Skip to content

Commit 227f985

Browse files
committed
XFA - Fix width of a container with lr-tb layout (bug 1718037)
1 parent d7f8a0e commit 227f985

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
@@ -938,6 +938,14 @@
938938
"lastPage": 2,
939939
"type": "eq"
940940
},
941+
{ "id": "xfa_bug1718037",
942+
"file": "pdfs/xfa_bug1718037.pdf",
943+
"md5": "a0b53d50e9faed9d57950a5159d5da12",
944+
"link": true,
945+
"rounds": 1,
946+
"enableXfa": true,
947+
"type": "eq"
948+
},
941949
{ "id": "xfa_bug1717681",
942950
"file": "pdfs/xfa_bug1717681.pdf",
943951
"md5": "435b1eae7e017b1a932fe204d1ba8be5",

0 commit comments

Comments
 (0)