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
Laurent MONIN
975a4251e8
parse_table(): reorder code to optimize even more.
2005-12-06 15:07:49 +01:00
Laurent MONIN
b6c54846ad
parse_table(): reduce code redundancy.
2005-12-06 15:02:45 +01:00
Laurent MONIN
a371f22b22
parse_table(): use intermediate variables to optimize tests.
2005-12-06 14:57:25 +01:00
Laurent MONIN
eb74cdf6f9
html_button(): drop suspect line which has nothing to do with BUTTON
...
html element.
2005-12-05 09:57:54 +01:00
Laurent MONIN
15a7069fea
Move code from html_input() to new html_input_format().
2005-12-04 18:25:23 +01:00
Laurent MONIN
b863b65fbc
html_input(): minor code reordering.
2005-12-04 12:45:42 +01:00
Laurent MONIN
a57c193ad9
html_input(): drop local variable @type, use @fc->type directly.
2005-12-04 12:43:53 +01:00
Laurent MONIN
7a443d0f73
html_input(): re-order type tests a bit.
2005-12-04 12:40:38 +01:00
Laurent MONIN
a5a731a77b
html_input(): increase indentation a bit to drop a goto/label.
2005-12-04 12:38:19 +01:00
Laurent MONIN
1223850567
html_input(): improve the test logic and simplify the code.
2005-12-04 12:35:55 +01:00
Laurent MONIN
e222bb733c
html_button(): improve the logic.
2005-12-04 12:27:22 +01:00
Laurent MONIN
2df9c06c46
Tidy up.
2005-12-04 12:24:39 +01:00
Laurent MONIN
d1f8b8061c
html_form(): prevent useless second test by using else if instead of if.
2005-12-04 12:21:43 +01:00
Miciah Dashiel Butler Masters
fee63d574a
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2005-11-27 19:40:49 +00:00
Miciah Dashiel Butler Masters
d0eeab5b7e
Merge the special handling in start_element for tables into html_table.
2005-11-26 02:38:12 +00:00
Miciah Dashiel Butler Masters
947ddc4160
In html_table, rename parameter a to attr.
2005-11-26 02:15:00 +00:00
Miciah Dashiel Butler Masters
cf2fcaa84f
Shuffle code so that the do_html_select, do_html_select_multiple, and
...
html_select are together.
2005-11-26 01:50:46 +00:00
Miciah Dashiel Butler Masters
a781cf1894
Give do_html_select return type void instead of int.
2005-11-26 01:47:50 +00:00
Miciah Dashiel Butler Masters
321003a09e
Check for the multiple attribute in html_select rather than in
...
do_html_select.
2005-11-26 01:46:01 +00:00
Miciah Dashiel Butler Masters
c2445f09bd
Factor do_html_select_multiple out of html_select.
2005-11-26 01:43:10 +00:00
Miciah Dashiel Butler Masters
a6a67174af
Drop the html_textarea wrapper for do_html_textarea and rename
...
do_html_textarea to html_textarea.
2005-11-26 01:35:26 +00:00
Miciah Dashiel Butler Masters
a27284611c
Don't export do_html_select.
2005-11-26 01:32:10 +00:00
Miciah Dashiel Butler Masters
683c8722d2
Merge do_html_script into html_script.
2005-11-26 01:23:07 +00:00