aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2024-08-07Use d_isascii() instead of isascii()Rodrigo Arias Mallo
Reviewed-by: dogma Tested-by: Alex (on OpenBSD)
2024-08-07Use dStrAsciiCasecmp instead of strncasecmpRodrigo Arias Mallo
Reviewed-by: dogma
2024-08-07Use dStrdup instead of strdupRodrigo Arias Mallo
The strdup function is not available in POSIX-2001, so we use our own implementation in dlib: dStrdup. Reviewed-by: dogma
2024-08-07Avoid INADDR_LOOPBACK as it is an extensionRodrigo Arias Mallo
Instead use inet_addr("127.0.0.1") which is POSIX 2001 and also more clear. Reviewed-by: dogma
2024-08-07Use portable dUsleep() instead of usleep()Rodrigo Arias Mallo
Reviewed-by: dogma
2024-08-07Make Dillo C99 standard compliantRodrigo Arias Mallo
Reviewed-by: dogma
2024-08-07Fix pedantic warningsRodrigo Arias Mallo
Reviewed-by: dogma
2024-07-27Add SVG support for currentColorRodrigo Arias Mallo
The currentColor special value for the fill and stroke attributes allows an image to follow the same foreground color of the surounding text.
2024-07-26Use FLTK reported DPI for SVG imagesRodrigo Arias Mallo
2024-07-26Don't report unknown SVG elements for nowRodrigo Arias Mallo
Until we have a way to enable or disable messages, we shouldn't pollute the output log. These may as well be better suited for a bug-like window.
2024-07-26Add support for g and symbol inside defsRodrigo Arias Mallo
These are used by Wolfram equations, example: https://mathworld.wolfram.com/images/equations/FourierTransform/Inline7.svg https://mathworld.wolfram.com/FourierTransform.html
2024-07-26Warn about SVG ignored elementsRodrigo Arias Mallo
2024-07-26Add support for MathJax equations in nanosvgRodrigo Arias Mallo
Allows Dillo to render Wikipedia math equations.
2024-07-26Merge SVG support from mobilized Dillo forkRodrigo Arias Mallo
Uses the nanosvg library to add SVG support. See: https://www.toomanyatoms.com/software/mobilized_dillo.html Authored-By: dogma
2024-07-14Render JSON content as plain textRodrigo Arias Mallo
Some website endpoints return information in JSON, which is helpful to be read as plain text in some situations. The content can still be downloaded to disk using the save button or the context menu. An example is the following endpoint https://tls.browserleaks.com/tls, which provides TLS fingerprinting information in JSON, which will change when reloading the page (only when Dillo is linked with LibreSSL). The original page https://tls.browserleaks.com/ uses JS and cannot be used in Dillo. See: https://lists.mailman3.com/hyperkitty/list/dillo-dev@mailman3.com/message/6C5K4F6NBRUDSPNPWTXLQXCK3U3SI7DM/
2024-06-25Ignore meta refresh content without URLRodrigo Arias Mallo
The content="0" attribute was wrongly parsed as the URL "0". The change makes the parser ignore a redirect with a content value that doesn't have ";" or "url=" after the delay number. Fixes: https://github.com/dillo-browser/dillo/issues/204
2024-06-25Add support for zoom factorRodrigo Arias Mallo
Allows zooming in and out of pages by changing the size of all elements, including font size, images and tables. The initial zoom is specified in the "zoom_factor" option of dillorc. Use the new shortcuts Ctrl+ and Ctrl- to adjust the zoom of the current page and Ctrl 0 to reset it to 100%. When a new tab or window is opened, the current zoom factor is inherited. Each tab retains its own zoom factor. Fixes: https://github.com/dillo-browser/dillo/issues/21
2024-06-21Only enable static_assert if supportedRodrigo Arias Mallo
Standards below C++11 don't support it, so we simply disable the static assert. It is only required to be enabled in the CI in one build. Reported-by: dogma
2024-06-11Ignore empty page title for tab labelsRodrigo Arias Mallo
When a page has an empty title like <title></title>, don't use it to set the tab label, but instead rely on the default tab label, which is computed from the file name.
2024-06-09Allow empty URLs with base URL setRodrigo Arias Mallo
They are used for href="" in links or action="" in forms. Fixes: https://github.com/dillo-browser/dillo/issues/190
2024-06-09Add new_tab_page optionRodrigo Arias Mallo
Adds support to load a custom page when a new tab is opened. The current behavior is set as the default, load a blank page. The location bar is only selected when the new tab page is the blank page, otherwise the page loaded gets the focus. Co-authored-by: Alex <a1ex@dismail.de> Fixes: https://github.com/dillo-browser/dillo/issues/124
2024-06-07Ensure the same number of tags for CSS and HTMLRodrigo Arias Mallo
The Tags array can be modified without changing the "ntags" number in the CSS side. To prevent errors, an static assert ensures the same number is used in both sides, which is known at compilation time. Fixes: https://github.com/dillo-browser/dillo/issues/184
2024-06-01Handle PNG warnings as non-fatalRodrigo Arias Mallo
The libpng library may emit warnings when decoding a PNG image, which are non-fatal. So far we were handling them as errors and stopping the decoding process, which prevents Dillo from decoding some images. In particular, images that emit the warning: > iCCP: known incorrect sRGB profile Fixes: https://github.com/dillo-browser/dillo/issues/179 Authored-by: dogma
2024-06-01Don't call SSL_get_error() with pending dataRodrigo Arias Mallo
When a positive non-zero value is returned from SSL_read or SSL_write, there is data read or written, so there is no need to check for errors. Only in the case the return value is 0 or negative.
2024-06-01Handle SSL_ERROR_ZERO_RETURN in OpenSSLRodrigo Arias Mallo
It may be returned when the server closes the connection, see: https://www.openssl.org/docs/manmaster/man3/SSL_get_error.html We simply handle it as if there was no error and return zero bytes read. Fixes: https://github.com/dillo-browser/dillo/issues/175
2024-05-18Avoid reaching into X509_ALGORTheo Buehler
It would be nice if X509_ALGOR could be made opaque at some point. There is a somewhat clumsy accessor X509_ALGOR_get0() that allows obtaining the ASN1_OBJECT sitting inside an X509_ALGOR. Use this instead.
2024-05-12Disable TLSv1.3 in MbedTLS 3.6.0 for nowRodrigo Arias Mallo
In Mbed TLS 3.6.0 there is support for TLSv1.3 but it requires special handling, so for now we disable it. See: https://gitlab.alpinelinux.org/alpine/aports/-/commit/4dc36afaa81a4d73758b29fa77981d07dbae0080.patch Fixes: https://github.com/dillo-browser/dillo/issues/158
2024-05-04Update online manual URLRodrigo Arias Mallo
The old manual page is no longer needed as we have the latest manual rendered in the new website.
2024-04-29Add force https modeMark Walker
Implement an option to force all http urls to be upgraded to HTTPS, similar to HTTPS-Only Mode in Firefox. A http_force_https preference variable is provided as well as a menu bar item to toggle this mode. See: https://support.mozilla.org/en-US/kb/https-only-prefs
2024-04-28Allow relative width td attributes in tablesRodrigo Arias Mallo
Partially reverts commit f5a0b6030c2001e5a0fcacf8139afa800643eb47. Fixes the rendering test table-missing-width-in-one-column. Fixes: https://lists.mailman3.com/hyperkitty/list/dillo-dev@mailman3.com/message/H7JEBC2HYNJ6FUPQM7ILBP7I5FLU33IZ/
2024-04-28Add Dillo version to about:splash pageRodrigo Arias Mallo
2024-04-26Improve quirk for text/xhtml content typeRodrigo Arias Mallo
When a <meta> tag reports the "text/xhtml" content, we were correcting it to the type guessed in TypeDet. However, the current implementation to guess XHTML and HTML pages fails if the doctype is not at the start of the document, falling back to text/plain. A more robust solution is to set the TypeNorm to "application/xhtml+xml", which can be handled by a_Mime_get_viewer() as an HTML-like document. Reported-by: Kevin Koster <dillo@ombertech.com> See: https://lists.mailman3.com/hyperkitty/list/dillo-dev@mailman3.com/thread/7GJ4AAMFFPEHOIYEOH4NHVMSXMJDFYXG/
2024-04-20Use DejaVu Sans for cursive by defaultRodrigo Arias Mallo
The URW Chancery L font is not likely to be installed, so by default we use the same as for serif and sans, DejaVu. Fixes: https://github.com/dillo-browser/dillo/issues/138
2024-04-09Control the direction of tab scrollingAlex
Adds the scroll_switches_tabs_reverse option in dillorc to allows reversing the direction of tab switching based on the movement of the mouse wheel. See: https://lists.mailman3.com/hyperkitty/list/dillo-dev@mailman3.com/thread/F2EF4NHF3CBMJ3XZII2TFIE6MSXEE5AD/ Fixes: https://github.com/dillo-browser/dillo/issues/122 Reviewed-by: Rodrigo Arias Mallo <rodarima@gmail.com>
2024-04-05Use SSL_get1_peer_certificate() in OpenSSL 3Rodrigo Arias Mallo
The function SSL_get_peer_certificate() is deprecated in 3.0.0, but still defined as a compatibility macro. Fixes: https://github.com/dillo-browser/dillo/issues/118
2024-04-01Fix HTML validator menuRodrigo Arias Mallo
The W3C validator is now protected under a CloudFlare JavaScript challenge. However, it can be bypassed by opening directly the link after the redirection. It doesn't work if an HTML 5 page is loaded, as that would redirect to the Nu validator which will attempt to run the challenge again. So the current solution is to use the "legacy" W3C validator for HTML 4.01 or older documents and the W3C Nu validator for HTML 5 documents only. Users would need to choose which one to use manually (at least for now). The WDG validator at https://www.htmlhelp.org/tools/validator/ is gone, the server reports "Server unable to read htaccess file, denying access to be safe", so it has been removed. Fixes: https://github.com/dillo-browser/dillo/issues/113
2024-03-31Add support for the main HTML tagRodrigo Arias Mallo
Fixes: https://github.com/dillo-browser/dillo/issues/109
2024-03-09Use Doxygen comments for C filesRodrigo Arias Mallo
2024-03-02Ignore percent width td attributes in tablesRodrigo Arias Mallo
The width attribute in tr and td tags is deprecated in HTML 4.01 and obsolete in HTML 5. However, we should still support it when loading the page in the transitional mode. Currently, the relative values of the width attribute are transformed into CSS values. They cause the available text width to be computed by applying the relative value to the cell width, which causes an unintended effect. The workaround for now is to simply ignore the value when it is specified as a percent.
2024-02-18Expand tilde to home directory in local URLsRodrigo Arias Mallo
Allows paths like "file:~/" and "file:~/.dillo/dillorc" to be opened by Dillo by expanding the tilde character '~' to the value of the $HOME environment variable. Fixes: https://github.com/dillo-browser/dillo/issues/81
2024-02-18Don't call SSL_shutdown on fatal SSL errorsRodrigo Arias Mallo
2024-02-18Handle errors in SSL_read() and SSL_write()Rodrigo Arias Mallo
We cannot rely on the return value and the errno, the function SSL_get_error() must be used to determine what happen and if we need to retry again. A wrapper function translates the SSL error into a proper errno value. In the case a premature EOF is sent by the server, the error queue is emptied before the error is returned. Fixes: https://github.com/dillo-browser/dillo/issues/79
2024-02-06Simplify about:splash pageRodrigo Arias Mallo
As this is the page that new users will see for the first time, we want to show them a very simple introduction so they can reach the full help when they need it.
2024-01-22Add scroll_switches_tabs optionRodrigo Arias Mallo
By default, scrolling the mouse wheel over the tabs will switch among tabs. The option allows users to disable the feature.
2024-01-16Use right button to close tabs by defaultRodrigo Arias Mallo
2024-01-16Switch tabs using the mouse wheelRodrigo Arias Mallo
Allows switching tabs using the mouse wheel, which is useful to quickly scan pages by looking at the page content instead of the tab title.
2024-01-15Add ui_tab_height optionRodrigo Arias Mallo
The default tab height of 16 pixels was causing some usability issues as the tabs are quite small in large monitors. The default size is increased to 20 pixels and the new option "ui_tab_height" allows the user to specify a different value.
2024-01-15Prevent nested calls to Tls_connect()Rodrigo Arias Mallo
They may accidentally happen if a fd callback is still attached to the connection socket while we wait in a FTLK dialog, causing another call to Tls_connect() which will end up in an infinite loop.
2024-01-15Remove fd watch while perforing TLS checkRodrigo Arias Mallo
Avoids calling the callback while the TLS dialog is opened, which was causing and infinite loop of recursive calls to Tls_connect(). Fixes: https://github.com/dillo-browser/dillo/issues/49
2024-01-14Report TLS errors if any before abortingRodrigo Arias Mallo
Instead of just assert that there are no previous TLS errors, print the error queue and then abort. It prevents the error queue to be emptied before having a chance to see what error was stored.