[ASTextNode] Optimize handling of constrained size to almost never recreate NSLayoutManager

This also fixes two fairly subtle but serious bugs, #1076 and #1046.
This commit is contained in:
Scott Goodson
2016-01-24 00:50:43 -08:00
parent 82f7956bf9
commit 9ddf68fa96
9 changed files with 81 additions and 55 deletions

View File

@@ -30,6 +30,8 @@
constrainedSize:(CGSize)constrainedSize
layoutManagerFactory:(NSLayoutManager*(*)(void))layoutManagerFactory;
@property (nonatomic, assign, readwrite) CGSize constrainedSize;
/**
All operations on TextKit values MUST occur within this locked context. Simultaneous access (even non-mutative) to
TextKit components may cause crashes.