Currently dillo does not handle the case where certain regions of a line can be wrapped and other regions cannot. A prominent example is the list of browsers at the bottom of http://en.wikipedia.org/wiki/Dillo Here is a patch that minimizes memory use (adds one int per textblock) at some cost of recalculating things http://www.dillo.org/test/nowrap.patch When whitespace isn't WHITE_SPACE_NORMAL, Textblock::add* functions still add words to the word list, but postpone wrapping until the entire nowrap/pre chunk has been added or a break has been seen. This is so that we know whether to put it all on a new line. Some possibilities: Putting some kind of spanWidth in each Word, calculating it in addNowrapWords and sticking this nonzero value into the beginning word. We'd have to remember to deal with it if things in the span changed size, or if dillo got on-the-fly display:none someday or whatever. Taking the time to stick the whole chunk into one word when the style is all the same. (Similar difficulties as the above.) I'm not sure whether that would make life more difficult if dillo got bidirectional text someday. Putting the nowrap Words into a Something, so that what is now a Word list would contain Word Word Word Something Word Something Word... That sounds complicated. Let the add* functions put the nowrap Words through wordWrap, and keep track of shifts between normal/nowrap in a line. When a line is completed, set up rewrap to do it over. This would be in an effort to "push down the bubble" of ickiness around add*/addNowrapWords/rewrap, although the resulting new bubble of ickiness that would pop up next to it would perhaps be similar. Small things that might or might not be improvements: make breaks have normal whitespace, and make lines with only one word have normal whitespace (text/plain).
participants (1)
-
corvid@lavabit.com