Skip to content

Sync from Fork repo#8

Open
venkatareddyboya-highspot wants to merge 777 commits into
highspot:v1.1.11-windowsfrom
espresso3389:master
Open

Sync from Fork repo#8
venkatareddyboya-highspot wants to merge 777 commits into
highspot:v1.1.11-windowsfrom
espresso3389:master

Conversation

@venkatareddyboya-highspot
Copy link
Copy Markdown
Collaborator

No description provided.

punzar and others added 30 commits May 8, 2026 16:24
When PDF text begins with a newline character, `outputCharRects` is empty
at the point where the code tries to access `outputCharRects.last`, causing
a StateError (Bad state: No element). Add `isNotEmpty` check to guard
against this edge case.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ing-newline

Fix crash in loadStructuredText when text starts with newline
When a PDF document is disposed while background operations (page loading,
font checking) are still in progress, calling subject.add() on a closed
stream throws a StateError. Add isDisposed checks before emitting events
in _notifyMissingFonts, _notifyDocumentLoadComplete, and the pages setter.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…pose

Fix stream closed crash on document dispose race condition
Fix pdfrxInitialize race condition
PdfDocumentListenable._progress() calls notifyListeners() on every
downloaded HTTP chunk during range-access loading. The viewer's
_onDocumentChanged listener unconditionally releases all cached page
images (releaseAllImages), clears layout, and sets _initialized=false
on EVERY notification — even when the document reference hasn't changed.

With preferRangeAccess enabled on a large PDF, hundreds of chunks arrive
during and after loading. Each triggers a full nuclear reset, causing
rendered pages to flash white repeatedly and preventing stable rendering.

Fix: add an early return at the top of _onDocumentChanged() that skips
the reset when the document reference is the same object. This correctly
distinguishes progress-only notifications from actual document changes
(initial load, document swap, error/null).
…ss-notification

fix: skip full viewer reset on progress-only notifications
Fix pdfrxInitialize calls in tests failing on macOS
…gression

[codex] Add macOS Flutter test regression coverage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.