aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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-17Use the aspect ratio of the content boxRodrigo Arias Mallo
The requisition box includes the margin, padding and border. To compute the aspect ratio of the image we need to remove them to get the content box. Once the adjustment is done, we add the borders again.
2024-10-17Add more image aspect ratio testsRodrigo Arias Mallo
2024-10-17Add img-aspect-ratio-relative-inside-fixed testRodrigo Arias Mallo
2024-10-17Remove aspect ratio logic from ImageRodrigo Arias Mallo
The aspect ratio is now preserved by Widget::correctRequisition(), so we don't need to do more steps after the call.
2024-10-17Fix img-aspect-ratio-absolute testRodrigo Arias Mallo
2024-10-17Use maximum size for pathological CSS casesRodrigo Arias Mallo
When CSS min-{width,height} > max-{width,height} set the max-{width,heigh} to the maximum value min-{width,height}.
2024-10-17Add support for aspect ratio in WidgetRodrigo Arias Mallo
Images should preserve their own aspect ratio, which is determined by the image buffer size, also known as the intrinsic size. Currently, when a child requests a requisition to be corrected by correctRequisition(), only the size was adjusted, ignoring the aspect ratio. The new Widget ratio variable holds the desired aspect ratio for the widget, and will only be taken into account when non-zero. In that case, then correcting the requisition, a naive algorithm tries to first increase the length of the small size to fill the preferred aspect ratio. In the case that it is not enough, the larger size is then decreased to fit the aspect ratio. And if that doesn't work either, the aspect ratio is not enforced and the widget will be distorted. There are special cases for correctRequisition() depending if the parent exists or not. The same approach is taken for both cases, but using the viewport size instead of the parent size.
2024-10-17Only use the viewport height with forceValue setRodrigo Arias Mallo
For cases where the available height is being computed and the CSS style has the height to auto, there available height is infinite. Don't return the viewport unless forceValue is set.
2024-10-17Add comment for dubious callRodrigo Arias Mallo
2024-10-17Add more image aspect ratio testsRodrigo Arias Mallo
2024-10-17Allow widgets to adjust new requisitionRodrigo Arias Mallo
When a widget calls the parent to correct its own requisition, let the child widget perform adjustments on the requisition. This allows images to control the height when the parent changes the width, so the image can preserve its own aspect ratio.
2024-10-17Improve comments in dw::core::WidgetRodrigo Arias Mallo
2024-10-17Use corrected requisition as fixed sizeRodrigo Arias Mallo
2024-10-17Expand percentage height values for requisitionsRodrigo Arias Mallo
When correcting a requisition, percent values were not being computed which prevents the min-height or max-height values to be taken into account.
2024-10-17Set the viewport width as initial width valueRodrigo Arias Mallo
When the initial width is -1, the contrainsts of min-width and max-width are not applied. If we set the viewport width after calcFinalWidth() it may exceed max-width. It is guaranteed to return a value different from -1 when the initial width is positive.
2024-10-17Don't apply min/max-width if the width is autoRodrigo Arias Mallo
Prevents reducing the available width of a body with width:auto and min-width:100px to 100px. The Widget::calcFinalWidth() method is also heavily documented, so we can understand precisely what it does.
2024-10-17Preserve aspect ratio of imagesRodrigo Arias Mallo
When posible, change the image size so the aspect ratio is always preserved. This is only posible when one or both dimensions have some room to play. When both dimensions are not fixed, a naive algorithm tries to satisfy all {min,max}-{width,height} and aspect ratio constraints, but it may fail. In that case, the aspect ratio is not preserved. Fixes the HTML tests img-aspect-ratio and img-max-bounds.
2024-10-17Round final relative CSS lengthRodrigo Arias Mallo
Prevents errors by one pixel
2024-10-17Add img-max-bounds HTML testRodrigo Arias Mallo
Tests several combinations of size contraints on images so we can check if the aspect ratio is kept or not.
2024-10-17Remove unused NotSoSimpleVector constructorRodrigo Arias Mallo
Fixes: https://github.com/dillo-browser/dillo/issues/281 See: https://bugs.gentoo.org/939137
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-17Update ChangeLog with new defaultsRodrigo Arias Mallo
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-14Take into account the scrollbar in page overlapRodrigo Arias Mallo
When the horizontal scrollbar is visible the viewport size is reduced, so the page overlap should be computed from the visible viewport only. The change ensures the overlap has the same lenght, regardless of the visibility state of the scrollbars.
2024-10-13Jump to top and bottom in scroll page modeRodrigo Arias Mallo
When scroll page mode is active, clicking on the up and down scrollbar buttons make the page jump to the top and bottom repectively.
2024-10-13Repeat page scrolling when holding the buttonRodrigo Arias Mallo
When the page scroll mode is enabled, pressing and holding the scrollbar will keep scrolling pages on that direction until the mouse button is released.
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-13Scroll full pages with mouse wheelRodrigo Arias Mallo
When using the scroll wheel over a page, holding Shift will cause full pages to be scrolled instead of scroll steps. The same effect can be achieved by scrolling over the vertical scrollbar.
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-06Test the C++ compiler worksRodrigo Arias Mallo
Stops the configure process if the C++ compiler doesn't work, otherwise it will fail at build time. Fixes: https://github.com/dillo-browser/dillo/issues/187
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-04Add doc/install.md to releaseAlex
2024-10-03Use command -v instead of whichmeat
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-10-01Add unclosed tag test for tbody, thead and tfootRodrigo Arias Mallo
2024-09-11Fix Google search by adding gbv=1 paramRodrigo Arias Mallo
If not given, it will cause any search attempt to go to a redirect page, which forces the user to click a small link to go to another search with the gbv=1 param set (along with other tracking parameters). Providing it from the start avoids the hassle.
2024-09-11Switch to HTTPS for Google searchRodrigo Arias Mallo
Use HTTPS by default, as Google won't redirect to HTTPS on its own.
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-11Stick to POSIX make rulesRodrigo Arias Mallo
Using $< in a non-suffix rule context is a GNUmake idiom Reported-by: Alex <a1ex@dismail.de>
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-07Stop the layouting loop after 1000 iterationsRodrigo Arias
Prevents Dillo from hoarding the CPU due to an infinite loop in the layouting. We also return the control to FLTK to update the screen and process events each 100 iterations, to keep the window responsive. It doesn't fix the root cause of the github-infinite-loop test, but it does allow the rendering to finish with no differences with the reference test.