1619 Commits
Author SHA1 Message Date
Huy Nguyen 387f3bf634 Properly lock layoutableContextMap
Signed-off-by: Huy Nguyen <huy@pinterest.com>
2016-03-29 13:40:57 -07:00
Scott Goodson 1ea1560694 [ASDisplayNode] Rasterized subnodes require special handling for __exitHierarchy. 2016-03-28 17:58:35 -07:00
Scott Goodson 096df7b385 [ASDisplayNode] Remove #if gating of ASDisplayNode hitTest: (I'd misread this as _ASDisplayView's implementation, and both are needed). 2016-03-28 07:49:14 -07:00
Scott Goodson cd493358cc [ASControlNode] Upgrades to +setEnableHitTestDebug: to intersect hitTestSlop with parents' bounds+slop, to accurately predict and visualize UIKit event delivery edge cases. 2016-03-27 22:02:13 -07:00
Scott Goodson 3e2414da6f [ASInterfaceState] Fix for an edge case of exiting Visible state before node deallocation. 2016-03-27 18:15:40 -07:00
appleguy 97798010cb Merge pull request #1443 from nguyenhuy/layoutable_context
[ASLayoutable] Introduce ASLayoutableContext, thread-local storage for layout passes.
2016-03-27 17:40:42 -07:00
Huy Nguyen 7bb3015950 Rename ASLayoutableContext methods 2016-03-27 17:38:41 -07:00
Huy Nguyen 81d26994c5 Introduce ASLayoutableContext
- The struct is mapped to ID of the current thread and used by subnodes to decide whether they should proceed measurement.
2016-03-27 17:09:59 -07:00
Scott Goodson c6093cffdf Fix assertion format specifier from previous commit. 2016-03-26 23:57:16 -07:00
Scott Goodson 6a887a8acf [ASDisplayNode] Alternative implementation of interfaceState -> invisible that avoids a subclass call from -dealloc. 2016-03-26 23:24:30 -07:00
Scott Goodson daf41ebb43 [ASTextNode] Fix edge case where text truncator may not run (manually hosted nodes that are lacking the expected call to -measure).
This fixes the scenario described in https://github.com/facebook/AsyncDisplayKit/issues/1295
2016-03-26 18:19:02 -07:00
Levi McCallum c07175bfcb Fix conditional 2016-03-25 11:54:56 -07:00
Levi McCallum 687be58621 Fix PagerNode from not loading 2016-03-25 10:02:47 -07:00
Levi McCallum f51ca78570 Simplify boolean logic 2016-03-24 21:40:49 -07:00
Levi McCallum d845a18dfb Prevent calculation of current index path when the collection view is empty 2016-03-24 21:33:01 -07:00
Eric Jensen 057ec55941 Correct documentation comments 2016-03-24 20:08:03 -07:00
Eric Jensen 7de48da44f Correct ASEditableTextNode's default value according to the documentation 2016-03-24 20:00:53 -07:00
Eric Jensen f988f86f7f Assign the textView's scrollEnabled property in ASEditableTextNode's didLoad method.
This prevents a mismatch if the scrollEnabled property on ASEditableTextNode is set before the textView is loaded.
2016-03-24 19:51:16 -07:00
Scott Goodson eed812dcdf [ASRangeController] Slight tweaks to the default Full ranges, for memory savings in multi-tabbed apps with still-excellent preloading consistency. 2016-03-23 23:36:59 -07:00
Adlai Holler a90a83b607 Copy sublayers to avoid NSFastEnumerationMutation exception 2016-03-23 21:57:23 -07:00
appleguy 4ffaebc93b Merge pull request #1409 from ejensen/swift-alignment-enum
[Refactoring] ASHorizontalAlignment & ASVerticalAlignment Swift interface
2016-03-23 21:03:44 -07:00
appleguy ac5d0265d9 Merge pull request #1408 from ejensen/swift-enum
[Refactoring] ASCellNodeVisibilityEvent Swift interface
2016-03-23 21:02:45 -07:00
Levi McCallum f760c8460a Nil out currentIndexPath after usage to prevent ASPagerFlowLayout crashes 2016-03-23 17:55:25 -07:00
Michael Schneider 4207e0e1a6 Add CFRunLoopWakeUp in processQueue 2016-03-22 20:19:17 -07:00
Scott Goodson e59431e702 [ASDisplayNode] Restore dispatch_async for clearContents, to prevent discarding contents for nodes that are simply moving to a new container. 2016-03-22 18:39:23 -07:00
Scott Goodson 5b9302b681 Revert "Prevent deallocation of asyncDataSource and asyncDelegate in ASCollectionView and ASTableView"
This reverts commit 3668f45286.
2016-03-22 14:38:50 -07:00
Scott Goodson 953c0f51f0 Revert "Move call of range update completion blocks to consider early returns in _updateVisibleNodeIndexPaths"
This reverts commit 41362fca39.
2016-03-22 14:37:49 -07:00
appleguy 2319197a59 Merge pull request #1415 from facebook/DeallocInterfaceState
[ASInterfaceState] Clear the "Visible" bit immediately upon deallocation, rather than waiting for ASRangeController on the next runloop.
2016-03-22 14:37:29 -07:00
Scott Goodson 76b38cbe6e [ASInterfaceState] Clear the "Visible" bit immediately upon deallocation, rather than waiting for ASRangeController on the next runloop. 2016-03-22 14:32:32 -07:00
Michael Schneider 41362fca39 Move call of range update completion blocks to consider early returns in _updateVisibleNodeIndexPaths 2016-03-22 12:43:09 -07:00
Michael Schneider 3668f45286 Prevent deallocation of asyncDataSource and asyncDelegate in ASCollectionView and ASTableView
Grab a strong reference for asyncDataSource and asyncDelegate in ASCollectionView and ASTableView before executing the range update to be sure they are not going away while executing the range update. This can happen in range updates while going back in the view controller hierarchy
2016-03-22 08:09:59 -07:00
appleguy fbe87cde4b Merge pull request #1410 from maicki/ASRunLoopQueueImproveProcessTriggering
[ASRunLoopQueue] Always signal runloop source if queue is not fully drained, to ensure more batches are guaranteed to run.
2016-03-21 17:12:39 -07:00
Michael Schneider a937184a0b Remove CFRunLoopWakeUp in CFRunLoop observer callback
We don't nee CFRunLoopWakeUp as at this time are currently running in an observer callback, and after running all of the BeforeWaiting observers it must surely check for more sources / etc to run before determining if it will sleep
2016-03-21 17:10:29 -07:00
Michael Schneider b3e98e9f5f If the queue is not fully drained yet force another run loop to process next batch of items 2016-03-21 16:58:39 -07:00
Eric Jensen 12da9ac6a9 Improve Swift compatibility of ASHorizontalAlignment & ASVerticalAlignment by using consistent naming 2016-03-21 11:16:28 -07:00
Eric Jensen b733936133 Improve Swift compatibility of ASCellNodeVisibilityEvent by using NS_ENUM macro 2016-03-21 11:10:28 -07:00
Huy Nguyen 9e76d7b603 Add method to cancel layout transitions in progress
- Also make sure a transition isn't invalidated right after it passed the validation test and before it proceeds
2016-03-20 23:17:35 -07:00
Rahul Malik 4eb3356615 Basic a11y support for ASButtonNode 2016-03-20 19:22:53 -07:00
Sam Stow 086bd8a52b [ASRelativeLayoutSpec] New core layout spec type: Relative Position, now powers Center as well.
This spec allows positioning a child at any 9-part box position (corners, edges, or center).
2016-03-19 22:37:02 -07:00
appleguy 4297cb1eb5 Merge pull request #1398 from facebook/Placeholders
[ASDisplayNode] Placeholders should always be recreated if returning to cleared nodes, and remain until ASNetwork/MultiplexImageNode finish loading their image from the network.
2016-03-19 21:19:05 -07:00
appleguy 36437f2fb7 Merge pull request #1399 from facebook/MKCancel
[ASMapNode] Reduce number of MapKit calls to -cancel by using the .isLoading property.
2016-03-19 21:16:30 -07:00
Scott Goodson 8308a4ce49 [AsyncDisplayKit] Adopt #pragma once, remove last remaining dispatch_sync (UIScreen scale). 2016-03-19 19:56:41 -07:00
Hannah Troisi f9a92366d3 [AsyncDisplayKit] Fix build so we can weak link AVFoundation
Unclear why the framework target required these seemingly unrelated changes to Collection
classes, but I modeled them after related files and it seems cleaner now (passes tests & framework target)
2016-03-19 17:54:02 -07:00
Hannah Troisi b98920c19f [ASVideoNode] Add to ASDK umbrella header 2016-03-19 17:10:47 -07:00
Scott Goodson 7bb48d266c [ASMapNode] Reduce number of MapKit calls to -cancel by using the .isLoading property. 2016-03-18 23:31:33 -07:00
Scott Goodson c5c7abb1d6 [ASDisplayNode] Placeholders should always be recreated if returning to past nodes.
If previously-displayed contents is gone (e.g. clearContents), and is not finished displaying
by the time the node is onscreen, recreate the placeholder immediately.
2016-03-18 21:13:26 -07:00
Michael Schneider 14b9df30a3 Create CFRunLoopSourceContext via calloc 2016-03-18 14:32:45 -07:00
Michael Schneider d1756baae7 Add custom run loop source to signal if new jobs are enqueued in ASRunLoopQueue
It is not guaranteed that the runloop will turn if it has no scheduled work, and this causes processing of the queue to stop. Attaching a custom loop source to the run loop and signal it if new work needs to be done
2016-03-18 14:02:27 -07:00
Eric Jensen 6739a3a4ab Condition logic simplification 2016-03-17 11:22:53 -07:00
Eric Jensen 17aebcbaba Add a space between the ? and : in ternarys 2016-03-17 10:38:51 -07:00