This reverts commit 6238e5edbde55fb82982ce4a19a0cbca7fe7eb9d.
We will re-apply this change, but there are some early signs of performance impacts that need to be investigated.
* Before truncate a text storage in ASTextKitContext reset the text storage to original value
* Fix ASTextNode tests
We should pass in the constrained size in both cases and the sizes should be the same. We adjust the calculated size in ASTextNode to be a bit narrower in the second case if we truncate again with the calculated size as constrained size it will truncate more and the resulting size will shrink.
Summary: Looks like this isn't being locked when it should be.
Reviewers: ricky, levi, scottg, schneider
Reviewed By: scottg, schneider
Subscribers: jenkins
Differential Revision: https://phabricator.pinadmin.com/D84952
* Added a member to `ASTextKitAttributes` that is an optional delegate to the struct's NSLayoutManager.
* Changed ASTextNode to set this delegate to an instance of ASTextNodeWordKerner.
* Updated init method of `ASTextKitContext` to take an optional NSLayoutManager delegate
* Added the files in TextKit folder to the public headers (so we can include ASTextNodeTypes.h)