100 Commits
Author SHA1 Message Date
calixteman 7594737f73 Fix a few edge cases when converting RGB images in convertRGBToRGBA and ImageResizer
- `convertRGBToRGBA` ignored the `byteOffset` of the source, which isn't zero
   when e.g. the data of an uncompressed image is read directly from the file,
   and it threw when the source wasn't 4-byte aligned. In that case all the
   pixels are now converted one by one.
   It also used `len >> 2`, which overflows for sources larger than 2 GiB.
 - In `ImageResizer.#rescaleImageData`, when the image had to be converted in
   several chunks:
   - if the chunk height divided the image height, the last chunk was converted
     with the full image height;
   - the rows were sampled relatively to each chunk, hence a chunk height which
     isn't a multiple of `2 ** K` shifted the sub-sampling grid and left the
     last rows of the result empty. They're now sampled on the image grid;
   - the chunk height is rounded to a multiple of 4 when possible, in order to
     keep the RGB data aligned;
   - if not even a single row fitted in the buffer, the loop never ended.
2026-10-03 17:04:16 +02:00
calixteman e9d1c85c7c Merge pull request #22041 from calixteman/sampled-fn-arity
Check shading function dimensions and bound sampled interpolation
2026-10-03 16:26:30 +02:00
calixteman c67fe1529d Check shading function dimensions and bound sampled interpolation
Expose function input/output counts and reject incompatible shading and
stitching functions.

Reuse interpolation buffers instead of allocating cube vertices per call.
Skip axes at integer sample coordinates, fixing invalid sample accesses
for Size=1 axes.

For functions with more than eight inputs, use simplex interpolation.
It reads at most m + 1 sample-table entries per output for m inputs,
instead of up to 2^m. It can produce different values from multilinear
interpolation.
2026-10-03 16:22:43 +02:00
calixteman fecf042a90 Merge pull request #22058 from calixteman/text-layer-stale-font-cache
Avoid resetting the text-layer measurement font
2026-10-03 15:53:14 +02:00
calixteman 62984d48db Avoid resetting the text-layer measurement font
Resizing the canvas in #getAscent reset ctx.font to 10px sans-serif
without updating #canvasCtxFonts. A subsequent 30px run using the
same family could skip setting the font and get an incorrect width.

Remove the resizing left over from the pixel-based fallback removed
in PR #19399. Add a regression test comparing 30px and 33px runs.
2026-10-03 12:21:10 +02:00
calixteman c33c32aed4 Merge pull request #22049 from calixteman/update_openjpeg3
Update OpenJpeg to 8314119b067c0fc77834731168daaebd379fdb12
2026-10-01 17:17:58 +02:00
calixteman d9080794fa Merge pull request #22034 from calixteman/sandbox-resetform-non-terminal
Reset the descendants of non-terminal fields in Doc.resetForm
2026-10-01 16:11:29 +02:00
calixteman f786355550 Update OpenJpeg to 8314119b067c0fc77834731168daaebd379fdb12 2026-10-01 15:43:30 +02:00
calixteman e3e606de23 Merge pull request #22047 from calixteman/vertical-default-vx
Use the glyph width for the default vertical origin
2026-10-01 15:05:55 +02:00
calixteman 29a06285dc Use the glyph width for the default vertical origin
Without a W2 entry, use half the glyph's horizontal width for vx
(PDF 32000-1, 9.7.4.3), retaining the DW2 vertical metrics.

Follow-up to #20933.
2026-10-01 13:21:23 +02:00
calixteman 735ea6285c Merge pull request #22036 from Prafyl/fix-rgb-srcpos
Use `srcPos` for the remaining pixels in `convertRGBToRGBA`
2026-10-01 12:27:12 +02:00
calixteman ebd61ab636 Merge pull request #22037 from calixteman/cff-index-offsets
Bound CFF INDEX and FDArray parsing
2026-10-01 12:25:27 +02:00
calixteman e130a42923 Bound CFF INDEX and FDArray parsing
Reject invalid INDEX offset sizes and clamp offsets to prevent overlapping
entries and repeated parsing of the same data.

