aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
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
2024-12-08Fix version retrieval for FLTK 1.3.3 and olderRodrigo Arias Mallo
The Fl:api_version() method is not available on FLTK 1.3.3 and older, it needs to use Fl::version() instead.
2024-12-08Allow image formats to be disabled from dillorcRodrigo Arias Mallo
Makes disabling certain formats posible without the need to rebuild Dillo from source. See: https://github.com/dillo-browser/dillo/pull/312
2024-11-24Fix undefined NULL with image support disabledRodrigo Arias Mallo
2024-11-24Report if WebP is enabled and the versionRodrigo Arias Mallo
2024-11-24Add WebP image supportRodrigo Arias Mallo
See: https://www.toomanyatoms.com/software/mobilized_dillo.html Authored-By: dogma
2024-11-24Print version of libraries and featuresRodrigo Arias Mallo
When reporting the version of Dillo with -v, print also the version of the libraries it is currently using, as well as the features that were enabled at build time. Notice the versions are reported by reading them at runtime, so we can detect the version loaded at run time, regardless of which version was used at link time. All features are always printed, but prefixes with + if enabled or - if disabled. This allows checking if the feature was disabled at configure time or if it is missing in that version of Dillo.
2024-11-24Add support to query version in TLS backendsRodrigo Arias Mallo
2024-11-24Add support to read png versionRodrigo Arias Mallo
2024-11-24Add support to read jpeg versionRodrigo Arias Mallo
2024-11-18Always include the path "/" in HTTP requestsRodrigo Arias Mallo
Following https://datatracker.ietf.org/doc/html/rfc7230#section-5.3.1, the path must not be empty, even if we have a query: > If the target URI's path component is empty, the client MUST send "/" > as the path within the origin-form of request-target. Notice URIs can have empty paths, this is a restriction of HTTP only. Fixes: https://github.com/dillo-browser/dillo/issues/302
2024-10-28Reload the current page on SIGUSR1 signalRodrigo Arias Mallo
Reloads the current page on all windows when the SIGUSR1 is received. This is useful to update the page when it is being edited. Fixes: https://github.com/dillo-browser/dillo/issues/255
2024-10-21Don't add border on images with a linkRodrigo Arias Mallo
Some images have the same background color as the page so they don't have a visible border. Always adding a border on images with a link breaks this property. Links continue to be discoverable by hovering with the mouse. Fixes: https://github.com/dillo-browser/dillo/issues/270
2024-10-17Only use full URL for HTTP proxiesRodrigo Arias Mallo
When performing a HTTPS request over a HTTP proxy, a direct connection is made to the remote server, so the GET line will be received as is. Therefore we shouldn't send the full URL but just the path. Fixes: https://github.com/dillo-browser/dillo/issues/279
2024-10-17Don't focus on new tabs by defaultRodrigo Arias Mallo
Assume the user will want to continue in the current page when opening a page in a new tab.
2024-10-17Don't show the quit dialog by defaultRodrigo Arias Mallo
Assume the user wants to quit Dillo by default even if there are multiple tabs.
2024-10-13Control the page overlap independentlyRodrigo Arias Mallo
Introduces the new option scroll_page_overlap to control the amount of pixels of overlap when scrolling to the next or previous page. Previously this value was taken from scroll_step, but now they are controlled independently. Fixes: https://github.com/dillo-browser/dillo/issues/276
2024-10-13Add new scrollbar page modeRodrigo Arias Mallo
The scroll page mode changes the behavior of the mouse when clicking on the vertical scrollbar. When enabled with scrollbar_page_mode=YES, clicking with the left button anywhere on the vertical scrollbar will cause the page to scroll down one page. With the right button, to scroll up one page. Holding Shift temporarily reverts the value of the option.
2024-10-13Add support for left scrollbarRodrigo Arias Mallo
Implements support for placing the vertical scrollbar on the left side by setting scrollbar_on_left=YES on dillorc. By default, continues to be on the right side. See: https://www.toomanyatoms.com/software/mobilized_dillo.html Authored-By: dogma
2024-10-05Add support for more CSS unitsRodrigo Arias Mallo
Implements support for ch, rem, vw, vh, vmin and vmax units of CSS lengths. For now the units relative to the viewport are only computed once, and they won't change when the window is resized, but only when the page is reloaded. See: https://www.toomanyatoms.com/software/mobilized_dillo.html Authored-By: dogma
2024-10-05Define CssLength as struct instead of intRodrigo Arias Mallo
The int type doesn't have a fixed size, and is only guarantee to hold 16 bits. The current implementation assumes a size of at least 32 bits, an uses three bits to encode the type of information stored in the rest. To add more types of lengths we would need to take more bits from the value itself. A simpler approach is just to use a enumeration to take care of the type of length and a union to encapsulate the different lengths values.
2024-10-01Trigger a close of td, th and tr tags on tbodyRodrigo Arias Mallo
When previous TD, TH or TR tags were left open, close them when a TBODY tag is found.
2024-09-11Fix heap use after free in TLS conn on errorsRodrigo Arias Mallo
When a error causes the TLS connection to fail and stop, the conn struct is free on Tls_close_by_key(), so writing to conn->in_connect is not correct after that point. The solution is to only set the flag when the it is still valid. Reported-by: Alex <a1ex@dismail.de> Link: https://lists.mailman3.com/hyperkitty/list/dillo-dev@mailman3.com/thread/TY2JYCIPC7IQ32U6VC7ZOV3FVFFOE5K3/
2024-09-10Generate boundary by choosing a random characterRodrigo Arias Mallo
Instead of rejecting random characters that are not in the boundary character set, draw a random index and select the character at that position. The probability distribution is not perfectly uniform with this method, but reduces the number of calls to rand() by 4 times on average.
2024-09-02Restrict boundary to alphanum charactersRodrigo Arias Mallo
Makes it less likely that server implementations may break due to unexpected boundary characters. It also allows us to avoid quotes around the boundary.
2024-09-02Avoid searching for boundary in file contentXavier Del Campo Romero
Making the boundary string very unlikely to collide with the file to upload allows Dillo to assume it would never be found and avoids the expensive memmem() check. Even if major implementations tend to add several '-' characters to multipart/form-data boundaries, this is not enforced by RFC 2046, so it can be increase to 70 random characters. See: https://lists.mailman3.com/hyperkitty/list/dillo-dev@mailman3.com/thread/VUB5PIOPJZ2VTCVGQPBZMGOYEISTXCFX/
2024-08-11Round CSS value after applying zoom levelRodrigo Arias Mallo
When a 1px value is used for the border, any zoom level that makes it smaller makes the resulting size 0, so it disappears. Using round instead leaves more room for zooming out before it disappears. Fixes: https://github.com/dillo-browser/dillo/issues/240
2024-08-07Disable CSS messages for nowRodrigo Arias Mallo
Long CSS stylesheets may fill the console output hiding important messages. For now let's disable them, until we improve the mechanism to select which messages should be enabled at runtime.
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