Commit Graph
635 Commits
Author SHA1 Message Date
Adlai Holler 1b16143456 Avoid calling it on tvOS 2019-04-22 16:26:00 -07:00
Adlai Holler 9b9e152cc5 Make it private again 2019-04-22 10:02:06 -07:00
Adlai Holler 2a5dc17b49 Don't call syscall on tvos 2019-04-22 09:20:35 -07:00
Adlai Holler e750cdc24a Keep the prior semantic of just requiring PROFILE to be defined 2019-04-19 15:01:29 -07:00
Adlai Holler f4793571f8 Refactor profiling code to fix warnings, be safer, more debuggable, less macro-y 2019-04-19 14:50:39 -07:00
Wu Zhong 5c185baae9 Remove lock of ASTextNodeRendererKey (#1454)
* Remove lock of ASTextNodeRendererKey

* Remove class check for isEqual

* Add const specifier to function parameter

* Fixes typo

* Fixes typo
2019-04-19 14:07:18 -07:00
Adlai Holler 38a67dd328 Shut down graphics contexts experiment (#1458)
* Shut down graphics contexts experiment

* Remove dead import

* Remove gone class
2019-04-18 18:36:39 -07:00
Harry Shamansky e4f4220b2b [#1451] Add support for UIAccessibilityCustomAction (#1452)
This PR adds support for UIAccessibilityCustomAction propagation through ASPendingState so that it can be picked up by VoiceOver.
2019-04-17 12:30:11 -07:00
Adlai Holler f48d778e3f Only create activities during debug (#1456) 2019-04-16 14:41:42 -07:00
Tim Norman 981482c564 Add didEnterHierarchy/didExitHierarchy to ASNodeController. (#1444) 2019-04-12 12:13:43 -07:00
Eric Scheers d55fd47b88 [ASTextNode] Maintain isAccessibilityElement setting on text nodes when updating text (#1326) 2019-04-09 08:14:36 -07:00
Michael Schneider b9c8b3233b Use AS::Mutex in ASCollectionElement (#1445) 2019-04-05 15:49:36 -07:00
Michael Schneider a66f0483c9 Simplify ASTraitCollection propagation in ASViewController (#1447) 2019-04-05 15:49:27 -07:00
Michael Schneider 838ab85a99 Use instance lock for ASPrimitiveTraitCollection (#1442)
* Use instance lock for ASPrimitiveTraitCollection

* Remove the atomic
2019-04-04 07:32:29 -07:00
Adlai Holler a4957bbbf2 Revert "Have image nodes draw into opaque contexts automatically if possible (#1432)" (#1443)
This reverts commit 28522ce977.
2019-04-04 07:28:32 -07:00
Adlai Holler bf466e83f2 Fix the stub for layerActionForKey: to let CA continue the search (#1441)
* Fix the stub for layerActionForKey: to let CA continue the search

* Kick CI
2019-04-03 17:46:26 -07:00
Max Wang d970dc3548 Fix scroll node in yoga (#1435)
* fix SIMULATE_WEB_RESPONSE not imported #449

* Fix to make rangeMode update in right time

* remove uncessary assert

* Fix collection cell editing bug for iOS 9 & 10

* Revert "Fix collection cell editing bug for iOS 9 & 10"

This reverts commit 06e18a1059.

* Fix child not fit to full scroll node's bounds when flex_grow = 1.0 is used on child
2019-04-02 08:11:25 -07:00
Greg Bolsinga 442317b8ab Wrap transaction operation retain cycle fix in an experiment (#1438)
* Wrap transaction operation retain cycle fix in an experiment

This is a follow on to #1429.

* fix typo in experiment name. fix copyright in tests file.
2019-04-01 16:11:52 -07:00
Adlai Holler 19e1a34a70 Add a verbose log for locking operations. Has no effect in production (#1436)
* Add a verbose log for locking operations. Has no effect in production

* Need check
2019-04-01 11:20:38 -07:00
ricky 453465564d [ASDisplayNode] Stop infinite layout in _u_measureNodeWithBoundsIfNecessary (#1434)
We came across an infinite layout loop in `_u_measureNodeWithBoundsIfNecessary`. After requesting a layout from above, the sizes between pending and caluclated layout still do not match. We continue to prefer to use the pending layout and ask for another layout loop from above. We can’t seem to break out of this loop. The solution (thanks to Huy for the guidance) was to nil out the pending layout we get from requesting the layout from above.

I was only able to reproduce this when working with a node in a `UINavigationBarItem’s` `titleView`. I think that UIKit must be doing something sneaky with setting the frame on the view. While I was not able to create a unit test to catch this issue (I tried for a long time, and can post what I’ve come up with to see if anyone has any suggestions), I was able to create a pretty simple example project that shows the behavior:
https://github.com/rcancro/TextureLayoutLoopExample
2019-04-01 08:53:47 -07:00
Adlai Holler 28522ce977 Have image nodes draw into opaque contexts automatically if possible (#1432)
* Have image nodes draw into opaque contexts if the image is opaque and it fills the context

* Call backingSize once
2019-03-29 11:16:35 -07:00
Ballad 8231599d43 [ASImageNode]fix incorrect backing size calculation (#1189)
* fix backing size for image node which content mode is scaleAspectFit

* chore: update comments and naming

* add change log

* Update CHANGELOG.md

* Update CHANGELOG.md

Co-Authored-By: junjielu <348649634@qq.com>

* add unit test for backing size calculation

* correct license
2019-03-29 10:45:55 -07:00
Adlai Holler fe1cb1c79d Add support for clipping only specific corners, add unit tests (#1415)
* Add support for clipping only specific corners, add unit tests

* Remove some cleanup to make the diff smaller

* Fix
2019-03-28 18:42:33 -07:00
Max Wang 039b6f03dd Fix dealloc on bg (#1410)
* fix SIMULATE_WEB_RESPONSE not imported #449

* Fix to make rangeMode update in right time

* remove uncessary assert

* Fix collection cell editing bug for iOS 9 & 10

* Revert "Fix collection cell editing bug for iOS 9 & 10"

This reverts commit 06e18a1059.

* Fix dealloc long gesture in background
2019-03-28 18:42:16 -07:00
Jacob Farkas 69f42dbb1d Replace +load initializers with __attribute__((constructor)) functions (#1425)
* Replace +load initializers with __attribute__((constructor)) functions

* Updating the documentation for textureDidInitialize, per @nguyenhuy
2019-03-28 18:41:42 -07:00
Greg Bolsinga 5f8161ece7 Fix retain cycle with transaction operations (#1429)
Add unit tests that help find cycles. `-testWeakWithSingleOperation` fails without the code fix applied.
2019-03-28 18:37:06 -07:00
Michael Zuccarino dfd44e8b9e [Experiment] Dont forget about these collection view background deallocs (#1424)
* Dont forget about these collection view background deallocs

* Also Table view for completeness
2019-03-27 11:23:27 -07:00
Michael Zuccarino 27cc0f2717 Experiment with disabling ASViewController background dealloc (#1420) 2019-03-25 14:11:04 -07:00
Huy Nguyen dbe1ceb77c Follow up on the ASRangeController fix in #1418 (#1419)
The changes in #1418 is a bit too aggressive when it comes to nodes that are in display range. It forces those nodes to not preload.

Also update the changes to avoid diluting the experiment data by triggering too broadly (i.e avoid triggering when the old and new implementations yield the same result leading to no behavior change).
2019-03-22 12:41:49 -07:00
Tim Norman 5937ac3333 Fix a bug with Yoga nodes whose position change and don't update. (#1408) 2019-03-22 11:30:40 -07:00
Huy Nguyen 09365b90ee Fix bug in ASRangeController that causes some cell nodes of a collection view which is about to becomes invisible to load their backing view/layer and render (#1418) 2019-03-22 06:40:18 -07:00
Michael Schneider 74de765b62 Only set ASLayoutElementStyle delegate if Yoga is enabled (#1417) 2019-03-21 07:41:02 -07:00
Kevin f4d6b95f1c Add support for reverse direction to yoga layouts (#1413)
* Add support for reverse direction to yoga layouts

* #ifdef YOGA yoga-specific additions

* oops
2019-03-20 15:09:21 -07:00
Andrew Yates 59279e7920 Fix GIF Caching (#1405) 2019-03-18 13:32:01 -07:00
Huy Nguyen e3ae6635c7 Avoid an unnecessary lock & unlock pair in ASMainSerialQueue (#1409) 2019-03-16 09:34:39 -07:00
Adlai Holler 34f16217a6 Add layer-action support to nodes (#1396)
* Add layer-action support to nodes, unify hierarchy notifications on it

* Better pending state

* Fix bool

* Skip extra copy

* Never run default actions

* Continue the search
2019-03-13 11:58:08 -07:00
Garrett Moon 96a7723d3b Context is a pretty general name that will cause conflicts with subclasses (#1399) 2019-03-12 15:32:58 -07:00
Adlai Holler 223d6bdca7 Fix header typo (#1402) 2019-03-12 14:34:58 -07:00
Adlai Holler abe46b08a9 Make shared CA transaction queue variable extern so it's actually shared (#1397) 2019-03-12 08:22:21 -07:00
Adlai Holler 5490d4d1fa Make experiment checks faster (#1393)
* Make experiment checks use dispatch_once when not debugging, clean up singleton

* One more

* Pull out the variable
2019-03-12 07:43:38 -07:00
ernestmama 6f44c3921e Remove experimental features (exp_skip_a11y_wait && exp_new_default_cell_layout_mode) (#1383)
* Remove experimental features

* prevent blocking main thread

* remove small content all together as none is the default

* Update ASExperimentalFeatures.h
2019-03-11 13:34:35 -07:00
Greg Bolsinga 593b56aaff Clean up a clang analyzer cast error (#1387)
~/Texture/Source/Private/ASMutableElementMap.mm:32:24: warning: Conversion from value of type 'NSMutableArray<NSMutableArray *> *' to incompatible type 'ASMutableCollectionElementTwoDimensionalArray *'
    _sectionsOfItems = (id)ASTwoDimensionalArrayDeepMutableCopy(items);
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
2019-03-09 12:15:20 -08:00
Adlai Holler 9cd0d58373 Rename ASDN C++ namespace to AS (#1366)
* Rename ASDN C++ namespace to "AS." Referring to the framework as ASDisplayNode is pretty out-dated and verbose. See CoreAnimation which usees CA for their internal namespace.

More using

* More cases
2019-03-09 12:14:58 -08:00
Jacob Farkas a38b3f547e Add UIDataSourceModelAssociation to ASTableView and ASCollectionView (#1354)
* Add UIDataSourceModelAssociation protocol conformance to ASTableView and ASCollectionView.

* Implementing review feedback from @Adlai-Holler
2019-03-09 07:56:10 -08:00
Garrett Moon 9b80eabd8f Adds support for using UIGraphicsImageRenderer in ASTextNode. (#1384)
* Adds support for using UIGraphicsImageRenderer in ASTextNode.

In many cases this reduces the backing store of text nodes by 1/2.

* Guard for UIGraphicsRenderer availability.

* Comma
2019-03-09 07:55:46 -08:00
Kevin 872e89b772 Need some more locks for working with calculated yoga layouts (#1388) 2019-03-09 07:55:35 -08:00
Kevin 510000ee85 Correct attributes lookup for supplementary elements. (#1318) 2019-03-08 09:41:25 -08:00
Greg Bolsinga dffe22f12d Fix CTLineRef leaks (#1386)
Found by Clang Static Analyzer:

~/Texture/Source/ASTextNode2.mm:663:39: warning: Potential leak of an object stored into 'truncationTokenLine'
      CTLineRef truncationTokenLine = CTLineCreateWithAttributedString((CFAttributedStringRef)_truncationAttributedText);
                                      ^
~/Texture/Source/ASTextNode2.mm:666:49: warning: Potential leak of an object stored into 'additionalTruncationTokenLine'
      CTLineRef additionalTruncationTokenLine = CTLineCreateWithAttributedString((CFAttributedStringRef)_additionalTruncationMessage);
                                                ^
2 warnings generated.
2019-03-08 09:40:51 -08:00
Michael Schneider bb6102aa18 Add Yoga support to ASButtonNode (#1381)
* Add Yoga support to ASButtonNode

* Drop unowned ASLayoutElementStyle parameter

* Fix access of Yoga properties

* Move ASButtonNode Yoga logic to Category

* Update header
2019-03-08 08:32:57 -08:00
Kevin aeb370ff13 Fix an issue where state change notifications can be sent mulitple times. (#1372)
Before the change: both - (void)setShouldInvertStrongReference:(BOOL)shouldInvertStrongReference and - (void)setNode:(ASDisplayNode *)node will call through [self setupReferencesWithNode:node]; which call the [node addInterfaceStateDelegate:self];
2019-03-08 08:27:49 -08:00