[layoutng] Create correct constraint spaces for children
This does a couple of things:
- Rationalizes the constructors for the NGConstraintSpace. We need the
following:
- A constructor for use by the layout opportunity iterator. The only thing
this constructor changes is the size and the offset:
NGConstraintSpace(const NGConstraintSpace&, NGLogicalOffset, NGLogicalSize);
- A constructor for use by layout algorithms, as a basis for finding
layout opportunities. This should reset the offset, set the container size,
writing mode and direction and reset the fixed size properties:
NGConstraintSpace(NGWritingMode, NGDirection, const NGConstraintSpace&, NGLogicalSize);
- A constructor for tests and the root constraint space:
NGConstraintSpace(NGWritingMode, NGDirection, NGLogicalSize);
- Makes sure to clamp inline and block sizes to zero after we subtract border
and padding
- Make sure not to subtract border and padding from an indefinite size
R=eae@chromium.org, ikilpatrick@chromium.org, mstensho@opera.com
BUG=635619
Review URL: https://codereview.chromium.org/2346403002 .
Cr-Commit-Position: refs/heads/master@{#419787}
6 files changed