Commit Graph

267 Commits

Author SHA1 Message Date
Crypto City
124b4c5697 add checked and value string ids 2025-08-07 06:16:58 +00:00
Crypto City
144dcc5efe add basic text-shadow support 2025-08-06 15:43:22 +00:00
Crypto City
1eca5ee967 add find_by_id element method 2025-08-06 14:42:10 +00:00
Crypto City
94d4566a48 new on_element_changed document_container virtual method
to allow redraw
2025-08-06 14:42:10 +00:00
Yuri Kobets
6288fca97f fix: incorrect position of the text of the list markers 2025-06-26 10:43:28 +03:00
Yuri Kobets
ec38e5854a added url::encode an url::decode functions 2025-06-09 23:27:24 +03:00
Yuri Kobets
79116da6ef Fix: removed css_calc.* files
These files are under development and should not be in master branch
yet. Fixes issue #409
2025-06-03 10:14:08 +03:00
Yuri Kobets
d0986f2b24 Conic gradient support for the container_cairo 2025-05-27 03:19:07 +03:00
Yuri Kobets
0f03825606 Added 'position:fixed' elements to the element::in_normal_flow as exclusion. 2025-04-21 00:37:04 +03:00
Yuri Kobets
4243738f28 fix: disable top/bottom margin collapse for elements with 'position:fixed' 2025-04-21 00:37:04 +03:00
Yuri Kobets
2d34cb9f09 fixed: elements with 'position:fixed' have issue with draw
* document_container::get_client_rect was renamed to get_viewport.
* updated draw_buffer class to handle fixed elements on scroll
2025-04-11 02:53:37 +03:00
Yuri Kobets
1274232171 Includes refactoring using clangd 2025-04-06 23:10:39 +03:00
Ollie
e077b97780 fix: support text-emphasis all feature. 2025-04-02 23:11:03 +03:00
Ollie
770d55ca37 feat: support text-emphasis 2025-04-02 23:11:03 +03:00
Ollie
165bed42c0 feat: Implements element click event API in document_container. 2025-04-02 23:04:48 +03:00
Ollie
5300da52ab fix: set a default implement for on_image_click 2025-04-02 23:04:48 +03:00
Ollie
ffe1b229f0 feat: Implements image click event.
feat: Optimized click event logic.
2025-04-02 23:04:48 +03:00
Yuri Kobets
36b39f8692 add intersect and operator== into the litehtml::position 2025-04-01 03:34:52 +03:00
Yuri Kobets
5d9f1994a0 Return string css properties as reference
Returning string by value causes read-after-free error.
2025-03-28 04:58:18 +03:00
Yuri Kobets
23751c1421 Support for text-decoration CSS properties
Supported properties:
* text-decoration (as shorthand for other text-decoration properties)
* text-decoration-color
* text-decoration-line
* text-decoration-style
* text-decoration-thickness

Changes in the container::create_font:
```litehtml::uint_ptr create_font(const font_description& descr, const document* doc, litehtml::font_metrics* fm);```

