13 Commits

Author SHA1 Message Date
Kevin
1410b29b63 Lock up to yogaRoot during layout to avoid deadlocks. (#1356)
* Lock up to yogaRoot during layout to avoid dead lock.

1) lock to root for tree
2) lock self to change parent (& consequently root)
3) Implement ASLocking (tryLock) on ASNodeController
4) add lockPair to try-lock node & controller together
5) lock controllers if they exist in lockToRoot...

Disable some asserts due to lock to root. :(

LL# No commands remaining.

* Add macro so non-Yoga still builds :)

* wut
2019-03-03 08:05:01 -08:00
Adlai Holler
6428077e01
Revert "Have node and controller share lock (#1227)" (#1347)
This reverts commit 2baa9438d798b9cf5689b46038383d0a9b7d007c.
2019-02-22 11:28:36 -08:00
Adlai Holler
2baa9438d7
Have node and controller share lock (#1227)
* Have node and controller share lock

* Do it different

* Restore prior method order

* Maybe store the reference

* Try that
2018-11-15 09:50:09 -08:00
Michael Schneider
097790317e
Yoga integration improvements (#1187)
* 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
2018-10-24 10:27:58 -07:00
Michael Schneider
cb154f1471 Let ASNodeController conform to NSLocking (#1179) 2018-10-21 11:49:02 -07:00
Max Wang
69ab24bc00 Make interface state delegate non optional (#1112)
* 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.

* Make interface state delegate protocol non-optional.

* add change log

* add missing removal

* add required method to ASNodeController

* fix indentation

* Update CHANGELOG.md
2018-09-12 09:48:39 -07:00
appleguy
465abb1ded [License] Simplify the Texture license to be pure Apache 2 (removing ASDK-Licenses). (#1077)
* [License] Simplify the Texture license to be pure Apache 2 (removing ASDK-Licenses)

With permission of the Facebook Open Source team, we are simplifying the Texture
license so that clients can rely on the Apache 2 terms that most of Texture is
already covered by. This means that code originally forked from AsyncDisplayKit
will be re-licensed from "BSD 3-clause + PATENTS v2" to Apache 2 without a
PATENTS file.

After getting confirmation that the updates to these core files look good, we'll
propagate this new license header to all files (in this same PR) and get sign-off
from all parties before landing.

* [License] Update all Texture source files to be pure Apache 2.

* Changelog entry for Apache 2 license update.

* Revert "[License] Update all Texture source files to be pure Apache 2."

This reverts commit ffa0fbbba9717d871dd16c4b07539f2f8208fc2b.

* [License] Update all Texture source files to be pure Apache 2, maintaining copyrights.

* [License] Update CONTRIBUTING, README, Podspec & Dangerfile.
2018-08-28 07:39:18 -07:00
Adlai Holler
cac14e0bce
Standardize Property Declaration Style in Core Classes (#870)
* Audit property attributes for core classes

* Update style guide

* Go crazy

* Update changelog
2018-05-24 14:42:43 -07:00
appleguy
223f1c9a36 [ASDisplayNode] Consolidate main thread initialization and allow apps to invoke it manually instead of +load. (#798)
* - [ASDisplayNode] Consolidate main thread initialization and allow apps to invoke it manually instead of +load.

Additionally this has a few minor fixes for Yoga support, and adds some basic
but universally valuable callbacks like -nodeDidLoad to ASNodeController.

* Small fix for handling _layoutVersion.

* Remove poking the scale accessor
2018-02-25 22:15:40 -08:00
appleguy
9a14f279aa [ASNodeController] Add -nodeDidLayout callback. Allow switching retain behavior at runtime. (#470)
With these changes, I'd also like to propose that we move ASNodeController
out of Beta (renaming the files without +Beta). Let me know what you think!

Because we don't support ASNodeController directly in ASCV / ASTV, it is still
important to allow flipping the ownership in certain cases (in particular, for
root CellNodeController objects that should follow the lifecycle of the
ASCellNode rather than owning the ASCellNode).
2017-07-27 01:07:53 -07:00
appleguy
71d5b3205d [ASNodeController+Beta] Provide an option to allow nodes to own their controllers. (#61)
* [ASNodeController+Beta] Provide an option to allow nodes to own their controllers.

We should certainly remove this before moving ASNodeController out of Beta. However, I think
it will require at least ASCollectionNode to be able to retain its top level set of node controllers.

Without this facility built in, it's very difficult for apps supporting both UIKit and ASDK to
manually manage the controllers and keep them in sync with perfect timing.

* [ASNodeController] Fix one of the #if's.
2017-05-01 10:51:59 -07:00
Garrett Moon
8013e25524 Update license v2 (#67)
* Fixed license

* Update all licenses

* Update Dangerfile for new license

* Update already updated licenses

* Closer…

* Closer…

* Closer…

* Closer…

* Closer…

* Closer…

* Closer…

* Closer…

* Closer…

* Closer…

* Closer…
2017-04-24 16:59:57 -07:00
Adlai Holler
73ca6ab514 Shuffle & Cleanup Stuff (#3080) 2017-02-26 18:14:13 -08:00