Skip to content

Revert to defaultClipBehavior - #20578

Merged
jonahwilliams merged 6 commits into
flutter:masterfrom
jonahwilliams:chrome_state
Aug 15, 2018
Merged

jonahwilliams merged 6 commits into
flutter:masterfrom
jonahwilliams:chrome_state

Conversation

@jonahwilliams

@jonahwilliams jonahwilliams commented Aug 14, 2018 •

Copy link
Copy Markdown
Contributor

Fixes #20483

@jonahwilliams

Copy link
Copy Markdown
Contributor Author

cc @liyuqian , @Hixie

@HansMuller HansMuller left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

I'm not happy about rolling this into Beta. Although this change fixes the FAB problem, the existence of #20483 implies that no one has reviewed the Flutter gallery since the clipping changes landed.

this.padding,
this.shape,
this.clipBehavior = Clip.none,
this.clipBehavior = ui.defaultClipBehavior, // ignore: deprecated_member_use

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You provide the same default value for clipBehavior in RawMaterialButton, so there's no need to specify it here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Because clipBehavior is defined as a default parameter on RawMaterialButton and we unconditionally pass clipBehavior from all parent widgets, it will end up as null unless we specify it at every level.

@HansMuller HansMuller Aug 14, 2018 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

~~ don't think we should include a clipBehavior parameter here (and etc). ~~

Never mind that. If we clip or otherwise make the splash (the InkWell) conform to the button's shape by default then I can understand adding a clipBehavior to buttons, since typically they don't need to be clipped anyway.

this.disabledElevation = 0.0,
this.shape,
this.clipBehavior = Clip.none,
this.clipBehavior = ui.defaultClipBehavior, // ignore: deprecated_member_use

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You provide the same default value for clipBehavior in RawMaterialButton, so there's no need to specify it here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

same as above

this.padding,
this.shape,
this.clipBehavior = Clip.none,
this.clipBehavior = ui.defaultClipBehavior, // ignore: deprecated_member_use,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You provide the same default value for clipBehavior in RawMaterialButton, so there's no need to specify it here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

same as above

@liyuqian

Copy link
Copy Markdown
Contributor

Thanks @jonahwilliams . Sorry that I couldn't be in the office today to fix the issue...

@Hixie

Hixie commented Aug 14, 2018

Copy link
Copy Markdown
Contributor

This reverts us to the old behavior right?

@jonahwilliams

Copy link
Copy Markdown
Contributor Author

@Hixie this mostly reverts #20205

@jonahwilliams
jonahwilliams merged commit 8de0e15 into flutter:master Aug 15, 2018
@jonahwilliams
jonahwilliams deleted the chrome_state branch August 15, 2018 03:23
@a-siva

a-siva commented Aug 15, 2018

Copy link
Copy Markdown
Contributor

This has caused a regression in the perf benchmark
flutter_gallery_ios32__transition_perf 99th_percentile_frame_rasterizer_time_millis

@jonahwilliams

Copy link
Copy Markdown
Contributor Author

The revert was necessary to fix several instances of overly aggressive clipping. If the performance is no worse than the last google3 roll and the last beta roll we should still proceed.

@a-siva

a-siva commented Aug 15, 2018

Copy link
Copy Markdown
Contributor

The performance is no worse than the last beta roll

liyuqian added a commit to liyuqian/flutter that referenced this pull request Aug 17, 2018
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 10, 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.

FloatingActionButton InkWell is not clipped (rectangle instead of circle)

6 participants