Sync from Fork repo#8
Open
venkatareddyboya-highspot wants to merge 827 commits into
Open
Conversation
Mouli-Namburu
approved these changes
Mar 7, 2025
a4af6b3 to
80f4c96
Compare
5748e8d to
6964170
Compare
93e3826 to
e809415
Compare
2e34c97 to
6bd3d1a
Compare
e70f7b0 to
09a9ff3
Compare
Remove ffi and move http to dev_dependencies in pdfrx
Fix inverted guard in selectAllText() causing null dereference
Fix PDFium initialization flag set in the wrong isolate
The text selection GestureDetector used the default DragStartBehavior.start, so onPanStart reported the post-slop position (~kTouchSlop, 18px). Free text-drag selection therefore began 1-2 characters after the touch-down on touch devices (notably iPad/tablets), skipping the first character(s). Setting dragStartBehavior: DragStartBehavior.down makes onPanStart report the original pointer-down position, so selection starts exactly where the user pressed.
fix: use DragStartBehavior.down for free text-drag selection (off-by-slop start anchor on touch)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 5.2.0 to 5.3.0. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](actions/setup-java@be666c2...ad2b381) --- updated-dependencies: - dependency-name: actions/setup-java dependency-version: 5.3.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 3.0.0 to 3.0.1. - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](softprops/action-gh-release@b430933...718ea10) --- updated-dependencies: - dependency-name: softprops/action-gh-release dependency-version: 3.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.3 to 7.0.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@df4cb1c...9c091bb) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
…ctions/setup-java-5.3.0 Bump actions/setup-java from 5.2.0 to 5.3.0
…oftprops/action-gh-release-3.0.1 Bump softprops/action-gh-release from 3.0.0 to 3.0.1
…ctions/checkout-7.0.0 Bump actions/checkout from 6.0.3 to 7.0.0
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 5.3.0 to 5.4.0. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](actions/setup-java@ad2b381...1bcf9fb) --- updated-dependencies: - dependency-name: actions/setup-java dependency-version: 5.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
…ctions/setup-java-5.4.0 Bump actions/setup-java from 5.3.0 to 5.4.0
PDFium inserts zero-width generated spaces to represent large gaps between text runs sharing the same baseline (e.g. table column gaps). PdfTextFormatter interpolated the space rect between the surrounding characters, so a single selectable space could cover the entire gap (~180pt measured on a real table PDF), causing drag selection to highlight the whole gap and jump across it at once. Clamp the combined space rect to 1.5x the line height (line width for vertical text), keeping it attached to the preceding character.
Follow-up to the previous clamp: a generated space (degenerate point char box) still produced a visible 1.5x-line-height tail after the preceding word, so selecting a word next to a table column gap looked like it selected extra blank space. Distinguish generated spaces (all char boxes degenerate) from real space glyphs: generated spaces are clamped to 0.25x line height (~a typical space advance), real spaces keep spanning their gap up to the existing 1.5x line height limit.
The widgets returned by _placeTextSelectionWidgets (anchor handles, magnifier, context menu) are keyless Positioned/AnimatedPositioned siblings. When selection handles appear or disappear while the context menu is visible (e.g. an app hot-swaps textSelectionParams.enableSelectionHandles after a selection settles), keyless index matching updates the old context menu slot into an anchor handle, unmounting and re-inflating the context menu subtree. A stateful context menu (async dictionary popup etc.) then loses its state and visibly flickers/reloads. Give each of the four children a stable key so Flutter reconciles them by key and the context menu element survives sibling insertions.
…pstream fix: clamp generated space rects to avoid huge selectable gaps (table column gaps)
fix: key text selection stack children to avoid context menu remount
_loadTextAsync defers work into a synchronized() closure; if the document is unloaded or replaced before the queued closure runs, the closure dereferences _document! and throws "Null check operator used on a null value". Guard _document (and the page index, in case the document was swapped for one with fewer pages) in both _loadTextAsync and _getCachedTextOrDelayLoadText, and re-check inside the queued closure where the original race occurs. Stack trace observed in production (pdfrx 2.2.24, Android arm64): #0 _PdfViewerState._loadTextAsync.<closure> (pdf_viewer.dart:1425) #1 objectSynchronized.<closure> (synchronized/extension_impl.dart:37) #2 BasicLock.synchronized (synchronized/basic_lock.dart:36) #4 _PdfViewerState._loadTextAsync (pdf_viewer.dart:1423) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fix null check crash in _loadTextAsync when document is unloaded
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.