1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-10-18 06:33:35 -04:00
Commit Graph

160 Commits

Author SHA1 Message Date
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
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
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
52d3a6411d Sort links when necessary 2006-01-28 14:13:41 +01:00
Laurent MONIN
5114c9d110 Trim trailing whitespaces. 2006-01-28 01:59:22 +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
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
20bd19e4c5 The RSS document title to channel->title 2006-01-09 02:18:57 +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
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
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
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
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
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
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
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
Jonas Fonseca
2d020e4879 Extend the URL_REGEX to allow more protocol and stuff like %XX in path part
Thanks to peder for suggestions.
2005-12-25 15:45:47 +01:00
Jonas Fonseca
4fa0937ca5 Make URL inside cdata, comment and text nodes accessible
It depends on existence of <regex.h> system header and that can be enabled
via document.plain.display_links. The URL regex was supplied by yanek.
2005-12-25 15:16:21 +01:00
Jonas Fonseca
cb90dcd58c Remove unused variable 2005-12-25 05:19:55 +01:00
Jonas Fonseca
f2ba5e7f6b Cleanup and remove unnneded code 2005-12-25 04:40:58 +01:00
Jonas Fonseca
40ae683bfb match_attribute_value(): Actually do the matching
This is still untested like the last patch.
2005-12-25 04:38:30 +01:00
Jonas Fonseca
fc35d9ee33 Implement matching of element relations for DOM selection
It requires searching the select_data stack for all matches of the parent
selector and check the properties of matched nodes.
2005-12-25 03:48:53 +01:00
Jonas Fonseca
1347678988 Introduce get_dom_node_list_index() to lookup the index of a node in a list 2005-12-25 03:46:01 +01:00
Jonas Fonseca
d36b2d8a36 get_dom_select_data(): Move macro nearer to its users 2005-12-25 02:43:08 +01:00
Jonas Fonseca
ce2aa08cb1 Compile fix 2005-12-24 13:07:57 +01:00
Jonas Fonseca
8d30613a7f The child node list can be NULL when matching for the :empty pseudo-class
Also use the children node list and not the attribute list (aka the map).
2005-12-23 01:03:39 +01:00
Jonas Fonseca
3ea1b30fd6 Fix matching of the :root structural pseudo-class
Root nodes either have no parents or are the single child of the document
node.
2005-12-23 00:59:56 +01:00