1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-28 01:35:32 +00:00
Commit Graph

1032 Commits

Author SHA1 Message Date
Witold Filipczyk
d86ce27523 [css] Add to the end of list. Refs #301
It needs more testing.
2024-04-20 20:06:45 +02:00
Witold Filipczyk
cdf02f5e0c [libcss] Removed unused function 2024-04-18 17:12:27 +02:00
Witold Filipczyk
5db5d33911 [libdom] Check charset in document only when it was not present in headers 2024-03-12 21:41:06 +01:00
Witold Filipczyk
9c04585e84 [terminal] Add cell_height and cell_width to structs unconditionally. Refs #288 2024-03-07 08:22:57 +01:00
Witold Filipczyk
f762775b9d [ecmascript] Commented out clientHeight and similar properties
Code is not ready yet.
2024-03-02 19:13:45 +01:00
Witold Filipczyk
862dfcc672 [document] parse meta also when there are headers 2024-02-28 20:37:24 +01:00
Witold Filipczyk
84660b694d [node] get_element -> get_element_rect 2024-01-27 13:53:24 +01:00
Witold Filipczyk
9e743f0e80 [renderer] Reorder instructions 2024-01-26 19:02:26 +01:00
Witold Filipczyk
9e3d874577 [document] Added function scan document
This function must calculate dimensions of nodes in document.
Every node has a rectangle. x0,y0 is the left up corner, x1,y1 - the right bottom.
In theory every child of given node is contained in this rectangle.
2024-01-26 18:43:33 +01:00
Witold Filipczyk
5c8b62247a [screen] Test commit. Added element_offset to struct screen_char 2024-01-21 17:02:09 +01:00
Witold Filipczyk
103669e825 [html5] Also add NAV element. Refs #282 2024-01-07 20:11:00 +01:00
Witold Filipczyk
ef80897185 [html5] Stubs for html_main and html_article. Refs #282 2024-01-07 11:43:18 +01:00
Witold Filipczyk
69edab0036 [libcss] initialize unit_len_ctx with zeroes 2024-01-07 11:41:52 +01:00
Witold Filipczyk
389df54184 Revert "[head] addcrlf". Refs #281
This reverts commit 90d4f17031.
2024-01-06 09:33:40 +01:00
Witold Filipczyk
2fdb04a6ab [libcss] bump libcss to 0.9.2 and libdom to 0.4.2
Needs some tweaks. Code is compilable at least.
2024-01-01 17:47:59 +01:00
Witold Filipczyk
2ace5374c8 [cast] cast to intptr_t to silence compiler 2023-12-08 11:14:27 +01:00
Witold Filipczyk
8badb62c34 [document] I did not test it, but I guess it must be & prepended here 2023-11-29 16:15:34 +01:00
Witold Filipczyk
a5d2119dbf [map] Reimplemented map as hash
Maybe it is slower, but C only.
2023-11-28 19:55:37 +01:00
Witold Filipczyk
9dedc5779b [dcument] Compilation fix 2023-11-27 18:33:44 +01:00
Witold Filipczyk
bfd3f01d35 [document] document.cpp -> document.c
Moved some code to ecmascript-c.cpp.
2023-11-27 16:38:58 +01:00
Witold Filipczyk
a07f339fd1 [document] get rid of C++ list.
In first place it was implemented in C++ because of memory corruption problems.
2023-11-27 16:26:09 +01:00
Witold Filipczyk
424466740c [document] renderer.cpp -> renderer.c
Moved ecmascript code to ecmascript-c.cpp
2023-11-26 19:47:59 +01:00
Witold Filipczyk
58b0b39200 [hr] char -> unsigned char to avoid warning 2023-11-17 16:04:05 +01:00
Witold Filipczyk
ec9708a87e [document] init_string(&document->text) 2023-11-11 16:34:12 +01:00
Witold Filipczyk
263a06396d [document] Free previous document->title if was set 2023-10-27 16:54:18 +02:00
rkd77
a9ea05f0de
Merge pull request #269 from balducci/master
make it build when CONFIG_ECMASCRIPT is undefined
2023-10-24 18:43:41 +02:00
gabriele balducci
1112827be6 make it build when CONFIG_ECMASCRIPT is undefined 2023-10-24 18:00:11 +01:59
Witold Filipczyk
007fef1d6c [forms] Temporarily comment assertion 2023-10-24 12:34:27 +02:00
Witold Filipczyk
f12134c2cf [libdom] unlock cached 2023-10-20 18:04:48 +02:00
Witold Filipczyk
9563fef842 [document] check also doc_view->vs 2023-10-20 13:44:41 +02:00
Witold Filipczyk
9504926c6b [frames] Do not free doc_view, when toggle html -> plain
I know it is not correct, but at least does not crash.
2023-10-15 16:06:53 +02:00
Witold Filipczyk
235d998a6a [ecmascript] scroll again
scroll3.html works if started as the first page.
2023-10-05 16:42:53 +02:00
Witold Filipczyk
8596d604cc [dom] rewrite cache 2023-09-29 18:51:58 +02:00
Witold Filipczyk
3b233ba711 [libcss] this assertion fails 2023-09-29 17:15:12 +02:00
Witold Filipczyk
7fc8c2088f [document] format_cache implemented as std::list
Slower, but works for my testcase.
2023-09-28 19:44:09 +02:00
Witold Filipczyk
6487a287cf [document] Slightly better handling of string 2023-09-28 12:04:57 +02:00
Witold Filipczyk
98e72e99f3 [document] text as struct string 2023-09-28 11:54:46 +02:00
Witold Filipczyk
e80a2f7014 Merge branch 'master' into router 2023-09-28 10:40:45 +02:00
hedy
7266ac4cbd
[gemini] Use paragraph tags on gemtext empty lines
This patch makes paragraphs separated by an empty new line appear after
an empty new line when rendered in elinks.