Limit FDArray parsing to the 256 entries addressable by FDSelect's Card8
indices. Reject format 3 ranges before they expand past the glyph count.
2026-10-01 11:43:01 +02:00
calixteman cf2db3a426 Bound tiling pattern folding work for tiny steps
Fold rows, then columns, and cap offsets by the rendered tile dimensions.
For the 10x10 fixture with 0.001 steps at scale 1, this reduces folding
from 100,020,001 drawImage calls to 22. Descending offsets draw the origin
tile last.

Add rendering tests for tiny steps, far-corner content, and overlap order.
2026-09-30 16:16:38 +02:00
calixteman 40cc2082df Reset the descendants of non-terminal fields in Doc.resetForm
When the array given to `resetForm` contains the name of a non-terminal
field, only that field was reset, so its terminal descendants kept their
values. It's the sandbox counterpart of #22014.

Walk the `_kidIds` of the collected fields and add every descendant
before resetting them.
2026-09-29 17:29:36 +02:00
calixteman 7cc69881fa Merge pull request #22014 from fstandhartinger/resetform-non-terminal-fields
Reset the descendants of non-terminal fields in a ResetForm action
2026-09-29 17:23:06 +02:00
calixteman 91041fb94d Merge pull request #22027 from calixteman/fix-tofontchar-perf-2075550
Avoid scanning identity /ToUnicode maps for font fallback (bug 2075550)
2026-09-29 00:37:30 +02:00
calixteman 25d979c9b1 Merge pull request #22019 from Snuffleupagus/compile-readString
Introduce a helper to reduce duplication when reading compiled string-data from fonts
2026-09-28 20:13:24 +02:00
calixteman f1c2b5aa3d Merge pull request #22022 from Snuffleupagus/compileFontInfo-writeBuffer
Add a helper function for writing buffer-data in `compileFontInfo`
2026-09-28 20:10:19 +02:00
calixteman 33854c2d17 Merge pull request #22025 from calixteman/fix-missing-glyphs-perf
Use a Uint8Array to track missing TrueType glyphs (bug 2075570)
2026-09-28 20:07:42 +02:00
calixteman bdbbfbe269 Avoid scanning identity /ToUnicode maps for font fallback (bug 2075550)
For non-embedded composite standard fonts, iterate existing `toFontChar`
entries when filtering against an incomplete /CIDToGIDMap. Deleting absent
entries is a no-op; retain entries outside the identity /ToUnicode range
to preserve the previous behavior.
2026-09-27 15:38:29 +02:00
calixteman 77ebaf094b Use a Uint8Array to track missing TrueType glyphs (bug 2075570)
Replace the Set introduced in PR #21911 with one byte per glyph.
Glyph IDs are integer indices in [0, numGlyphs).
It'll help to slightly improve performance.
2026-09-27 14:29:45 +02:00
calixteman d52fdf411a Merge pull request #22018 from mozilla/update-locales
l10n: Update locale files
2026-09-25 08:04:29 +02:00
calixteman 31d20bc5ac Merge pull request #21965 from Shubham-Padkonde/fix/printd-escaped-literals
Preserve escaped literals in util.printd
2026-09-24 21:23:23 +02:00
calixteman 0db170cd42 Merge pull request #21975 from Snuffleupagus/CMap-ToUnicodeMap-cidToGidMap-Maps
Convert the `CMap` and `ToUnicodeMap` classes to store its data in Maps
2026-09-24 21:19:00 +02:00
calixteman f479957f00 Route worker messages by stable page proxy IDs
PDFPageProxy._pageIndex changes when pages are reordered, so worker replies tagged with an earlier index can reach a different proxy.

Use a stable proxy ID for StartRenderPage and page-local obj messages. Keep pageIndex for WorkerTask diagnostics and GlobalImageCache.

Fixes #21954.
2026-09-21 19:05:20 +02:00
calixteman 9098b759d1 Increase the browser protocol timeout
Use `browserTimeout` for protocol calls so Firefox's `session.new`
command gets more than 22.5 seconds to complete.

Give dedicated tests time for the protocol and close timeouts, and use
`killBrowser` for cleanup.

