* 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
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
* 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
* 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
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.
Render tests are .htm files in litehtml/test directory.
Tests starting with "-" are disabled.
Correct rendering is in corresponding .htm.png file.
To generate .png file, run ctest from litehtml/build. The test will fail
and create xxx.htm-FAILED.png file. Rename it to xxx.htm.png
One ASCII raster font with 3 sizes is supported, see litehtml/containers/test/fonts. This should be enough for tests.
Border painting is supported, only solid borders.
Backgrounds, images and list markers are not supported.
* 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
CSSTest.SelectorParse fails on GitHub Actions but not on Travis or on
any developer systems. Disable the test until we can determine what's
going on here.
This is implemented using several URL path helper functions. The
functions aren't strictly necessary, but the functions make it easier
to implement and test the resolution functionality.
The url class is a URL parser and container class that makes working
with URLs easier. In particular, the resolve() function makes working
with base URLs and possibly relative URLs easier.
url instances are meant to be immutable. If users need to modify a
url instance they can do so by creating a new url instance. See the
resolve() implementation for a non-trivial example of how to build a
new url instance using existing url instances.
Note that the current implementation is inefficient due to each URL
component requiring its own separate memory allocation. We should
consider re-writing this to use tstring_view once that branch is
merged into master.
Add codepoint utility functions that test whether a codepoint belongs
to a set of codepoints (e.g., the valid codepoints for a URL scheme).
Most of these functions are implemented using a compact lookup table
so should be reasonably fast.
The functions are based on similar functions from the css-parser branch
that were introduced in commit 1698324920. We'll want to merge these
sets of functions together once the branches are merged.
tstring_view is a string reference type that provides a view into a
string that is owned elsewhere (e.g., by a std::string object).
tstring_view implements the same interface as std::base_string_view in
the standard library. When litehtml moves to C++17 consider replacing
the tstring_view implementation with the standard library
implementations (e.g., via a using statement).
GoogleTest provides a number of nice features (such as autodiscovery)
that make writing and running tests easier and less tedious. This
patch converts the litehtml tests over to use GoogleTest. Note that
the conversion is mostly mechanical -- no attempt has been made to
make the tests "idiomatic" GoogleTests.
Most of the CMake changes are based on code from the GoogleTest
documentation, specifically the "Quickstart: Building with CMake"
guide:
https://google.github.io/googletest/quickstart-cmake.html