158 Commits
Author SHA1 Message Date
Scott Goodson df3ce787f7 Ensure that the uncommon __unloadNode codepath does not unintentionally trigger node removal. 2015-12-29 23:11:33 -08:00
Scott Goodson 55861b3de1 Update the expectations of the tests now that the clearContents behavior is corrected. 2015-12-27 16:37:33 -08:00
Scott Goodson 93498d8240 [ASDisplayNode] Preserve contents after non-range-managed nodes are removed from superviews or windows.
This behavior changed in 1.9.3 and introduced flickering in some cases.  Preserving the contents is closer to UIKit behavior.
2015-12-27 15:35:43 -08:00
Scott Goodson 4b560a703a PR #1000 on GitHub! Provide a Beta API to enable the new, high efficiency render-ahead mechanism. 2015-12-26 16:34:44 -08:00
Scott Goodson a1429ea23b Add ability to enable new rendering range with a class method in ASDisplayNode+Beta.h 2015-12-26 14:22:24 -08:00
Scott Goodson a2cf2a88e6 Overhaul header files / includes to eliminate circular references that Xcode 7 is angry about. 2015-12-25 19:22:00 -08:00
Scott Goodson af74f4a1c2 Fix the AsyncDisplayKit tests under Xcode 7! Workaround for unfixed Apple bug with @dynamic on CALayer. 2015-12-25 14:01:18 -08:00
Scott Goodson 928c440b4c Several small optimizations, especially to _ASPendingState and other hot paths. 2015-12-23 16:38:33 -08:00
Scott Goodson 065625f246 Make ASCollectionView always create an ASCollectionNode. Add visibilityDidChange:, interfaceStateDidChange:fromState: 2015-12-22 21:46:46 -08:00
appleguy d7492b331f Merge pull request #968 from facebook/LockHandlingOnRemoveFromSupernode
[ASDisplayNode] Release the lock before setting supernode pointer to nil, in case we are deallocated.
2015-12-21 20:55:54 -08:00
appleguy af9f8dfea7 Merge pull request #931 from lappp9/cells-with-view-controllers
[ASCellNode] Support for wrapping UIViewControllers
2015-12-21 20:55:28 -08:00
Scott Goodson 06688f7061 Release the lock before setting supernode pointer to nil, in case we are deallocated. 2015-12-21 19:57:39 -08:00
Scott Goodson b8602d1073 Fix ASBasicImageDownloader tests - prevent use of init / new instead of +sharedImageDownloader. 2015-12-20 15:42:57 -08:00
Scott Goodson 97bb05d326 Order-of-magnitude speedup in handling of "disable visibility notifications"
Before, it was expensive to check this value, even though it was rarely set.
Now the cost is moved to setting the value, and is made very cheap to check with _hierarchyState.
2015-12-20 12:47:42 -08:00
Scott Goodson 92126f0d66 Support surprisingly nice automatic behavior for the unsupported case of view-backed nodes as children of layer-backed ones. 2015-12-19 20:33:28 -08:00
Scott Goodson bbc0452a7a Improve UIView & CALayer handling of -addSubnode:, and ensure node hierarchies are hooked up even when addSubview: is used directly. 2015-12-19 18:29:05 -08:00
Scott Goodson 32a99e3d41 Ensure that .hierarchyState is propogated to new subnodes early enough for us to reference it as the views are added. 2015-12-18 19:52:47 -08:00
Scott Goodson 578d0f4f78 Final cleanup for initial version of removing the UIWindow-based render range.
The UIWindow mode remains enabled by default, but rendering and the test suite works correctly both enabled and disabled.
2015-12-18 18:47:08 -08:00
Scott Goodson c6759671e6 Merge branch 'master' into RemoveWorkingWindow 2015-12-18 18:25:14 -08:00
Scott Goodson ee152eadf1 Remove CALayer and UIView implementations of "name" property.
This avoids CoreAnimation from capturing the name from a background thread deep within the internals
of AVPlayerLayer, which commits transactions off the main thread.  If the main thread is also accessing
properties that require the lock, in very specific app architectures relying on AVPlayerLayer, this
can cause a deadlock.