Fixes #21978.
2026-09-20 21:37:43 +02:00
Calixte Denizet 80adfa9efc Limit cumulative CMap range entries
MAX_MAP_RANGE previously applied to each range independently, so
overlapping ranges could repeat the same work. Apply it cumulatively
per CMap.
2026-09-19 21:11:49 +02:00
Calixte Denizet d1e416df36 Tighten xref stream field-width validation
Reject negative widths and require at least one byte per entry. This bounds
entry parsing by the decoded stream length.
2026-09-19 18:17:51 +02:00
Calixte Denizet c3a2798726 Update JBIG2 decoder to pdfium@bb1f9f71 2026-09-18 22:19:18 +02:00
Calixte Denizet 540e63c3d9 Settle editor focus before page.focus in integration tests
Deleting an editor that contains focus schedules a zero-delay focus of the
main container. This can override a later `page.focus()` before a key press.

Wrap `page.focus` so deferred editor updates settle first.
2026-09-18 22:08:05 +02:00
Calixte Denizet c989d4b6e9 Defer the Firefox features notification until after first-page rendering (bug 2072145)
The notification loaded moz-message-bar and its dependencies during
viewer startup. Updating --pfn-bar-height also animated
#viewerContainer's block-start offset because its transition covered all
properties.

Load and localize the notification after the first pagerendered event,
moving this work past pdfpaint's first-page timestamp. Limit the viewer
transition to inset-inline-start, and let the viewer start if
document.l10n.ready rejects in automation.
2026-09-18 17:16:10 +02:00
calixteman 579c4b700f Merge pull request #21979 from mozilla/update-locales
l10n: Update locale files
2026-09-18 08:24:33 +02:00
calixteman ad9920eb80 Recover from browser startup and reload failures
Use the 120-second browser timeout for test-page navigation and protocol calls. Retry browser startup, including page acquisition, up to three times, and initialize failed sessions before closing them.

Limit browser.close() to 15 seconds and kill the process if it remains alive. If a timed-out reftest page cannot be reloaded, try up to three replacement browsers.

Register all sessions before launch so completion waits for pending startups.
2026-09-17 18:20:24 +02:00
calixteman c65061e336 Merge pull request #21966 from jsimplicio/fix-pdfFeaturesNotification-border-radius
Fix unexpected border-radius on the pdfFeaturesNotification bar (bug 2071593)
2026-09-17 18:16:08 +02:00
Calixte Denizet efd9513a3c Validate embedded media content types
Validate PDF Name media types with RFC 6838 restricted-name syntax while
allowing MIME parameters in MediaClip /CT strings. Use normalized Blob.type
when selecting the media element.

Add tests for invalid, overlong, and parameterized values.
2026-09-17 16:40:23 +02:00
calixteman ee470d5db4 Merge pull request #21964 from calixteman/features-link-no-href
[Firefox] Remove the about:pdf href from the PDF features notification link (bug 2071624)
2026-09-16 22:59:35 +02:00
Calixte Denizet dd934ced3d [Firefox] Remove the about:pdf href from the PDF features notification link (bug 2071624)
Content cannot load about:pdf, and the parent process already opens the
features page when the link is activated. The href only served the context
menu and middle clicks, which asked for an illegal load and crashed the
parent process on Nightly.

Without an href the <a> is neither focusable nor activated by Enter, hence
the tabindex, the role and the keydown handler.
2026-09-15 21:35:11 +02:00
calixteman d31dc44bec Merge pull request #21963 from calixteman/no-browser-download
Allow tests to reuse installed browsers
2026-09-15 19:37:30 +02:00
Calixte Denizet 518e14cefc Allow tests to reuse installed browsers
Add --noBrowserDownload to reuse browser installations managed by CI and skip cache trimming. Only install browsers selected for the test run.
2026-09-15 19:26:54 +02:00
calixteman 59c19f10ed Merge pull request #21945 from calixteman/grayscale-text-aa-windows
Use grayscale text antialiasing in Windows Firefox tests
2026-09-15 14:57:50 +02:00
Calixte Denizet b53dd54aa6 Fix two FreeText integration tests when running headed on a HiDPI screen
isCanvasMonochrome read the canvas with CSS pixel coordinates, but the
canvas is scaled by the devicePixelRatio, hence the wrong area was
checked when it isn't 1.

The "must clear all" test clicked exactly on the top-left corner of the
annotation editor layer: with a fractional layer position the click can
land just outside of it, so no editor is created. Click inside the layer
instead.
2026-09-15 10:33:17 +02:00
calixteman 600c131406 Use grayscale text antialiasing in Windows Firefox tests
Set the ClearType level to 0 and the rendering mode to natural symmetric
(5). When Windows ClearType is enabled, Firefox applies these overrides
and selects grayscale instead of subpixel antialiasing by default.

