-
Notifications
You must be signed in to change notification settings - Fork 6k
Issues/80711 reland #26813
Issues/80711 reland #26813
Conversation
| CGRect result; | ||
| const SkRect& rect = _semanticsObject.node.rect; | ||
| float x, y, width, height; | ||
| float scrollExtentMax = _semanticsObject.node.scrollExtentMax == INFINITY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't check equality against INFINITY, there is the isfinite function https://en.cppreference.com/w/c/numeric/math/isfinite
| x = rect.x(); | ||
| y = rect.y(); | ||
| width = rect.width(); | ||
| height = rect.height() + scrollExtentMax; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I liked the CGRectMake calls better fwiw. It's a bit easier to maintain since it enforces all things are set before returning the result.
|
|
||
| namespace { | ||
|
|
||
| constexpr float kScrollExtentMaxForInf = 1000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably worth commenting why 1000. That sounds like a small number, it's hard for me to know if it's adequate.
| w * effectivelyScale, h * effectivelyScale))); | ||
| XCTAssertTrue(CGSizeEqualToSize( | ||
| scrollable.contentSize, | ||
| CGSizeMake(w * effectivelyScale, (h + 1000 + scrollPosition) * effectivelyScale))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull out 1000 into a variable, name it so people have a chance of finding the const where it comes from.
gaaclarke
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
|
This pull request is not suitable for automatic merging in its current state.
|
86e6a53 to
d6feb68
Compare
This reverts commit 53e4dcf.
This reverts commit 53e4dcf.
This reverts commit 53e4dcf.
Previous pr was reverted due to a internal test failure
the issue was the flutterscrollablesemanticsobject does not handle the case where scrollextent can be infinity. The fix is in the second commit.
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.