Commit Graph

67 Commits

Author SHA1 Message Date
Crypto City
7010cf7055 add basic text-shadow support 2023-05-19 16:58:07 +00:00
Crypto City
69644db06a new on_element_changed document_container virtual method
to allow redraw
2023-04-29 20:59:27 +00:00
Crypto City
6e9662fb8a add find_by_id element method 2023-04-29 20:58:27 +00:00
Crypto City
ff97010a9d make ~document_container virtual 2023-02-05 18:44:05 +00:00
Crypto City
511892fe06 fix build on windows 2023-01-30 22:04:39 +00:00
stasoid
6b55a1b852 cosmetics 2022-03-26 20:36:05 +06:00
stasoid
5a00888bbc var() 2022-03-17 10:37:42 +06:00
stasoid
315738cc4d fix blockquote 2022-03-08 20:48:26 +06:00
stasoid
c8a4ee6f72 fix #194
Also fixes rendering of this HTML:
<table width=100px border=1>
<tr><td>aaa<td style="display:none">bbb<td>ccc

and this HTML:
<style>p{display:table-cell}</style>
<p>aaa</p><!----><p>bbb</p>

and improves rendering of this HTML:
<style>
p{display:table-cell}
span{white-space:pre}
</style>
<span>
<p>aaa</p>  <p>bbb</p>
2022-03-04 21:21:24 +06:00
cotn666
f27e69b0b3
Fix MinGW build 2022-02-22 10:44:25 +01:00
wih1hi
e91823d438 fixed style property 'white-space: pre-wrap' 2021-12-28 13:13:06 +01:00
Yuri Kobets
b4903811fc Fixed compilation error on Windows 2021-11-15 01:31:54 +03:00
Yuri Kobets
6617ab7188 Refactoring 2021-11-11 00:12:38 +03:00
Yuri Kobets
7d234d9a7e Use pango library as text renderer for container_linux 2021-11-07 03:53:00 +03:00
Yuri Kobets
cd72813881 Fixed parsing of escape sequence for :before and :after classes 2021-11-05 20:20:26 +03:00
Yuri Kobets
d4209476bc Add t_ prefix for functions litehtml::strcasecmp, litehtml::strncasecmp, litehtml::tolower and litehtml::isdigit 2021-11-05 02:32:49 +03:00
g4mba5
4dc1a18fc3
Add custom implementations of 'strcasecmp', 'strncasecmp', 'tolower' and 'isdigit' that ignore the current locale (#178)
Add custom implementations of 'strcasecmp', 'strncasecmp', 'tolower' and 'isdigit' that ignore the current locale
2021-11-05 02:16:30 +03:00
Yuri Kobets
bb04a50f93 Add a custom 'strtod' implementation that ignores the current locale. 2021-11-04 23:22:54 +03:00
Yuri Kobets
f00bc949f7 Revert "Add a custom 'strtod' implementation that ignores the current locale." 2021-11-04 16:54:12 +03:00
Yuri Kobets
d45cbbb558
Merge branch 'master' into g4mba5-patch-strtod 2021-11-04 16:44:19 +03:00
Yuri Kobets
1f36d26f30 Added document_container::split_text to use custom text splitting engines 2021-11-01 02:53:40 +03:00
Yuri Kobets
ac6bbc7d2a Added table caption support 2021-11-01 01:25:35 +03:00
g4mba5
0fea186f0e
'strtod' declaration 2021-10-30 21:56:41 +02:00
g4mba5
2164e69327
The custom 'strtod' will be implemented directly in 'litehtml' namespace 2021-10-30 21:55:46 +02:00
g4mba5
626f5a34a0
Make 't_strtod' points at its implementation in 'document.cpp' 2021-10-30 21:11:19 +02:00
Evgeniy A. Dushistov
971eadced8 fix "scaring" warnings
1. usage of virtual functions without destructor,
   not public not-virtual destructor + final convinced compiler that
   all ok
2. couple of unused variables and arguments (the most noisy one)
3. extra copy in cycle
4. std::move prevent copy elision warning
2021-10-28 13:56:59 +03:00
ericLemanissier
af9061a2c8
include cstdint int os_types
it is needed for uintptr_t
2021-10-27 14:02:23 +02:00
Mark Jan van Kampen
131f207e01
Adds ptrdiff_t include to tstring_view.h
On some platforms ptrdiff_t is included through other system headers, on
others not. By including cstddef the code should compile on all platforms
that comply with the standard.
2021-10-27 10:43:50 +02:00
Mark Jan van Kampen
bb01af1c36
Adds missing includes to utf8_strings.h 2021-10-27 06:49:11 +02:00
John Poole
463cfc2de1
Merge branch 'master' into url-class 2021-09-25 20:26:05 -04:00
John Poole
527fbe3413 Extend URL path resolution to handle relative paths
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.
2021-09-25 13:52:56 -04:00
John Poole
d3c368458d Add a url class
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.
2021-09-25 11:58:31 -04:00
John Poole
3147b4fc78 Add codepoint utility functions, tests
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.
2021-09-25 11:57:52 -04:00
John Poole
14e2001376 Add tstring_view, a string reference type
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).
2021-09-23 14:56:34 -04:00
Unknown
da53571a47 Added support for loading HTML into an existing element 2020-06-14 01:13:51 +01:00
Yuri Kobets
58e92d6dc6 Extended support for ordered lists.
Supported list-style-type: decimal, decimal-leading-zero, lower/upper-latin, lower/upper-alpha, lower/upper-roman, lower-greek
2020-05-10 02:55:34 +03:00
Alex Zhondin
259d96c2e1 added missing files 2020-05-09 13:44:24 +03:00
Alex Zhondin
948930ad35 support ordered lists 2020-05-09 13:44:24 +03:00
Eike Ziller
42ceb48b4b Fix build with MSVC 2019 and CMake
The WIN32 define is missing with MSVC 2019, use _WIN32
2019-10-28 14:10:50 +01:00
great90
c218b3153e delete repeated include
delete repeated include of "litehtml/stylesheet.h" and "litehtml/html_tag.h"
2019-10-12 09:52:15 +08:00
Yuri Kobets
72fcde2dd3 Fixed: image with max-height percent causes 0 height
Closes #93
2019-09-29 17:34:09 +03:00
Yuri Kobets
94996b27af Removed gumbo.h from document.h, moved VS project into top directory, compile fix in src/html_tag.cpp 2019-09-29 14:30:14 +03:00
Martin Miralles-Cordal
fa610010b3 Moved src headers into discrete folders and updated include paths. 2019-09-22 16:59:03 -04:00
NikitaFeodonit
3320aa4898 Fixes for compilation for many platforms.
Split gubmo and litehtml to different CMake projects with different
compile languages.
Move 'src/strings.h' to 'src/gumbo/visualc/include/strings.h'.
Remove '../src/' in '#include' directive in litehtml.h and
add target_include_directories() in CMake project.
Set C/C++ standard flags by set_target_properties() in CMake project.
Do not set build type and C/C++ compiler flags in library project.
2018-05-25 20:24:53 +03:00
NikitaFeodonit
5515b347a4 Replace '#pragme once' to '#ifndef' because of Eclipse code parser. 2018-05-25 18:21:58 +03:00
NikitaFeodonit
3104c078dc Convert line delimiters to Unix style. 2018-05-25 17:05:49 +03:00
Yuri Kobets
30409bd842 Rollback the pull request #13 - hardcoded styles are not very good.
The same effect can be achieved via master.css. When render html into the source with calculated
width/height (like tooltips) we can set width/height into "auto" to get valid width instead of the maximum width.
2015-06-06 04:45:57 +03:00
Yuri Kobets
81207e27b7 Fix for tag <br clear="all"> 2015-05-22 22:49:59 +03:00
Yuri Kobets
4da59f1a89 tokenize function is replaced to split_string.
some fixes in CSS parsing.
2014-10-21 00:10:16 +04:00
yuri.kobets@gmail.com
9dd887c109 Position of floating boxes is incorrect inside inline/float boxes
Relative positioning is fixed
2014-08-24 15:28:13 +00:00