The FreeText position tests located the glyphs by binarizing the
screenshots at 50% luminance and taking the first black pixel: with
antialiasing a thin stem can be split over two light pixels and then
disappears, so the detected position jumps to the next stem. Use the
centroid of the ink instead, which doesn't depend on any threshold.
2026-09-15 10:20:25 +02:00
calixteman f4f90c2f69 Merge pull request #21932 from calixteman/firefox-cleartype-params
Pin all the ClearType parameters used by the reference tests on Windows
2026-09-10 22:22:39 +02:00
Calixte Denizet d6959e53bf Pin all the ClearType parameters used by the reference tests on Windows
Fixing the rendering mode alone didn't make the Windows references
reproducible: the PDFs with non-embedded fonts, rendered with system fonts
through ClearType, still changed on every run.
2026-09-10 22:21:38 +02:00
calixteman 0070b442a9 Merge pull request #21931 from calixteman/firefox-text-rendering-mode
Fix the DirectWrite rendering mode used by the reference tests on Windows
2026-09-10 20:00:47 +02:00
Calixte Denizet 2129d9fab3 Fix the DirectWrite rendering mode used by the reference tests on Windows
With the default value of the pref, Firefox derives the rendering mode from
the system settings and the text rendering differs from one run to the
other on Windows, which makes hundreds of reference test pages fail in the
GitHub CI for nothing. Forcing the mode makes it reproducible.
2026-09-10 19:58:00 +02:00
calixteman 3d4725513d Merge pull request #21930 from calixteman/analyzer-magnifier-dpr
Fix the magnifier of the reftest analyzer when the images are displayed scaled
2026-09-10 19:16:34 +02:00
Calixte Denizet 9b25153176 Fix the magnifier of the reftest analyzer when the images are displayed scaled
The images are displayed at `outputScale / devicePixelRatio`, but the
magnifier used the position within the SVG as image coordinates and
multiplied the pixel offset by the device pixel ratio, so with a ratio
other than 1 (or an output scale other than 1) it showed the wrong pixels.
2026-09-10 18:35:19 +02:00
calixteman 61385f9eb5 Merge pull request #21928 from calixteman/analyzer-cross-origin
Let the reftest analyzer load images from absolute URLs
2026-09-10 17:37:00 +02:00
Calixte Denizet da81ae95d9 Let the reftest analyzer load the references from mozilla/pdf.js.refs
The path of the log is only prepended to relative image paths. An absolute
URL is accepted when it points to a reference in mozilla/pdf.js.refs
(revision, platform, browser, test id and page are checked, and the URL is
rebuilt from a constant prefix); it is then fetched with CORS so that the
pixels can be compared. This lets the reference tests report of
mozilla/pdf.js.pdfs link the references instead of copying them.
2026-09-10 17:24:47 +02:00
Calixte Denizet 7727520836 Add a badge showing whether the reference images are up to date
The reference images are regenerated on every push to master by the private
mozilla/pdf.js.pdfs repository, which publishes the outcome as a shields.io
endpoint on https://mozilla.github.io/pdf.js.refs/. The badge links to the
commits of mozilla/pdf.js.refs where the updates land.
2026-09-10 10:44:27 +02:00
calixteman 10db1d6793 Merge pull request #21923 from Snuffleupagus/importPrintedAppearances-normal-import
Use a "normal" import statement to access the `importPrintedAppearances` function, in the `src/core/worker.js` file (PR 21858 follow-up)
2026-09-10 09:48:28 +02:00
calixteman 61ac0bd9b0 Merge pull request #21918 from calixteman/ref-tests-ci
Add a way to run the reference tests from a PR label
2026-09-09 20:35:18 +02:00
Calixte Denizet 28bbd8f023 Add a way to run the reference tests from a PR label
Adding the `browsertest` label to a PR dispatches a run to the private
mozilla/pdf.js.pdfs repository, which runs the Firefox reference tests on
Linux and Windows, sharded across several machines, and posts the results
(with a link to the reftest analyzer hosted on mozilla/pdf.js.refs) as a
comment. Every push to master dispatches a reference update in the same way.