All font parameters are moved to the ```font_description``` structure.
2025-03-12 23:09:56 +03:00
Yuri Kobets
65128c39b3
Updated inline layout rendering (#389)
* Added subscripts/superscripts baseline shift to the font_metrics
* Improved rendering of inline elements with top and bottom vertical align
* Improved rendering of the line-height property
2025-03-07 17:30:32 +03:00
Judd Cohen
0ee1967cf3 Add support for the "appearance" CSS property. Because litehtml itself does not implement input widgets, this is simply a passthrough value to allow applications implementing input support to handle the property.
Reference: https://www.w3.org/TR/css-ui-4/#appearance-switching
2024-10-21 00:38:43 +03:00
Yuri Kobets
b756c9e28a fixed: copy-paste bug in element.h #366 2024-10-13 03:42:26 +03:00
Yuri Kobets
20b3fc6c00 Added include <algorithm> to types.h to fix build error on Windows 2024-10-09 22:32:58 +03:00
Yuri Kobets
3e533ee157 fixed: positioning of elements with position absolute and fixed 2024-10-05 15:22:42 +03:00
Yuri Kobets
1514b1678d Added support for 'ex' and 'ch' units. Improved calculating x-height metric. 2024-10-05 15:22:42 +03:00
Yuri Kobets
28a999de56 Support for "font: <system-family-name>" 2024-10-05 15:22:42 +03:00
Andy Maloney
577367ecc9 Use one callback with enum to avoid extra API (#2) 2024-08-19 16:41:50 +03:00
Andy Maloney
1a54872a46 Add callbacks for mouse entering/leaving elements (#1)
Useful for showing URLs from anchors or for debugging.
2024-08-19 16:41:50 +03:00
stasoid
c264530997 render_test: use <filesystem> instead of <dirent.h>, <sys/stat.h> 2024-05-25 23:00:54 +03:00
stasoid
28bbe74ec9 test_container: support TTF fonts 2024-05-20 00:40:31 +03:00
stasoid
d9565ee928 deduplicate prepare_color_points 2024-05-16 22:54:49 +03:00
stasoid
60bd9f18f1 implement gradient color transition hints 2024-05-16 22:54:49 +03:00
stasoid
c80a2a08e9 use optional<css_length> in gradient::color_stop
unitless 0 is a valid length value, stop using it as a <no length> value
2024-05-16 22:54:49 +03:00
stasoid
3af10950e7 fix conic-gradient-2.htm 2024-05-16 22:54:49 +03:00
Yuri Kobets
c268ac29e8 Revert "undo some recent style changes"
This reverts commit 3c72715e6c.
2024-05-11 17:58:02 +03:00
stasoid
966e24a561 handle height attribute of table, tr, td/th 2024-05-11 13:21:22 +03:00
stasoid
1611b789f1 don't ignore @import after bad rules 2024-05-11 13:21:22 +03:00
stasoid
430d5a127f render_test: add ability to run standalone (without gtest) 2024-05-11 13:21:22 +03:00
stasoid
3c72715e6c undo some recent style changes 2024-05-11 13:21:22 +03:00
stasoid
e3f481f705 spaces -> tabs in some places 2024-05-04 23:31:55 +03:00
stasoid
9136086b2c fix subtest d in media.htm failing when compiled with gcc
abs() in eval_op() in media_query.cpp is abs(int) instead of abs(float) after switching from <math.h> to <cmath>
Minimal example: https://tio.run/##RYuxCsIwEEBn7ysOXNqhjoJt7Chk6SSI43lJayBJS3MVQfx1Y8HB5T148HiaqoE5562L7BdjUbkxyWwptPBvHEjuLUDvRxJ8kF8sHlF3J93p87UBcFEwkItFiS/YJDF1zeMiqBTSLRWH/Q6r31c28M75w72nIeXqQt6vtE@ZafVkDUVx/AU

Note that gcc doesn't display any warning, but clang does: https://tio.run/##Sy4o0E3OScxL//9fOTMvOac0JVXBJjO/uKQoNTHXjgshlpybWJJhx8WVlpOfWKJQlphTmqpgq@Dp5@bp5xkSac3FlZlXopCbmJmnoalQzcVZXJJiZZWcX1qiYGOjkJhUrGFppqegC9Gnac1V@/8/AA
2024-05-04 23:31:55 +03:00
stasoid
e207a989f9 add media query tests, fix @media not unknown 2024-05-04 23:31:55 +03:00
stasoid
99dd1ffec7 test_container: support images 2024-05-04 23:31:55 +03:00
stasoid
59cdf6b5a7 Fix this gcc error:
litehtml/include/litehtml/document.h:75:14: error: declaration of ‘litehtml::mode litehtml::document::mode() const’ changes meaning of ‘mode’ [-fpermissive]
   75 |   mode       mode() const { return m_mode; }
      |              ^~~~

Note: this error is specific to gcc, clang and VS don't display it.
Minimal example:
gcc: https://tio.run/##Sy4o0E1PTv7/PzWvNFchNz8lVaG6otaaKzknsbhYwZGrmosTLAgiNDSri1JLSovyFCqsa7mAijLzShRyEzPzgBK1//8DAA
clang: https://tio.run/##Sy4o0E3OScxL//8/Na80VyE3PyVVobqi1poLKFpcrODIVc3FCRYEERqa1UWpJaVFeQoV1rVcQEWZeSUKuYmZeUCJ2v//AQ
2024-04-29 21:26:27 +05:00
stasoid
621c0ad9a3 Merge remote-tracking branch 'upstream/master' 2024-04-29 20:43:15 +05:00
stasoid
ca693a290e support selector_list in :nth-child(an+b of selector_list) 2024-04-29 19:16:30 +05:00
Andy Maloney
c25af5240b Ensure border style is initialized 2024-04-26 17:27:39 +03:00
stasoid
cf500fdd63 make id and class selectors match case-sensitively in no quirks/limited quirks mode and case-insensitively in quirks mode 2024-04-26 19:20:30 +05:00
stasoid
60f29d1b14 match :is() selector 2024-04-26 14:11:07 +05:00