aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2025-08-30Don't show form inputs with display:noneRodrigo Arias Mallo
When the current element or a parent has display:none, the display_none flag is set and no new element should be added to the viewport. For form inputs, instead of always adding the Embed to the viewport, we only do it if display_none is not set. The Embed is still registered as an input in the form, so it will continue to send the proper form values to the server. For complex buttons that can contain nested elements inside, we switch to a dummy button that doesn't have a Textbox and rely on the logic at html.cc to avoid creating more child elements until the display_none is unset. Fixes: https://github.com/dillo-browser/dillo/issues/433
2025-08-30Use uppercase Submit by default in buttonsRodrigo Arias Mallo
2025-08-30Exit all tabs with SIGUSR2 signalRodrigo Arias Mallo
Breaking the loop causes missing leaks that are otherwise visible when closing the tab.
2025-08-24Cleanly exit dillo on USR2 signalRodrigo Arias Mallo
Allows detecting memory leaks on exit automatically.
2025-08-12Fix internal page leakRodrigo Arias Mallo
A copy of the buffer is done while injecting the content for about:cache and about:dicache, so the Dstr needs to be free'd after.
2025-08-11Add dicache meaning: decompressed image cacheRodrigo Arias Mallo
From Livio Baldini Soares: > Let me clarify a little bit about what the dicache is. > > This is how Dillo works. When you ask for a URL (be it a root URL, > like a HTML, or an image embedded in a page), it looks it up in a > _memory_ cache. If it's already there it returns the content of the > cache, and if not it makes a connection to retrieve that URL. > > But there is a complication with respect to images. The images which > are downloaded need to be decompressed to be displayed (that is, > transformed from their original format, jpeg, gif, etc, to a bitmap > format). So for images, first the dicache (_d_ecompressed _i_mage > cache) is checked, then the cache, then finally it is retrieved from > the site. The problem with dicache is that it eats up a *LOT* of > memory, and the only benefit is the processing time of transforming > from the original format to the bitmap. That's why the default is NO. See: https://dillo-dev.auriga.wearlab.narkive.com/TYZWEMgE/how-to-use-dicache#post3 See: https://github.com/dillo-browser/dillo/issues/249#issuecomment-2295040723
2025-08-11Add about:dicache for decompressed image cacheRodrigo Arias Mallo
The dicache holds the decompressed buffers for each image and it often is the main cause for memory consumption in Dillo. The current algorithm for evicting entries waits until a image has no references and at least three pages were opened before removing the entry.
2025-08-11Add about:cache page with cache statisticsRodrigo Arias Mallo
The internal network cache holds entries for all the URLs fetched by Dillo, and it only grows over time. It is convenient to be able to see what elements are being currently stored so we can have choose a better criteria if we decide to remove entries to avoid a huge memory usage over time. The entries are generated every time the page is requested, so it always reflects the current state.
2025-08-11Add hit counter in cache entriesRodrigo Arias Mallo
2025-08-04Middle click in Home or Book opens in new tabRodrigo Arias Mallo
Open the Home page or the Bookmarks in a new tab if the button is pressed with middle-click, following the same behavior for hyperlinks.
2025-08-04Focus the N-th tab with Alt-<number>Rodrigo Arias Mallo
Allows jumping directly to a given tab. It encourages a low number of tabs opened, otherwise it will exceed the 1 to 10 range.
2025-08-02Handle OpAbort from DPI CCC server sideRodrigo Arias Mallo
When loading http://elpis.ws and then the issue 10, several images are requested via the data: URL which in turn causes many calls to the DPI datauri plugin, and it seems some may fail. When the DPI server fails to reply, an OpAbort is received by the CCC, but is ignored when it comes from the server side. This leaves the connection entry stale, and when navigating backwards, an attempt to read a free chunk of memory causes a crash. Instead of ignoring the OpAbort, we handle it as if the CCC had received an OpEnd event, which propagates the received operation to the chain and then removes the connection.
2025-07-26Add NetBSD default path for CA certificate bundleRodrigo Arias Mallo
In NetBSD the default CA certificate bundle for OpenSSL is located at /etc/openssl/certs/ca-certificates.crt, so we include it in the default search list so it works out of the box. See: https://man.netbsd.org/certctl.8#FILES See: https://wiki.netbsd.org/certctl-transition/
2025-07-11Report if IPv6 support is enabled with the -v flagRodrigo Arias Mallo
The IPv6 support is stored in the config.h header file, instead of being passed with the -D flag, so it is easier to read from version.cc.
2025-07-02Don't change CFLAGS or LDFLAGS for custom Mbed TLSRodrigo Arias Mallo
Adding the extra flags to search Mbed TLS in CFLAGS and LDFLAGS directly inhibits AC_PROG_CC from injecting the usual -O2 and -g flags. Instead, we add them to MBEDTLS_* set of variables which are only used to locate Mbed TLS. Then we pass them to the Makefile via AC_SUBSTAC_SUBST(). We also move the LIBSSL_* flags to be early on the order of dillo_LDADD, so that extra -L flags which can be injected from fltk-config or other programs, don't accidentally point to /usr/lib or a similar location where it could race with another installation of Mbed TLS. This mechanism won't work for cases in which Mbed TLS has libraries installed in a location other than the default search path, but works for Arch Linux and Gentoo because the symlink them to the default search path, even if they are installed in a different location.
2025-05-20Make Ctrl+A select input textRodrigo Arias Mallo
The Emacs shortcut was overriding the FLTK behavior of selecting all input text. Fixes: https://github.com/dillo-browser/dillo/issues/400
2025-05-18Only parse Content-Disposition for root URLsRodrigo Arias Mallo
A server may return the Content-Disposition in elements of a page like images, which would otherwise trigger several "save as" dialogs. Fixes: https://github.com/dillo-browser/dillo/issues/398
2025-05-08Make Ctrl+C copy selection into clipboardRodrigo Arias Mallo
Follows the behavior of so many other programs by copying the current text selection into the clipboard with Ctrl+C. Selecting text continues to copy it into the primary selection. Fixes: https://github.com/dillo-browser/dillo/issues/228
2025-05-07Copy links to clipboard selection tooRodrigo Arias Mallo
Selecting text in the page copies only to the primary selection. Copying links via the context menu now places the URL both in the primary and clipboard selections so it can also be pasted with Ctrl+V. See: https://github.com/dillo-browser/dillo/issues/228
2025-05-02Print brotli version with -vRodrigo Arias Mallo
2025-05-01Allow whitespaces before separatorRodrigo Arias Mallo
2025-05-01Use simpler algorithm to remove bad charactersRodrigo Arias Mallo
This one requires a copy of the string, but it is easier to follow.
2025-05-01Simplify algorithm to parse filenameRodrigo Arias Mallo
Instead of keeping a escaped flag, we simply check again both the previous and current character for non-backlash and quote. As the filename can be empty if we don't get a maching quote, we stop there.
2025-05-01Flatten the conditionals so it is easier to readRodrigo Arias Mallo
2025-05-01Free memory before erasing the pointerRodrigo Arias Mallo
2025-05-01Make all pointers mandatory (not NULL)Rodrigo Arias Mallo
2025-05-01Move a_Misc_parse_content_disposition() to misc.hRodrigo Arias Mallo
For now it allows building the unit test without linking problems. A more long-term solution is to split the code into separate modules that can be tested more easily.
2025-05-01Offer download if content disposition isn't recognizedCameron Paul
2025-05-01Re-enable failing tests and fix themCameron Paul
2025-05-01Fix disposition test linking and add more test casesCameron Paul
2025-05-01Fix off by one error with quoted filenamesCameron Paul
2025-05-01Handle quoted content dispositions and escape special filesystem charactersCameron Paul
2025-05-01Support for Content-Disposition filenameCameron Paul
2025-04-30Middle-click on back or forward opens in new tabAlex
Reviewed-by: Rodrigo Arias Mallo <rodarima@gmail.com> See: https://lists.mailman3.com/hyperkitty/list/dillo-dev@mailman3.com/thread/XXD2NXCGQLZLJ3V57NCPU3327DAEFKAN/
2025-04-27Control + left click opens link in new tabRodrigo Arias Mallo
Small laptops and netbooks that lack a proper 3 button touchpad make it difficult to open a new tab. Using the control modifier makes is easier to open links in new tabs. It also allows mixing it with the shift modifier to control the focus.
2025-04-27Add about:keys to show keyboard shortcutsRodrigo Arias Mallo
Fixes: https://github.com/dillo-browser/dillo/issues/66
2025-04-06Add brotli supportRodrigo Arias Mallo
Implements support for brotli (br) content encoding. Fixes: https://github.com/dillo-browser/dillo/issues/377
2025-03-20Display RSS feeds as plain textRodrigo Arias Mallo
Allows inspecting their content before adding it to a feed reader by reading it as plain text.
2025-02-19Fix build on Solaris 10 and old gcc 4.0.1Claes Nästén
Remove extra semicolons and commas, as well as isinf() so it builds and runs on Solaris 10. Also add extra fixes for non C++11 courtesy of Sevan Janiyan, making Dillo compile and run on OS X 10.4 PowerPC with GCC 4.0.1 and 8.5. Co-authored-by: Sevan Janiyan <venture37@geeklan.co.uk>
2025-02-05Fix several typosGevel Tekens
See: https://lists.mailman3.com/hyperkitty/list/dillo-dev@mailman3.com/thread/L3FFAINJJMIOZQNID5HC2DHKJIIIHEYH/
2025-01-25Fix OOB read in nsvg__parseColorRGB()bptato
nsvg__isspace uses strchr on a NUL terminated string, so it returns true for the NUL terminator. Other uses of nsvg__isspace account for this by checking for NUL first; I've followed the same pattern here. Fixes: https://github.com/memononen/nanosvg/issues/241 See: https://github.com/memononen/nanosvg/pull/262
2025-01-25Fixed invalid memory read on single stop gradientklapeto
See: https://github.com/memononen/nanosvg/pull/252
2025-01-17Don't ask when overwriting version fileRodrigo Arias Mallo
2024-12-28Support line fragments in plain text filesRodrigo Arias Mallo
Line numbers can be referenced using the fragment L + line number. For example, file://foo/bar.txt#L42 will cause Dillo to scroll to line 42. Fixes: https://github.com/dillo-browser/dillo/issues/330
2024-12-17Add support for user actions in the link menuRodrigo Arias Mallo
Allows the user to define additional entries in the link menu which will execute the given program/script. Each actions is defined using the "link_action" option. The link URL is stored in the $url enviroment variable and the current page in $origin, so the user can customize how do the handling. Here is a simple example to add three new entries: link_action="Debug variables:echo url=$url origin=$origin" link_action="Open in MPV:mpv $url" link_action="Open in Firefox:firefox $url" The command is spawned in a forked process using the system() call, which uses the shell to expand any variable. In particular, the $url variable is set to the current URL being opened. Fixes: https://github.com/dillo-browser/dillo/issues/3
2024-12-17Fix build error for missing commit.hRodrigo Arias Mallo
Add the target commit.h as a dependency of version.o, so it gets generated before being included in version.cc, otherwise when doing a parallel build it can fail.
2024-12-11Avoid rebuild when the git commit is the sameRodrigo Arias Mallo
Compare the commit used in the last rebuild to determine if it has changed, rather than using a phony target which always causes a rebuild.
2024-12-11Use Dillo user agent for downloads tooRodrigo Arias Mallo
Send the user agent to the downloads DPI so we can use the same as Dillo uses from the http_user_agent option. See: https://lists.mailman3.com/hyperkitty/list/dillo-dev@mailman3.com/thread/A6IHJ4TBGHJ3CT2UOMEAROSG2WRTRO6U/
2024-12-10Fix FLTK version for old releasesRodrigo Arias Mallo
The returned value from Fl::version() is a floating point number like 1.0303, not 10303, so we correct it to follow Fl::api_version().
2024-12-09Add git commit to the reported version with -vRodrigo Arias Mallo
When git is available, records the git commit in the dillo binary, so dillo -v reports the version and the commit. Otherwise only the release version is reported (as we do now). The commit is *always* recomputed when "make" is called. This allows switching branches, doing a dirty rebuild and still get the correct commit with "dillo -v". Using AC_INIT() doesn't update the commit when the source is already configured. Fixes: https://github.com/dillo-browser/dillo/issues/288