The test runner gets a `--shard=k/N` option to split the manifest across
machines and a `--summaryFile` option to write the final counts as JSON.
2026-09-09 19:20:37 +02:00
calixteman 583cc674ca Merge pull request #21858 from calixteman/print_pdf_freetext
Use platform print-to-PDF for FreeText appearances (bug 1794809)
2026-09-09 15:49:55 +02:00
calixteman 2269fc0989 Merge pull request #21900 from calixteman/geckoview-typed-signature
[GeckoView] Add typed signatures (bug 2069485)
2026-09-09 15:49:05 +02:00
Calixte Denizet 7a3f57cb83 Add unit tests checking that a CMap's own mappings take precedence over usecmap ones
See https://issues.apache.org/jira/browse/PDFBOX-6251.
2026-09-09 15:31:00 +02:00
Calixte Denizet 12e7b53f87 [GeckoView] Add typed signatures (bug 2069485)
Forward GeckoView's "addsignature" DOM event to the viewer. Convert
non-empty text to contours, switch to signature mode when needed, and
create a SignatureEditor at the visible center of the current annotation
layer.

The GeckoView signature manager has no description-edit control, so the
editor toolbar accepts a missing button.
2026-09-08 22:13:11 +02:00
calixteman 1e7954ff09 Merge pull request #21912 from calixteman/tr-fallback
Add a software fallback for transfer maps
2026-09-08 21:31:36 +02:00
Calixte Denizet 1d554b3cd8 Wait for editor focus before integration test input
Wrap Puppeteer keyboard and mouse input to let deferred editor focus changes settle first, replacing explicit waits.
2026-09-08 21:16:21 +02:00
Calixte Denizet 4de80f8749 Add a software fallback for transfer maps
Transfer functions use SVG filters through `ctx.filter`. When those
filters are unavailable or rejected, map solid colors and raster pixels
in software.

Apply the fallback to fills, strokes, images, masks, groups, shadings,
and tiling patterns. Rasterize gradients first so nonlinear maps run
after interpolation. Include filter state in image-mask dependencies and
exclude fallback-mapped groups from backdrop copies.

Add pixel coverage with `transfer_maps.pdf`; Node.js exercises the
fallback.
2026-09-08 20:59:16 +02:00
Calixte Denizet 1a7308e391 Don't crash when a transfer function array contains /Identity entries
The evaluator emits `null` for each /Identity entry of a four-function
/TR array, but `DOMFilterFactory.#createTables` dereferenced it, which
aborted the rendering of the whole page. A `null` map now simply gets no
`feFunc` element, i.e. the identity for that channel.

The test file also showed that the cell of a coloured tiling pattern
inherited the fill and stroke styles in effect when the pattern was
selected. Per PDF 32000-1, 8.7.3.1, it starts from the graphics state at
the beginning of the parent content stream, hence black, which is also
what Acrobat, pdfium, xpdf, Ghostscript, Foxit and mupdf paint.
2026-09-07 20:14:54 +02:00
Calixte Denizet 33586d45d8 Fix few intermittents in integration tests with Chrome 2026-09-07 18:41:59 +02:00
Calixte Denizet 2d8b5429b7 Keep editing disabled when switching documents
setDocument() reset annotationEditorMode from DISABLE to NONE
when clearing the current PDF, so the next PDF initialized an editor
manager. Preserve DISABLE across documents.

Fixes #21899.
2026-09-07 18:22:46 +02:00
calixteman 3463d92848 Merge pull request #21891 from NakuRei/fix-sampled-function-zero-width-domain
Prevent NaN values in sampled functions with a degenerate Domain
2026-09-07 09:10:44 +02:00
calixteman c3c21fa894 Use platform print-to-PDF for FreeText appearances (bug 1794809)
PDF.js creates FreeText appearances with Helvetica and WinAnsiEncoding. It
cannot generate a matching appearance when Helvetica cannot encode the text.

Add a Firefox-only `printToPDF` callback to `saveDocument`. The worker batches
serialized FreeText entries and imports one generated PDF page per appearance.
The single-PDF batch preserves resources shared across pages.

