16 Commits

Author SHA1 Message Date
Adlai Holler
9c3b688a87 Remove textStorageCreationBlock API (#2142)
* Remove textStorageCreationBlock API

* Remove layoutManagerCreationBlock also
2016-08-26 11:42:20 -07:00
Michael Schneider
aba05a747c [ASThread] Add SharedLocker and SharedUnlocker that uses a shared pointer for the mutex (#2047)
* Add SharedLocker and SharedUnlocker that uses a shared pointer for the mutex

* Move ASTextKitContext to use Shared Locker
2016-08-09 15:20:31 -07:00
Hannah Troisi
4baf9bdbfe [Infer] Fix Infer errors/warnings (#1938)
* [Infer] Fix 11 Infer errors/warnings

* fix build error
2016-07-16 15:29:24 -07:00
Scott Goodson
bf9c142765 Revert "[ASTextNode] Fix text node truncation (#1863)"
This reverts commit 6238e5edbde55fb82982ce4a19a0cbca7fe7eb9d.

We will re-apply this change, but there are some early signs of performance impacts that need to be investigated.
2016-07-09 23:54:43 -07:00
Scott Goodson
d83f319fe3 Revert "Use textStorageCreationBlock for resetting the text storage (#1874)"
This reverts commit d646d3c753193382f8ad029172d975c782ad8544.
2016-07-09 23:54:28 -07:00
Michael Schneider
d646d3c753 Use textStorageCreationBlock for resetting the text storage (#1874) 2016-07-09 16:43:18 -07:00
Michael Schneider
6238e5edbd [ASTextNode] Fix text node truncation (#1863)
* 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.
2016-07-09 15:40:31 -07:00
Michael Schneider
22fa715682 Move lock from ASDN::Mutex to std::mutex in ASTextKitContext 2016-06-20 13:42:17 -07:00
Hannah Troisi
c857e809f4 Clean up header comments (for consistent Facebook licensing info) (#1741)
[Licensing] Clean up header comments (for consistent Facebook licensing info)
2016-06-11 23:31:39 -07:00
Garrett Moon
dd998b086f I think this needs a lock.
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
2016-04-15 10:41:31 -07:00
rcancro
00b0968bf7 Add ability to customize NSLayoutManager and NSTextStorage when created in the ASTextKitContext 2016-02-22 13:00:02 -08:00
appleguy
2c194fd924 Merge pull request #1140 from rcancro/textNodeWordSpacing
[ASTextNode] Added ASTextNodeWordKerner support
2016-01-28 15:38:00 -08:00
rcancro
7f6f2fed11 Added ASTextNodeWordKerner support to ASTextNode
* 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)
2016-01-28 08:38:22 -08:00
Samuel Hsiung
90ac40020f Use NSForegroundColorAttributeName for links in ASTextNodes by subclassing NSLayoutManager 2016-01-27 21:13:28 -08:00
Scott Goodson
9ddf68fa96 [ASTextNode] Optimize handling of constrained size to almost never recreate NSLayoutManager
This also fixes two fairly subtle but serious bugs, #1076 and #1046.
2016-01-24 00:50:43 -08:00
Levi McCallum
a0c05ebffc Rename CK classes to AS classes 2015-11-30 06:44:53 -08:00