Kalle Olavi Niemitalo
1c5db85b1a
Bug 821: Document the charsets of buffers for BFU and form input fields.
2006-10-25 19:46:01 +03:00
Witold Filipczyk
2fe0623298
Moved the setTimeout timer to the struct document.
2006-10-24 16:47:41 +02:00
Miciah Dashiel Butler Masters
3041ef5ff1
Use foreachbacksafe in shrink_format_cache
...
I hope that it isn't too confusing to re-use the local variable next
with foreachbacksafe.
2006-10-20 23:10:35 +00:00
Witold Filipczyk
461787013b
Revert commit 7cb91c3213
. Doble glyphs should
...
be displayed correctly.
2006-10-01 16:08:52 +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
Kalle Olavi Niemitalo
e8462980e5
Change "utf_8" to "utf8" in most identifiers.
...
Suggested by Miciah on #elinks.
What was renamed:
add_utf_8 => add_utf8
cp2utf_8 => cp2utf8
encode_utf_8 => encode_utf8
get_translation_table_to_utf_8 => get_translation_table_to_utf8
goto invalid_utf_8_start_byte => goto invalid_utf8_start_byte
goto utf_8 => goto utf8
goto utf_8_select => goto utf8_select
terminal_interlink.utf_8 => terminal_interlink.utf8
utf_8_to_unicode => utf8_to_unicode
What was not renamed:
terminal._template_.utf_8_io option, TERM_OPT_UTF_8_IO
Compatibility with existing elinks.conf files would require an alias.
--enable-utf-8
Because the name of the charset is UTF-8, --enable-utf-8 looks better
than --enable-utf8.
CONFIG_UTF_8
Will be renamed in a later commit.
Unicode/utf_8.cp, table_utf_8, aliases_utf_8
Will be renamed in a later commit.
2006-09-17 16:06:22 +03:00
Kalle Olavi Niemitalo
8850d85998
ECMAScript: If accessKey is a surrogate, throw an error when reading it.
...
Surrogates are now treated the same way as out-of-range characters
like U+110000; if a link has such an access key, then the ECMAScript
accessKey property cannot be read. It seems currently impossible to
set such an access key though, because accesskey_string_to_unicode()
doesn't support multibyte characters yet.
2006-08-27 11:45:11 +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
Miciah Dashiel Butler Masters
948d010088
Drop obsolete, commented-out code in put_chars
...
Drop some code for superscript and subscript handling that was deleted
in commit 65016cdca4
, then added back
with the UTF-8 merge in commit 2a6125e3d0
,
and then disabled in commit 1b653b9765
.
2006-08-03 06:12:30 +00:00
Witold Filipczyk
7af9cf5ebc
The missing line:
...
cells += added_chars - 1;
This is a fix for bug 778.
goto next instead of continue. Not heavilly tested
2006-07-28 22:33:16 +02:00
Laurent MONIN
1136aefb71
Trim trailing whitespaces.
2006-07-27 09:51:10 +02:00
Witold Filipczyk
8b4daed148
Commented out the code causing infinite loop when viewing
...
test/backspaces.txt.
2006-07-23 16:35:53 +02:00
Witold Filipczyk
58b158871c
Decode the second char of double glyph. Still problems with a splitted
...
char
2006-07-23 13:14:38 +02:00
Witold Filipczyk
7cb91c3213
Decode the second char from double glyph. When that char is splitted
...
by convert_string and that char is the beginning of double glyph too
we have a problem. This is a rare case. Must we care about it?
2006-07-23 13:04:39 +02:00
Witold Filipczyk
a3e0caca57
Return number of really processed chars. In that case 0
2006-07-23 12:27:20 +02:00
Witold Filipczyk
f5351fc0dc
Remember fragment of the splitted char and decode it next time. Idea by Jonas.
...
Not tested at all. UCS_NO_CHAR is returned only for <hr> or for UTF-8 char
which is splitted by convert_string
2006-07-21 22:10:18 +02:00
Witold Filipczyk
7c7a0bb890
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2006-07-21 19:00:49 +02:00
Witold Filipczyk
1b653b9765
Compilation fix
2006-07-21 13:21:21 +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
Miciah Dashiel Butler Masters
ecbc2271d1
examine_element: drop html_stack parameter
...
The stack is available via the html_context, which is passed to
examine_element as of commit f42c86be70744e62af92282e4d64fc3066f6ba04.
2006-07-21 11:10:54 +00:00
Witold Filipczyk
8a1ef2ada9
That was missing, at least I think so
2006-07-20 02:05:56 +02:00
Witold Filipczyk
b388b4afea
Avoided rerendering
2006-07-20 02:03:25 +02:00
Witold Filipczyk
70a46e12aa
Fixed the issue when assummed codepage is not UTF-8
2006-07-19 19:11:03 +02:00
Witold Filipczyk
44c74ac389
Refactor is_cp_special to is_cp_utf8
2006-07-18 17:51:03 +02:00
Witold Filipczyk
1adbce8429
unicode_val_T instead of unsigned char in struct search
2006-07-17 22:14:45 +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
Jonas Fonseca
ef051261b3
Improve upon pasky's intro to the HTML engine
2006-07-13 21:12:24 +02:00
Petr Baudis
314dbc2dab
Add short intro and talk about box model
2006-07-13 03:46:16 +02:00
Petr Baudis
1ae18267f8
Kill src/document/html/TODO
...
In the first paragraph it lists what's already done. In the second it
lists the obvious. And the third is obsolete.
2006-07-13 02:51:31 +02:00
Laurent MONIN
36a277540c
Let be more tolerant with buggy meta refresh. It should fix bug 767.
2006-07-10 21:16:14 +02:00
Miciah Dashiel Butler Masters
bfc8b17d64
Fix a bug in the plaintext renderer when handling tabs
...
Commit 3ce3f01f30
introduced a bug whereby
if a tab set the current position in the line to or greater than the number
of bytes remaining in the source, the line was split after the tab.
2006-06-16 21:13:33 +00:00
Laurent MONIN
ef37161070
distribute_rows_or_cols(): merge two loops.
2006-06-06 23:10:29 +02:00
Laurent MONIN
824b4374fa
distribute_rows_or_cols(): simplify code.
2006-06-06 23:09:19 +02:00
Jonas Fonseca
9f3456c872
Add support for parsing space separated CSS class attribute values
...
Sequentially apply style for stuff like class="class1 class2".
2006-06-06 15:21:56 +02:00
Kalle Olavi Niemitalo
819b6fab80
parse_header_param stores the string via a pointer parameter.
...
Its return value is now an enum that lets callers know whether an
error occurred. However, this commit changes the callers only
minimally, so they do not yet check the return value.
2006-06-05 20:22:53 +00:00
Witold Filipczyk
966d965c11
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2006-06-02 19:53:36 +02:00
Witold Filipczyk
53890a9a95
The label ng moved one line down
2006-06-02 19:51:32 +02:00
Laurent MONIN
8cba76541b
Code simplification and tidy up.
2006-06-02 18:54:03 +02:00
Miciah Dashiel Butler Masters
6712baaee0
Comment html_context->position
2006-06-02 06:13:31 +00:00
Miciah Dashiel Butler Masters
b1a7f3f19e
Add a comment to html_context->put_chars_f explaining not to use it
2006-06-02 05:53:49 +00: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
Laurent MONIN
1d3656a317
Pass a pointer to a hash pointer to free_hash() to ensure hash pointer
...
is NULL on return.
2006-05-31 19:33:36 +02:00
Laurent MONIN
54099f5286
Do not export init_hash(),strhash() and hash_size() anymore, use a
...
wrapper named init_hash8() instead.
2006-05-31 19:17:01 +02:00
Laurent MONIN
4c5d4bcf34
Revert d19dcaa3e7
patch that breaks table
...
rendering.
2006-05-31 18:50:15 +02:00
Miciah Dashiel Butler Masters
c91c763d49
Eliminate link_bg
...
Instead of saving the old link colours when selecting a link and using that
to restore them when unselecting it, just copy the data from the document.
- Eliminate struct link_bg and the .link_bg and .link_bg_n members
of struct document_view.
- Eliminate the free_link routine and don't call it from draw_doc,
clear_link, or detach_formatted.
- Add a .old_current_link member to struct view_state and initialise it in
init_vs.
- Don't save link_bg in draw_current_link.
- Rewrite clear_link to use the document data instead of link_bg.
- Modify init_link_drawing not to allocate ling_bg and to return a pointer
to a static variable for the template character.
2006-05-28 01:08:46 +00:00
Miciah Dashiel Butler Masters
36e7044948
DOM: Factor get_doctype out of render_dom_document.
2006-05-28 00:39:58 +00:00
Miciah Dashiel Butler Masters
f925adbfc9
DOM: Factor done_dom_renderer out of render_dom_document.
2006-05-28 00:39:54 +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
ca3fc4f7ac
Mark line_break and put_chars static
2006-05-28 00:10:14 +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
Witold Filipczyk
9fcd5ea64e
Weird. The backslash removed
2006-05-26 20:03:48 +02:00
Witold Filipczyk
d19dcaa3e7
IMHO line_break should fill lines with spaces. This is done for <pre>.
...
See glib documentation in 256 colors for the difference.
Some lines are 1 space longer. I have no idea how to level them.
2006-05-26 19:59:20 +02:00
Witold Filipczyk
c4c97a07bd
plain renderer: return when data is invalid in some cases
2006-05-10 18:18:22 +02:00
Witold Filipczyk
82d38ff2be
plain renderer: rewritten change_colors, handling 256 color ESC sequences.
...
TODO: mono mode
2006-05-10 17:46:31 +02:00
Witold Filipczyk
c677bc010d
plain renderer: stdio.h is not required
2006-05-08 10:20:37 +02:00
Witold Filipczyk
88c146a395
plain_renderer: cg-log -c | elinks works. The code needs cleanup
2006-05-07 15:49:08 +02:00
Witold Filipczyk
1feab80c13
plain renderer: used switch instead of if, else if, else
2006-05-07 14:39:27 +02:00
Pavol Babincak
bbd24d7bf4
Corrected computing cell count for html select in UTF-8.
2006-05-07 00:51:25 +02:00
Witold Filipczyk
e56f429c9b
Another workaround related to tcc
2006-05-05 22:18:27 +02:00
Witold Filipczyk
ad160766b8
Added id to the form control. id is used by scripts
2006-05-01 19:22:07 +02:00
Pavol Babincak
7951d7bf22
Added: split line after any double-width character in html renderer.
...
Note: there are ugly bug (feature?) - when there isn't enought room for
whole double-width char two double-chars are displayed. Can be seen on
table with double-width chars reduced as much as possible.
2006-04-09 19:17:16 +02:00
Pavol Babincak
dd05c89d49
Replaced utf8_len with cells.
2006-04-09 19:07:43 +02:00
Pavol Babincak
161ccf9eae
Use unicode_val_T instead of uint16_t for unicode data + cell count fix.
2006-04-09 17:04:47 +02:00
Witold Filipczyk
18280cafbb
Code generated by tcc was broken for those boolean expressions
2006-04-06 22:07:45 +02:00
Pavol Babincak
8b9d06c977
Convert link titles to correct codepage before displaying it on screen.
...
Don't replace UTF-8 bytes with '*'. Probably there is need to do better
check what will be displayed.
Also get_current_link_title is no longer pretty and trivial. (o:
2006-03-13 01:54:34 +01:00
witekfl
3f01c3d2fe
Display optionally tabs bar at top like other browser do.
...
TODO: input_line_layouter, ACT_MAIN_TAB_MENU
2006-03-04 10:24:37 +01:00
Timo Lindfors
212b4a2893
Fix bug #741 : "html comments shouldn't be evaluted inside STYLE elements"
2006-02-22 19:45:14 -05:00
Pavol Babincak
f4a430e480
Support for double-width glyphs in DOM renderer
...
Removed duplicate code for UTF-8 in DOM renderer. Modified DOM renderer
to correctly displaying multi-width glyphs.
2006-02-18 20:28:01 +01:00
Pavol Babincak
fc5f2389ed
Support for double-width glyphs in plain renderer
...
Removed duplicate code for UTF-8 in plain renderer. Modified plain renderer
to correctly displaying multi-width glyphs.
2006-02-18 20:28:00 +01:00
Pavol Babincak
f9d67aeb73
Added configure option --enable-utf-8
...
For enabling better UTF-8 support by Witek and Scrool.
2006-02-18 20:28:00 +01:00
Witold Filipczyk
44a1aa9c87
Witekfl's UTF-8 patch v5.
2006-02-18 20:27:46 +01: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
Eric Wald
3ce3f01f30
Add support for forcing wrapping at the screen boundary
...
This patch modifies ELinks wrapping behavior slightly.
* The wrap command now toggles line wrapping in HTML mode, as well as
text mode. Note that when the HTML view of a page is wrapped, its
source view is unwrapped, and vice versa.
* Tabs in text-mode lines are now handled correctly.
* Wrapping a line that reaches exactly to the edge of the screen will
no longer produce a blank line in text mode.
* Text within extra-wide table cells is now wrapped to less than the
screen width, to eliminate sideways scrolling.
The last point is only enabled by setting TABLE_LINE_PADDING to a
non-negative number, in the src/setup.h header file, because it is a
significant change of behavior from previous versions.
2006-02-15 15:50:29 +01: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
Miciah Dashiel Butler Masters
b8ee886a60
sort_links: fix memory leak
...
Free document->lines1 and document->lines2 if they are already set. This
fixes a memory leak from commit 52d3a6411d
.
2006-02-03 20:12:24 +00:00
Jonas Fonseca
92a9cafb6e
DOM: Replace various DOM status/error/exception codes with dom_code enum
...
Replaces sgml_parser_code, dom_stack_code, and dom_exception_code and
generally tries to simplify things and remove redundant codes.
2006-01-31 22:01:35 +01:00
Jonas Fonseca
ca5a5f230a
Make render_dom_node_source static
2006-01-29 12:11:35 +01:00
Jonas Fonseca
2e3e18595f
Normalize all links added by the plain renderer
...
Fixes problems with host or protocol parts not being lowercased. This
triggers an assertion failure when trying to download such links. Reported
by lindi-.
2006-01-29 09:04:52 +01:00
52d3a6411d
Sort links when necessary
2006-01-28 14:13:41 +01:00
dacb694e33
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
2006-01-28 12:11:29 +01: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
Laurent MONIN
5114c9d110
Trim trailing whitespaces.
2006-01-28 01:59:22 +01:00
Laurent MONIN
bae3b58146
Fix a potential memleak.
2006-01-28 01:58:00 +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
bea1a0c559
Handle <base href=""> for HTML source rendering
...
Requested by witekfl.
2006-01-25 23:16:30 +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
Miciah Dashiel Butler Masters
3b5724edd5
look_for_link: simplify string
...
Use stracpy(empty_string_or_(target_base)) instead of
null_or_stracpy(target_base) and then stracpy("") if that returns NULL.
2006-01-18 20:38:33 +00:00
Jonas Fonseca
1d52d67e50
Add get_dom_node_child() which searches for a node with given type
2006-01-16 07:11:02 +01:00
Jonas Fonseca
6c85c0f009
Add DOM configuration inspired module
...
It add support for normalizing a DOM document in various ways, such as
removing comments, converting CDATA section nodes to text nodes, cleanup
whitespace, etc.
Use it in the RSS renderer to sanitize the text to be rendered.
2006-01-16 05:12:34 +01:00
Jonas Fonseca
eecc22751d
Use dom_stack_code enum for dom_stack_callback_T
2006-01-16 00:55:58 +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
0950996dd8
Change parse_sgml() to take buf+bufsize instead of DOM string
2006-01-14 11:32:11 +01:00
Laurent MONIN
5685221512
Trim trailing whitespaces.
2006-01-13 00:11:39 +01:00
Jonas Fonseca
63d754f85b
Convert the RSS title string
2006-01-09 19:14:28 +01:00
Jonas Fonseca
4dd9db446b
init_html_parser_state(): Drop local html_element variable
2006-01-09 02:56:44 +01:00
Jonas Fonseca
20bd19e4c5
The RSS document title to channel->title
2006-01-09 02:18:57 +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
Jonas Fonseca
bc55cd55cb
Add the basic support for rendering RSS documents
...
It is very simple for now, so it only displays headlines and doesn't
support a whole lot of RSS flavours.
2006-01-08 03:44:23 +01:00
Laurent MONIN
31c30864e0
Trim trailing whitespaces.
2006-01-04 18:08:48 +01:00
Jonas Fonseca
359a29bb40
Make it possible to use more CSS properties with the source highlighting
2006-01-04 00:50:40 +01:00
Jonas Fonseca
af72dd8435
Make parse_sgml() return the sgml_parser_code enum
...
It is mostly just ignored for now. The SGML parser test tool will however
return parser code.
2006-01-02 17:40:42 +01:00
Jonas Fonseca
f608e2a0ae
Add the concept of completeness to strings being parsed and scanned
...
... not used yet.
2006-01-02 02:08:20 +01:00
Laurent MONIN
54997c506f
Drop trailing whitespaces.
2006-01-02 00:15:20 +01:00
Jonas Fonseca
021af4e87c
Although aware ELinks doesn't need another sgml/doctype here is DocBook
...
It was created a long time ago so (I think) it deserves to survive. It
maps .sgml files to applicatino/docbook+xml and uses the highlighter.
2006-01-01 23:22:10 +01:00
Jonas Fonseca
7d64cb893c
Improve (or rather fix) how document types are matched in the DOM renderer
2006-01-01 23:14:16 +01:00
Jonas Fonseca
c656a96a73
Use the simpler strcasecmp() instead of strcaselcmp()
2006-01-01 23:05:34 +01:00
Jonas Fonseca
479039fb9e
Also highlight HTML if the MIME type is application/xhtml+xml
2006-01-01 23:02:41 +01:00
Jonas Fonseca
9a0bf83756
Add basic stuff for XBEL parsing/highlighting using the DOM engine
2005-12-30 22:19:32 +01:00
Jonas Fonseca
ff75d5086f
Remove the DOM track tracer from the renderer
2005-12-30 13:08:42 +01:00
Jonas Fonseca
6e163b186c
Make the dom_scanner_token store it's string in a dom_string struct
2005-12-28 16:23:36 +01:00
Jonas Fonseca
d1e275be52
Make parse_sgml() take buffer as dom_string struct
2005-12-28 15:21:45 +01:00
Jonas Fonseca
11e168aba4
Make init_sgml_parser() take URI as dom_string struct
2005-12-28 15:19:10 +01:00
Jonas Fonseca
a21f192199
Remove some left over .vimrc files
2005-12-28 14:14:12 +01:00
Jonas Fonseca
71533eef9a
Elute all DOM-related code and put it in src/dom
2005-12-28 14:05:14 +01:00
Jonas Fonseca
217f905d88
call_dom_stack_callbacks(): Only acquire the state data if needed
2005-12-27 15:22:06 +01:00
Jonas Fonseca
a31eaaabdd
Rename parse_sgml_document() -> parse_sgml_plain()
...
It really can be anything. I visited the elusive HTML parser to find the
new ending. ;)
2005-12-27 06:22:53 +01:00
Jonas Fonseca
9e7dfb1ddf
Make walk_dom_nodes() use a stack context; reduces the DOM stack state size
2005-12-27 06:04:01 +01:00
Jonas Fonseca
a4831fef2d
Make it easier to work with DOM stack contexts outside of the callbacks
...
The problem is to get access to the context when it is not the first one
and it has to happen outside of the context callbacks. This changes the
memory management so that the context adder returns the context. To further
improve the use of contexts add a context destructor which makes it
possible to unregister (temporary) contexts.
2005-12-27 05:59:12 +01:00
Jonas Fonseca
774aa70c6f
Drop (now) unused get_dom_stack_parent() wrapper for get_dom_stack_state()
2005-12-27 04:44:20 +01:00
Jonas Fonseca
af19f811e3
Simplify DOM node popping
...
.. by turning do_pop_dom_node() into pop_dom_node() and let pop_dom_state()
handle it's own logic for reaching the wanted state.
2005-12-27 04:42:28 +01:00
Jonas Fonseca
f371de1638
Restructure the SGML parser file and add comments to the main parts
2005-12-27 03:57:56 +01:00
Jonas Fonseca
f5b32f86d1
Drop some dead code related to past rendering of DOM attribute nodes
2005-12-27 03:55:34 +01:00
Jonas Fonseca
b36229c222
Drop some unneeded #includes
2005-12-27 03:33:49 +01:00
Jonas Fonseca
0e2eefcb82
Add missing HTML_(SCRIPT, ...) definition
2005-12-27 01:58:54 +01:00
Jonas Fonseca
74a0a7b174
Highlight the 'CDATA' part of <![CDATA[ (in a bit hacky way)
2005-12-26 20:51:01 +01:00
Jonas Fonseca
c99b1cc2cc
Render content of CDATA sections with orange2 (in lack of something better)
2005-12-26 19:56:07 +01:00
Jonas Fonseca
e28f3fc592
Drop macros in favour of more informative direct calls to add_sgml_node()
2005-12-26 19:45:58 +01:00
Jonas Fonseca
98d7263c2f
Parse <[CDATA[ sections ]]>
2005-12-26 19:43:32 +01:00
Miciah Dashiel Butler Masters
92c9b86374
In add_document_line, check expanded + line_pos rather than just
...
expanded when checking whether there are enough characters on the line
to decrement expanded by 2. This fixes the problem reported by fonseca
where the linked text was offset from the URI when there were backspaces
earlier on the line.
2005-12-26 11:43:18 +00:00
Miciah Dashiel Butler Masters
e64871f5e2
Drop some dead code in add_document_line: line_pos should never be
...
negative.
2005-12-26 10:31:06 +00:00
Jonas Fonseca
be8c68c5f7
Fix matching of file:// URLs which of course have no host name
2005-12-25 16:22:20 +01:00
Jonas Fonseca
5dd9061a55
Allocate the string of nodes being 'linkified'
...
This makes the string actually NUL terminated at the right place and the
matching will never go beyond the text region of the node. One example is
<!--http://elinks.cz/-- > which didn't work before.
2005-12-25 16:08:00 +01:00