Commit Graph

13022 Commits

Author SHA1 Message Date
Garrett Moon
2c9e51e8f7 Add support for textContainerInset to ASTextNode (ala UITextView) (#2062)
* Add support for textContainerInset to ASTextNode (ala UITextView)

* Better comment, parens to increase readability. Thanks @schneider!

* Add textContainerInset snapshot test.
2016-08-12 12:07:00 -07:00
Flo
39cb188b9e [ASVideoNode] Improve playerStatus behaviour and image generation (#2024)
* [ASVideoNode] Use the videoComposition when generating images.

* [ASVideoNode] Improve playerState behaviour.

* [ASVideoNode] Use KVO on _player.rate to determine the playerState.
2016-08-12 12:06:02 -07:00
Hannah Troisi
3c0fea80ef Merge pull request #2023 from maicki/MSLayoutTransitionAPINaming
[Layout Transition API] Move Transition Layout API out of beta header and remove shouldMeasureAsync from API
2016-08-11 21:17:54 -07:00
Hannah Troisi
2040674aed Merge pull request #1767 from facebook/AHPercentToFraction
[ASRelativeDimensionType] Replace "percent" with "fraction" Where Appropriate
2016-08-11 20:33:34 -07:00
Michael Schneider
075dd73280 Parse RFC 3339 date time strings around 7-8 times faster (#2059) 2016-08-11 12:46:26 -07:00
Adlai Holler
aedb83cfe3 [ASDataController] Remove Unused Batch Update Processing Code (#2054)
* [ASDataController] Remove dead batch updating code

* Address PR comments
2016-08-11 11:48:17 -07:00
Hannah Troisi
2afd063b10 [ASRangeController] Debug overlay to show the size and direction of display + fetchData ranges during scrolling. (#2008)
* Rebase ASRangeController diff with master.

* fix Table / CollectionNode debug label names
- now returns class names rather than generic ASTableNode, ASPagerNode
- ASPagerNode will be labeled as ASPagerNodeProxy (not sure how to get around this)

* refactor layout code: use ASDk's own resizeableRoundedCorner... methods

* Fixes and cleanup for manual layout version of range controller debug overlay.

I am working on a layout spec-based version, but it has some issues, so landing this to get the near-term value is probably the best next step.

* Remove .orig and .rej files.

* One last .orig file to remove.

* Final project file cleanup and tweaks to implementation for ASTableNode.

* fix build issues

* fix arrow directions
2016-08-11 11:23:07 -07:00
Hannah Troisi
7494b114aa Merge pull request #2041 from maicki/MSLayoutSpecChildChildrenProperty
[ASLayoutSpec] Make child and children a property
2016-08-11 10:56:31 -07:00
Adlai Holler
3f77a3d46c More Percent -> Fraction 2016-08-11 10:37:48 -07:00
Adlai Holler
e80a82f832 [ASDataController] Bail on waitUntilUpdatesAreCommitted if batch updating (#2053) 2016-08-10 14:51:10 -07:00
Brandon Withrow
49b70905c5 Code Cleanup 2016-08-10 12:06:46 -07:00
Brandon Withrow
b8b839b9e6 Fix parenting with solid layers 2016-08-10 11:54:57 -07:00
Michael Schneider
b84be07776 Make child and children on ASLayoutSpec a property 2016-08-10 10:33:13 -07:00
Michael Schneider
32058815f2 Move Transition Layout API out of beta header and remove shouldMeasureAsync from API
shouldMeasureAsync is enabled by default now.
2016-08-10 10:30:25 -07:00
Adlai Holler
f07d5c4e99 [Examples] Percent -> Fraction 2016-08-10 10:26:21 -07:00
Adlai Holler
7abceba4a0 Rename snapshot test reference images 2016-08-10 10:26:21 -07:00
Adlai Holler
eb9f86cfdb Replace "percent" with "fraction" where appropriate 2016-08-10 10:26:21 -07:00
Peter
f5a63ed4ab Initial Commit 2016-08-10 19:31:50 +03:00
Adlai Holler
49b65fd783 Revert "Fix if pending layout will be deallocated (#2038)" (#2051)
This reverts commit 2804d50220.
2016-08-09 16:10:21 -07:00
Hannah Troisi
893e601e81 Convert to type-generic math (#2050)
* [Optimization] Convert to type-generic math

* add std:: prefix in obj-c++ files

* more cleanup

* revert test changes

* convert min and max back to fmin/fmax
2016-08-09 15:31:37 -07:00
Michael Schneider
aba05a747c [ASThread] Add SharedLocker and SharedUnlocker that uses a shared pointer for the mutex (#2047)
* Add SharedLocker and SharedUnlocker that uses a shared pointer for the mutex

* Move ASTextKitContext to use Shared Locker
2016-08-09 15:20:31 -07:00
Brandon Withrow
42380b03b4 Added further support for rect and ellipse layers 2016-08-09 15:20:11 -07:00
Michael Schneider
d9db780b0b [ASTextNode] Fix ASTextNode shadow is not rendering (#2042)
* Passing through shadow in renderer attribute

* Fix memory leak setting shadow color
2016-08-09 14:56:59 -07:00
Hannah Troisi
03c74452b2 [ASImageNode] fix scaling math (#2045)
* fix ASImageNode scaling

* convert to type-generic math
2016-08-09 13:45:19 -07:00
Michael Schneider
024b8afef5 Move NS_ASSUME_NONNULL_END to the end of the ASDisplayNode header (#2046) 2016-08-09 13:06:01 -07:00
Peter
a31c0a3e40 no message 2016-08-09 00:23:43 +03:00
Peter
cd0eb7f756 no message 2016-08-09 00:23:25 +03:00
Peter
9712c36334 no message 2016-08-09 00:23:02 +03:00
Peter
2e501affef no message 2016-08-09 00:22:48 +03:00
Peter
88bb8b3f6e Merge commit 'f40f08753d432cdaa7a799a7875bfc2a1f21c973'
# Conflicts:
#	AsyncDisplayKit/ASDisplayNode.mm
2016-08-09 00:22:26 +03:00
Peter
e0dbb64ee5 no message 2016-08-09 00:20:58 +03:00
Hannah Trosi
f40f08753d fix ASImageNode scaling 2016-08-08 11:10:10 -07:00
Adlai Holler
1fbf8ad073 [ASDataController] Cancel if we lose our data source, fix bugs (#1987)
[ASRangeController] We're already on main thread, remove blocks

Make data source read-only, clarify what's asynchronous

[ASDataController] Clean up some interfaces

[ASDataController] A little more cleanup

[ASDataController] Cleanup

[ASDataController] Restore some changes, exit more often

[ASDataController] Use item counts that we already have rather than requerying them

[ASDataController] Revert weakifications

[ASDataController] Add a mechanism to measure how much work we avoided
2016-08-05 15:39:33 -07:00
ricky
39da5d2cb0 [ASTraitCollection] propagate window container size via ASTraitCollection in iOS7 (#2019) 2016-08-05 10:34:13 -07:00
Michael Schneider
2804d50220 Fix if pending layout will be deallocated (#2038)
The pending layout transition needs to stay alive at least until applySubnodeInsertions did finish execute as it can happen that with Implicit Hierarchy Management new nodes gonna be added that internally call setNeedsLayout what will invalidate and deallocate the transition in the middle of inserting nodes
2016-08-05 10:25:50 -07:00
David Rodrigues
70574243f7 Prevent API misuse at compile time (#2035)
Using Objective-C attributes, in this case `unavailable`, we can hide
unsupported APIs at compile time instead of detecting and warn about it
at runtime with a set of asserts.
2016-08-04 19:00:46 -07:00
Adlai Holler
01c8dc3dc2 [ASDisplayNode] Assert that user doesn't reuse layout specs (#2036) 2016-08-04 16:54:48 -07:00
Brandon Withrow
0d69b161d6 Added support for Solid masks and Line Caps 2016-08-04 15:21:34 -07:00
Adlai Holler
4725035f21 [ASTableView/ASCollectionView] Flush pending updates before selecting/scrolling to item (#2034) 2016-08-04 13:19:14 -07:00
Brandon Withrow
b2ac190b96 Bug fixes 2016-08-03 15:49:47 -07:00
Benjamin Scholtysik (Reimold)
c9525f82cd Address comments to PR by Lumaxis 2016-08-03 15:45:58 -07:00
Garrett Moon
f3c8fd8d62 Because Pods and the Podfile.lock are not checked in, they should be … (#2029)
* Because Pods and the Podfile.lock are not checked in, they should be removed before installing. Otherwise the state is not consistant.

* Pod install no longer updates the repo

* Copy changes to split up examples.
2016-08-03 13:27:45 -07:00
Chris Danford
c09db1cb17 ASImageNode backing store sharing for memory and CPU reduction (#1974) 2016-08-03 13:10:50 -07:00
Hannah Troisi
57fd880d86 Merge pull request #2027 from facebook/1.9.90
[Cocoapods] Update PINCache dependency to include performance improv…
2016-08-02 23:01:49 -07:00
Hannah Troisi
76a81b2a57 [Cocoapods] Update PINCache dependency to include performance improvements
Includes PINCache 3 beta (in latest PINRemoteImage release) AND Update master version number to 2.0-beta.1 ahead of API changes
2016-08-02 23:01:02 -07:00
Hannah Troisi
36a1ac4997 [Cocoapods] Update PINCache dependency to include performance improvements
Includes PINCache 3 beta (in latest PINRemoteImage release)
2016-08-02 22:58:56 -07:00
Michael Schneider
e58136de58 Merge pull request #2026 from maicki/MSRevertUseChildrenMapDirectly
Revert "[ASLayoutSpec] Use childrenMap directly to prevent creating an NSArray within ASDK Part 2 (#2021)"
2016-08-02 10:13:22 -07:00
Michael Schneider
d5cbe33686 Revert "[ASLayoutSpec] Use childrenMap directly to prevent creating an NSArray within ASDK Part 2 (#2021)"
This reverts commit d5a7c19522.
2016-08-02 10:10:36 -07:00
Peter
98aaa3fc67 no message 2016-08-02 17:01:22 +03:00
Michael Schneider
d5a7c19522 [ASLayoutSpec] Use childrenMap directly to prevent creating an NSArray within ASDK Part 2 (#2021)
* Revert "Revert "[ASLayoutSpec] Use childrenMap directly to prevent creating an NSArray within ASDK (#1937)""

This reverts commit 735b4ebd08.

* Fix crash and add exception for mutating while using fast enumeration of ASLayoutSpec children

NSFastEnumeration is potentially quite dangerous in the wrong hands. In particular, it does not provide a safe mechanism for you to return temporary objects directly, and it does not provide any guarantee that you will be called when the enumeration has completed; therefore if we generate temporaries and store them in an instance variable, we will not necessarily be able to clean them up! This means fast enumeration methods should never be called within an autorelease pool or the autorelease pool be drained within the fast enumeration loop.

The reason is we store references to objects in the stackBuf struct by casting the child pointer to __autoreleasing id. If we pop the autorelease pool between calls to -countByEnumeratingWithState:objects:count:, it will die in a messy explosion of pointer dereferences and EXC_BAD_ACCESS.

* Add tests for ASDisplayNode and ASLayoutSpec fast enumeration
2016-08-01 18:08:48 -07:00