Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test merge with squash #32

Merged

Conversation

shaymerrill-mc
Copy link
Collaborator

No description provided.

Snuffleupagus and others added 30 commits September 24, 2022 13:42
Currently the `viewBookmark`-button, which is actually a `href`-element, gets an inconsistent `outline`.
Similarly, the `dialog`-buttons also have an inconsistent `outline` after the changes in PR 15438.

Finally, simplifies a couple of `border` rules since setting a border-width when "none" is being used doesn't seem meaningful.
This only applies to the GENERIC viewer, hence we use the pre-processor to exclude it from the Firefox PDF Viewer.
…ining-2

Use more optional chaining in the code-base (PR 15398 follow-up)
Reference supported browsers Wiki-page in more README files
…xport

[api-minor] Stop exposing the `LoopbackPort` class in the API
Restore the old fonts in the `errorWrapper` (PR 15438 follow-up)
Use a consistent `outline` for all UI buttons (PR 15438 follow-up)
These checks were added years ago, but given the following compatibility data we should just be able to call the method directly: https://developer.mozilla.org/en-US/docs/Web/API/Event/stopImmediatePropagation#browser_compatibility
…ropagation-checks

Use `stopImmediatePropagation` without checking for its existence first
…477 follow-up)

The existing `loadingContext` class-property can be simplified slightly, since we've not been using the `id`-property on the requests ever since PR 3477 (which landed nine years ago).
Furthermore, by default we're also not even using that code-path now since the Font Loading API will always be used when available.
By having just *one* class, and using pre-processor blocks directly in the relevant methods, we reduce the size of this code in the *built* `pdf.js` file.
Originally, when the `BaseFontLoader` abstraction was added in PR 9982, the idea was probably that additional build-targets would get their own implementations. Given that this hasn't happened in the four years since that landed, it doesn't seem meaningful to keep it around.
Fix property chain orders of Operators in isDotExpression
…method (PR 3477 follow-up)

This is yet another small piece of functionality that became unused in PR 3477 (which landed nine years ago).
…LoadEvent` method (PR 10539 follow-up)

After the changes in PR 10539 (which landed over three years ago) the `FontLoader.bind` method can only be called with *a single* font at a time, hence the `_prepareFontLoadEvent` method obviously don't need to support multiple fonts any more.
…method

Given that Firefox supports *synchronous* font loading, when the Font Loading API isn't being used, there's really no point including code which if called would just throw in the MOZCENTRAL build. (This is safe, since the `FontLoader.isSyncFontLoadingSupported`-getter always return `true` there.)
…ad (issue 15509)

This property is documented in https://web.archive.org/web/20201112021418if_/https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/AcrobatDC_js_api_reference.pdf#G5.1977075

Given that PR 14207, which is *somewhat* similar, landed without tests that's hopefully fine here as well.
[JS] Override the `Doc.external`-getter to avoid `alert`-modals on load (issue 15509)
…m `node-canvas`

Fewer dependencies shouldn't be a bad idea in general, and given that the `node-canvas` package already include a `DOMMatrix` polyfill we can simply use that one instead.
Note that this PR only adds the "underscore"-variant of *actually existing* ligatures, however the referenced PDF document also uses a couple of non-standard ones (e.g. `ft`, `Th`, and `fh`) that we cannot easily support without larger changes (since they don't have official Unicode-entries).
Given that it's clearly the PDF document, and its fonts, that's the culprit here it's not entirely clear to me that we actually want to attempt a larger refactoring/rewriting of the `glyphlist.js` code, assuming it's even generally possible. Especially when this patch alone already improves our copy-paste behaviour when compared to both Adobe Reader and PDFium, and that this is only the *second* time this sort of bug has been reported.
This extends the approach used in PresentationMode to also cover the AnnotationEditor, and tries to handle the combination of both cases correctly.
In order to simplify the overall implementation we simply track the *first* seen "previous" cursorTool, and don't allow it to be reset as long as either PresentationMode or an AnnotationEditor is being used.
…rsor-tools

[Editing] Disable the HandTool during editing (bug 1792422)
[JS] Add the function AFExactMatch
Rather than "manually" looking up the l10n-string and then updating the button, we can (and probably even should) just update the l10n-id and then trigger proper translation for the button DOM-element.
…ollowup

Revert "Don't listen for window resolution changes in old browsers (PR 15319 follow-up)"
Add more non-standard ligatures in the `glyphlist.js` file (issue 15516)
Replace the `DOMMatrix` polyfill, used with Node.js, with the one from `node-canvas`
Snuffleupagus and others added 27 commits November 23, 2022 15:54
Add support for Optional Content in TilingPatterns (issue 15716)
Revert "Remove the overflowing text special-case from `scrollIntoView` (issue 15714)"
Add a fallback for non-embedded *composite* Tahoma fonts (issue 15719)
This has never really been used anywhere within the PDF.js library[1], and when streaming of textContent was introduced this parameter was effectively made redundant.
Note that when streaming of textContent is used, all text-layout has already happened by the time that this `timeout`-functionality is actually invoked (thus making it pointless).
While the `timeout`-functionality may still "work" when the textContent is provided upfront, although it's never been used/tested, streaming will generally perform better (in e.g. a viewer setting).

*Please note:* While unrelated here, also removes a now unused property that I forgot in PR 15259.

---
[1] At least not since the code was moved into its current file, which happened in PR 6619 and landed seven years ago.
…er-timeout

[api-minor] Deprecate the TextLayer `timeout` parameter
The use of `Array.prototype.reduce()` is, in my opinion, hurting overall readability since it's not particularly easy to look at the relevant code and immediately understand what's going on here. Furthermore this code leads to strictly speaking unnecessary allocations and parsing, since we could just track the min/max values directly in the relevant loop instead.
…actor

Re-factor and simplify the `getQuadPoints` helper function
…default Scroll/Spread modes (issue 15695)

Please refer to the inline comment for additional details. The patch also improves internal consistency when `#scrollIntoView` is called directly.
Ensure that the initial document position is always correct with non-default Scroll/Spread modes (issue 15695)
…ple' into merge_v3.1.81_into_mc-master_simple
@shaymerrill-mc shaymerrill-mc changed the title Test merge with rebase Test merge with squash Jan 6, 2023
@shaymerrill-mc shaymerrill-mc merged commit b82a3a5 into mc-master-test-merge Jan 6, 2023
@shaymerrill-mc shaymerrill-mc deleted the merge_v3.1.81_into_mc-master-test-merge branch January 6, 2023 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
9 participants