Copy each page's resources and content without reserializing retained
operators. Drop marked-content operators because their metadata belongs to the
generated PDF.
2026-09-06 21:29:59 +02:00
calixteman f79d62f5ec Fix comment tooltip and highlight test races 2026-09-06 20:19:18 +02:00
calixteman f9fa28c9b9 Use @napi-rs/canvas for PNG decoding in integration tests
This removes the `pngjs` dependency.
2026-09-06 19:02:30 +02:00
calixteman c5af039649 Replace kleur with util.styleText
All supported Node.js versions provide `util.styleText`. Preserve the existing color-enabling rules and the styles used by the build and test output.
2026-09-06 18:24:18 +02:00
calixteman 9cb1f0014d Remove the unused @babel/runtime dependency
It was added in the Babel 7 update (commit b46ec5195) as the helper
library for `@babel/plugin-transform-runtime`. That plugin was removed
in commit 6e3179994, when the Babel `targets`-option was introduced,
but the runtime package itself was left behind. Nothing has used it
since.
2026-09-06 17:46:27 +02:00
calixteman 216a300327 Avoid a CPU DoS when auto-sizing text fields (bug 2069428)
Auto-sizing tried line counts one by one, which was very slow for long text in narrow fields and could loop forever when there was no usable height.

Search for the line count instead, and skip text or canvases when the field is too small.
2026-09-06 17:19:08 +02:00
calixteman 6f1720b37f Wait for the deferred focus changes in the editor integration tests
When an editor is added, moved or committed, it's moved in the DOM in a
setTimeout and the focus is restored in a second one. Without the slowMo
option for Chrome, the next Puppeteer command can run in between and be
broken by the deferred focus change (e.g. a new empty FreeText editor is
removed because it loses the focus).

