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

[H] Fix bugs in RenderSizedOverflowBox and RenderFractionallySizedOverflowBox #23492

Merged
merged 1 commit into from
Oct 26, 2018

Conversation

Hixie
Copy link
Contributor

@Hixie Hixie commented Oct 25, 2018

Bug #1: These didn't work with directional alignments, due to an error
in the types of the constructor arguments.

Bug #2: Pretty sure RenderSizedOverflowBox never worked at all. As
soon as I wrote a test for it, the test showed that there was a
fundamental bug in its performLayout method: it didn't set
parentUsesSize, but it immediately tried to use the child's size.

@Hixie
Copy link
Contributor Author

Hixie commented Oct 25, 2018

cc @goderbauer

@Hixie Hixie changed the title Fix bugs in RenderSizedOverflowBox and RenderFractionallySizedOverflo… Fix bugs in RenderSizedOverflowBox and RenderFractionallySizedOverflowBox Oct 25, 2018
@Hixie Hixie changed the title Fix bugs in RenderSizedOverflowBox and RenderFractionallySizedOverflowBox [H] Fix bugs in RenderSizedOverflowBox and RenderFractionallySizedOverflowBox Oct 25, 2018
Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

class RenderFractionallySizedOverflowBox extends RenderAligningShiftedBox {
/// Creates a render box that sizes its child to a fraction of the total available space.
///
/// If non-null, the [widthFactor] and [heightFactor] arguments must be
/// non-negative.
///
/// The [alignment] must be null.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we even have the alignment leaver then? :)

Joke aside: there's a "not" missing here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol oops

…wBox

Bug #1: These didn't work with directional alignments, due to an error
in the types of the constructor arguments.

Bug #2: Pretty sure RenderSizedOverflowBox never worked at all. As
soon as I wrote a test for it, the test showed that there was a
fundamental bug in its performLayout method: it didn't set
parentUsesSize, but it immediately tried to use the child's size.
@Hixie Hixie merged commit 5330846 into flutter:master Oct 26, 2018
@Hixie Hixie deleted the FractionallySizedBox branch October 26, 2018 17:31
Xavjer pushed a commit to Xavjer/flutter that referenced this pull request Nov 1, 2018
…wBox (flutter#23492)

Bug flutter#1: These didn't work with directional alignments, due to an error
in the types of the constructor arguments.

Bug flutter#2: Pretty sure RenderSizedOverflowBox never worked at all. As
soon as I wrote a test for it, the test showed that there was a
fundamental bug in its performLayout method: it didn't set
parentUsesSize, but it immediately tried to use the child's size.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants