aboutsummaryrefslogtreecommitdiffstats
path: root/src/render_block.cpp
Commit message (Collapse)AuthorAgeFilesLines
* flexbox: some tests are resolvedYuri Kobets2024-01-311-10/+10
|
* flexbox rendering fixesYuri Kobets2024-01-281-1/+15
|
* flex: fixed the height calc in size_mode_content modeYuri Kobets2024-01-071-1/+1
|
* flex: fix auto-shrink testsYuri Kobets2024-01-041-16/+25
|
* flex: more flex tests passedYuri Kobets2023-12-281-6/+15
|
* refactor render_item based classesYuri Kobets2023-06-131-1/+3
| | | | All render_item based classes are moved into the own headers
* optimization: elements_vector replaced with elements_listYuri Kobets2023-06-071-2/+1
| | | | | Also added element::children() method. Closes issue #27
* Fixed calculating min with for elements with floatsYuri Kobets2023-06-071-10/+11
| | | | Fixes issue #99
* Optimizing floating boxes renderingYuri Kobets2023-06-061-551/+22
| | | | | | | | | * 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
* blocks re-rendering refactorYuri Kobets2023-05-281-21/+9
| | | | | | 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
* fixed floating boxes rendering, apply box-sizing to min/max width/heightYuri Kobets2023-05-131-28/+74
|
* fixed rendering elements with position absoute and fixedYuri Kobets2023-05-121-13/+1
| | | | | | | | 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
* fixed rendering of <html> and <body> tagsYuri Kobets2023-05-121-0/+12
| | | | | | | | | | | | * 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
* Rendering refactoringYuri Kobets2023-05-091-75/+37
| | | | | | | | | * 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
* Fixed rendered document size calculating.Yuri Kobets2023-05-051-4/+2
| | | | | | | | 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.
* fixed table rendering with width defined as percentYuri Kobets2023-04-281-2/+6
|
* fixed support for box-sizing: border-boxYuri Kobets2023-04-241-33/+65
|
* fixed: incorrect floated block positionYuri Kobets2023-04-171-8/+12
|
* fixed rendering issue with fixed block sizeYuri Kobets2023-04-141-0/+4
|
* fixed table renderingYuri Kobets2023-04-141-4/+7
|
* fixed positioned elements rendering (absolute, fixed)Yuri Kobets2023-04-021-1/+2
|
* Fixed: (min/max) width/height calculating with percent units.Yuri Kobets2023-03-291-130/+88
|
* New tests and fixes for inline renderingYuri Kobets2023-02-161-12/+12
| | | | | | | * test10.htm - test for issue #247 * test11.htm - test for issue #249 * test12.htm - inline text rendering * test13.htm - vertical align test
* fixes in calculating line box widthYuri Kobets2023-02-061-14/+7
|
* optimization: removing std::dynamic_pointer_castYuri Kobets2023-02-051-9/+9
|
* create html_tag constructor for anonymous wrapper boxesstasoid2022-12-051-12/+2
| | | | changed css_properties::compute signature because shared_from_this cannot be called during construction of *this
* document::createFromString optimization:stasoid2022-11-271-9/+6
| | | | | | Move css property parsing from css_properties::parse (which is called from html_tag::parse_styles for every tree node) to style::add_property (which is called during stylesheet parsing). document::createFromString: 1287 ms -> 1048 ms on Obama wiki
* This basically reverts commit 5a00888b "var()" to improve performance.stasoid2022-11-211-3/+7
| | | | | I'll readd var() support later in a way that doesn't hurt performance so much. document::createFromString: 1730 ms -> 1287 ms on Obama wiki
* parse_styles optimization: use string_id for CSS property namesstasoid2022-11-071-2/+2
| | | | decreases parse_styles time by 37% (750 ms -> 468 ms on Obama wiki on my machine)
* remove wchar supportstasoid2022-10-211-13/+11
| | | | closes issue #217
* Fixed: compilation is failed on WindowsYuri Kobets2022-09-171-1/+1
|
* Internal refactoring (#212)Yuri Kobets2022-09-141-0/+862
* Refactored CSS properties All CSS related properties are moved into the separate class css_properties. Getters and setters are removed from classes element and html_tag. Access to the css_properties rleased via css() [ro] and css_w() [rw] methods * fix: el_text don't have to copy all css properties from parent * Refactored rendering code * Added flex and inline_flex values for display css property * Implementing box generation https://www.w3.org/TR/CSS22/visuren.html#box-gen * Split inlines on block box inside * Split parsing and rendering trees. * Fixed some bugs * Fixed: impossible to click urls on Obama wiki's toc * Make element::get_placement work again * Fixed: incorrect rendering table captions * find_styles_changes function returned to the element class * set parent correctly during render items split * fixed urls on https://en.cppreference.com/w/cpp/container/vector * fixed rendering blocks with width in percents Example: https://web.archive.org/web/20110101155107/http://www.unicode.org/ Issue #208 * Fixed placement of blocks with "overflow: hidden" with floating boxes. * refactoring of rendering block * Selectors :before and :after returned back with fixed behaviour. * fixed render_item::is_last_child_inline * fixed: text inside nested inlines has extra paddings/margins * fixed documet test