So wait for those timeouts after creating, committing, selecting or moving
an editor, and remove the slowMo option which isn't required anymore
(see #21885).
2026-09-06 14:30:44 +02:00
calixteman 716aff9d50 Merge pull request #21882 from mozilla/update-locales
l10n: Update locale files
2026-09-04 08:30:30 +02:00
Calixte Denizet bb0b1c1e15 Keep the ToUnicode mapping of unencoded glyphs in non-embedded Type1 fonts
When a charcode has no glyph name in the encoding of a non-embedded Type1
font, it's replaced by a space (see issue 18059) and the unicode value was
overridden too, even if the /ToUnicode map had an explicit entry for it.
Consequently, the text layer contained a space instead of the expected char.
Only override the unicode value when the /ToUnicode map has no entry.

The test file comes from https://issues.chromium.org/issues/554790604.
2026-09-03 21:19:12 +02:00
Calixte Denizet 7071056e95 Fix the fill area computation for a rotated tiling pattern
Only two diagonal corners of the fill area were transformed into pattern
space, so with a rotated pattern matrix the area could wrongly look like it
fits within a single tile.

It fixes #21878.
2026-09-03 15:52:48 +02:00
Calixte Denizet fcea525640 Use moz-message-bar for the Firefox features notification (bug 2057608)
Bug 2066198 lets the PDF viewer load the moz-message-bar module from a
chrome: URL. Add the required CSP and localization entries, and preserve viewer
focus on dismissal.
2026-09-03 09:13:36 +02:00
calixteman 74515c623c Merge pull request #21810 from calixteman/quantize_measured_font_size
Account for the Firefox font size quantization in the text layer
2026-09-02 11:38:24 +02:00
Calixte Denizet 08b565d28b Fix the vertical alignment of the views manager header
The sidebar top padding pushed the header down, so the title was
off-center and the header corners overlapped the rounded corner of the
panel. Remove that padding and round the header corners instead, as the
Nova build already does.

It fixes #21870.
2026-09-02 08:31:15 +02:00
Calixte Denizet abd3ae43b2 Address the high-severity zizmor findings
- Scope the GitHub App tokens in `notify-pdf-sync.yml` and
   `update_locales.yml` using `permission-*` inputs.
 - Move the `publish_release.yml` permissions to the job level.
 - Ignore the (low-confidence) `cache-poisoning` finding in
   `publish_release.yml` and keep the npm cache enabled.
2026-09-01 21:01:09 +02:00
calixteman 4ed57bc436 Merge pull request #21829 from HyeryongChoi/getSinglePixelWidth-rm-cache
Fix incorrect text stroke width caused by stale pixel-width cache
2026-08-31 13:44:18 +02:00
Calixte Denizet 26341dcdbd Add JSDoc linting
Enable rules that validate existing JSDoc comments and fix the reported issues.
2026-08-31 11:57:30 +02:00
calixteman a815e4f8f0 Merge pull request #21850 from darkdi/jsdoc-param-names
Fix the [Object] param entry in createAndAddNewEditor and three similar slips
2026-08-31 10:06:36 +02:00
Calixte Denizet 316e03cef4 Set deployment: false on the code-coverage environment jobs
This avoids creating deployment objects, and the associated pull request
timeline entries, for jobs that only need the environment secrets.
2026-08-31 09:43:06 +02:00
calixteman ffb904cc63 Fix the adjacent-page reordering integration test 2026-08-29 20:34:34 +02:00
calixteman c3257df8db Merge pull request #21833 from mozilla/update-locales
l10n: Update locale files
2026-08-28 08:27:15 +02:00
Calixte Denizet 17f9254430 Localize the comment dialog save button through its label span 2026-08-27 09:34:34 +02:00
Calixte Denizet 651ee701da Account for the Firefox font size quantization in the text layer
Firefox rounds the font size set on a canvas 2d context, once divided by
the device pixel ratio, to 7 bits of precision. Hence `measureText` can
return a width up to ~1% off the one the spans are laid out with, which
made `--scale-x` slightly wrong in a zoom dependent way.
Measure with a size left untouched by that rounding and rescale the
returned width, which is linear in the font size.
2026-08-26 20:57:43 +02:00
Calixte Denizet 9be0233cc1 Use ImageDecoder for JPEG dimension mismatches without resizing (bug 2066163) 2026-08-25 10:37:54 +02:00
calixteman 9aea8e2dfb Merge pull request #21807 from calixteman/touch/no-pinch-while-panning
Avoid zooming during fast two-finger panning
2026-08-21 08:37:32 +02:00
calixteman e05ab5e66a Avoid zooming during fast two-finger panning
Round scale updates and carry rounding error. Filter span changes consistent with staggered touch samples.
2026-08-21 08:29:11 +02:00
calixteman 3cb74c4831 Merge pull request #21808 from mozilla/update-locales
l10n: Update locale files
2026-08-21 07:20:00 +02:00
Calixte Denizet e1651fc4e2 Vertically center the text in single-line and comb text fields (bug 2055455)
Improve the formula for centering glyphs in text fields and use the same shift for the single-line and the comb paths.
2026-08-19 15:26:32 +02:00
calixteman cbe0e9dbef Merge pull request #18151 from calixteman/bug1898053
Auto-close the marked content sections left open in a text object (bug 1898053)
2026-08-19 10:39:47 +02:00
Calixte Denizet c5c7699615 Auto-close the marked content sections left open in a text object (bug 1898053)
Some PDFs open a marked content section inside a text object and never
close it. Each section adds a nesting level in the text layer, so the DOM
becomes deep enough to crash Chromium with a stack overflow.

When extracting the text, the sections opened after the matching BT are
now closed on ET. The marked content level is tracked per stream in both
getTextContent and getOperatorList: the sections a stream left open are
closed when it ends, and an unbalanced EMC is ignored.
2026-08-18 15:38:44 +02:00
calixteman 42250fbd24 Merge pull request #21798 from calixteman/remove_unused_l10n_ids
Remove unused l10n IDs
2026-08-18 13:39:16 +02:00
Calixte Denizet 6e36bc7e7c Remove unused l10n IDs
It fixes #21270
2026-08-18 13:27:12 +02:00
calixteman 652808115a Merge pull request #21794 from calixteman/jpeg-downscale-while-decoding
Downscale large JPEG images with ImageDecoder (bug 2063570)
2026-08-18 10:40:44 +02:00
calixteman 3e9483fa87 Merge pull request #21795 from calixteman/fix-ci-firefox-only-integration-tests
Fix Firefox-only tests in Chrome CI
2026-08-18 10:20:06 +02:00
calixteman 7e66cd3994 Downscale large JPEG images with ImageDecoder (bug 2063570)
Read dimensions from supported JPEG SOF markers and request a reduced
ImageDecoder frame when the source exceeds canvas limits. Use the returned
frame size because requested dimensions are best-effort.

Try ImageDecoder before the pixel-buffer fallback and add unit tests for
dimension parsing and resize requests.
2026-08-17 22:19:09 +02:00