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
Kalle Olavi Niemitalo
a58345f4e7
html_textarea: Use memmove rather than memcpy.
...
This is an overlapping copy and memcpy is not required to support that.
2007-04-30 01:41:32 +03:00
Kalle Olavi Niemitalo
bafe47508d
Bug 784: Add html_context->doc_cp and parse attributes with it.
...
options->cp is still used for this in seven places where html_context
is not easily available. Those should eventually be corrected too,
but I'm checking this change in already because it's better than what
we had before.
2007-04-30 00:56:39 +03:00
Laurent MONIN
0b98c5051b
Fix trailing whitespaces
2007-04-26 15:02:04 +02:00
Witold Filipczyk
e347122e6d
get_attr_value: do not do trim_chars
...
trim_chars was called only in debug mode and the results of the get_attr_val
for value=" something " in debug mode differ from normal and fastmem mode.
[ From commit c4500039b2
on the witekfl
branch. --KON ]
2007-03-18 13:32:25 +02:00
Kalle Olavi Niemitalo
7645a836fc
Cast the NULL argument of straconcat to unsigned char *.
...
straconcat reads the args with va_arg(ap, const unsigned char *),
and the NULL macro may have the wrong type (e.g. int).
Many places pass string literals of type char * to straconcat. This
is in principle also a violation, but I'm ignoring it for now because
if it becomes a problem with some C implementation, then so will the
use of unsigned char * with printf "%s", which is so widespread in
ELinks that I'm not going to try fixing it now.
2007-03-11 12:59:11 +02:00
Kalle Olavi Niemitalo
a193632187
Make html_context.quote_level unsigned.
...
Continuation of 7e9fc6f33b
.
2006-12-10 14:14:16 +02:00
Jonas Fonseca
9d43babde2
Fix out-of-bound access to the quote_char buffer
...
The quote_level was decremented unconditionally and could become negative
resulting in a negative index after applying "modulus 2". Reproducable
with an HTML file contianing "</q>".
Reported by paakku.
2006-11-26 22:32:02 +01:00
Kalle Olavi Niemitalo
c283b128b6
Bug 387: Treat 
 inside <pre>...</pre> as a newline.
...
Recognize all of 
 
 with any number of leading
zeroes. (Previously only and 
 were supported.) All of
