Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for inline-block and for computing min/max-content #25033

Merged
merged 21 commits into from Dec 4, 2019
Merged

Conversation

@SimonSapin
Copy link
Member

SimonSapin commented Dec 3, 2019

No description provided.

@highfive
Copy link

highfive commented Dec 3, 2019

Heads up! This PR modifies the following files:

  • @jgraham: tests/wpt/metadata-layout-2020/css/CSS2/box-display/containing-block-008.xht.ini, tests/wpt/metadata-layout-2020/css/CSS2/box-display/containing-block-010.xht.ini
  • @emilio: components/style/values/computed/percentage.rs, components/style/values/computed/length.rs, components/style/values/generics/length.rs
@jdm
Copy link
Member

jdm commented Dec 3, 2019

r? @nox

@highfive highfive assigned nox and unassigned jdm Dec 3, 2019
Copy link
Member

nox left a comment

Lots of remarks but many of them are not that interesting.

components/layout_2020/flow/construct.rs Outdated Show resolved Hide resolved
components/layout_2020/intrinsic.rs Outdated Show resolved Hide resolved
components/layout_2020/intrinsic.rs Outdated Show resolved Hide resolved
components/layout_2020/intrinsic.rs Outdated Show resolved Hide resolved
components/layout_2020/intrinsic.rs Outdated Show resolved Hide resolved
components/layout_2020/flow/inline.rs Outdated Show resolved Hide resolved
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.

Copy link
@nox

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.

Copy link
@SimonSapin

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.

components/layout_2020/flow/inline.rs Outdated Show resolved Hide resolved
// 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,
);
Comment on lines +470 to +478

This comment has been minimized.

Copy link
@nox

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.

Copy link
@SimonSapin

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.

components/layout_2020/positioned.rs Outdated Show resolved Hide resolved
@SimonSapin
Copy link
Member Author

SimonSapin commented Dec 4, 2019

@bors-servo r=nox per IRC discussion

@bors-servo
Copy link
Contributor

bors-servo commented Dec 4, 2019

📌 Commit dd9dfc6 has been approved by nox

@bors-servo
Copy link
Contributor

bors-servo commented Dec 4, 2019

Testing commit dd9dfc6 with merge e70397d...

bors-servo added a commit that referenced this pull request Dec 4, 2019
Add support for inline-block and for computing min/max-content
@bors-servo
Copy link
Contributor

bors-servo commented Dec 4, 2019

☀️ Test successful - status-taskcluster
Approved by: nox
Pushing e70397d to master...

1 similar comment
@bors-servo
Copy link
Contributor

bors-servo commented Dec 4, 2019

☀️ Test successful - status-taskcluster
Approved by: nox
Pushing e70397d to master...

@bors-servo bors-servo merged commit dd9dfc6 into master Dec 4, 2019
2 checks passed
2 checks passed
Community-TC (pull_request) TaskGroup: success
Details
homu Test successful
Details
@bors-servo bors-servo deleted the intrinsic branch Dec 4, 2019
@SimonSapin SimonSapin added this to Done / resolved in Layout 2020 Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Layout 2020
  
Merged / resolved
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.