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

1013 Commits

Author SHA1 Message Date
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
Witold Filipczyk
5fbfacbab6 [xhtml] Special case for BR. Refs #266
Rewrite is as <BR/> instead of <BR></BR>.
2023-09-14 17:40:27 +02:00
Witold Filipczyk
c603fe4058 [libdom] convert back < to &lt; and > to &gt; Refs #266 2023-09-13 21:38:40 +02:00
Witold Filipczyk
e0a125f112 [gmi] Add a new line after the first line of "preformatted" text. Refs #265 2023-09-12 10:23:26 +02:00
Witold Filipczyk
188f63941c [spidermonkey] element.focus() 2023-09-11 15:48:18 +02:00
Witold Filipczyk
e2e7b7332e [libdom] Added map (node -> element_offset) 2023-09-11 14:59:05 +02:00
Witold Filipczyk
207dc70c87 [libcss] Set status = 0 for color. 2023-08-26 09:10:03 +02:00
Witold Filipczyk
abf035f21f [libcss] Do not set black as default color 2023-08-26 09:04:44 +02:00
Witold Filipczyk
80a33fd3ea [css] line-through 2023-08-25 20:53:26 +02:00
Witold Filipczyk
c9fd41588f [terminal] Strikethrough for <STRIKE> element 2023-08-25 20:10:54 +02:00
Witold Filipczyk
4ef70a1cfa [libdom] scan_http_equiv in libdom renderer. Refs #249 2023-07-27 13:30:42 +02:00
Witold Filipczyk
450eda0283 [html] Check encoding line ( <?xml version="1.0" encoding="utf-8"?> ) 2023-07-27 11:41:43 +02:00
Witold Filipczyk
90d4f17031 [head] addcrlf 2023-07-27 11:20:53 +02:00
Witold Filipczyk
83a296234a [terminal] Added terminfo for 24 bit color
To test: Build with terminfo support and run elinks for example as:
TERM=xterm-direct elinks --terminfo 1
2023-07-19 19:00:26 +02:00
Witold Filipczyk
cbc29daab2 [html] Decrease number of line breaks for DL, OL and UL. Refs #248 2023-07-18 19:44:15 +02:00
Witold Filipczyk
d783cf4add [string] string_replace -> el_string_replace 2023-07-01 19:40:24 +02:00
Witold Filipczyk
3ff58b17e4 [gemini] Missing LIs. Refs #242 2023-06-27 16:06:58 +02:00
Witold Filipczyk
f85f899a7f [plain] Compilation fix. Refs #239 2023-06-20 13:58:14 +02:00
Witold Filipczyk
a67188413c [lists] LIST_HEAD -> LIST_HEAD_EL to not clash with libevent's LIST_HEAD. Also added curl implementation of ftpes and sftp
Implementation of ftpes and sftp is based on curl's hiperfifo example. It requires libevent.
ftpes only encrypts control channel. There were problems when both control and data were encrypted. It stucked on SIZE.
Only successful connections work, errors are not handled properly.
2023-06-19 18:43:53 +02:00
Witold Filipczyk
de285144f0 [iframes] Still not functional
There are bugs.
For example:
- frames borders are drawn in wrong place
- iframes are not "relative" to the document, they are drawn in the same position of the screen
  even when scrolling.
- some elements of screen disappear when going back
- crashes
2023-06-10 17:57:28 +02:00