On 10/12/2011 11:21 AM, L. David Baron wrote:
Right now nsIFrame::GetUsed{Margin,Border,Padding} don't apply the
skip-sides information to the result they return.  (The skip-sides
information is what tells us to omit the margin, border, and padding
at breaks.)

This means that most callers of these methods need to call
nsIFrame::ApplySkipSides on the result before using that result.
However, I suspect that most of the callers that should be doing
this aren't (though I haven't gone through them yet; I should).

I'm starting to think this was an API design mistake (on my part),
given that I usually forget about it.

Thoughts?

Just one: that it might be necessary in some cases to /not/ apply
skip sides, so if you're merging ApplySkipSides into the GetUsed
calls, add an argument to not skip sides. I'm thinking about, e.g.
calculating whether there's enough space to close the element
before a page break and thus whether to return COMPLETE or
INCOMPLETE during reflow.

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

Reply via email to