Repository navigation
fix(apple): report DevTools geometry again once Core Animation commits it - #2768
Merged
Merged
Conversation
…s it DevTools read each view's geometry through its presentation layer once, as a mount batch ended. A change that is not animated, such as the setContentOffset: of a non-animated ScrollTo, moves the presentation layers only at the next Core Animation commit, so that report still showed the old geometry, and with no animation running nothing reported again: TestNativeDevToolsFollowStickyScroll read the sticky header at its unscrolled y=130 after scrolling to 200 in about one run in six, however long it waited, while the native scroll view was at 200. ReportLayerGeometry now also keeps the frames coming while a layer's presentation geometry differs from its model geometry, so the next frame reports the committed geometry. Fixes #2753
|
This pull request has no valid
Run the checks on the head commit, fill the block in the template, then push or edit the body: this label and comment update on their own. |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2753
Summary
DevTools on Apple platforms read each view's geometry through its presentation layer once, as a mount batch ended. A change that is not animated, such as the
setContentOffset:of a non-animatedScrollTo, moves the presentation layers only at the next Core Animation commit, so that report still showed the old geometry, and with no animation running nothing reported again.That is what
TestNativeDevToolsFollowStickyScrollhit onapple-simulator: a traced run showed the native scroll view at 200 (before 0 after 200, no remount, no pull-back) while DevTools kept the header at its unscrolled y=130, however long the test waited.ReportLayerGeometry(internal/platform/apple/dev_geometry.go) now also keeps the frames coming while a layer's presentation geometry differs from its model geometry, so the next frame reports the committed geometry. It only does this while DevTools observes.Verification
apple-simulatorwith the wholetestdata/devtools-geometrypackage run 15 times in a row on this change (diagnostic branch, run 46273234047): 15 passes. Before it, the sticky test failed about one run in six (2 of 12 in run 46272285407).ios(simulator SDK) andmacos.Screenshots
None.