Commit Graph

951 Commits

Author SHA1 Message Date
Yuri Kobets
b2eef3ccc2
Merge pull request #268 from litehtml/blocks_rendering
Blocks rendering
2023-06-12 18:35:21 +03:00
Yuri Kobets
29c0df7e67 added "content: none" support for ::before/::after elements 2023-06-08 19:30:00 +03:00
Yuri Kobets
14b31106c3 fixed rendering of ::before and ::after elements
* now ::before and ::after elements are created if content is not
  defined
* styles ::before and ::after without other selectors are applied
  to the already created before/after elements
2023-06-08 04:28:18 +03:00
Yuri Kobets
b212cf42bb el_before_after_base::add_text add spaces as el_space 2023-06-07 18:29:24 +03:00
Yuri Kobets
0c700d2409 optimization: elements_vector replaced with elements_list
Also added element::children() method.
Closes issue #27
2023-06-07 15:47:51 +03:00
Yuri Kobets
672b603eff Process align attribute for table tag via master.css
Fixes issue #114
2023-06-07 03:03:54 +03:00
Yuri Kobets
7ec04267b1 Fixed calculating min with for elements with floats
Fixes issue #99
2023-06-07 02:52:59 +03:00
Yuri Kobets
b0a6930308 Optimizing floating boxes rendering
* is_floats_holder function is renamed to is_block_formatting_context
* All floating boxes related functions are moved to new class formatting_context
* The class formatting_context was passed as argument to the render
  function
* render function is now is wrapper for _render. The render function
  creates formatting_context when required
2023-06-06 00:29:19 +03:00
Yuri Kobets
87c622789a blocks re-rendering refactor
moved display property based re-rendering from render_item_block::render
to the top functions: place_float, place_inline and
render_item_block_context::_render_content
2023-05-28 18:53:39 +03:00
Yuri Kobets
cb84450654 fix: render_test._/"acid1.htm" test fails on x86 architecture
Issue #265
2023-05-19 02:55:10 +03:00
Yuri Kobets
8139af9b70 get_child_by_point: search child from the end of elements list 2023-05-14 00:46:25 +03:00
Yuri Kobets
03104d39e0 fixed floating boxes rendering, apply box-sizing to min/max width/height 2023-05-13 02:24:36 +03:00
Yuri Kobets
3b896beede changed signature of document_container::set_clip
Removed arguments valid_x and valid_y because they are always true
2023-05-12 18:13:13 +03:00
Yuri Kobets
bc1c8e3cc1
Merge pull request #262 from litehtml/block_render_fix
Block render fix
2023-05-12 17:56:28 +03:00
Yuri Kobets
819c20e682 fixed rendering elements with position absoute and fixed
Also:
* refactoring: have_parent is replaced with is_root in render_item
* fixed: The tag <body> is not floats holder by default
* expanding <html> and <body> elements auto-expanding up to client
  rectangle
2023-05-12 17:29:44 +03:00
Yuri Kobets
ec2d94639f fixed rendering of <html> and <body> tags
* Removed "width: 100%; height: 100%" from <html> style
* extend <html> and <body> elements to the client rectangle if
  width/height is auto
* Reverse inherit for <html> background is working again
* Always draw <html> element background into document clipping area to
  fill entire "browser window".
* Added document::content_width and document::content_height. These
  methodts return the document size without <html> and <body> tags for
  using in tests and other applications
2023-05-12 00:06:54 +03:00
Yuri Kobets
3ba397469c refactoring: rename have_parent to is_root 2023-05-10 02:13:33 +03:00
Yuri Kobets
0a1b32aedb Rendering refactoring
* max_width argument removed from _render function
* added render_width into containing_block_context structure. This
  member should be used to render element instead of max_width
* _render protected function is replaced with render function
* apply auto-margins from parent element. Auto margins must not be
  applied inside render function
2023-05-09 02:51:03 +03:00
Yuri Kobets
46bbc0a98e Fixed rendered document size calculating.
document::height() now returns minimum height. This was used in the
render_test.cpp to find the bitmap height. Most of tests were updated
to to match real document size.

