Skip to content

apply fp hack to Flex#31890

Merged
dnfield merged 8 commits intoflutter:masterfrom
dnfield:inconsequential_overflow
May 2, 2019
Merged

apply fp hack to Flex#31890
dnfield merged 8 commits intoflutter:masterfrom
dnfield:inconsequential_overflow

Conversation

@dnfield
Copy link
Contributor

@dnfield dnfield commented May 1, 2019

Description

The google3 roll is failing due to this right now. It seems to be related to the 64 bit rect change, although it's hard to tease out exactly why. The internal test case is also not failing on a local emulator, but consistently fails on emulator that is actually used for the test.

This applies the same floating point hack as used by TextPainter to Flex. It means that very small epsilons will be ignored when calculating whether there is overflow for a Flex.

Related Issues

Internal roll failures.

Tests

I added the following tests:

A test that fails without this logic, by hard coding accumulated values from the actually failing test for our internal customer. The test simulates the actual case in which multiple widgets/renderobjects are calculated with a simpler, hard coded version.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (Please read Handling breaking changes). Replace this with a link to the e-mail where you asked for input on this proposed change.
  • No, this is not a breaking change.

@dnfield dnfield requested review from Hixie and cyanglaz May 1, 2019 08:19
@dnfield dnfield requested a review from goderbauer May 1, 2019 08:24
@dnfield dnfield added the framework flutter/packages/flutter repository. See also f: labels. label May 1, 2019
@chunhtai
Copy link
Contributor

chunhtai commented May 1, 2019

LGTM

@chunhtai chunhtai mentioned this pull request May 1, 2019
8 tasks
@dnfield dnfield merged commit 5b2281e into flutter:master May 2, 2019
@dnfield dnfield deleted the inconsequential_overflow branch May 2, 2019 00:28
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants