Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd support for inline-block and for computing min/max-content #25033
Conversation
highfive
commented
Dec 3, 2019
|
Heads up! This PR modifies the following files:
|
|
r? @nox |
|
Lots of remarks but many of them are not that interesting. |
| struct InlineFormattingContextState<'box_tree, 'cb> { | ||
| containing_block: &'cb ContainingBlock, | ||
| struct InlineFormattingContextState<'box_tree, 'a> { | ||
| absolutely_positioned_fragments: &'a mut Vec<AbsolutelyPositionedFragment<'box_tree>>, |
This comment has been minimized.
This comment has been minimized.
nox
Dec 4, 2019
Member
Consider making this change separately from the implementation of inline-block so that its rationale is written in a commit message.
This comment has been minimized.
This comment has been minimized.
SimonSapin
Dec 4, 2019
Author
Member
What change? This field is only added for the because layout code for inline-block needs to access it.
| // FIXME is this correct? | ||
| let dummy_tree_rank = 0; | ||
| // FIXME: Do we need to call `adjust_static_positions` somewhere near here? | ||
| let independent_layout = non_replaced.layout( | ||
| layout_context, | ||
| &containing_block_for_children, | ||
| dummy_tree_rank, | ||
| ifc.absolutely_positioned_fragments, | ||
| ); |
This comment has been minimized.
This comment has been minimized.
nox
Dec 4, 2019
Member
A dummy tree rank should only be used if this is an absolute containing block (i.e. a containing block in which absolutely positioned descendants should be placed relatively to).
This comment has been minimized.
This comment has been minimized.
SimonSapin
Dec 4, 2019
Author
Member
That’s what I suspected. But I think line breaking makes it tricky to computed the correct rank, especially when we’ll add support for going “back” through an atomic inline-level to find the last wrap opportunity after overflowing a line.
|
@bors-servo r=nox per IRC discussion |
|
|
Add support for inline-block and for computing min/max-content
|
|
1 similar comment
|
|
SimonSapin commentedDec 3, 2019
No description provided.