* Add experiment to skip waiting until all updates of collection/table view are committed in -accessibilityElements
The wait was introduced in #1217 which blocks the main thread until updates are proccessed. We suspect this causes perf regressions accross the app and need to confirm this via an experiment.
* Add option to skip default behavior of ASCellLayoutMode
* Fix unit test
* Fix unit test in another way
* Remove import
* Minor change
* Add ASCellLayoutModeSyncForSmallContent
* Update unit tests
* Remove unnecessary change
* Remove unnecessary changes
Initializing the LUT arrays at file level scope creates a large chunk of code retaining and releasing all of the NSStrings in the tables. Moving them to function level moves the initialization to being lazy.
As of today, ASRangeController doesn't manage the interfaceState for supplementary nodes. This bug was introduced with a refactoring of this code a couple months ago.
With this change, the supplementary nodes will automatically enter each interfaceState bit when they are added to a view hierarchy.
* Set automaticallyAdjustsContentOffset when view is load
* [ASTableNode] Update test: set automaticallyAdjustsContentOffset before view is load (#1278)
* Wrap supplementary node blocks to enable resizing them.
Most ASCellNodeBlocks are wrapped by ASCollectionView.mm to add an `interactionDelegate` as well as calling `enterHierarchyState` on the node and setting its transform to a reflection if `inverted` is set on the collectionView.
This PR adds this behavior to supplementary nodes as well.
* Simplify code / block will never be nil
If PIN_ANIMATED is enabled, the creation of a PINRemoteImageManager
will create a sharedDownloader also. Thus we cannot assert that it
doesn't exist. We will move this assertion up to the methods that
create the preconfiguredSharedManager and before said manager is
allocated.
* Introduce ASCellLayoutMode
* Some smaller improvements
* Improve logic around _superPerformBatchUpdates:completion:
* Add comment about default values for ASCellLayoutModeNone
* Always call _superReloadData:completion: within UICollectionView
* Add initial range test for ASCellLayoutModeNone
With the changes to `ASPrimitiveTraitCollection` in e392f832f4 a new `ASPrimitiveTraitCollectionMakeDefault` was created. The new method didn’t give all values in an `ASPrimitiveTraitCollection` a default value (or initialize the struct with `{}`). This was causing fields like `userInterfaceIdiom`, `forceTouchCapability`, and `displayScale` to be filled with garbage, leading to `ASPrimitiveTraitCollectionIsEqualToASPrimitiveTraitCollection` to return `YES` when the trait collection hadn’t really changed.
It also looks like the getter `containerSize` was not implemented.
After 5c9815f, some Mutexes are used as global C++ variables which are loaded before main(). Since the Mutex constructor checks for unfair lock experiment, it triggers an experiment configuration load, and our app isn't ready to respond that early in the process.
https://github.com/TextureGroup/Texture/pull/886 enforces that some nodes are loaded before they are sent a visiblity event, but it was not propagating the trait collection before forcing the load.
We are propagating traits in `_setSupernode:` (which was happening after the forced load). I moved the possible forced load to `_setSupernode:`, after propagating traits but before any visibility states are changed.
* Fix A11Y for horizontal collection nodes in Texture.
Collections have their own handling in UIKit that we shouldn't mess with. As such no nodes that contain CollectionNodes should ever be treated as AccessibilityContainers.
* Update braces
- Clear _displayCompletionBlock while we still have the node's instance lock. Because it may not be the same block by the time the lock is reacquired. In other words, it can happen that another thread sets a new display block after this thread releases the lock but before it reacquires it. And we don't want to clear out the new block.
- Reduce a lock/unlock pair which should help perf a tiny bit.
We will revert #1023. The current solution introduces problems if we are unlocking before calling _completePendingLayoutTransition. _completePendingLayoutTransition needs to be happening in one transaction if called from _u_measureNodeWithBoundsIfNecessary.
* Convert the codebase to Objective-C++ throughout. One language is better than two.
* Put it back
* Fix linker
* Point explicitly to updated Weaver to unblock build
* Revert "Point explicitly to updated Weaver to unblock build"
This reverts commit fdc25296e8794d4e6e56c35f5fe6da2be3f71dbc.
* Revert "Fix linker"
This reverts commit 7be25f91519b8497ef42de79f115bcfbdb965c39.
* Add in the frameworks
* no message
* Address spec lint warnings
* Fix tvos build
* Put that back
* Address Michael's review
* Add comment to kick CI
* Remove whitespace at the end of the line
* Fix indentation
* Wrap if check for assertion in ASDISPLAYNODE_ASSERTIONS_ENABLED
* Add testTextNodeSwitchWorksInMultiThreadEnvironment tests