71 Commits

Author SHA1 Message Date
Michael Schneider
11215bf97f [Automatic Hierarchy Management] Rename IHM to automatic hierarchy management and move out of beta header (#2066)
* Rename automaticHierarchy to automaticallyManagesSubnodes

* Comment adjustments
2016-08-15 12:06:06 -07:00
appleguy
74bf376b2f [ASDisplayNode] Rename _propertyLock to __instanceLock__ to avoid subclass naming collisions. (#1941) 2016-07-16 15:32:13 -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
938ecd9b6f Fix deadlock when laying out on multiple threads
Summary:
We observed a deadlock which occurred when two threads were laying out the same set of nodes.

On one thread, layout would occur on a leaf node. It would lock and as part of this layout
process, ASDK walks up the node tree and calls __setNeedsLayout on its supernode until it
reaches the supernode with no supernode. When the supernode gets its call to __setNeedsLayout
it also locks. So leaf node locks and then awaits supernode lock.

On another thread, we're doing a layout pass on the supernode in the above thread. This locks
the supernode and attempts to lock the leaf node. This deadlocks (remember the above thread
is holding onto the leaf lock and awaiting the supernode lock. This thread is holding onto
the supernode lock and awaiting the leaf lock).

This is all exacerbated by the use of recursive locks.
2016-05-03 15:56:38 -07:00
appleguy
dd4853bf3a Merge pull request #1273 from aaronschubert0/tvOS
[tvOS] Add default focus states to ASControlNode & ASImageNode.
2016-04-20 13:29:31 -07:00
Michael Schneider
42174210c5 Follow up for ASCollectionNode and ASTableNode background color fix 2016-04-19 16:07:42 -07:00
Michael Schneider
3793dc024e Improve setting special properties for certain classes directly to the UIView
- Remove duplicated code in ASCollectionNode and ASTableNode
- Fix setting the pending state to the view if applying the pending state to the view
2016-04-19 10:50:22 -07:00
Aaron Schubert
21abe8f899 Fix merge conflicts 2016-04-19 09:02:07 +01:00
Michael Schneider
2fade63f1b Add handling layer backed accessibility elements within layer backed nodes 2016-04-11 12:59:04 -07:00
Michael Schneider
28c4fede57 Add support for newly added a11y properties in iOS 8 / 9 and tvOS
New a11y properties:
- accessibilityNavigationStyle
- accessibilityHeaderElements
- accessibilityActivationPoint
- accessibilityPath
2016-04-09 11:23:25 -07:00
Michael Schneider
f3303c1fb8 Add properties for accessibilty to ASDisplayNode to support layer backed nodes 2016-04-09 11:23:25 -07:00
Michael Schneider
9c29d0efa8 Initial commit for improved accessibility support 2016-04-09 11:23:25 -07:00
Eric Jensen
ddd5ff1f75 Correct spelling errors 2016-03-15 21:56:51 -07:00
Huy Nguyen
caddd1d287 Fix threadSafeBounds
- Bounds change set directly to _ASDisplayLayer should also be saved to threadSafeBounds
- Remove overkill _usesDisplayView flag
2016-03-03 16:18:07 -08:00
Huy Nguyen
9162d7b2df Implement thread-safe bounds and use it in ASTextNode 2016-03-02 22:42:53 -08:00
Scott Goodson
5e35ef7938 [ASDisplayNode] Ensure display is triggered properly even before layers are onscreen (in display range). 2016-02-29 00:46:45 -08:00
Scott Goodson
eac85b6c9a [ASDisplayNode] Optimize -setNeedsDisplay, deep mutable array copies.
These optimizations are surprisingly impactful.  -setNeedsDisplay being called
for every node triggered cancelAsyncDisplay, locking, and memory management overhead
that is completely avoidable because Core Animation triggers first display automatically.

The mutable array copy optimizations reduced this key cost by over 10x, from 52ms to 5ms
on an iPad Air 2 / A8X with a real-world test case.
2016-02-28 20:54:56 -08:00
Scott Goodson
89516129a4 [ASDisplayNode] Bridge should trigger display when opacity or bg color change. 2016-02-25 18:25:39 -08:00
Aaron Schubert
682903fba5 Make ASDisplayNode unable to be focused by default. ASControlNode will be the new default. 2016-02-23 10:36:53 +00:00
Adlai Holler
5eca1e6c68 [ASDisplayNode:UIViewBridge] Clean up setNeedsDisplay/setNeedsLayout 2016-02-21 11:23:28 -08:00
Adlai Holler
d9d4d40997 [ASDisplayNode:UIViewBridge:setFrame] Use CALayer directly when possible 2016-02-21 10:52:20 -08:00
Adlai Holler
b1c7f47b02 [ASDisplayNode:UIViewBridge] Refactor setFrame: to simplify logic 2016-02-21 10:42:38 -08:00
Adlai Holler
3ff833c4f5 [ASDisplayNode:UIViewBridge] Reduce calls to -isNodeLoaded 2016-02-21 10:10:04 -08:00
Adlai Holler
e1bf0f6a88 [ASDisplayNode:setFrame] Initialize local variable values 2016-02-21 10:08:27 -08:00
Adlai Holler
648dc817ad [ASDisplayNode] Use a C function to lazily create pending view state 2016-02-21 10:03:06 -08:00
Adlai Holler
b929bfdd33 I am not a smart man 2016-02-20 15:43:00 -08:00
Adlai Holler
e9712cdfa1 Make the tests sturdier, improve setNeedsLayout/setNeedsDisplay bridging 2016-02-20 15:43:00 -08:00
Adlai Holler
636c8c04f3 Improve bridging of frame property 2016-02-20 15:43:00 -08:00
Adlai Holler
563d0893a3 Beef up the properties, beef up the demo app 2016-02-20 15:43:00 -08:00
Adlai Holler
7a6006e627 Apply same fix on opaqueness 2016-02-20 15:40:47 -08:00
Adlai Holler
b0cbd2dd59 Fix background color issue 2016-02-20 15:40:47 -08:00
Adlai Holler
71edc810d3 Revert unnecessary change to [ASDisplayNode setOpaque:] 2016-02-20 15:40:47 -08:00
Adlai Holler
a46bd8e29b More tests, all but 1 passing 2016-02-20 15:40:47 -08:00
Adlai Holler
1514cef36d Beef up the unit tests and make em pass 2016-02-20 15:40:47 -08:00
Adlai Holler
b5b5f9f559 Some clean up 2016-02-20 15:40:47 -08:00
Adlai Holler
ea304f7f37 Nodes always read bridged properties from pending state 2016-02-20 15:40:47 -08:00
Michael Schneider
5d474bcb1a Remove ASDisplayNode -shouldUseNewRenderingRange method and ASRangeControllerStable class 2016-02-07 15:03:23 -08:00
Aaron Schubert
28b03e3a28 [tvOS] Expose UIFocusEnvironment Protocol methods to ASDisplayNode 2016-01-13 10:09:44 +00:00
Aaron Schubert
cc4f604ea3 [tvOS] Initial commit to make build run. 2016-01-12 14:43:30 +00:00
Scott Goodson
0feaa2a368 Improvements to the efficiency of recursivelySetInterfaceState: and the beta range controller. 2016-01-10 02:40:47 -08:00
Scott Goodson
b273f358f5 [ASRangeController] Initial implementation of functional-style, ASInterfaceState-based range controller. 2016-01-01 00:48: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
99fbc97bda Optimizations for ASTextNode handling of renderer allocation and deallocation.
Optimizations for ASDisplayNode handling of bridged property "contentMode", especially for layer-backed nodes.
2015-12-25 01:36:32 -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
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
Scott Goodson
840884272d Introduced ASHierarchyState. Created ASDisplayNode+FrameworkPrivate.h. Fixed deadlock. 2015-12-05 22:20:16 -08:00
Scott Goodson
3b6b48175d Fix for an incorrect assertion firing when transforming an ASLayoutSpec-positioned node. 2015-12-01 17:49:11 -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