Skip to content

Commit 5911408

Browse files
author
Catherine
committed
XFA - Fix xfaLink class to make links work (bug 1735738)
There were some links not working in some XFA files,I realized that the anchor tag that contains the link has an inline display and couldn't receive any height, solved this by adding a "position: absolute". Tested with two different files in Firefox Nightly and Chrome and now all links are working perfectly fine. Added reftest to avoid future regressions
1 parent 52fce0d commit 5911408

7 files changed

+5836
-5815
lines changed

test/driver.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,10 @@ var rasterizeXfaLayer = (function rasterizeXfaLayerClosure() {
291291
file: "../web/xfa_layer_builder.css",
292292
promise: null,
293293
},
294+
overrides: {
295+
file: "./xfa_layer_builder_overrides.css",
296+
promise: null,
297+
},
294298
};
295299

296300
function getXfaLayerStyle() {
@@ -326,8 +330,8 @@ var rasterizeXfaLayer = (function rasterizeXfaLayerClosure() {
326330
foreignObject.appendChild(div);
327331

328332
stylePromise
329-
.then(async ([cssRules]) => {
330-
style.textContent = fontRules + "\n" + cssRules;
333+
.then(async ([common, overrides]) => {
334+
style.textContent = common + "\n" + overrides;
331335

332336
XfaLayer.render({
333337
xfa,

test/pdfs/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@
380380
!issue2128r.pdf
381381
!issue5540.pdf
382382
!issue5549.pdf
383+
!xfa_bug1735738.pdf.link
383384
!visibility_expressions.pdf
384385
!issue5475.pdf
385386
!issue10519_reduced.pdf

test/pdfs/xfa_bug1735738.pdf

204 KB
Binary file not shown.

test/pdfs/xfa_bug1735738.pdf.link

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

0 commit comments

Comments
 (0)