Commits
master
Name already in use
Commits on Oct 7, 2023
-
Merge pull request #17090 from timvandermeij/autoprint-intermittent
Activate the selector check for the `autoprint` integration test as soon as possible
-
Activate the selector check for the
autoprintintegration test as s……oon as possible The Windows bot is usually slower than the Linux bot, and therefore text layer rendering is as well. However, the `autoprint` test awaited text layer rendering to complete before activating the selector check, which makes it timing-sensitive and causes it to never resolve because the page is already printed (and the printed page div removed) by then. This commit should fix the issue by activating the selector check as soon as possible, namely as soon as the viewer appears, which should ensure we're always registering the selector check in time because we're doing it even before rendering is starting.
-
Merge pull request #17086 from Snuffleupagus/rm-structuredClone-polyfill
[api-minor] Stop polyfilling `structuredClone` in legacy builds
-
Merge pull request #17055 from Snuffleupagus/output-modules
[api-major] Output JavaScript modules in the builds (issue 10317)
-
Merge pull request #17077 from Snuffleupagus/css-rm-unneeded-alpha
Remove unnecessary alpha-value from CSS `rgb` colors
Commits on Oct 1, 2023
-
Merge pull request #17053 from calixteman/issue17044
Add alt-text svg images to the dist (issue #17044)
-
Merge pull request #17052 from Snuffleupagus/web-pdfjsLib-export
Use a standard `export` statement in the `web/pdfjs.js` file
Commits on Sep 24, 2023
-
Merge pull request #17024 from timvandermeij/bump
Bump the stable version in `pdfjs.config`
-
-
Merge pull request #17022 from timvandermeij/fix-intermittent-us
Fix integration test "Interaction in issue14307.pdf (1) must check input for US zip format"
-
Use realistic typing delays for the scripting integration tests
In the scripting integration tests we use a few different typing delays, mostly 100 or 200 milliseconds. According to for example https://www.typingpal.com/en/documentation/school-edition/pedagogical-resources/typing-speed, a fast typing speed is around 300 characters per minute, which is 5 characters per second and therefore a delay of 200 milliseconds between each keystroke. Note that this is already above average, so in practice the delay will be even larger. Therefore the 100 milliseconds variant is unrealistically fast and therefore not suitable for the integration tests which aim to simulate the average user behavior. On top of that, the quick typing speeds are problematic for the tests that involve validation alert dialogs appearing during typing. In those tests a handler is registered to close the dialog once it pops up, but it takes time for Puppeteer to notice the dialog, trigger the handler and close it. If the typing delay, which is the delay between the key down and key up events according to the Puppeteer source code at https://github.com/puppeteer/puppeteer/blob/master/packages/puppeteer-core/src/cdp/Input.ts#L209-L215, is too short, the key up event will be fired before the dialog is closed. In that time the text box we're typing in is not focused, so when the dialog is closed the `page.type()` call on the text box will never resolve because the key up event never reached the text box. This commit aims to fix the issues by converting all 100 millisecond delays to 200 milliseconds. For instance the "must check input for US zip format" failed pretty consistently locally before and hasn't failed anymore with a 200 millisecond delay.
-
Merge pull request #17021 from timvandermeij/fix-intermittent-autoprint
Fix integration test "Interaction in autoprint.pdf must check if printing is triggered when the document is open"
-
Don't wait for scripting to be ready in the
autoprintintegration testThis integration test fails often because we wait for scripting to be ready before we check the printed page, but most of the time the PDF is already done printing before scripting is reported to be ready. This happens because the print trigger is on the `Open` event, which is one of the first events to be dispatched and, most notably, before scripting is marked as ready; please see https://github.com/mozilla/pdf.js/blob/master/web/pdf_scripting_manager.js#L176-L191. Given that the PDF document is only one page, printing it is usually finished between triggering the `Open` event and scripting reported to be ready. If this happens the printed page is already destroyed before we get to our actual test, which will then timeout because it will never find the printed page in the DOM. This commit fixes the problem by not awaiting scripting to be ready because the fact that the printed page appears is already enough to know that autoprint was triggered (after all, there is no other user interaction involved here). While we're here we also switch to the shorter `page.waitForSelector` function.
-
Merge pull request #17020 from Snuffleupagus/update-packages
Update packages and translations
Commits on Sep 23, 2023
-
Merge pull request #16970 from timvandermeij/fix-intermittent-border
Fix integration test "Interaction in issue15053.pdf must check that a button and text field with a border are hidden"
-
Merge pull request #16967 from timvandermeij/fix-intermittent-freetext
Fix integration test "FreeText Editor FreeText (edit existing in double clicking on it) must move an annotation"
Commits on Sep 17, 2023
-
Wait for visibility change in the
issue15053integration testEspecially on slower bots there is some time between clicking the element and the actual visibility change, but we didn't await this and checked the visibility state immediately after clicking. This can be reproduced 100% of the time by introducing a delay in the `display` and `hidden` handlers of the `_commonActions` shadow call. This commit fixes the problem by waiting until the first visibility change actually happened before continuing with the assertions.
-
Wait for selector instead of timeout in the freetext double click mov…
…e integration test This integration test currently fails intermittently on the bots because of the fixed timeout in the test, which is sometimes too low on slower systems. The issue can be reproduced 100% of the time by introducing a delay just before dispatching the `switchannotationeditormode` event. Puppeteer also discourages this and instead recommends waiting for a selector instead, which we now do here. This ensures that the test only continues if the element under test is available and therefore prevents any timing problems.
-
Merge pull request #16964 from timvandermeij/fix-intermittent-annotat…
…ions-move Fix off-by-one errors in the "FreeText must move several annotations" integration test
-
Fix off-by-one errors in the "FreeText must move several annotations"…
… integration test The x/y-coordinates are floats instead of integers like one might expect. The current approach rounds both the old and the new coordinates in order to do integer comparison. However, rounding each coordinate individually causes too much loss of precision because, depending on the decimal value, they are either rounded up or down which causes intermittent off-by-one errors. This commit fixes the problem by comparing coordinate differences instead of the coordinates themselves. The precision loss is avoided by subtracting the old from the new coordinate as-is and only rounding the final result.
-
Merge pull request #16962 from timvandermeij/fix-intermittent-bug1844576
Fix integration test "Interaction in bug1844576.pdf must check that a field has the correct formatted value"
-
Wait for selector instead of timeout in the
bug1844576integration ……test This integration test currently fails intermittently on the bots because of the fixed timeout in the test, which is sometimes too low on slower systems. The issue can be reproduced 100% of the time by introducing a delay in the `WidgetAnnotationElement.showElementAndHideCanvas` method. Puppeteer also discourages this and instead recommends waiting for a selector instead, which we now do here. This ensures that the test only continues if the element under test is available and therefore prevents any timing problems.
-
Use the
page.$evalmethod in thebug1844576integration testWe already use `page.$eval` in most other integration tests and it's simpler because it already takes the selector as argument, so we don't have to do a separate `querySelector` call ourselves.
-
Merge pull request #16961 from Snuffleupagus/debugger-rm-closure
Remove (some) closures from `web/debugger.js`
-
Merge pull request #16959 from Snuffleupagus/rm-CipherTransformFactor…
…y-closure Remove the closure from the `CipherTransformFactory` class
Commits on Sep 16, 2023
-
Merge pull request #16958 from timvandermeij/puppeteer
Update Puppeteer to version 21.2.1
-
Merge pull request #16957 from Snuffleupagus/SaveDocument-more-await
Use `await` even more in the "SaveDocument" worker-thread handler
-
Update Puppeteer to version 21.2.1
This release fixes the upstream bug that caused old Firefox revisions to not be removed from the cache. Fixes #16904.
-
Merge pull request #16956 from Snuffleupagus/opMap-rm-getLookupTableF…
…actory Simplify the `EvaluatorPreprocessor.opMap` getter a little bit
-
Merge pull request #16954 from Snuffleupagus/rm-colorspace-closure
Remove the remaining closures in the `src/core/colorspace.js` file
Commits on Sep 10, 2023
-
Merge pull request #16932 from timvandermeij/unit-test-enable
Enable unit test "creates pdf doc from non-existent URL"
-
Enable unit test "creates pdf doc from non-existent URL"
The unit test is re-enabled because it no longer seems to fail after 10 runs on Linux where this used to fail often. Code inspection also shows that the code is correct and should raise the previous exception (anymore). Finally, a lot has changed since this test was disabled such as new Jasmine versions, new Linux bot OS version and new browser versions.
-
Merge pull request #16925 from timvandermeij/updates
Update packages and translations