[pull] master from mozilla:master#446
Merged
Merged
Conversation
Chromium 148+ improved their selection behavior when it comes to absolutely positioned elements, thus making text selectino in PDF.js much better. Unfortunately this does not only mean that the workaround we currently have for Chromium is unnecessary, but it actually become harmful. It conflicts with Chromium's new behavior, making text selection *worse* on mobile. As the change has been released in Chrome only a month ago, this patch keeps the workaround for older Chromium versions. There is no easy way to feture-detect is, so unfortunately we need to do user agent version detection.
…etFont The font size (Tf) and the text matrix (Tm) can appear in any order in an appearance stream. Applying the scale factor eagerly in setFont missed the case where Tf precedes Tm (e.g. Skia-generated FreeText), yielding a wrong guessed font size.
…Manager` class (PR 21247 follow-up) This has a couple of advantages: - It allows accessing and iterating `this.#results` directly, without having to (needlessly) create a temporary array. - By moving the "worst status" computation into its own getter, it can be re-used from the `#updateButtonState` method as well which reduces code duplication.
…addPasteButton` method Rather than effectively duplicating code, we can re-use the existing helper here as well.
…ct-chrome Avoid text selection workaround in modern Chromium
…10nArgs Use the `#getPageL10nArgs` helper in the `PDFThumbnailView.prototype.addPasteButton` method
…er-#bannerState Move the `bannerStateForResults` helper into the `SignaturePropertiesManager` class (PR 21247 follow-up)
Update to Babel 8
Apply the appearance-stream scale factor when text is shown, not on setFont
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )