On Mon, 26 Sep 2005 05:25 am, Andreas L Delmelle wrote:
> On Sep 25, 2005, at 19:47, Andreas L Delmelle wrote:
> > Currently, I have solved this locally by creating the pageVP with
> > the indefinite dimension set to Integer.MAX_VALUE.
> > The only things I'm still looking for are ways to:
>
> ...
>
> BTW, stumbled upon an interesting issue:
> Does anyone know how percentages should be viewed in case the page's
> height is indefinite? Or would this simply be something the user
> shouldn't be doing at all (i.e. define the page-height to be
> "indefinite", so that its ultimate value depends on the laid out
> content, and at the same time define certain properties as having a
> value that is a percentage of the page-height...?) My common sense
> tells me that this is a circular reference, so the results are
> "unpredictable", and I can safely create a pageHeightContext with bpd
> set to Integer.MAX_VALUE...

I would say
a) in the case of percentages being defined on an indefinite base value 
the behaviour is not defined in the spec, ie. left to the user agent.
b) in terms of protecting the user from him/herself a base value of 0 in 
this case may be preferable, at least you wont get huge margins or 
regions. This could be caught in the SimplePercentBase constructor so 
you don't have to have if-then-else everywhere. Alternatively,
c) if we want to be really nice to the user we could instead catch it in 
the percentage evaluation, in LengthBase.getBaseLength check if the 
value to be returned is MAX_VALUE and if so force it down to 0 and log 
a warning for the user.

>
> Just thought I'd ask, even if only as a rhetorical question :-)
>
>
> Cheers,
>
> Andreas

Manuel

Reply via email to