Commit Graph

13022 Commits

Author SHA1 Message Date
Adlai Holler
5cad23b925 Split framework dependencies into separate subspecs to reduce binary size and dynamic linking time when they're not needed (#1028) 2018-07-14 11:10:19 -07:00
Huy Nguyen
0dc97fbb2f Stricter locking assertions (#1024)
- Rename `ASDisplayNodeAssertLockUnownedByCurrentThread` to `ASAssertUnlocked`, and `ASDisplayNodeAssertLockOwnedByCurrentThread` to `ASAssertLocked` -> shorter and hopefully easier to distinguish between the two.
- Add assertions to `_locked_` and `_u_` (i.e "unlocked") methods.
- Turn `CHECK_LOCKING_SAFETY` flag on by default. After #1022 and #1023, we're in a good shape to actually enforce locked/unlocked requirements of internal methods. Our test suite passed, and we'll test more at Pinterest after the sync this week.
- Fix ASVideoNode to avoid calling `play` while holding the lock. That method inserts a subnode and must be called lock free.
- Simplify `_loaded(node)` to only nil-check `_layer` because regardless of whether the node is view or layer backed, the layer should always be set if loaded. Use it throughout.
- Other minor changes.
2018-07-13 14:58:16 -07:00
huang-kun
8cd123b0de Add an introduction for ASCornerLayoutSpec in layout2-layoutspec-types.md (#1021) 2018-07-13 13:09:59 -07:00
Adlai Holler
af7f71f92d Address warnings in Xcode >= 9.3 about using %zd for NSInteger (#1026) 2018-07-13 11:56:54 -07:00
Kevin
8986838b48 Add move detection and support to ASLayoutTransition (#1006)
* Add move detection and support to ASLayoutTransition

...and NSArray+Diffing.
Add some tests.

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update ASLayout+IGListKit.h

* Update ASLayout+IGListKit.mm

* Use std collections to avoid NSNumber boxing

* Update ASLayoutTransition.mm

* Code review updates.

* Use `unordered_multimap` on stack instead of unordered_map<id,queue> on heap
* Remove notFound BOOL (use NSNotFound sentinel value) and put some vars inside the if (insertions/moves) loop
* Don't copy defaultCompare block (redundant under ARC)
* Whitespace
* Remove unneeded mutableCopy-s in ArrayDiffingTests

* Code review updates.

* Type _subnodeMoves pair.first to ASDisplayNode * instead of id
* C++ enumeration
* unowned refs for adding previousLayout nodes to _subnodeMoves
* Remove unreleated ASDynamicCast that is probably right though

* Add commentary to NSArray+Diffing.h; make multimap elements unowned

* Use std::make_pair, optimize ASLayout+IGListKit

* Oops I thought I had added these headers but nope

* Simplify simplify

* Diff subnodes instead of sublayouts

* Another randomized test with actual ASLayouts
2018-07-13 10:19:03 -07:00
Adlai Holler
7c1aee7315 Fix i386 build by providing fallbacks to thread_local variables (#1025) 2018-07-12 21:09:24 -07:00
Michael Schneider
763332f2a7 Add showsHorizontal(Vertical)ScrollIndicator property applying from pending state (#1016) 2018-07-12 15:39:02 -07:00
Ilya Laktyushin
e42d7f427e no message 2018-07-12 23:57:46 +03:00
Huy Nguyen
814fc382c7 Make sure -_completePendingLayoutTransition is called without the node's instance lock #trivial (#1023)
This is because committing the layout transition (aka `-_completeLayoutTransition:`) results in subnode insertions and removals which must be called lock-free.
2018-07-12 11:26:26 -07:00
Huy Nguyen
5ffcd405c6 Fix misleading/scary stack trace shown when an assertion occurs during node measurement (#1022)
- Currently, there is a pair of mutex unlock and unlock that wraps around `-_u_measureNodeWithBoundsIfNecessary:` in `__layout`. That is because this method must be called without the lock.
- When an assertion occurs within that method, the runtime bails early without reacquire the lock (so the lock is free now). However, the runtime then hits the end of the outmost mutex locker scope and tries to release the lock that it no longer holds, causing another assertion in ASThread to be shown to user (#932). This makes it extremely hard to idenfity the root assertion.
- Fix by replacing the unlock/lock pair with a mutex unlocker.
2018-07-12 11:25:35 -07:00
Sergey Pronin
a08d2210cf [IGListKit] Adds missing UIScrollViewDelegate method to DataSource proxy (#1015)
* Adds missing UIScrollViewDelegate method to IGListKit proxy implementation

* Updates CHANGELOG
2018-07-10 11:16:13 -07:00
Michael Schneider
55abeed743 Introduce let / var macros and some further cleanup (#1012)
* Introduce let / var and some further cleanup

* Address first comments

* Update changelog

* Move the const before auto
2018-07-10 09:37:53 -07:00
Ilya Laktyushin
b6f2f36fc7 no message 2018-07-10 02:13:36 +03:00
Michael Schneider
c8b5a1b323 Rewrite Swift Example (#1002)
* Rewrite Swift Example

* Add license header to OrderedDictionary
2018-07-08 08:55:28 -07:00
Michael Schneider
6c487dd26c Properly consider node for responder methods (#1008)
* Properly consider node for responder methods

* Add changelog
2018-07-06 08:32:03 -07:00
Michael Schneider
d28b17c87f Fix warnings and memory issues (#1003) 2018-07-03 08:39:49 -07:00
Ilya Laktyushin
8a6d5806c6 Merge branch 'master' of bitbucket.org:iakovlevpeterp/legacycomponents 2018-07-03 17:25:34 +03:00
Ilya Laktyushin
023d786ed5 no message 2018-07-03 17:23:29 +03:00
Gregory K
dacde29548 Merge pull request #46 from mymedia2/patch-2
Add conditions for FreeBSD and GNU/Hurd
2018-07-02 01:10:38 +03:00
Grishka
697eea96aa 2.1.1: a bunch of fixes
- Enabled delay-agnostic AEC on Windows & Linux, it seems to make a difference after all (telegramdesktop/tdesktop#4881)
- Fixed PulseAudio crashes, at least I hope so (closes #42)
- Fixed parsing of floating-point server config values in some locales in Linux
2018-07-02 00:42:49 +03:00
Adlai Holler
75594affe2 Remove yoga layout spec, which has been superseded (#999)
* Remove yoga layout spec, which has been superseded by tighter yoga-display node integration

* Changelog
2018-06-30 09:42:27 -07:00
Adlai Holler
77e2d28919 Create transfer-array method and use it (#987)
* Create transfer-array method and use it

* License headers

* Update ASArrayByFlatMapping
2018-06-29 18:21:55 -07:00
Peter
01ba13b13b no message 2018-06-29 20:19:01 +03:00
Peter
c192cd39e4 Merge commit '3700bb909e458165c34619321b613474f8de37e2' into feature/secureid 2018-06-29 20:17:03 +03:00
Peter
827f23b20d no message 2018-06-29 20:16:58 +03:00
Peter
ec83f35663 Merge commit 'e619daec44a21b6310f2fe834c6a0cc5b3df5270' 2018-06-29 20:16:26 +03:00
Peter
e5388dc43e no message 2018-06-29 20:16:22 +03:00
Peter
edee78b9af Merge commit '13b718d77bb4a218636988a1384328198d09a2d6' 2018-06-29 20:14:53 +03:00
Peter
98f6354dd6 no message 2018-06-29 20:14:40 +03:00
Peter
f3ec180e4d no message 2018-06-29 20:14:18 +03:00
overtake
3700bb909e no message 2018-06-29 13:32:55 +03:00
Brandon Withrow
21122a769c Merge pull request #623 from Garolla/patch-1
Calling boolValue instead of converting NSNumber
2018-06-28 10:08:51 -05:00
Emanuele Garolla
7437e77910 Update LOTCompositionContainer.m
Changed to check for nil
2018-06-28 16:46:56 +02:00
Brandon Withrow
bd48d7702a Merge pull request #636 from daniele-pizziconi/master
Fixing issue: macOS doesn't handle window changes as iOS does.
2018-06-28 09:36:54 -05:00
Brandon Withrow
31a3bccba3 Merge pull request #627 from kgeorgy/issue626
Add the strong specifier for unspecified properties
2018-06-28 09:35:44 -05:00
Brandon Withrow
237254b13a Merge pull request #622 from HaikuTeam/master
Add basic support for base64 image asset URLs.
2018-06-28 09:32:56 -05:00
Garrett Moon
a4f78ad3e0 Adds support for having multiple interface state delegates. (#979)
* Adds support for having multiple interface state delegates.

Hopefully in a performant way.

* Switch to respondsToSelector for int del instead of separate object

* Add CHANGELOG

* Make ASDisplayNode+InterfaceState.h public

* Huy's comments

* Don't even bother removing since it's a weak hash table.
2018-06-27 16:52:40 -07:00
Muukii
f0dac14505 Fix typo in containers-asviewcontroller.md (#989) 2018-06-25 08:29:02 -07:00
Michael Schneider
b82128ee4e Add missing instance variables in ASTextNode and warnings cleanup #trivial (#984)
* Add missing instance variables in ASTextNode and warnings cleanup

* Re-add drain
2018-06-24 08:56:10 -07:00
Michael Zuccarino
37e82132be Use valid Upgrade to 2.0 beta 1 page (#980)
upgrading.html => adoption-guide-2-0-beta1.html

Testing this doesn't quite work in preview as the path differs a bit from when its accessible through the normal resolver. I assume this will substitute the last path slug and the server maps `_docs` to `docs` https://github.com/TextureGroup/Texture/tree/master/docs/_docs
2018-06-23 09:00:43 -07:00
Adlai Holler
0fe991f818 Optimize layout flattening (#982)
* Optimize layout flattening

* Changelog

* Remove whitespace

* Update ASLayout.mm

Add comment
2018-06-22 14:20:33 -07:00
Ilya Laktyushin
13b718d77b no message 2018-06-22 20:11:19 +03:00
Grishka
a541f8faf0 remove "copy info.plist" 2018-06-20 19:06:44 +03:00
Grishka
5de4e68040 reduce NS strength 2018-06-20 18:14:53 +03:00
overtake
3737a01ba0 Merge branch 'feature/secureid' of https://github.com/peter-iakovlev/TelegramCoreDev into feature/secureid 2018-06-20 13:08:51 +03:00
Peter
4190cf8759 no message 2018-06-20 00:06:38 +01:00
Max Wang
fa0ef6fdd2 ASConfiguration version check only when have json dict (#971)
* fix SIMULATE_WEB_RESPONSE not imported #449

* Fix to make rangeMode update in right time

* remove uncessary assert

* avoid extra version log.

* check dictionary earlier
2018-06-19 09:20:34 -07:00
Adlai Holler
a0e5f4c002 Create an experiment to remove extra collection teardown step (#975)
* Create an experiment to remove extra collection teardown step, simplify delegate proxy

* chagelog

* Remove detritus
2018-06-19 08:32:02 -07:00
overtake
c6a696732d Merge branch 'feature/secureid' of https://github.com/peter-iakovlev/TelegramCoreDev into feature/secureid 2018-06-19 17:54:12 +03:00
Peter
2734a8a2ad no message 2018-06-19 15:53:53 +01:00