summaryrefslogtreecommitdiff
path: root/backend
AgeCommit message (Collapse)AuthorFilesLines
11 daysepub: Expose GepubDoc handle via EvDocument virtual methodVictor Kareh1-0/+8
Add a get_doc_handle virtual method to EvDocumentClass so the view layer can obtain the underlying GepubDoc without depending on backend types directly. This prepares for replacing EvWebView with GepubWidget which needs the GepubDoc to render content. Assisted-by: OpenCode:claude-opus-4-6
11 daysepub: Remove dead code and unused virtual methodsVictor Kareh7-2981/+0
Remove the bundled minizip directory, unused includes, and the night mode virtual methods from EvDocumentClass which are no longer called by any code. Night mode is now handled entirely through WebKit user stylesheets. Assisted-by: OpenCode:claude-opus-4-6
11 daysepub: Pre-compute page paths and disable find interfaceVictor Kareh1-33/+27
Pre-compute all page URI paths at load time so get_page is thread-safe and does not mutate GepubDoc state. Remove the EvDocumentFind interface because the threaded find job is incompatible with the single-threaded GepubDoc and WebKit. EPUB search will be reimplemented using WebKit's native find controller in a future commit. Assisted-by: OpenCode:claude-opus-4-6
11 daysepub: Implement night mode using WebKit user stylesheetsVictor Kareh1-12/+0
Replace the old approach of modifying extracted HTML files on disk with a WebKitUserStyleSheet injected via the WebKitUserContentManager. This is cleaner and works with the new libgepub backend which no longer extracts files to a temporary directory. Assisted-by: OpenCode:claude-opus-4-6
11 daysepub: Replace backend internals with libgepubVictor Kareh3-1697/+249
Replace the hand-rolled EPUB parsing with libgepub. This removes the bundled minizip library, custom XML utilities, and temporary directory extraction in favor of GepubDoc which handles archive access, metadata, spine navigation, and table of contents. An epub:// URI scheme handler serves resources directly from the archive without extracting to disk. Search and night mode are stubbed as no-ops pending follow-up commits. Assisted-by: OpenCode:claude-opus-4-6
11 daysepub: Add libgepub-0.7 build dependencyVictor Kareh1-0/+1
Add libgepub as a required dependency for the EPUB backend in both meson and autotools build systems. No source code changes yet, but this prepares for replacing the hand-rolled EPUB parsing with libgepub. Assisted-by: OpenCode:claude-opus-4-6
2026-06-06epub: add NULL guards to prevent crashes with malformed EPUBsVictor Kareh1-1/+8
EPUB files with missing or incomplete metadata (like no title or missing navigation elements) can cause NULL pointer dereferences in the XML parsing functions. This adds NULL checks to xml_parse_children_of_node, get_child_list, and the TOC text parsing loop. Fixes #707
2026-06-02build: Distribute meson build files when using autotoolsVictor Kareh1-1/+1
Fixes #673 Backported from https://gitlab.gnome.org/GNOME/evince/-/commit/021428c9
2026-06-02epub: validate epub content before parsingVictor Kareh1-3/+20
Check that the content file exists before attempting to parse it, and handle failures in document title extraction gracefully.
2026-06-02epub: use g_strndup for parsing document pathVictor Kareh1-9/+2
Replace manual byte-by-byte copy loop with g_strndup when extracting the directory component from the epub container's full-path attribute.
2026-05-19pdf: adding annotation squiggly.Victor Kareh1-0/+3
This adds support to the pdf backend for loading and saving text markup annotations of subtype Squiggly. Backported from https://gitlab.gnome.org/GNOME/evince/-/commit/5702e401
2026-05-19Add support for reading underline text markup annotationsVictor Kareh1-0/+3
Backported from https://gitlab.gnome.org/GNOME/evince/-/commit/4bd88ed0
2026-05-19Add support for reading strike out text markup annotationsVictor Kareh1-0/+3
Backported from https://gitlab.gnome.org/GNOME/evince/-/commit/9b71d67e
2026-05-19pdf: Create highlight annotations for existing annotations in documentVictor Kareh1-0/+3
Implementing the type and a method to create highlight annotations. Backported from https://gitlab.gnome.org/GNOME/evince/-/commit/53c349e8
2026-04-01fix build on gcc 15mbkma1-0/+1
2026-03-11pdf: Always use poppler_document_save to avoid data lossGermán Poo-Caamaño1-12/+6
We used to use two methods to save a document: poppler_document_save and poppler_document_save_a_copy. The latter only saves a copy of the original document, discarding any change done (e.g. forms and annotations). However, after a document has been modified and saved, if there is no new change and the user saves the document, it will discard even the previous saved changes to preserve a copy of the original document. By only using poppler_document_save to save the content of the current document opened in Atril, to avoid data loss made between saves. https://bugzilla.gnome.org/show_bug.cgi?id=770012 Adapted from the original commit at: https://gitlab.gnome.org/GNOME/evince/-/commit/26dc2f52 Co-authored-by: Eric Park <[email protected]>
2025-12-23epub: Try and locate MathJax at configure timeColomban Wendling1-1/+1
Based on an XReader change[1], look up the MathJax source at configure time for better portability. If not specified manually, look in the common locations. This adds the --with-mathjax-directory=DIR configure option to manually specify the location, overriding the automatic discovery. The Meson part already exists, although was not used by the code. [1]: https://github.com/linuxmint/xreader/commit/9c6f363ad47f33b290d270489e50f7ad6071987a
2025-12-23Import test-ev-archive.c from XReaderColomban Wendling2-14/+130
Import test source from XReader[1]. This is not as useful as it might seem as it's not a unit test, but it's still nice to have an easy way to manually test this code, and reduces differences with XReader, especially in the Meson build system. [1] https://github.com/linuxmint/xreader/blob/master/backend/comics/test-ev-archive.c
2025-12-23meson: Replace backend boolean options with featuresColomban Wendling2-2/+2
This allows enabling the backend automatically depending on whether the dependencies are satisfied or not, like Autotool's counterpart. By default, the PDF backend is force-enabled and the Pixbuf backend is disabled, as with Autotools.
2025-12-23meson: Fix build of the Comics, DVI and Pixbuf backendsColomban Wendling3-17/+18
2025-04-04fix: rename all backend filesOz Tiram8-8/+8
Signed-off-by: Oz Tiram <[email protected]>
2025-04-04chore: clean references to xreaderOz Tiram1-2/+2
Signed-off-by: Oz Tiram <[email protected]>
2025-04-04chore: remove unused intltoolOz Tiram8-56/+56
Signed-off-by: Oz Tiram <[email protected]>
2025-04-04Initial support for mesonOz Tiram12-0/+410
Mostly copy and paste from linuxmint/xreader Signed-off-by: Oz Tiram <[email protected]>
2024-01-31epub: fix previous commitraveit651-1/+1
2024-01-31fix a incompatible pointer type warning for gcc14raveit651-2/+2
* fix a incompatible pointer type warning for gcc14 Co-authored-by: Colomban Wendling <[email protected]>
2024-01-31epub: Avoid crash when index list has extraneous entrycorrectmost1-2/+2
This commit also fixes an incorrect sizeof call detected by AddressSanitizer. Closes #599
2024-01-17epub: Prevent path traversal when extracting fileslukefromdc1-6/+22
Test each file's resolved path against the temporary directory before extracting.
2024-01-07comics: Use libarchive to unpack documentslukefromdc5-739/+795
This commit eliminates the use of external commands for opening comic documents, and uses libarchive instead.
2022-11-17epub: add fallback for malformed epub files in check_mime_typerbuj1-28/+38
2022-08-04epub: Fix index loading for certain documents - look for epub:typeMichael Webster1-1/+7
instead of epub:id. Add a null check as well. ref: https://help.apple.com/itc/booksassetguide/en.lproj/itc0f175a5b9.html#apdd3c4c6d1c0904 https://idpf.org/epub/301/spec/epub-contentdocs-20140626.html#sec-xhtml-nav
2022-01-02Remove warnings about redefining gettext support macrosrbuj1-2/+2
2021-11-20Use a blank line at mostrbuj28-128/+0
2021-04-01epub: declaration of ‘uL’ shadows a previous local [-Wshadow]rbuj1-2/+0
2021-04-01epub: fix typorbuj1-1/+1
2021-02-10dvi: use glib i18n macrosrbuj3-20/+18
2021-02-10build: allow users to disable gettext support (--disable-nls)rbuj9-1/+37
2021-01-28Remove warning -Wtype-limitsrbuj1-2/+0
2021-01-07ps backend: do not silence the warnings when rendering the pagerbuj1-5/+5
2020-12-09build: remove legacy variable MATEICONDIRrbuj1-1/+0
2020-10-24epub backend: Escape link text to display & in index contentrbuj1-1/+1
2020-09-02ev-poppler: 'POPPLER_ACTION_RESET_FORM' not handled in switch [-Wswitch]rbuj1-8/+13
2020-08-28epub-document: improve code-styleraveit651-552/+552
- tab to spaces - fix some indents
2020-08-26check return value of xmlDocGetRootElement call if is NULLlvtao-sec1-2/+12
2020-08-16Remove unused macrosPablo Barciela7-15/+0
2020-07-15ev-poppler: remove warning about no previous declarationrbuj1-1/+1
2020-07-10Fix segfault on empty navMaperrt1-2/+2
2020-04-23djvu-text-page: Fix cppcheck [clarifyCalculation] warningsPablo Barciela1-2/+2
Fixes the warnings: backend/djvu/djvu-text-page.c:46:31: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] g_strjoin (delimit & 2 ? "\n" : ^ backend/djvu/djvu-text-page.c:47:28: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] delimit & 1 ? " " : NULL, ^
2020-04-15Fix cppcheck [knownConditionTrueFalse] warningsPablo Barciela2-7/+1
Fixes the warnings: backend/comics/comics-document.c:767:21: style: Condition 'bytes<=0' is always true [knownConditionTrueFalse] backend/epub/minizip/unzip.c:603:25: style: Condition 'unz_copyright[0]!=' '' is always false [knownConditionTrueFalse] properties/ev-properties-view.c:197:33: style: Condition 'text' is always true [knownConditionTrueFalse] shell/ev-sidebar-thumbnails.c:598:7: style: Condition '!loading_icon' is always true [knownConditionTrueFalse] shell/main.c:115:6: style: Condition '!error' is always true [knownConditionTrueFalse]
2020-04-14Remove strict-prototypes warningrbuj2-2/+2