Skip to content

Take the new core, and say when a legacy file is locked - #180

Merged
andiwand merged 1 commit into
mainfrom
core-6.10
Aug 21, 2026
Merged

Take the new core, and say when a legacy file is locked#180
andiwand merged 1 commit into
mainfrom
core-6.10

Conversation

@andiwand

@andiwand andiwand commented Aug 21, 2026

Copy link
Copy Markdown
Member

odrcore 6.9.0 → 6.10.0.

Wired: an encrypted .doc, .ppt or .xls now reports itself encrypted.
No password opens one — odrcore cannot decrypt them — so the reader says the
file is password protected instead of putting a prompt up that would only come
back, and instead of falling back to the web view, which makes nothing of it
either. Covered by a new test against the real encrypted fixture.

Comes with the core, nothing to wire: PDF text copies as words rather than
L o r e m, marking it highlights the words, PDFs with nested parentheses in a
string open, and an odf table keeps the rows a repeating header holds.

Not wired: the new fit

6.10.0 adds HtmlConfig::viewport_width and an odr.setZoom() API, aimed at
apps that know their web view's width. Both work by putting zoom on the body,
and that does not hold up in WKWebView: the zoom is applied to the layout, but
getBoundingClientRect() ignores it while elementFromPoint() does not.
Measured on the iOS 26 simulator with the page fitted at zoom: 0.472:

value
documentElement.clientWidth 390
documentElement.scrollWidth 390 (826 with the zoom reset — the fit is real)
body.getBoundingClientRect().width 826
elementFromPoint at the rect's centre nothing
elementFromPoint at that point × the zoom the run

So the page fits and looks right, but everything that mixes rects with viewport
coordinates is off by the zoom factor — the app's tap-to-edit (its test fails),
and odrcore's own reading-position anchor, which is elementFromPoint plus
getBoundingClientRect. That machinery was verified in Chrome, where the two
agree.

The app therefore keeps fitting through the viewport meta tag, as before. Worth
a core-side issue: getBoundingClientRect() needs dividing by the applied zoom
where the engine reports unzoomed rects, or the fit needs to be a transform
rather than zoom.

Checks

  • 53 unit tests pass.
  • Text, PDF, spreadsheet and Word screens rendered on the simulator and looked
    over.
  • scripts/format.sh --check clean.

🤖 Generated with Claude Code

odrcore 6.10.0. A password protected .doc, .ppt or .xls now reports itself
as such, and since no password opens one, the reader says so rather than
asking or handing the file to the web view.

The rest comes with the core: PDF text copies as words, marking it
highlights them, a few more PDFs open, and a repeating table header keeps
its rows.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Jjxr44wSfKMQegPbPBbVv
@andiwand
andiwand merged commit caffb26 into main Aug 21, 2026
4 checks passed
@andiwand
andiwand deleted the core-6.10 branch August 21, 2026 07:31
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.

1 participant