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

Implement size extremums #25031

Merged
merged 2 commits into from Dec 4, 2019
Merged

Implement size extremums #25031

merged 2 commits into from Dec 4, 2019

Conversation

@nox
Copy link
Member

nox commented Dec 3, 2019

No description provided.

@highfive
Copy link

highfive commented Dec 3, 2019

Heads up! This PR modifies the following files:

  • @emilio: components/style/properties/longhands/position.mako.rs
@highfive
Copy link

highfive commented Dec 3, 2019

warning Warning warning

  • These commits modify style code, but no tests are modified. Please consider adding a test!
@SimonSapin SimonSapin mentioned this pull request Dec 3, 2019
3 of 8 tasks complete
components/layout_2020/style_ext.rs Outdated Show resolved Hide resolved
components/layout_2020/style_ext.rs Show resolved Hide resolved
components/layout_2020/flow/mod.rs Outdated Show resolved Hide resolved
components/layout_2020/flow/mod.rs Show resolved Hide resolved
@nox nox assigned SimonSapin and unassigned ferjm Dec 4, 2019
@nox nox force-pushed the 2020-images branch from 2d5f28a to 48ceb56 Dec 4, 2019
if let Some(max_block_size) = max_block_size {
if block_size > max_block_size {
block_size = max_block_size;
}
}
Comment on lines 621 to 625

This comment has been minimized.

Copy link
@SimonSapin

SimonSapin Dec 4, 2019

Member

Nit: why not use .min() here? Or even for a function that handles the Option

This comment has been minimized.

Copy link
@SimonSapin

SimonSapin Dec 4, 2019

Member

Something like:

fn maybe_clamp_at_max(x: Length, max_x: Option<Length>) -> Length {
    if let Some(max_x) = max_x {
        x.min(max_x)
    } else {
        x
    }
}
@nox nox force-pushed the 2020-images branch from a60d668 to 4ebdc39 Dec 4, 2019
@nox
Copy link
Member Author

nox commented Dec 4, 2019

@bors-servo r=SimonSapin

@bors-servo
Copy link
Contributor

bors-servo commented Dec 4, 2019

📌 Commit 4ebdc39 has been approved by SimonSapin

@bors-servo
Copy link
Contributor

bors-servo commented Dec 4, 2019

Testing commit 4ebdc39 with merge 951dc24...

bors-servo added a commit that referenced this pull request Dec 4, 2019
Implement size extremums
@bors-servo
Copy link
Contributor

bors-servo commented Dec 4, 2019

☀️ Test successful - status-taskcluster
Approved by: SimonSapin
Pushing 951dc24 to master...

@bors-servo bors-servo merged commit 4ebdc39 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 2020-images branch Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

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