these are case insensitive.
Treat each CR+LF combination ( ) as a single newline.
2006-11-11 20:31:25 +02:00
Kalle Olavi Niemitalo
92cb452a9e
Rename CONFIG_UTF_8 to CONFIG_UTF8.
...
The configure script no longer recognizes "CONFIG_UTF_8=yes" lines
in custom features.conf files. They will have to be changed to
"CONFIG_UTF8=yes". This incompatibility was deemed acceptable
because no released version of ELinks supports CONFIG_UTF_8.
The --enable-utf-8 option was not renamed.
2006-09-17 16:12:47 +03:00
Witold Filipczyk
a5c395cd7a
Workaround for segfaults introduced by previous commit.
...
Why html_context->part->document isn't set ?
2006-08-05 20:17:48 +02:00
Witold Filipczyk
b7409fc5a7
The fix for bug 784. There is a wide area to cleanup and tidy up the code.
2006-08-05 18:32:05 +02:00
Witold Filipczyk
bdc3fcb7e4
I forgot about this one
2006-08-05 18:08:52 +02:00
Witold Filipczyk
049d088e8a
The massive attack: the only property of options used by get_attr_val was
...
cp (codepage). To fix bug 784 html_context->part->document->cp should
be passed to get_attr_val instead of html_context->options->cp.
2006-08-05 18:06:28 +02:00
Witold Filipczyk
2a6125e3d0
Merge with utf8. src/document/plain/renderer.c replaced by utf8 version
2006-07-21 13:12:06 +02:00
Petr Baudis
85c9c54d00
Accept float widths (ceiling them)
...
Especially percentages might be floats instead of integer, see
e.g. http://www.armitunes.com/cgi-bin/icecast/playing.cgi .
2006-07-16 22:22:16 +02:00
Witold Filipczyk
53890a9a95
The label ng moved one line down
2006-06-02 19:51:32 +02:00
Miciah Dashiel Butler Masters
77f5585125
Use put_chrs instead of html_context->put_chars_f in element handlers
...
In html_subscript, html_subscript_close, html_superscript, html_quote, and
html_quote_close, use put_chrs instead of html_context->put_chars_f.
Element handlers should use put_chrs so that it can correctly handle
whitespace and stuff.
2006-06-02 05:51:24 +00:00
Miciah Dashiel Butler Masters
3272290189
Better <q> support
...
Patch by Jonas Koelker, Jonas Fonseca, and me.
2006-05-28 00:37:12 +00:00
Miciah Dashiel Butler Masters
65016cdca4
Fix superscript and subscript support
...
Introduce html_subscript_close callback. Draw opening and closing brackets
and carets for subscript and superscript text directly in the element
handlers rather than performing weirdness in the renderer. This both
improves readability and fixes bug 284, misplaced brackets with subscripts.
2006-05-28 00:10:13 +00:00
Miciah Dashiel Butler Masters
6947902b57
Replace special handling in end_element with callbacks
...
Add close callbacks html_html_close, html_style_close, and
html_xmp_close. end_element now calls the element close callback instead
of performing special handling for certain tags.
2006-05-28 00:10:13 +00:00
Miciah Dashiel Butler Masters
0f2982aa5d
end_element: inconsequential code shuffling
2006-05-28 00:10:12 +00:00
Miciah Dashiel Butler Masters
03fde090cf
struct element_info: add .close callback
...
Rename enum element_type values, shortening ELEMENT_TYPE_ to just ET_
and reformat the elements table to squeeze everything in.
2006-05-28 00:10:12 +00:00
Miciah Dashiel Butler Masters
12b5345b9a
struct element_info: rename .func to .open
2006-05-28 00:10:12 +00:00
Pavol Babincak
bbd24d7bf4
Corrected computing cell count for html select in UTF-8.
2006-05-07 00:51:25 +02:00
Witold Filipczyk
ad160766b8
Added id to the form control. id is used by scripts
2006-05-01 19:22:07 +02:00
Timo Lindfors
212b4a2893
Fix bug #741 : "html comments shouldn't be evaluted inside STYLE elements"
2006-02-22 19:45:14 -05:00
Miciah Dashiel Butler Masters
190259ca22
mem_alloc_align: drop the obj type parameter
...
Instead use the object itself, i.e., replace typeof(obj) with
typeof(**ptr).
2006-02-17 17:32:59 +00:00
Miciah Dashiel Butler Masters
2c087e52e7
Revert unstable 'Eval embedded scripts at once'
...
Revert commit 2f0490cb04
('Eval embedded scripts at once') and follow-up commit
997f61bb32
('Use document_view instead of
view_state. It is safer probably') because the change causes crashes on
numerous pages and just looks wrong.
2006-02-12 15:03:12 +00:00
997f61bb32
Use document_view instead of view_state. It is safer probably
2006-01-28 12:07:00 +01:00
9cc9db4e24
Handling onsubmit
2006-01-28 11:17:22 +01:00
6e4c80a29e
Avoid memleak
2006-01-28 08:37:58 +01:00
b1b66db850
Success. document.write works for me.
2006-01-27 16:54:39 +01:00
9c9fa1d81c
Defined document.write and document.writeln for SEE
2006-01-27 14:55:53 +01:00
8bf45d0ece
Spidermonkey's document.write and document.writeln defined. They work,
...
but rendering doesn't work
2006-01-27 13:29:38 +01:00
2551fe3525
Render html written by document.write. I'm not sure if format_html_part
...
is called right way
2006-01-27 12:41:35 +01:00
62d42380f8
Added ret param for document.write
2006-01-27 12:07:45 +01:00
2f0490cb04
Eval embedded scripts at once
2006-01-27 10:26:58 +01:00
Jonas Fonseca
89a95a5fc5
Rename enum html_element_type to html_element_mortality_type
...
This name is reserved for DOM.
2006-01-25 23:13:10 +01:00
Jonas Fonseca
2748d043f9
Autogenerate .vimrc files and put the master in config/vimrc
...
This changes the init target to be idempotent: most importantly it will now
never overwrite a Makefile if it exists. Additionally 'make init' will
generate the .vimrc files. Yay, no more stupid 'added fairies' commits! ;)
2006-01-15 18:38:58 +01:00
Jonas Fonseca
5339525f1d
Oops, kill_html_stack_top() -> pop_html_element()
2006-01-09 01:40:16 +01:00
Jonas Fonseca
fe10af364d
Introduce pop_html_element(); wraps kill_html_stack_item(..., html_top)
2006-01-09 01:29:40 +01:00
Jonas Fonseca
94fd9303f3
Introduce html_bottom; similar to html_top
2006-01-09 01:24:54 +01:00
Jonas Fonseca
27283098f4
Clearify code a little
2006-01-09 01:24:38 +01:00
Jonas Fonseca
5808b4ae0c
Make html_top have a pointer type; use it to declare format and par_format
2006-01-09 01:22:33 +01:00
Laurent MONIN
54997c506f
Drop trailing whitespaces.
2006-01-02 00:15:20 +01:00
Miciah Dashiel Butler Masters
f9dea85126
Drop a line that should have been dropped with commit
...
3719e75068
, 'Reduce code redundancy.'
2005-12-10 16:24:54 +00:00
Laurent MONIN
20cb9ad9ee
html_option(): optimize code.
2005-12-08 16:33:37 +01:00
Laurent MONIN
8fe86a1a63
Drop trailing spaces.
2005-12-08 16:27:51 +01:00
Laurent MONIN
3719e75068
Reduce code redundancy.
2005-12-08 16:26:37 +01:00
Laurent MONIN
1f7aa841aa
Simplify tests.
2005-12-08 16:25:22 +01:00
Laurent MONIN
d9f0de82f8
Use closing_tag variable in tests.
2005-12-08 16:22:53 +01:00
Laurent MONIN
37ec65247d
Minor code reordering.
2005-12-08 16:20:13 +01:00
Laurent MONIN
279f2bec93
Goto see instead of se.
2005-12-08 16:19:20 +01:00
Laurent MONIN
a499bf5a61
Introduce closing_tag variable.
2005-12-08 16:16:28 +01:00
Laurent MONIN
ae00f391f2
t_name -> name, t_namelen -> namelen.
2005-12-08 16:13:21 +01:00
Laurent MONIN
5f66f98b66
Prevent useless tests when @namelen is 0.
2005-12-08 16:11:19 +01:00
Laurent MONIN
a1284ccd1f
skip_table(): simplify code.
2005-12-07 20:51:09 +01:00
Laurent MONIN
f3838bac5b
parse_table(): cache to_upper() result.
2005-12-07 20:36:07 +01:00
Laurent MONIN
485e16c6c9
parse_table(): optimize code a bit.
2005-12-07 20:32:36 +01:00
Laurent MONIN
53cbf3e3df
parse_table(): introduce a local variable @is_header to cache test result.
2005-12-06 15:38:34 +01:00
Laurent MONIN
90d843e8fc
parse_table(): re-order code.
2005-12-06 15:35:52 +01:00
Laurent MONIN
a00dfbecf9
parse_table(): fix missing goto see.
2005-12-06 15:32:02 +01:00
Laurent MONIN
29a80ce4eb
parse_table(): optimize even more using @closing_tag.
2005-12-06 15:19:44 +01:00
Laurent MONIN
b63dd28500
parse_table(): use strlcasecmp() instead of strncasecmp().
2005-12-06 15:17:56 +01:00
Laurent MONIN
3fe59e8c7a
parse_table(): totally drop @t_name and @t_namelen in favor of @name
...
and @namelen.
2005-12-06 15:15:25 +01:00