Previously, for a gemtext source that looks like this:

    First para
    Second line

    Second para

It renders like this:

    First para
    Second line
    Second para

After this patch, they now render like this:

    First para
    Second line

    Second para

Unfortunately this also adds a </p> to the start of the HTML, as well as
a <p> at the end, both redundant; but since the HTML is parsed and
rendered later on, it does not seem to alter how the document would
look.

    </p><p> First para <br> Second line </p><p> Second para </p><p>

I could possibly add a `first_paragraph` variable and a `i !=
buffer->length` check to remove the first </p> and last <p> in the HTML,
making the HTML source "prettier". But I don't believe that would be too
beneficial, considering the performance tradeoff in executing these two
extra checks for each empty new line encountered.

For testing please see: gemini://hedy.tilde.cafe/tmp/paragraphs.gmi
2023-09-28 15:48:59 +08:00
Witold Filipczyk
5175ecd2b7 [libcss] gray75 as default color for text 2023-09-27 10:47:04 +02:00
Witold Filipczyk
a645856fac [libcss] color must be set
Otherwise valgrind shows uninitialized value.
2023-09-26 19:44:34 +02:00
Witold Filipczyk
5e5d7f702a [options] Moved was_xml_parsed below framename
Also call display_timer. For framesets
2023-09-26 16:58:13 +02:00
Witold Filipczyk
15da44d9ea [libdom] reparse document, when it was modified by js 2023-09-24 17:56:58 +02:00
Witold Filipczyk
78543c55ee [table] skip_script 2023-09-24 17:56:06 +02:00
Witold Filipczyk
773ac97e1b [libdom] For parsed document separate function: dump_xhtml 2023-09-23 19:28:28 +02:00
Witold Filipczyk
b3e77ef53e [js] document is already parsed. No need to check 2023-09-23 18:58:21 +02:00
Witold Filipczyk
f461c86ce6 [document] Added body_onkeypress
It is silly, but I want some scripts to work.
2023-09-22 16:37:53 +02:00
Witold Filipczyk
447aa41dc9 [js] placeholder for onkeypress 2023-09-21 09:30:50 +02:00
Witold Filipczyk
5dc2187450 [libdom] Do not rewrite < and > in scripts 2023-09-20 18:46:38 +02:00
Witold Filipczyk
79bfb0bc4a [br] Shorter code 2023-09-14 17:57:56 +02:00