Hey that's cool! I thought about doing something like this, but didn't find a good way. I thought it would grow much more complicated. On Fri, May 23, 2008 at 03:12:13PM +0000, corvid wrote:
--- dillo2/src/html.cc 2008-05-23 14:02:05.000000000 +0000 +++ dillo2-cur/src/html.cc 2008-05-23 14:45:11.000000000 +0000 @@ -1004,11 +1004,16 @@ void DilloHtml::write(char *Buf, int Buf Buf_Consumed = BufSize; Local_Ofs += token_start;
+ /* updates line number and tag offset */ + (void)Html_get_line_number(this); + + /* don't need anything further back */ + dStr_erase(Local_Buf, 0, CurrTagOfs); + Local_Ofs -= CurrTagOfs; + OldTagOfs = CurrTagOfs = 0; + if (bw) a_UIcmd_set_page_prog(bw, BufSize, 1); - - if (Eof) - a_Decode_free(decoder); }
/* @@ -1021,6 +1026,8 @@ void DilloHtml::freeParseData()
dStr_free(Stash, TRUE); dStr_free(attr_data, TRUE); + + a_Decode_free(decoder); dStr_free(Local_Buf, TRUE); dFree(charset); }
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
On Fri, May 23, 2008 at 05:31:30PM +0200, Johannes Hofmann wrote:
Hey that's cool! I thought about doing something like this, but didn't find a good way. I thought it would grow much more complicated.
Committed with some changes. Note that this may help when fetching a huge page through the network (i.e. in chunks). When it comes from the cache, it's one big chunk of data. -- Cheers Jorge.-
participants (3)
-
corvid@lavabit.com
-
jcid@dillo.org
-
Johannes.Hofmann@gmx.de