summaryrefslogtreecommitdiff
path: root/source/html
AgeCommit message (Collapse)Author
2017-03-28Return fz_document from all document handlers.Sebastian Rasmussen
To make it possible to avoid casting in most cases.
2017-03-23Introduce fz_new_derived_...Robin Watts
Instead of having fz_new_XXXX(ctx, type, ...) macros that call fz_new_XXXX_of_size etc, use fz_new_derived_... Clearer naming, and doesn't clash with fz_new_document_writer.
2017-03-22Update fz_new_page.Robin Watts
Move this into the same style as fz_new_document and fz_new_image.
2017-03-20epub: Fix disappearing images bug.Tor Andersson
The bug was introduced in commit ad09b038 where we adjust the y coordinate in draw calls instead of using the top level matrix so that high level output devices get reasonable page coordinates for objects. We forgot to adjust the y coordinate for images.
2017-03-01epub: Adjust y coordinate for page_top in draw calls, not by top matrix.Tor Andersson
We used to bake in the page_top in all the y coordinates of all objects, and use the top level matrix to subtract page_top. If we subtract page_top from the y coordinates instead of using the matrix to do it, we get smaller numbers in the device calls.
2017-03-01Don't truncate page height when loading links.Tor Andersson
We accidentally used int for the page height when loading links, and in the case where the page dimension is not an integer number of points that would lead to rounding accumulation errors in the resulting bounding boxes.
2017-02-06Make sure to fill in 'doc' field of HTML links.Tor Andersson
2017-02-06Add bookmarks so we can find a location after reflowing a document.Tor Andersson
2017-01-09epub: Reset old line breaks before choosing new ones.Tor Andersson
This was causing problems when laying out a document multiple times, where old line breaks taken would be sticky.
2017-01-09Make fz_parse_xml take a fz_buffer. Make xps_part contain a fz_buffer.Tor Andersson
2017-01-09Add fz_terminate_buffer function.Tor Andersson
Non-destructively zero terminate a fz_buffer for use as a C string.
2016-12-27Strip extraneous blank lines.Tor Andersson
2016-12-16Fix 697355: Use @page background color.Tor Andersson
2016-12-16Move page size and margins into fz_html struct.Tor Andersson
2016-12-16gl: Print warning when link destinations cannot be found.Tor Andersson
2016-11-23Add toggle to enable/disable document styles.Tor Andersson
2016-11-16Fix 697335: Handle links with content in nested tag.Tor Andersson
We would not create a link box for the "bar" text in links of the form: <a href="foo"><span>bar</span></a>.
2016-11-14Make fz_buffer structure private to fitz.Robin Watts
Move the definition of the structure contents into new fitz-imp.h file. Make all code outside of fitz access the buffer through the defined API. Add a convenience API for people that want to get buffers as null terminated C strings.
2016-11-14Add/fix page coordinates to link targets.Tor Andersson
Correctly transformed target coordinates for PDF. Target coordinates for EPUB and HTML.
2016-11-03Fix signed/unsigned and size_t/int/fz_off_t warnings.Robin Watts
All seen in MSVC, mostly in 64bit builds.
2016-10-28epub: Add links to XHTML and FB2 formats.Tor Andersson
2016-10-28epub: Add 'id' attribute to all HTML elements, not just <a> tags.Tor Andersson
Allows id anchoring to block elements as well as inline elements. Fix for bug 697123.
2016-10-28Clean up link destination handling.Tor Andersson
All link destinations should be URIs, and a document specific function can be called to resolve them to actual page numbers. Outlines have cached page numbers as well as string URIs.
2016-10-26epub: Fix link bbox when it contains spaces that have been justified.Tor Andersson
2016-10-21epub: Set link height to the font size.Tor Andersson
2016-10-21epub: Don't call strcmp for quick tag name checks.Tor Andersson
2016-10-18All external drop functions handles NULL.Sebastian Rasmussen
2016-10-14epub: Add hyperlinks.Tor Andersson
2016-10-14Be stricter when parsing css length units.Tor Andersson
2016-10-12css: Remove unused variables.Tor Andersson
2016-10-12Use pool allocator when parsing CSS.Tor Andersson
Fixes memory leaks when parsing throws exceptions and saves a lot of tiny mallocs for objects that have common life times.
2016-10-12Bug 696958: parse css hex colors that are missing the '#' prefix.Tor Andersson
2016-10-12Bug 696958: Workarounds for 'rem' and 'ch' units in epub.Tor Andersson
2016-10-12Split fz_html into fz_html and fz_html_box for nodes.Tor Andersson
Removes the need to carry fz_pool along in all boxes.
2016-10-12Always call fz_drop_document() to drop the document.Sebastian Rasmussen
2016-10-11Free document in fz_drop_document(), not in subclassing documents.Sebastian Rasmussen
2016-10-10Bug 697123: epub: Adjust anchor positions using fragments.Robin Watts
2016-10-10Simplify linked list handling in epub-doc.cRobin Watts
2016-10-10Remove needless parameter passing.Robin Watts
2016-10-10HTML: Keep 'Anchors' in the html box list.Robin Watts
Keep them as 'FLOW' entries rather than box entries. Although they technically enclose areas of text, we only ever use them as points. Thanks to Tor for fixing this code.
2016-10-10Use more bitfields in HTML.Robin Watts
Saves 12 bytes per fz_html, and we have a lot.
2016-10-10Change HTML agent to use bitfields rather than chars.Robin Watts
Saves 8 bytes on every css_style (and we have a lot of those).
2016-10-09html: Fix leak of buffer when opening as stream.Sebastian Rasmussen
2016-10-09html: Add missing function pointer when opening as stream.Sebastian Rasmussen
2016-10-07Add ctx to fz_font functions.Robin Watts
2016-10-06Squash warnings in cluster builds.Robin Watts
2016-10-06Bug 697182: Fix memory leak in html-layout.Robin Watts
Only create a text object if we are definitely going to use it, and then take care of exceptions being thrown.
2016-10-05Bug 697177: Avoid SEGV in Epub file.Robin Watts
Thanks to Vlad Glagolev for the example file, analysis and patch. We had failed to initialise the "last break class" value, so that when we use it as an index into an array, we run the risk of crashing. The fix is simply to initialise it. By initialising it to OP we don't allow any softbreaks to be added when it's uninitialised, which feels right to me.
2016-10-05Uncouple font shaper data from harfbuzz.Robin Watts
The fz_font structure now doesn't know anything about harfbuzz at all, it merely offers an abstract 'fz_shaper_data_t' entry.
2016-10-05Move fz_font definition to be private.Robin Watts
Move the definition of fz_font to be in a private header file rather than in the public API. Add accessors for specific parts of the structure and use them as appropriate. The font flags, and the harfbuzz records remain public. This means that only 3 files now need access to the font implementation (font.c, pdf-font.c and pdf-type3.c). This may be able to be improved further in future.