Re: white-space patch
Jorge Arellano Cid <[email protected]>
| Newsgroups | gmane.comp.web.dillo.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Oct 05, 2011 at 01:32:29PM +0200, Johannes Hofmann wrote:
> On Tue, Oct 04, 2011 at 04:13:57PM -0300, Jorge Arellano Cid wrote:
> > On Tue, Oct 04, 2011 at 01:57:05PM -0300, Jorge Arellano Cid wrote:
> >
> > > [...]
> > > Attached goes a small and very interesting testcase.
> > > (I had a hard time reducing google's page :-P).
> > >
> > > Compare with Firefox/Iceweasel rendering.
> >
> > There's a "min-width" CSS element that dillo doesn't support:
> >
> > #center_col{min-width:562px}
> >
> > Taking it out of the equation makes Firefox render the page
> > quite similar to dillo; so maybe it is not a rewrap bug, but a
> > lack of implementation of CSS' min-width.
>
> A colleague just found a simple test case, and the fix for it also
> seems to fix the google case - but it needs some more testing.
>
> Testcase:
>
> <b>Hello World</b><div>Hello world</div>
>
> Notice how the first line breaks without need when narrowing the
> window.
Good testcase!
Here, the first sentence is broken regardless the window size,
and FWIW, this patch solves it:
@@ -1825,6 +1825,7 @@ void Textblock::addParbreak (int space,
word = addWord (0, 0, 0, style);
word->content.type = core::Content::BREAK;
+ word->content.breakType = core::Content::BREAK_OK;
word->content.breakSpace = space;
wordWrap (words->size () - 1);
}
@@ -1846,6 +1847,7 @@ void Textblock::addLinebreak (core::styl
word = addWord (0, 0, 0, style);
word->content.type = core::Content::BREAK;
+ word->content.breakType = core::Content::BREAK_OK;
word->content.breakSpace = 0;
wordWrap (words->size () - 1);
}
(this patch doesn't solve the google testcase, so I thought
it was better to let you know of it).
--
Cheers
Jorge.-