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
* Newline character support and truncated line sizing improvement.
For purposes of truncating text, respect explicit newlines.
Don't size to smaller than truncated line width unless we have to.
* Update CHANGELOG.md
* fix SIMULATE_WEB_RESPONSE not imported #449
* Fix to make rangeMode update in right time
* remove uncessary assert
* Fix collection cell editing bug for iOS 9 & 10
* Revert "Fix collection cell editing bug for iOS 9 & 10"
This reverts commit 06e18a10596622ff8a68835c95a23986d7bf61ea.
* Add a11y support for ASSCrollNode.
* Changelog
* Clean up.
* fix braces
* add test
* disable for ci
Modified the ASDisplayNode accessibility label to only aggregate its sub-nodes' labels when it doesn't have any explicit accessibility label set on itself. If an existing label is already present, it is instead treated as an override to the container's a11y label. Added relevant tests.
* fix SIMULATE_WEB_RESPONSE not imported #449
* Fix to make rangeMode update in right time
* access layer to load node before enter visible
* revert space
* Thread safety for Yoga layout
* Support baseline alignments for ASYogaLayout
* Refactor ASLayoutElementYogaBaselineFunc to not require yogaParent (its parent style is set into a private var on ASLayoutElementStyle before layout instead)
* Only set the accessibility element if the view is loaded
* Add nodeWillCalculateLayout to ASNodeController
* Update Changelog
* Address first comments
* Expose textLayoutForConstraint:
- Expose textLayoutForConstraint:, but make unavailable on ASTextNode
- Refactor compatibleLayoutWithContainer:text: into a static method
* Instead of textLayoutForConstraint: expose shouldTruncateForConstrainedSize: in ASTextNode