Also added ACID1 test.
2023-05-05 03:31:05 +03:00
Yuri Kobets
34a09af757 Added support for "font: inherit" style. 2023-05-03 02:40:03 +03:00
Yuri Kobets
0dd4b48709 fixed table rendering with width defined as percent 2023-04-28 03:12:46 +03:00
Yuri Kobets
dea6f7fad5 fix re-render table into returned min width in block context 2023-04-25 02:26:21 +03:00
Yuri Kobets
714d234090 fixed support for box-sizing: border-box 2023-04-24 00:20:26 +03:00
Yuri Kobets
f3b2fc03c6 fixed: incorrect floated block position 2023-04-17 02:12:55 +03:00
Yuri Kobets
24e622ed55 table rendering fix 2023-04-15 18:45:22 +03:00
Yuri Kobets
180529bd5c fixed rendering issue with fixed block size 2023-04-14 15:04:24 +03:00
Yuri Kobets
109a837ef6 fixed table rendering 2023-04-14 00:40:39 +03:00
Yuri Kobets
61e89e5059 process zero font-size 2023-04-02 04:53:30 +03:00
Yuri Kobets
ebda06e786 fixed positioned elements rendering (absolute, fixed) 2023-04-02 03:05:21 +03:00
Yuri Kobets
9bc386df9b Fixed: (min/max) width/height calculating with percent units. 2023-03-29 02:28:18 +03:00
Yuri Kobets
866f47ad4d
Merge pull request #258 from stasoid/master
support multiple background images
2023-02-25 15:49:07 +03:00
stasoid
f7e10d0985 remove background.cpp 2023-02-25 12:23:23 +06:00
stasoid
8ef9ec8275 fix: "inherit" doesn't work 2023-02-25 12:08:29 +06:00
stasoid
19095e184e test_container: update for API change 2023-02-25 11:19:59 +06:00
stasoid
28a2831518 support multiple background images 2023-02-25 10:33:42 +06:00
Yuri Kobets
1a544160a3 revert table-3-width.htm rendering test 2023-02-21 03:51:08 +03:00
Yuri Kobets
a858b82c24 fix: Unicode escape sequences with lower case are processed incorrenly in the content property 2023-02-21 03:46:07 +03:00
Yuri Kobets
4f6952ac83 fixed: elements ":after" ":before" are not rendered 2023-02-19 00:00:55 +03:00
Yuri Kobets
eca6a7439d don't inherit font-size, font-weight and font-style properties for table
Related to the issue #233
2023-02-18 16:00:25 +03:00
Yuri Kobets
b3a42c2acb Added smaller and larger values support for font-size CSS property 2023-02-18 15:58:11 +03:00
Yuri Kobets
6935de2836 fixed: Bug in margin / padding with position: absolute #79 2023-02-18 14:39:08 +03:00
Yuri Kobets
1154e56af6
Merge pull request #254 from stasoid/master
test_container: add more font sizes
2023-02-18 13:54:06 +03:00
stasoid
65d58b22f0 remove outdated comments 2023-02-18 08:29:48 +06:00
stasoid
ff7c449016 update render test results 2023-02-18 07:56:09 +06:00
stasoid
d788efb131 sort render tests 2023-02-18 07:53:17 +06:00
stasoid
5cf3c9ee03 handle <font> relative size according to https://developer.mozilla.org/en-US/docs/Web/HTML/Element/font#attr-size 2023-02-18 07:50:16 +06:00
stasoid
742aa8e8a0 render_test: increase rendering height for test1.htm 2023-02-18 07:39:54 +06:00
stasoid
65645f9ac4 test_container: add more font sizes 2023-02-18 07:37:53 +06:00
Yuri Kobets
0d91021f28 fix: line height is calculated incorrectly
related to the issue #233
2023-02-17 13:14:19 +03:00
Yuri Kobets
6c6b188fc2 fixed: tr bgcolor doesn't work #252 2023-02-17 11:54:25 +03:00