Questions on scrollframe padding code

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Questions on scrollframe padding code

Boris Zbarsky
I have three questions about the code at
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/layout/generic/nsGfxScrollFrame.cpp&rev=3.267&mark=470-484#462 
:

1)  Should that third "if" work with mComputedMinWidth?
2)  This seems to do the wrong thing if box-sizing is not content-box (since
     mComputedMinWidth and mComputedMaxWidth refer to whatever the corresponding
     CSS properties refer to.  This is unlike mComputedWidth, which always refers
     to the content width).
3)  Is there a reason we're not adding in border too?

-Boris
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: Questions on scrollframe padding code

L. David Baron
On Wednesday 2006-06-07 10:37 -0500, Boris Zbarsky wrote:
> I have three questions about the code at
> http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/layout/generic/nsGfxScrollFrame.cpp&rev=3.267&mark=470-484#462 
> :
>
> 1)  Should that third "if" work with mComputedMinWidth?

Looks like it, but it would need to change the body as well, and also
s/PR_MIN/PR_MAX/.

> 2)  This seems to do the wrong thing if box-sizing is not content-box (since
>     mComputedMinWidth and mComputedMaxWidth refer to whatever the
>     corresponding
>     CSS properties refer to.  This is unlike mComputedWidth, which always
>     refers
>     to the content width).

Should 'box-sizing' affect 'min-width' and 'max-width'?  Does it
anywhere else?

> 3)  Is there a reason we're not adding in border too?

Because border goes outside the scrollbars and padding inside?

-David

--
L. David Baron                                <URL: http://dbaron.org/ >
           Technical Lead, Layout & CSS, Mozilla Corporation

_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout

attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Questions on scrollframe padding code

Boris Zbarsky
In reply to this post by Boris Zbarsky
L. David Baron wrote:
> Looks like it, but it would need to change the body as well, and also
> s/PR_MIN/PR_MAX/.

Right.

>> 2)  This seems to do the wrong thing if box-sizing is not content-box (since
>>     mComputedMinWidth and mComputedMaxWidth refer to whatever the
>>     corresponding
>>     CSS properties refer to.  This is unlike mComputedWidth, which always
>>     refers
>>     to the content width).
>
> Should 'box-sizing' affect 'min-width' and 'max-width'?  Does it
> anywhere else?

We're pretty consistent about it affecting them, yes.

Whether we should be is a separate question, but it would make sense that
'min-width' and 'max-width' would refer to the same dimension as 'width'...

>> 3)  Is there a reason we're not adding in border too?
>
> Because border goes outside the scrollbars and padding inside?

Ah, ok.

I guess what I want to do is once reflow branch lands go through and fix all our
min/max width stuff to be consistent and to use a utility method or maybe two on
the reflow state.

-Boris
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout