1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-19 01:36:33 -04:00
Commit Graph

158 Commits

Author SHA1 Message Date
Witold Filipczyk
52d6f37c8e Explicit cast to (const char *) for strchr function (C++) 2016-04-20 19:43:37 +02:00
Witold Filipczyk
67673f5fe5 new -> new_ for C++ compatibility 2016-04-20 18:42:22 +02:00
Witold Filipczyk
f4981bb553 class -> class_ for C++ compatibility 2016-04-20 18:18:27 +02:00
Witold Filipczyk
c84dfd7e18 mem_free_if where aplicable. Initialised memory in encoding/* 2015-05-10 17:27:55 +02:00
Witold Filipczyk
ca4d770c0b Revert "Apply styles of html element for body element."
This reverts commit 5f9b54f594.
2015-05-09 22:11:13 +02:00
Fabienne Ducroquet
ad7ff0386d Changes in the handling of the format flags for list elements
* Rename P_STAR as P_DISC and P_PLUS as P_SQUARE.

* Delete P_NONE because it was used only as the default flag in init_html_parser
  and a list with P_NONE then got bullets, so instead use P_DISC by default (as
  per the CSS specification), and P_NO_BULLET for lists with no bullets.

* Use as bullets the characters:
  - U+25E6 WHITE BULLET for the circle style;
  - U+25AA BLACK SMALL SQUARE (alias square bullet) for the square style;
  - U+2022 BULLET for the disc style (default).

Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
2013-09-07 10:51:54 +02:00
witekfl
aead2de59a Do not treat <li> specially and handle </li>. See test/ul_a_li.html. 2012-06-12 14:31:55 +02:00
witekfl
5f9b54f594 Apply styles of html element for body element.
See test/css/css_body.html and test/css/css_html.html
2012-05-22 15:22:48 +02:00
Miciah Dashiel Butler Masters
0189b6bfc9 Add support & test for the CSS list-style property
Recognise the list-style property and apply it by setting the
appropriate flag on the element's parattr based on the property's value.

Add test/list-style.html with an example of each possible list-style
value (many are unsupported by the HTML engine).
2011-11-14 04:34:50 +00:00
Kalle Olavi Niemitalo
715571a5d6 HTML bug 1114: Don't doubly decode entities in attributes
The HTML parser decoded SGML entity references and numeric character
references in the following attributes, and then the renderer did the
same again:

link/@title
link/@hreflang
link/@type
link/@media
img/@alt
area/@alt
input[@type="image"]/@alt
input[@type="image"]/@name
input[@type="button"]/@value

The result was that e.g. title="&amp;#65;" displayed as "A"
even though it was supposed to display as "&#65;".

Fix by making the HTML parser tell the renderer that the entities have
already been decoded.
2011-05-01 22:54:45 +03:00
Witold Filipczyk
cbf70d5304 Refactoring: use struct string instead of unsigned char.
It probably doesn't make sense, but there is one warning less on OpenBSD.
2010-09-19 13:56:54 +02:00
Witold Filipczyk
d112adc8f3 include libgen.h for basename 2010-09-19 13:01:42 +02:00
Witold Filipczyk
79340fa4ac Better looking symbols for LI elements. 2010-08-11 21:22:21 +02:00
Nils Dagsson Moskopp
2f0d954add Rudimentary support for HTML5 media elements
Make use of the HTML5 media elements, <video> and <audio> by adding
links to the media.
2010-08-07 20:44:44 +00:00
Witold Filipczyk
d91668b0c5 Pass the codepage (cp) instead of options to the scan_http_equiv. 2009-01-27 09:23:56 +01:00
Kalle Olavi Niemitalo
0ec4f380fa Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	AUTHORS
2008-11-10 00:07:20 +02:00
Peter Collingbourne
658b9cc70f Fixed bug relating to newlines in hidden input fields
This patch fixes an issue whereby a newline character appearing within
a hidden input field is incorrectly reinterpreted as a space character.
The patch handles almost all cases, and includes a test case.
15/18 tests pass, but the remainder currently fail due to the fact
that ELinks does not currently support textarea scripting.
2008-11-09 23:28:46 +02:00
Kalle Olavi Niemitalo
5c2fada371 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/session/download.c
2008-11-01 22:39:17 +02:00
M. Vefa Bicakci
20a7a6c460 Patch 3: Further fixes including strcasestr and convert_to_lowercase 2008-11-01 22:32:43 +02:00
M. Vefa Bicakci
96b3093519 Patch 2: Modifications to the remaining parts of ELinks
[Forward ported to 0.12 from bug 1004 attachment 499.  --KON]
2008-11-01 22:20:25 +02:00
M. Vefa Bicakci
86085de07e Patch 1: Finalize modifications to the HTML parser
[Forward ported to 0.12 from bug 1004 attachment 498.  --KON]
2008-10-26 18:00:19 +02:00
M. Vefa Bicakci
85c26ddc45 Patch 0: Partial modification of the HTML parser and modification of the FastFind subsystem
[Forward ported to 0.12 from bug 1004 attachment 500.  --KON]
2008-10-26 16:13:38 +02:00
Miciah Dashiel Butler Masters
c21a3592c9 Build fix: Wrap supports_html_media_attr with #ifdef CONFIG_CSS/#endif 2008-06-18 08:48:18 +00:00
Miciah Dashiel Butler Masters
9af30f13b9 Document start_element and end_element 2008-06-09 13:58:41 +00:00
Miciah Dashiel Butler Masters
3a0286e447 Strings corrections from Malcolm Parsons
Fix the spelling and grammar in various comments, variable names, comment
descriptions, and documentation.
2008-01-27 04:19:23 +00:00
Miciah Dashiel Butler Masters
643a34e6af Strings corrections from Malcolm Parsons
Fix the spelling and grammar in various comments, variable names, comment
descriptions, and documentation.
2008-01-27 04:09:18 +00:00
Kalle Olavi Niemitalo
d2733656b8 Bug 722: Truncate names of HTML media types.
HTML 4.01 section 6.13 says each entry in the list
must be truncated before the first character that
is not in the allowed set.
2008-01-12 10:08:02 +02:00
Kalle Olavi Niemitalo
65b365587e Bug 722: Read document.css.media only if needed. 2008-01-12 09:37:56 +02:00
Kalle Olavi Niemitalo
0c899dcc8a Bug 722: Default to media="all", not media="screen". 2008-01-12 09:35:41 +02:00
Kalle Olavi Niemitalo
60144e9ff6 Bug 722: Filter CSS according to media types.
This patch adds support for:
- option document.css.media
- CSS @import "foo.css" tty;
- CSS @media tty { ... }
- HTML <link rel="stylesheet" media="tty">
- HTML <style media="tty">

This patch is attachments 395 and 396 from bugzilla.elinks.cz, which
are based on attachment 388 from bugzilla.elinks.cz.  This new
version of the patch fixes conflicts with recent 0.13.GIT changes,
marks Doxygen commands with at-signs rather than backslashes, and
adds a few comments.
2007-12-22 03:18:06 +00:00
Laurent MONIN
11dea66ff1 struct table bordercolor,bgcolor -> color.(border|background) 2007-10-12 17:10:30 +02:00
Laurent MONIN
367767c500 struct par_attrib bgcolor -> color.background 2007-10-12 17:04:44 +02:00
Laurent MONIN
bc498c00da struct text_style_color fg,bg -> foreground, background 2007-10-12 16:41:06 +02:00
Laurent MONIN
944a8e7bd9 style.(fg|bg) -> style.color.(fg|bg)
Introduce INIT_TEXT_STYLE() macro to initialize struct text_style.
2007-10-10 14:59:15 +02:00
Laurent MONIN
ca6424595b format.(clink|vlink|...) -> format.color.(clink|vlink|...)
It makes more obvious these fields are colors.
2007-10-10 14:37:10 +02:00
Miciah Dashiel Butler Masters
f2f478eb2f Let CSS selectors select non-pairable elements
This necessitates that non-pairable elements be briefly pushed on the stack, so that get_css_selector_for_element sees them, and then popped.

It would be possible to push them only when CONFIG_CSS is defined, as they are otherwise not needed (as evidenced by the fact that we've gone so long without bothering to push them).  However, the performance hit should be small, the necessary #ifdef/#endif wrappers would be pretty ugly, and ideally, the CSS code will someday be in such a state that it can be considered an integral feature.
2007-10-09 14:14:45 +00:00
Laurent MONIN
05fc8f5169 Fix compilation with --disable-css.
Compilation failed due to missing DEBUG_CSS test.
This was introduced in commit 98260f7970
2007-09-24 15:32:42 +02:00
Laurent MONIN
27057926b9 Fix compilation with --disable-css.
Compilation failed due to missing DEBUG_CSS test.
This was introduced in commit 98260f7970
2007-09-21 11:05:40 +02:00
Laurent MONIN
f0e66866f5 Trim trailing whitespaces. 2007-09-14 15:12:32 +02:00
Petr Baudis
37b20d998c document/html: Move enum html_special_type from parser.h to renderer.h
...since it is renderer interface.
2007-09-14 15:03:14 +02:00
Laurent MONIN
09cf904814 Backport Pasky's changes concerning text_style-related stuff.
It partially includes changes made in following commits:

document/html: struct text_attrib_style -> struct text_style
commit    e133941206

document: struct format_attr -> struct text_style_format
commit    070d335796

document: Unify text style -> screen attribute handling
commit    b66d2bec67

document: Move text_style-related stuff to dedicated format.*
commit    db9431465f
2007-09-14 14:59:37 +02:00
Miciah Dashiel Butler Masters
0e0bacf0d3 Merge branch 'master' of ssh://pasky.or.cz/srv/git/elinks
Conflicts:

	src/document/options.c
2007-08-30 21:13:43 +00:00
Petr Baudis
e5539a9937 document/html: Move enum html_special_type from parser.h to renderer.h
...since it is renderer interface.
2007-08-28 22:19:33 +02:00
Petr Baudis
55495ab655 document: Turn options' default_fg, default_bg to default_style
...as struct text_style. This way it might be possible later to
add other default formatting attributes by CSS and it allows
quite a code simplification in the DOM renderer.
2007-08-28 21:16:44 +02:00
Miciah Dashiel Butler Masters
ea372bd0cd get_opt_*: Add ses parameter
Add a session parameter to get_opt_ and its wrappers in preparation for session-specific and domain-specific options.
2007-08-28 17:24:59 +00:00
Kalle Olavi Niemitalo
8097929290 Merge with #elinks-0.12 2007-07-16 00:18:17 +03:00
Kalle Olavi Niemitalo
98260f7970 CSS bug 766: Parse the id and class attributes in advance.
time elinks -no-connect -no-home 'http://rss.slashdot.org/Slashdot/slashdot/to?m=5878'
Wait until finished loading, then press q and Enter.

before	19.96user 0.16system 0:25.97elapsed 77%CPU (0avgtext+0avgdata 0maxresident)k
	0inputs+0outputs (0major+3630minor)pagefaults 0swaps
after	6.46user 0.12system 0:12.66elapsed 52%CPU (0avgtext+0avgdata 0maxresident)k
	0inputs+0outputs (0major+3630minor)pagefaults 0swaps
before	18.02user 0.19system 0:23.86elapsed 76%CPU (0avgtext+0avgdata 0maxresident)k
	0inputs+0outputs (0major+3572minor)pagefaults 0swaps
after	5.73user 0.15system 0:10.02elapsed 58%CPU (0avgtext+0avgdata 0maxresident)k
	0inputs+0outputs (0major+3628minor)pagefaults 0swaps
before	19.80user 0.15system 0:25.14elapsed 79%CPU (0avgtext+0avgdata 0maxresident)k
	0inputs+0outputs (0major+3461minor)pagefaults 0swaps
after	6.28user 0.13system 0:11.91elapsed 53%CPU (0avgtext+0avgdata 0maxresident)k
	0inputs+0outputs (0major+3626minor)pagefaults 0swaps
2007-07-15 22:19:30 +03:00
Kalle Olavi Niemitalo
eccc8c23f0 Merge with http://elinks.cz/elinks.git#elinks-0.12 2007-07-09 16:03:06 +03:00
Kalle Olavi Niemitalo
f8f99cc04e put_link_line: Add a comment related to bug 213. 2007-05-13 12:11:17 +03:00
Kalle Olavi Niemitalo
68ff5a8d61 Bug 816, html_textarea: Expand entity references.
Because the renderer no longer does that.
The comment "We don't cope well with entities here" may now be
obsolete but I'm not sure about that so I'm leaving it in.
2007-04-30 02:10:25 +03:00