Commit Graph

25012 Commits

Author SHA1 Message Date
ricky
af98d23bf0 michael's comments 2016-06-21 14:49:47 -07:00
ricky
eb715e5836 hold children in a map instead of vector 2016-06-21 14:22:49 -07:00
ricky
2675204d50 [ASLayoutSpec.mm] Remove use of dictionary to hold children
Converted the backing store of children to a std::vector. Subclass now have defined indexes instead of string keys to add children.
2016-06-21 14:22:44 -07:00
Michael Schneider
36e48cf340 Remove caching of _drawParameter and use bounds instead of threadSafeBounds 2016-06-21 13:11:38 -07:00
Michael Schneider
74b9b6b49e Use threadSafeBounds instead of bounds to create drawing parameters 2016-06-21 13:11:38 -07:00
Michael Schneider
e7f2edd183 Add updating drawing parameter in ASTextNode
Update drawing on demand if properties change and not on every drawing cycle. This should reduce the overhead to access properties from the view / layer for the drawing parameters.
2016-06-21 13:11:38 -07:00
Michael Schneider
fc7cff333e Prevent subclassing of ASTextNode and ASImageNode 2016-06-21 13:11:38 -07:00
Michael Schneider
3384297c58 Move drawing parameters in ASTextNode and ASImageNode to structs 2016-06-21 13:11:38 -07:00
Michael Schneider
6dac29a16f Merge pull request #1768 from vadims/fix-editable-text-size-calculation
[ASEditableTextNode] should include insets when calculating size
2016-06-21 13:03:01 -07:00
Lukas Spieß
c25fd45f5e Update capitalization of "Code of Conduct" 2016-06-21 22:01:10 +02:00
Lukas Spieß
1fc2215428 Add Microsoft Code of Conduct 2016-06-21 21:57:02 +02:00
Adlai Holler
fcb6938224 Revert deprecated method warning suppression 2016-06-21 09:20:40 -07:00
Adlai Holler
c14bbf6005 Undeprecate the methods. Just inform users about the index path issue 2016-06-21 09:16:54 -07:00
George A
83d610cd54 [ASMapNode] Toggle user interaction when liveMap changes (#1753)
[ASMapNode] Change map snapshot when updating it with a new region (#1754)
[ASMapNode] Commented out code that is causing inaccurate behavior
[ASMapNode] Added the ability to zoom in and show annotations, similar to showAnnotations:animated: of MKMapView.
Added a basic example for ASMapNode to try out the different changes
2016-06-21 16:13:55 +02: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
Hannah Troisi
21d0f1e10d [Travis CI] Build Optimizations (#1743)
* [Travis CI] Build Optimizations

* update cocoapods versionm

* test sharing derived data directories

* Hack to reduce travis run time

* Remove test file

* Add missing slashes
2016-06-21 01:02:40 -07:00
Gareth Reese
062bcf3631 [ASVideoNode] issue #1782 Placeholder images are replaced by a blank placeholder. Now checks the .URL property of the parent class as well as the .image to ensure that new placeholders aren't generated. 2016-06-21 07:51:58 +01:00
Hannah Troisi
92b412b73f [GitHub Mgmt] Updated Issue Checklist (#1787)
* [ASDK Management] PR / Issue Checklists

* Update ISSUE_TEMPLATE.md

* Remove PR template, add GitHub rules, modify issue template

* Fixed Issue Template
2016-06-20 21:44:48 -07:00
Eric Jensen
c32e2f8383 If the animated image is ready, start animating it as soon as it's set (#1724) 2016-06-20 20:18:44 -07:00
Hannah Troisi
1198f114f2 [ASDK Management] PR / Issue Checklists (#1752)
* [ASDK Management] PR / Issue Checklists

* Update ISSUE_TEMPLATE.md

* Remove PR template, add GitHub rules, modify issue template
2016-06-20 20:17:51 -07:00
Adlai Holler
9873f4bd7d Deprecate willDisplayNode:/didEndDisplayingNode: methods 2016-06-20 16:40:10 -07:00
Michael Schneider
c129b78318 Merge pull request #1749 from maicki/AddASTextNodeLocking
[ASTextNode] Refactor locking to account for recent feature additions and on-demand initialization.
2016-06-20 13:44:13 -07:00
Michael Schneider
6bde8cdcf3 Adress review comments
- Add locking to _linkAttributeValueAtPoint:attributeName:range:inAdditionalTruncationMessage:forHighlighting: as we access the attributed text in there
- Add locking to touchesBegan:withEvent: as we are accessing the [ASTextKitRenderer firstVisibleRange]
- Add locking for highlightStyle
- Move accessing delegate property access to instance variable access
2016-06-20 13:42:17 -07:00
Michael Schneider
f3a909324d Add lock to _rendererAttributes 2016-06-20 13:42:17 -07:00
Michael Schneider
3d72a6b7e5 Cleanup ASTextNode and add locking
For now we use a big recursive lock. This needs to be revisited as we revisit the whole ASDK locking strategy.
2016-06-20 13:42:17 -07:00
Michael Schneider
22fa715682 Move lock from ASDN::Mutex to std::mutex in ASTextKitContext 2016-06-20 13:42:17 -07:00
Adlai Holler
b4f25f3d63 Merge pull request #1778 from eanagel/asimagenode-animated-scrolling
[ASImageNode] Update default run loop for animated images to CommonModes
2016-06-20 13:40:43 -07:00
Michael Schneider
e30a4c5b58 Merge pull request #1776 from maicki/FixWrappedViewsAreDisappearing
[Wrapping Views] Fix wrapped UIKit components are disappearing
2016-06-20 13:38:03 -07:00
Michael Schneider
e230c69055 Improve settings flags 2016-06-20 13:34:14 -07:00
Michael Schneider
eef22074a4 Add caching for checking if ASDisplayNode can clear it contents or setNeedsDisplay: can be called on the layer 2016-06-20 13:04:44 -07:00
Michael Schneider
23736c3cf7 Fix wrapped UIKit components are disappearing
I looked into the internals of UIImageView a bit. I would recommend to not fixing this in a universal way. UIImageView is specifically optimized for performance and does not use the usual way to provide the contents of the CALayer that backs the UIImageView.

Furthermore we cannot trigger a recreation of the contents of the UIImageView layer as if it get’s cleared and we call setNeedsDisplay on it it goes trough the normal flow to assign the contents to a layer via the CALayerDelegate methods. Unfortunately UIImageView does not do it, it actually does not implement some of the methods at all, so nothing will show up. It’s getting better, by calling setNeedsDisplay on an UIImageView layer it actually clears the contents and nothing is visible anymore. So we have to be careful to not calling that too.

Unfortunately I didn’t find a way yet to trigger a recreation of the UIImageView layers content except calling the private _updateState method.

That said it’s different for layers of other UIKit components like UILabel for example. Clearing the contents of a UILabel layer and calling setNeedsDisplay on the layer usually recreates the contents of the it and it will show up again.

This commit prevents to clear the contents of a layer for all wrapped UIKit and instead only NOT clear the content if the node wraps a UIImageView otherwise we should clear the contents of the layer to reclaim memory as usual.
2016-06-20 13:04:44 -07:00
Michael Schneider
ad997015ea Merge pull request #1783 from maicki/FixHandlingOptionalDidLoadImage
[ASNetworkImage] Fix not handling imageNode:didLoadImage: from ASNetworkImageNodeDelegate as optional
2016-06-20 12:59:11 -07:00
Michael Schneider
2c6e810e26 Fix not handling imageNode:didLoadImage: from ASNetworkImageNodeDelegate as optional 2016-06-20 07:50:40 -07:00
Ethan Nagel
ead9590d36 Default animation run loop -> CommonModes 2016-06-19 18:52:32 -07:00
Peter
bb9062c684 no message 2016-06-19 15:19:00 +03:00
Peter
82e22670c0 no message 2016-06-19 15:17:53 +03:00
Peter
e8197e5398 no message 2016-06-19 15:15:24 +03:00
Peter
c693212a77 no message 2016-06-19 15:14:26 +03:00
Hannah Troisi
da27d36b4a Add comments 2016-06-18 12:54:55 -07:00
Adlai Holler
5d434d418f Merge pull request #1765 from facebook/AHLockingPassOne
[ASDisplayNode] Resolve Deadlock Caused By removeFromSupernode
2016-06-17 13:58:10 -07:00
Vadim Spivak
eb057ca380 Editable text node should include insets when calculating size 2016-06-17 13:55:32 -07:00
Adlai Holler
3446f39704 Merge pull request #1746 from maicki/FixFetchDataRangeModeMinimumDefault
Fix default tuning parameter for range mode ASLayoutRangeModeMinimum and range type ASLayoutRangeTypeFetchData
2016-06-17 11:45:43 -07:00
Brandon Withrow
b2835650b2 Stuf 2016-06-17 10:40:38 -07:00
Peter
d354e968ec no message 2016-06-17 20:22:09 +03:00
Hannah Troisi
46421f8684 [ASCollectionView] support UICollectionViewLayoutAttributes 2016-06-17 10:17:52 -07:00
Adlai Holler
42aa52b407 [ASDisplayNode] Put the thread affinity assertion back 2016-06-17 09:51:09 -07:00
Hannah Troisi
d96beb29de Merge remote-tracking branch 'facebook/master' 2016-06-16 22:23:35 -07:00
Vadim Spivak
e55037354c Round up editable text node to the next point (#1761)
Rounding up to the next device pixel was calculating a height smaller
than  UITextView's contentSize. This was causing the baseline to move as
the user was typing.
2016-06-16 21:59:29 -07:00
Michael Schneider
aa5d730eab Deallocate objects on a serial queue specific for deallocation (#1737)
[Performance] Prevent GCD thread explosion due to object deallocation workloads (serial deallocation queue).
2016-06-16 18:18:43 -07:00
Michael Schneider
efab1a4855 Move modifier to __weak for the highlighted layer in ASTextNode (#1756) 2016-06-16 18:12:57 -07:00