wpd-codec: lift image boxes as ContentImageBlock - #1180
Conversation
|
@codex security review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
An image box's content prefix names a packet whose container spelling this reader has no specification for, so the lift is magic-driven: the packet's raw bytes are scanned by signature and structural walk (the PNG chunk chain to IEND, the JPEG marker segments to EOI), never by guessing at a container header, and exactly that span lifts as a ContentImageBlock sized by the box's own frame -- with an absolute-from-page-edge position carried as the image's floatPosition. A WPG vector graphic or OLE payload stays honestly reported through wpd/box-content-unresolved rather than approximated. The base64 encoder is hand-written (no Buffer, no atob) keeping the package Worker-isomorphic.
97f48fc to
8e40360
Compare
|
🎉 This PR is included in version 3.4.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Closes #927's live remainder. Much of the issue's original list had already landed under concurrent sessions (text/equation boxes, merge codes, table formulas, style packets -- all verified untouched); this PR lifts the one remaining parse-without-lift structure the schema has a home for:
The remaining structures are boundaries with stated reasons: WPG vector graphics are a distinct binary vector format outside ContentImageBlock's kinds (decoding it is a project the scale of the reader itself), native OLE objects are an OLE server's native stream rather than a nested document package (the same boundary ooxml.js draws for OLE1), and headers/footers/footnotes/endnotes are blocked on #1128 -- which is precisely that schema design's own tracking issue.
Closes #927 (the page-furniture/notes remainder lives in #1128).