The "name" property is primarily used by ASDK's unit test infrastructure, so I'm leaving it in place for
that purpose - and it may still be used for debugging, if someone wants to set it.  It will remain
possible to get the node from a layer or view with asyncdisplaykit_node, and access name from there.
2015-12-18 16:01:19 -08:00
Luke Parham 6cbc51dc61 cleaned up comments 2015-12-16 23:44:17 -06:00
rcancro 2e6e81e66b Don't allow unitialized or under constrained layouts cause a crash.
Should I move the pixel bounds rounding to here instead of leaving it in ASLayout?
2015-12-16 15:34:30 -08:00
Scott Goodson 872b3588d8 Complete merge of working window removal with ASHierarchyState changes in master. 2015-12-11 22:15:13 -08:00
Scott Goodson 00fe336ae7 Merge branch 'master' into RemoveWorkingWindow 2015-12-11 21:34:45 -08:00
Luke Parham eeb49859f0 view controller node is resized to match layoutspec for cells 2015-12-09 13:13:39 -06:00
Luke Parham 5e34f10b81 added sample app that initializes ASCollectionView cells using view controllers, wip though 2015-12-08 21:57:14 -06:00
Scott Goodson 1e9c4563f3 Improve factoring of locking and early returns for -setInterfaceState: and -setHierarchyState: 2015-12-06 19:30:04 -08:00
Scott Goodson c11d90cd3a Fix an issue with ASHierarchyState when disabling rasterization after having enabled it. 2015-12-06 18:46:29 -08:00
Scott Goodson 271f288a19 Polish ASHierarchyState implementation, fix old comment typos, work on test breakages. 2015-12-06 15:04:47 -08:00
Scott Goodson 67aec97523 Adopt ASHierarchyState to replace manual checking for ASCellNode parent. 2015-12-05 22:41:40 -08:00
Scott Goodson 840884272d Introduced ASHierarchyState. Created ASDisplayNode+FrameworkPrivate.h. Fixed deadlock. 2015-12-05 22:20:16 -08:00
appleguy 29897297c5 Merge pull request #913 from Adlai-Holler/WorkaroundCellContentsLoading
Provide Basic Interface State Support for Nodes Outside of Cells
2015-12-05 17:35:28 -08:00
Adlai Holler 4284b6e23a Set _interfaceState before calling fetchData et al. 2015-12-05 00:20:44 -08:00
Adlai Holler 9579420cd7 Add static constant ASInterfaceStateInHierarchy which we'll return if the node is not in a cell but its view is in a window 2015-12-04 12:47:36 -08:00
Scott Goodson ee917ae210 Disable verbose logging, re-enable working window to merge WIP and avoid conflicts. 2015-12-01 16:48:59 -08:00
Scott Goodson 8bc65a9624 A few more debug changes for the removal of the working window. 2015-12-01 12:01:16 -08:00
Scott Goodson 9669f147ba Efficiency improvements to consolidate display events for the window-less preload range. 2015-11-30 19:02:16 -08:00
Scott Goodson 7f59beb195 Initial experimental commit with functioning preloading, without the working window. 2015-11-30 19:01:57 -08:00
Scott Goodson 254f55b758 Add locking for ASInterfaceState. Misc. cleanup. 2015-11-29 14:57:43 -08:00
Scott Goodson 936730d46b ASInterfaceStateVisible is now being driven by a new ASRangeHandlerVisible. 2015-11-29 13:24:42 -08:00
Scott Goodson 1ed22866b1 Working implementation of ASInterfaceState for Display and FetchData behaviors. 2015-11-28 22:48:30 -08:00
Scott Goodson 943cae7eb9 Placeholder implementation of -setInterfaceState:. 2015-11-28 18:22:03 -08:00
Scott Goodson ff0e94b4e1 Introduce ASInterfaceState on ASDisplayNode.
Later, this will be added to ASViewController.  Right now it is not hooked up to drive anything.
It will become the codepath that drives calls like -fetchData and -clearContents.
2015-11-28 18:22:03 -08:00
Scott Goodson 18dffb41e8 Fix an issue that could cause the view / layer to be created early by -clearContents. 2015-11-19 17:10:06 -08:00
Scott Goodson 2a0b9c8e14 Substantially improve behavior of nested Table & Collection Nodes
This ensures memory cleanup happens correctly and introduces a new test project
to support developing new features while stressing tough use cases for correctness.
2015-11-14 15:25:35 -08:00
Scott Goodson 3a4e9902e2 Remove a change that leaked from another diff in progress. 2015-11-07 23:35:58 -08:00
Scott Goodson efa47d65dd Re-add name method to fix tests (grr). Clean up positioning of responder methods in header. 2015-11-07 23:29:36 -08:00
Scott Goodson e0f40d5644 Fix unusual cell content blanking issue when making existing cells much taller. 2015-11-07 23:08:53 -08:00
Huy Nguyen cd31f884dd Move ASDisplayNodePerformBlockOnMainThread to ASInternalHelpers 2015-10-29 16:09:36 +02:00
Huy Nguyen b77522bf4f Remove debugging names of ASDisplayNode and _ASDisplayLayer
- They are neither considered internally nor in tests. And when they are accidently considered, they cause tests to fail.
- Developers can easily set debugging names themselves whenever needed.
2015-10-26 07:44:59 +02:00