4546 Commits

Author SHA1 Message Date
Peter
34b6e37b8c Merge commit '131619de96190415aec89987d4493220c6d0305d'
# Conflicts:
#	Source/ASDisplayNode+Deprecated.h
#	Source/ASDisplayNode.mm
#	Source/ASDisplayNodeExtras.h
#	Source/ASImageNode+AnimatedImage.mm
#	Source/Private/ASSection.h
#	Source/Private/_ASHierarchyChangeSet.mm
2017-12-25 01:44:19 +04:00
Peter
6ad4823542 no message 2017-12-23 18:25:39 +04:00
appleguy
131619de96
Reimplement ASRectTable using unordered_map to avoid obscure NSMapTable exception. (#719)
* Reimplement ASRectTable using unordered_map to avoid obscure NSMapTable exception.

The new class is called ASRectMap, which patterns alongside ASIntegerMap in both name and implementation.

After some pretty detailed investigation, including study of open-source reimplementations
of Foundation, the best lead I've found on the NSMapTable exception is that
some NSPointerFunction types are not fully supported. Strangely, the ones being used
do seem to work fine almost all of the time.

The main concern is the Struct memory type, which is not officially re-declared in
NSMapTable, and as such the documentation claims that there may exist some
combinations of NSPointerFunction that are not supported.

Because the exception is occurring frequently enough to be a concern (in the hundreds
to low thousands, though only 50 a day) - I decided to replace NSMapTable entirely
in order to ensure full correctness.

"*** -[NSMapTable initWithKeyPointerFunctions:valuePointerFunctions:capacity:] Requested configuration not supported."

* Fix Xcode project
2017-12-21 16:17:25 -08:00
Stephen Williams
4dec51ca37 Fix ASDKgram example #trivial (#700)
- Fix an insta-crash that's caused by Webservice.load method to call its completion block off the main thread.
- Fix incorrect http status code check.
- Bump the deployment target to get the project compiling.
2017-12-20 12:53:13 +00:00
John T McIntosh
fff5aae0a5 Add support for toggling logs off and back on at runtime #trivial (#714) 2017-12-20 12:49:09 +00:00
Huy Nguyen
7416d6a88a
Add Blendle to our showcase page (#721) 2017-12-19 18:53:13 +01:00
Ilya
eab7bea48d Add missing flags for ASCollectionDelegate (#718)
* Add missing flags for ASCollectionDelegate

* Update CHANGELOG.md
2017-12-19 17:13:45 +00:00
César Estébanez Tascón
8f19434788 Check for nil elements on ASTableView as well #trivial (#710) 2017-12-19 16:56:35 +00:00
Garrett Moon
46d46fdf12
#trivial Fixes image nodes being stuck not being able to download image (#720)
* #trivial Fixes image nodes being stuck not being able to download image

* Clear out the _cacheUUID too even though this is not strictly necessary.
2017-12-18 15:15:29 -08:00
Ha Hyun soo
8300d8eb61 Vingle very community - Update showcase (#711) 2017-12-11 19:47:41 -08:00
Huy Nguyen
5a4d569c56
Ensure an ASM enabled node applies its pending layout when enters preload state (#706)
This makes sure subnodes are inserted and start preloading right away, instead of waiting until the next layout pass of the supernode. Fixes #693.
2017-12-08 18:30:26 +00:00
Garrett Moon
008a1ce208
Revert Adds support for specifying a quality indexed array of URLs (#699)
* Revert "Adds support for specifying a quality indexed array of URLs (#557)"

This reverts commit 3c77d4a5da44c46c7b80b2a627c95389b7d6352d.

* Add CHANGELOG entry
2017-12-05 13:55:19 -08:00
Garrett Moon
0b6d41f872
A couple performance tweaks for animated images #trivial (#634)
* A couple performance tweaks for animated images

* @nguyenhuy's comments

* Avoid calling animatedImageData twice. Thanks @maicki.

* Fix call to background deallocation

* Good catch by @Adlai-Holler
2017-12-04 14:56:04 -08:00
Andrew Yates
c1f517a7eb Correct Synchronous Concurrency Talk Link (#698)
Fixes #697.
2017-12-04 10:41:00 -08:00
Adlai Holler
0dc7002f0b Add unit tests for the layout engine (#424)
* Build testing platform & tests for the layout engine

* Add our license header to debugbreak.

* Remove thing

* Address review comments

* Beef up the logging

* Update -[ASLayout isEqual:]

* testLayoutTransitionWithAsyncMeasurement passes now

* Disable testASetNeedsLayoutInterferingWithTheCurrentTransition

* Fix build errors
2017-12-01 17:05:47 +00:00
Huy Nguyen
bccde6cf0f
[ASScrollNode] Fix small bugs and add unit tests (#637)
* Add unit tests for ASScrollNode

* Make sure ASScrollNode's size is clamped against its size range

* Invalidate ASScrollNode's calculated layout if its scrollable directions changed

* Update comment

* Update CHANGELOG

* Address Adlai's comments
2017-12-01 15:41:06 +00:00
Huy Nguyen
b01fac35b6
[ASDisplayNode+Layout] Ensure a pending layout is applied once (#695)
Before:
  - Even if a pending layout was applied before, it'll be unnecessarily applied again in next layout passes and cause `-calculatedLayoutDidChange` being called multiple times.

After:
  - If a pending layout was applied, the calculated layout will not be ignored but reused, if possible, in next layout passes.

Test plan: testSetNeedsLayoutAndNormalLayoutPass in #424.
2017-12-01 13:11:17 +00:00
Erekle
d8cda8d74a [iOS11] Update project settings and fix errors (#676)
* [iOS11] Update project settings and fix errors

* update changelog

* resolve comments
2017-11-30 12:25:06 +00:00
Richard Henry
324288455f Add missing </div> tags in Layout API Sizing docs (#691)
This fixes the broken documentation here: http://texturegroup.org/docs/layout2-api-sizing.html
2017-11-28 12:15:56 +00:00
Huy Nguyen
b411149290
Add a recent talk by @smeis at CocoaHeadsNL (#687) 2017-11-28 12:14:56 +00:00
Richard Henry
ab51983ebf Fix bug that breaks ASNodeController docs page (#690)
When Obj-C is selected on this page, the bottom half of the documentation is missing. When Swift is selected, malformed content appears where the documentation is nested inside the code block.

Repro'd here in Safari and Chrome: http://texturegroup.org/docs/containers-asnodecontroller.html

I think the bug is that <PhotoCellNode> is being parsed as an HTML tag, and this should fix it.
2017-11-27 22:20:50 -08:00
huang-kun
e4b2c05c21 [ASCornerLayoutSpec] New layout spec class for declarative corner element layout. (#657)
* Add new layout spec class with snapshot testing. Update examples and CHANGELOG.md

* Code review updates.

* Open curly bracket in a new line.
2017-11-24 13:45:59 +00:00
Max Wang
b2539d3531 Bugfix/fix yoga logging aligning api changes (#668)
* fix SIMULATE_WEB_RESPONSE not imported #449

* Fix logging message for new api
2017-11-21 13:34:21 +00:00
Erwin Zhang
cb2e5ddb2d Fix swift sample. (#669) 2017-11-21 13:33:45 +00:00
WymzeeLabs
17c4d606d7 Update subtree-rasterization.md (#679)
* Update subtree-rasterization.md

For Texture 2.5.1 API

* Update subtree-rasterization.md
2017-11-21 12:16:04 +00:00
WymzeeLabs
fc79566ad4 Update layer-backing.md (#678)
Reflect Texture 2.5.1 API change
2017-11-21 12:14:23 +00:00
Adlai Holler
4fc753a458
Make it possible to map between sections even if they're empty (#660)
* Make section mapping work even for empty sections

* Unlock more cases and update changelog

* Fix complexity documentation
2017-11-03 16:24:48 -07:00
Adlai Holler
ff608c92bf
[Minor Breaking API] Make deallocation queues more reliable (#651)
* Make our async deallocation functions take a double pointer, so we can be sure we've released before the queue drains

* Make it a class property

* Fix the return type

* Use a locker

* Improve release notes
2017-11-02 10:45:34 -07:00
TBXark
64b6242b9c Update layout2-layoutspec-types.md (#655)
Fix `ASBackgroundLayoutSpec ` example code bug
2017-11-02 16:45:57 +00:00
Garrett Moon
1626c17ff2 Disable this test for now, it's too flakey and no one has time to investigate (#649) 2017-11-02 12:54:39 +00:00
Adlai Holler
944cad6ed6
Make the framework backwards compatible with Xcode 8 (#650)
* Make the framework backwards compatible with Xcode < 9

* Update changelog
2017-10-31 16:11:57 -07:00
Garrett Moon
255682da3d Fix a layout deadlock caused by holding the lock and going up the tree. (#638)
* Fix a layout deadlock caused by holding the lock and going up the tree.

* Add CHANGELOG message

* Huy's comments
2017-10-31 15:36:01 +00:00
Ha Hyun soo
d8c2a8edd2 [Documentation] Update Inversion Docs (#647)
* Update docs

append inversion example about swift language

* apply github comment
2017-10-31 13:25:37 +00:00
appleguy
63efdbde8f [ASCollectionView] Call -invalidateFlowLayoutDelegateMetrics when rotating. #trivial (#616)
* [ASCollectionView] Ensure -invalidateFlowLayoutDelegateMetrics is called for UIKit passthrough cells.

This allows rotation to work properly when rotating UIKit passthrough
cells that need to change width.

* [ASCollectionView] No need to verify node is still in model to handle view-only notifications.
2017-10-31 13:20:58 +00:00
Adlai Holler
af99ff5ef2 Have ASNetworkImageNode report whether images were cached or not (#639)
* Have ASNetworkImageNode report whether images were cached or not.

* Update changelog

* Add fileURL case
2017-10-25 15:57:30 -07:00
r é m i 
8317c11e42 [Tests] Introducing tests for the ASTabBarController (#628)
* introducing tests for the ASTabBarController

* Update ASTabBarControllerTests.m
2017-10-25 10:53:37 +01:00
r é m i 
128700f82d [Tests] Add test scrollToPageAtIndex ASPagerNode (#629)
* add scrollToPageAtIndex for the ASPagerNode

* update convention code
2017-10-24 19:40:48 +01:00
r é m i 
baf1ea2db4 introduce tests for the ASNavigationViewController (#627) 2017-10-24 19:40:28 +01:00
Huy Nguyen
3b91fbaab2 Update "Getting Started" page (#633) 2017-10-24 16:50:50 +01:00
Garrett Moon
d00a58580a Xcode update line should be in 2.6 2017-10-24 08:20:41 -07:00
Garrett Moon
7fffebe293 Update to 2.6 to indicate Xcode upgrade required. 2017-10-24 08:17:43 -07:00
appleguy
68f3468d91 [ASCollectionView] Improve performance and behavior of rotation / bounds changes. (#431)
* [ASCollectionView] Improve performance and behavior of rotation / bounds changes.

See #430 for details.

* Edit CHANGELOG.md

* [ASDataController] Implement -relayoutAllNodesWithInvalidationBlock:, to flush the ASMainSerialQueue before -invalidateLayout is called.

* Don't set download results if no longer in preload range. (#606)

Good catch by @djblake, if you scroll fast enough, you leave images
set on the image node because didExitPreloadRange (which would have
cleared it) was already called.

* Animated WebP support (#605)

* Updating to support animated WebP

* Fix a deadlock with display link

* Fix playhead issue.

* Fix up timing on iOS 10 and above

* Don't redraw the same frame over and over

* Clear out layer contents if we're an animated GIF on exit range

* Clear out cover image on exit of visible range

* Don't set cover image if we're no longer in display range.

* Don't clear out image if we're not an animated image

* Only set image if we're not already animating

* Get rid of changes to podfile

* Add CHANGELOG entry

* Update license

* Update PINRemoteImage

* Remove commented out lines in example

* [ASDataController] Add nullable specifier to invalidationBlock for relayout of nodes.
2017-10-24 13:12:52 +01:00
Garrett Moon
63842e1a39 Fixing changelog 2017-10-22 17:42:57 -07:00
Garrett Moon
7779531810 Update CHANGELOG for 2.5.1 2017-10-22 17:39:14 -07:00
Garrett Moon
53147f0ce6 Updating podspec to 2.5.1 2017-10-22 17:36:52 -07:00
Garrett Moon
d31af734df Dispatch batch update to main #trivial (#626)
* Dispatch batch update to main

* TableView too
2017-10-20 15:01:38 -07:00
Garrett Moon
919ec8d32b Check if we need to do a batch update (#624)
* Check if we need to do a batch update

If we've changed our leading screens for batch fetching, we
may need to batch fetch.

* Add CHANGELOG entry
2017-10-20 09:23:07 -07:00
Michael Schneider
526a7cfb53 Fix name clash with YYText (#623) 2017-10-18 15:49:58 -07:00
Max Wang
dce7ab3a9b [ASTextNode] Implement an example comparing ASTextNode 1 & 2 behavior. (#570)
* fix SIMULATE_WEB_RESPONSE not imported #449

* add constraint to using catching for layout

* Add TextNode example to test Yoga Layout

* update Yoga version

* add debugging log

* fix lisence

* clean up

* clean up

* fix lisence warning

* add shared scheme

* change sdk version

* revert some metadata

* Merge FlexLayoutExample to TextStressText.
Add flags to control different TextNode used.

* clean up

* fix lisence and syntax

* clean up

* remove xcworkspacedata

* Tiny coding style changes

* Another tiny change related to code style
2017-10-17 15:03:53 +01:00
Huy Nguyen
c12509e67a [ASTextKitComponents] Make sure Main Thread Checker isn't triggered during background calculations #trivial (#612)
* Add unit test

* Make sure TextKit components can calculate size in background without upsetting Main Thread Checker
- Add a new thread-safe text view bounds.
- Temporary components stack doesn't have a text view so it can be safely deallocated off main.

* Add ASTextKitComponentsTextView

* Remove unnecessary change

* Fix minor mistake

* ASTextKitComponentsTextView has only 1 initializer

* Minor change

* Switch to atomic property

* Remove manual synthesization
2017-10-17 14:20:20 +01:00