277 Commits

Author SHA1 Message Date
Hannah Troisi
e4abe898d5 [ASEditableTextNode] Support UITextInputTraits pass-through methods (threadsafe for use before view creation) (#1809)
* [ASEditableTextNode] Support UITextInputTraits

* consistent property attributes

* remove logging, fix tests to account for UIKit weirdness

* address @appleguy's comments
2016-06-24 16:53:10 -07:00
Adlai Holler
457e08005f [ASDataController] Remove asyncDataFetching Option, Cleanup (#1794)
* [ASDataController] Add some assertions to clarify what queues things happen on

* [ASCollectionDataController] Optimize willReloadData

* [ASDataController] Minor optimizations, no functional changes

* [ASDataController] Always reload data on _editingTransactionQueue

* [ASDataController] Remove async data fetching option, deprecate callbacks

* [ASDataController] Not mutable

* [ASMultidimensionalArrayUtils] Use fast enumeration

* Optimize ASMultidimensionalArrayUtils
2016-06-23 21:08:44 -07:00
Adlai Holler
57310a6fe4 Merge pull request #1802 from facebook/AHThrashTesting
[Unit Tests] Add Table View Data Thrash Testing
2016-06-22 21:35:58 -07:00
Michael Schneider
7175afba59 Merge pull request #1790 from gazreese/ASVideoNode-delegate-superclass
[ASVideoNode] Ensure that both ASVideoNode and ASNetworkImageNode delegate methods are called
2016-06-22 20:43:49 -07:00
Adlai Holler
12336de325 [ASThrashTesting] Array is immutable 2016-06-22 17:25:09 -07:00
Adlai Holler
9fc3ec9096 [ASThrashTesting] Numbers so magic 2016-06-22 17:19:36 -07:00
Adlai Holler
bd7f90f7ee [ASThrashTesting] Remove unneeded clang diagnostics 2016-06-22 17:14:01 -07:00
Adlai Holler
3ca95778df [ASThrashTesting] Some cleanup 2016-06-22 17:11:21 -07:00
Adlai Holler
383667f2c3 [ASThrashTesting] Rocking and rolling! 2016-06-22 17:02:46 -07:00
John Engelhart
ea64d7d09b Pr/fix unit tests memory leaks (#1795)
* Fix some concurrency problems detected by Xcode 8's new Thread Sanitizer.

Some of these changes are arguably just to silence the warnings from Thread Sanitizer.

* Fix several memory leaks in the unit tests.

A number of the unit test source files are compield with `-fno-objc-arc`.  This was clearly overlooked when writing several of the unit tests.

Fixed by (mostly) switching to use of `-autorelease` for the problem code.

NOTE: This commit doesn't fix all the memory leaks found.  There's still at least one leak in `-[ASDisplayNodeTests testSetNeedsDataFetchImmediateState]`, and several leaks in `ASBasicImageDownloader.mm`.  I wasn't able to find a trivial cause to these, unfortunately.
2016-06-22 16:56:53 -07:00
Adlai Holler
4184c21c0c [ASThrashTesting] Continue setting up replay feature 2016-06-22 15:46:47 -07:00
Adlai Holler
15e03d85cf [ASThrashTesting] Move update into an archivable object so we can replay tests 2016-06-22 14:19:59 -07:00
Adlai Holler
290897cb56 [ASThrashTesting] Little more cleanup 2016-06-22 13:06:16 -07:00
Adlai Holler
64835c0db7 [ASThrashTesting] It's working! + Cleanup 2016-06-22 13:04:47 -07:00
Adlai Holler
fcf2db79f8 [ASTableViewThrashTests] Initial commit 2016-06-21 18:46:08 -07:00
Gareth Reese
3fee0810d5 [ASVideoNode] Ensure that both ASVideoNode and ASNetworkImageNode delegate methods are called for ASVideoNode observers 2016-06-21 11:36:54 +01:00
Adlai Holler
0002d333f0 [ASDisplayNodeTests] Add some removeFromSupernode tests 2016-06-16 17:59:50 -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
appleguy
c211c76c64 Merge pull request #1735 from levi/betterFlatten3
[ASLayout] Clean up flattening process of ASLayout
2016-06-11 23:15:16 -07:00
appleguy
a7128cd213 Merge pull request #1605 from lappp9/override-callback-for-display-range
[ASDisplayNode] Added callbacks for entering and exiting fetch data and display ranges
2016-06-11 22:21:20 -07:00
Levi McCallum
a3e8f556a3 Clean up flattening process in ASLayout 2016-06-10 12:43:46 -07:00
Levi McCallum
ca2fb0bc74 Update FBSnapshotTestCase and generate @3x images 2016-06-08 13:33:03 -07:00
Luke Parham
fc5467b110 fixed typo and added backwards compatibility for 'visibilityDidChange' 2016-06-06 02:02:23 -05:00
Luke Parham
e510120031 changed '-visibilityDidChange:' to '-visiblieStateDidChange:' to match the others 2016-06-06 00:56:21 -05:00
Luke Parham
d47059dffe updated load and display did change methods 2016-06-06 00:56:21 -05:00
Luke Parham
8526171b30 reenabled new tests 2016-06-06 00:56:21 -05:00
Luke Parham
449a2cc517 added callbacks for entering and exiting fetch data and display ranges 2016-06-06 00:56:21 -05:00
appleguy
3725e53fe9 Merge pull request #1687 from levi/constrainedSize
[ASDisplayNode] Move constrained size to ASLayout
2016-06-05 18:26:03 -07:00
Hannah Troisi
52d58992da [ASVideoNode] Change superclass to ASNetworkImageNode so that it can be its own placeholder (#1710)
* [ASVideoNode] Change superclass to ASNetworkImageNode so that ASVideoNode can be its own placeholder
- remove _placeholderImageNode property of ASVideoNode (use self.image now instead)
- move layoutSpecThatFits: code to calculateSizeThatFits: & layout: methods as ASImageNode uses calculateSizeThatFits:

* [ASVideoNode] Tweaks to the definition of the delegate protocols to integrate with ASNetworkImageNode (superclass)
2016-06-05 18:18:52 -07:00
Levi McCallum
c469ad273b [ASLayout] Cache constrained size range 2016-06-05 09:22:46 -07:00
appleguy
4804f429b9 Revert "[ASCollectionView] Add a "Null Object" for a layout inspector if custom layout is given but no layout inspector" (#1713) 2016-06-04 22:49:10 -07:00
appleguy
c9b448bc95 Merge pull request #1674 from maicki/RefactorASCollectionViewLayoutInspectingUsage
[ASCollectionView] Add a "Null Object" for a layout inspector if custom layout is given but no layout inspector
2016-06-04 21:30:48 -07:00
Michael Schneider
750d57d964 Disable _ASDisplayLayer test 2016-06-04 20:05:41 -07:00
Michael Schneider
a914e3c428 Change visibleSizeRange to return a range with 0 location and length 2016-06-04 15:40:07 -07:00
Michael Schneider
00d9372ee4 Add a "Null Object" for a layout inspector if no no flow layout is given
The purpose of the ASCollectionViewCustomLayoutInspector is to provide a default implementation if given a custom layout, but no layout inspector.
2016-06-04 13:58:23 -07:00
Michael Schneider
19bb6519ed Fix crash truncating a string of a node with a zero size
The crash happens in the placeholderImage of ASTextNode. The node is not visible in the time it try to get the `placeholderImage` and so the `visibleRange` has count 0 and a crash happens while accessing the first object of an empty array.
2016-06-03 09:53:59 -07:00
Michael Schneider
e84f9f27c2 Fix measurement of ASEditableTextNode
- Add ability to measure the ASEditableTextNode based on the content now by calling measure:
- ASEditableTextNode considers preferredFrameSize now
- Fix crash if ASEditableTextNode is included in a horizontal stack
- Add tests for ASEditableTextNode
2016-05-31 16:29:40 -07:00
Erekle
100d2b4f26 moved spinner to ASVIdeoPlayerNode 2016-05-19 15:07:39 +04:00
Erekle
98c451118b removed play button
* Removed play button from ASVideoNode
* Removed play button tests
* added some checks in ASVideoPlayerNode
* added new delegate method for time formats
2016-05-13 00:46:55 +04:00
appleguy
495f32f0ef Merge pull request #1570 from maicki/FixASTextNodeAttributedStringInconsitency
[ASTextNode] Fix API ASTextNode API inconsistencies
2016-05-10 13:44:56 -07:00
rcancro
22e026a5e1 fix truncater method to only return the truncater. 2016-05-09 16:36:27 -07:00
Michael Schneider
29ab87a1e4 Fix API ASTextNode API inconsistencies
- Deprecate attributedString in ASTextNode in favor of attributedText to be aligned with UILabel
- Deprecate truncationAttributedString in ASTextNode in favor of truncationAttributedText to be aligned with attributedText
2016-05-04 21:03:31 -07:00
Robin Chou
39ee33f21a Update remaining tests. 2016-04-28 21:13:34 -04:00
Robin Chou
9c2909a968 Updating tests. 2016-04-28 21:04:04 -04:00
Michael Schneider
5cfc16733a Add node as parameter in ASLayoutSpecBlock 2016-04-22 11:22:20 -07:00
Michael Schneider
87a37a283e Add a block API to provide an ASLayoutSpec without having to subclass ASDisplayNode 2016-04-20 19:16:54 -07:00
Eric Jensen
6a4bc3fd5b Rename setPlaceholderImage to setVideoPlaceholderImage in order to prevent super class setter conflict 2016-04-18 22:30:32 -07:00
Eric Jensen
b5c3b15069 Observe playbackLikelyToKeepUp in order to handle player buffer filling and emptying 2016-04-18 22:13:49 -07:00
Eric Jensen
e65d63a502 Simplified and improved video node's handling of state changes:
- Simplified visibility state change handling.
- Placeholder image is now updated after switching assets.
- Improves memory usage by clearing the placeholder image in clearFetchedData.
2016-04-18 22:13:49 -07:00
appleguy
f9d00eea93 Merge pull request #1550 from maicki/FixArrayDiffStaticAnalyzer
[NSArray+Diffing] Static analyzer issue with common indexes algorithm in _asdk_commonIndexesWithArray:
2016-04-18 22:01:29 -07:00