Commit Graph
5092 Commits
Author SHA1 Message Date
LiuJian c6fc05d9e6 Set automaticallyAdjustsContentOffset to ASTableView when view is load (#1278)
* Set automaticallyAdjustsContentOffset when view is load

* [ASTableNode] Update test: set automaticallyAdjustsContentOffset before view is load (#1278)
2018-12-11 19:32:43 -08:00
Kevin b69fe703fd Wrap supplementary node blocks to enable resizing them. (#1265)
* Wrap supplementary node blocks to enable resizing them.

Most ASCellNodeBlocks are wrapped by ASCollectionView.mm to add an `interactionDelegate` as well as calling `enterHierarchyState` on the node and setting its transform to a reflection if `inverted` is set on the collectionView.

This PR adds this behavior to supplementary nodes as well.

* Simplify code / block will never be nil
sync-base-12-11-18
2018-12-10 14:33:04 -08:00
Kevin 5ae6547f5f Move assertions so they are valid. (#1261)
If PIN_ANIMATED is enabled, the creation of a PINRemoteImageManager
will create a sharedDownloader also. Thus we cannot assert that it
doesn't exist. We will move this assertion up to the methods that
create the preconfiguredSharedManager and before said manager is
allocated.
2018-12-10 14:32:16 -08:00
Max Wang 1d4b4c73cd Yoga debug info (#1253)
* 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.

* Add description method for yoga.

* Fix comment
2018-12-10 14:29:43 -08:00
Michael Schneider 82b4d34e5b Introduce ASCellLayoutMode (#1273)
* Introduce ASCellLayoutMode

* Some smaller improvements

* Improve logic around _superPerformBatchUpdates:completion:

* Add comment about default values for ASCellLayoutModeNone

* Always call _superReloadData:completion: within UICollectionView

* Add initial range test for ASCellLayoutModeNone
2018-12-09 23:39:28 -08:00
Max Wang 4d9d3c26d9 Disable a11y cache (#1274)
* disable a11y cache

* style update
2018-12-09 08:41:18 -08:00
Adlai Holler bccdf83d2f Escalate directly to yoga root rather than walking up (#1269) 2018-12-07 13:12:57 -08:00
Michael Schneider 86a853ea09 Forward hitTest:withEvent and piontInside:withEvent: to node within _ASCollectionViewCell (#1268) 2018-12-06 07:57:54 -08:00
Michael Schneider 758afabde3 Fix isTruncated logic in ASTextNode2 (#1259)
* Fix isTruncated logic in ASTextNode2

* Add truncation tests
2018-12-04 13:40:24 -08:00
Kevin fb844c3252 Allow setting SDK and platform through environment variables for build.sh (#1249) 2018-12-03 15:44:15 -08:00
Andrew Yates 430169ff31 Move Bluebird to new row. (#1264) 2018-12-03 15:42:22 -08:00
Shihab 712b66e05a Added Bluebird (#1263) 2018-12-03 12:43:36 -08:00
Rasul Tataev 635a370fff Documentation typo, "trying" written two times. #trivial (#1258)
Issue is at row 153 of ASVideoNode.h file
2018-11-30 07:35:36 -08:00
ricky 3daa5ac538 [ASPrimitiveTraitCollection] Fix ASPrimitiveTraitCollectionMakeDefault and implement containerSize (#1256)
With the changes to `ASPrimitiveTraitCollection` in https://github.com/TextureGroup/Texture/commit/e392f832f42897da41a7c0106709b55427efcea4 a new `ASPrimitiveTraitCollectionMakeDefault` was created. The new method didn’t give all values in an `ASPrimitiveTraitCollection` a default value (or initialize the struct with `{}`). This was causing fields like `userInterfaceIdiom`, `forceTouchCapability`, and `displayScale` to be filled with garbage, leading to `ASPrimitiveTraitCollectionIsEqualToASPrimitiveTraitCollection` to return `YES` when the trait collection hadn’t really changed.

It also looks like the getter `containerSize` was not implemented.
2018-11-28 08:56:08 -08:00
ernestmama 4d1ffcc2d0 Add more delegate methods for monitoring network image node progress (#1247) 2018-11-27 09:48:57 -08:00
Huy Nguyen a255953d34 Avoid using global Mutex variables (#1252)
After 5c9815f, some Mutexes are used as global C++ variables which are loaded before main(). Since the Mutex constructor checks for unfair lock experiment, it triggers an experiment configuration load, and our app isn't ready to respond that early in the process.
2018-11-26 17:25:38 -08:00
Michael Schneider f2bc63f05a Add way to compile out ASTextNode + TextKit dependencies (#1242)
* Add way to compile out ASTextNode + TextKit dependencies

* Compile out ASExperimentalTextNode and fix tests
2018-11-23 09:13:15 -08:00
Michael Schneider 31125ff6cf Add Video subspec (#1240) 2018-11-21 08:30:22 -08:00
Garrett Moon 90a9a9640a Add development docs structure (#1245) 2018-11-20 12:59:07 -08:00
Tim Norman 5be2213c50 Convert YGUndefined back to CGFLOAT_MAX for Texture layout (#1244)
* Convert YGUndefined back to CGFLOAT_MAX for Texture layout

* Update ASYogaUtilities.mm

Quick fix to brace style
2018-11-20 07:27:53 -08:00
ricky 9cf54e8e8b [ASDisplayNode] Propagate traits before loading a subnode (#1234)
https://github.com/TextureGroup/Texture/pull/886 enforces that some nodes are loaded before they are sent a visiblity event, but it was not propagating the trait collection before forcing the load.

We are propagating traits in `_setSupernode:` (which was happening after the forced load). I moved the possible forced load to `_setSupernode:`, after propagating traits but before any visibility states are changed.
2018-11-19 17:53:00 -08:00
Adlai Holler 2baa9438d7 Have node and controller share lock (#1227)
* Have node and controller share lock

* Do it different

* Restore prior method order

* Maybe store the reference

* Try that
2018-11-15 09:50:09 -08:00
Michael Schneider 8029632460 Fix A11Y for horizontal collection nodes in Texture (#1217)
* Fix A11Y for horizontal collection nodes in Texture.

Collections have their own handling in UIKit that we shouldn't mess with. As such no nodes that contain CollectionNodes should ever be treated as AccessibilityContainers.

* Update braces
2018-11-14 08:11:32 -08:00
Kevin 771c068ad6 Correct block self references to strongSelf (#1231) 2018-11-13 08:20:20 -08:00
Orkhan Huseynov ce78fa00df Update image-node.md (#1230)
typo fix
2018-11-12 08:23:41 -08:00
Michael Schneider 39f25f661e ASCATransactionQueue interface trashing improvements (#1216)
* ASCATransactionQueue interface trashing improvements

* Use weakSelf
2018-11-11 08:43:07 -08:00
Andrew Yates fd047d681e Make ASEditableTextNode accessible to VoiceOver (#1162)
* Make ASEditableTextNode accessible to VoiceOver

* Update CHANGELOG

* Make ASEditableTextNode an accessibility container

* Remove initial fix

* Changelog

* Correct changelog entry

* Remove isAccessibilityElement as it’s a container

* Add isNodeLoaded checks

* Remove Changelog Changes
2018-11-10 08:41:58 -08:00
Michael Schneider 53368a5cb6 Remove CHECK_LOCKING_SAFETY check (#1225)
Locking assertions are always active now
2018-11-09 07:31:28 -08:00
Adlai Holler 56e69eac78 Initialize mutex assertion variables (#1226) 2018-11-08 13:07:46 -08:00
Adlai Holler 4cfc333d81 Clean up our mutex, fix try_lock not hooking into assert mechanism (#1219)
* Clean up our mutex

* Placement new import

* Privatize
2018-11-07 10:47:48 -08:00
Michael Schneider 7edaeab839 Fix warning using __builtin_popcount (#1218) 2018-11-07 07:01:19 -08:00
Adlai Holler e392f832f4 Rework ASTraitCollection to Fix Warnings and Remove Boilerplate (#1211)
* Clean up trait collection to fix a ton of warnings and remove code

* Support Xcode 9 (iOS 11 SDK)

* Hack harder
2018-11-06 08:31:09 -08:00
Adlai Holler 5c9815f46d ASThread: Remove Locker, Unlocker, and SharedMutex (#1213)
* ASThread: Remove Locker, Unlocker, and SharedMutex

* Remove extra line

* Kick the CI

* Move C++ down

* Fix thing
2018-11-05 13:26:36 -08:00
Michael Schneider 5909e27e37 Fix shouldTruncateForConstrainedSize in ASTextNode2 (#1214) 2018-11-05 13:16:36 -08:00
Huy Nguyen 87615b0ec2 Cleanup Dangerfile (#1212)
`has_changes_in_source_directory` and `declared_trivial` are not longer needed after after PR #1031.
2018-11-04 18:22:28 -08:00
Huy Nguyen e745aded7d [ASImageNode] Fix a threading issue which can cause a display completion block to never be executed (#1148)
- Clear _displayCompletionBlock while we still have the node's instance lock. Because it may not be the same block by the time the lock is reacquired. In other words, it can happen that another thread sets a new display block after this thread releases the lock but before it reacquires it. And we don't want to clear out the new block.
- Reduce a lock/unlock pair which should help perf a tiny bit.
2018-11-04 16:28:48 -08:00
Adlai Holler c7d1465aba Generate the changelog at release time rather than updating in each PR (#1031) 2018-11-04 11:34:21 -08:00
Michael Schneider aad0b5d18b Add -Wno-implicit-retain-self to podspec + smaller cleanups (#1209) 2018-11-04 09:34:39 -08:00
Kevin a3194f8757 Allow configuring imageCache when initializing ASPINRemoteImageDownloader. (#1197)
* Allow configuring imageCache along with NSURLSessionConfiguration when initializing ASPINRemoteImageDownloader.

* Update CHANGELOG.md

* Update Source/Details/ASPINRemoteImageDownloader.m

Co-Authored-By: wiseoldduck <kevin@wode.com>

* Put class linkage tests behind #if DEBUG

* Remove silly nil check

* Add non-nil assert

* Update documentation
2018-11-04 09:26:57 -08:00
Michael Schneider a34f45355e Revert #1023 (#1204)
We will revert #1023. The current solution introduces problems if we are unlocking before calling _completePendingLayoutTransition. _completePendingLayoutTransition needs to be happening in one transaction if called from _u_measureNodeWithBoundsIfNecessary.
2018-11-03 12:32:15 -07:00
Michael Schneider ecfc7835da Add experiment flag to skip layoutIfNeeded in enterPreloadState for ASM nodes (#1201) 2018-11-03 09:44:42 -07:00
Adlai Holler 706396f7d1 Delete circle config from master now that I know how to get it to build my experimental branch 2018-11-02 14:04:41 -07:00
Adlai Holler d0ba092a77 Convert the codebase to Objective-C++ (#1206)
* Convert the codebase to Objective-C++ throughout. One language is better than two.

* Put it back

* Fix linker

* Point explicitly to updated Weaver to unblock build

* Revert "Point explicitly to updated Weaver to unblock build"

This reverts commit fdc25296e8794d4e6e56c35f5fe6da2be3f71dbc.

* Revert "Fix linker"

This reverts commit 7be25f91519b8497ef42de79f115bcfbdb965c39.

* Add in the frameworks

* no message

* Address spec lint warnings

* Fix tvos build

* Put that back

* Address Michael's review

* Add comment to kick CI
2018-11-02 12:04:14 -07:00
Adlai Holler 7ccdcb9472 Fix the config and limit the branch 2018-11-02 09:12:51 -07:00
Adlai Holler d3591980e3 Add a CircleCI configuration file 2018-11-02 08:42:45 -07:00
Michael Schneider 8822bae0d5 Follow up cleanup #trivial (#1203)
* Remove whitespace at the end of the line

* Fix indentation

* Wrap if check for assertion in ASDISPLAYNODE_ASSERTIONS_ENABLED

* Add testTextNodeSwitchWorksInMultiThreadEnvironment tests
2018-11-02 07:54:15 -07:00
Adlai Holler 0380b270bb Address Xcode warnings about unguarded availability and implicit self retains (#1207) 2018-11-01 19:40:16 -07:00
Kevin fde47a5e28 Add tests for accessibility (#1205) 2018-11-01 08:10:44 -07:00
Michael Schneider fec14f8310 Fix logic cleaning data if delegate / dataSource changes and bring over logic to ASTableView (#1200)
* Cleanup in ASTableView datasource/delegate change

* Fix experiments logic

* Add changelog entry
2018-11-01 08:08:45 -07:00
ernestmama 055d27c45a ASTextNode2 to consider both width and height when determining if it is calculating an instrinsic size (#1196) 2018-10-31 14:06:48 -10:00