Commit Graph

25012 Commits

Author SHA1 Message Date
Peter Iakovlev
c7217f3ce7 no message 2018-03-28 16:04:20 +04:00
Mikhail Filimonov
e425c69db4 Merge branch 'feature/secureid' of https://github.com/peter-iakovlev/TelegramCoreDev into feature/secureid 2018-03-28 16:01:41 +04:00
Peter Iakovlev
152a139727 no message 2018-03-28 15:01:20 +04:00
dmaclach
cf1c3f6d94 Make NSIndexSet+ASHelpers.h reference local #trivial (#857)
* Make NSIndexSet+ASHelpers.h reference local

NSIndexSet+ASHelpers.h should be a user vs a system or framework include.

* Update ASIntegerMap.mm
2018-03-28 08:17:13 +01:00
Yevgen Pogribnyi
7f01b89ddc [ASDisplayNode] Provide safeAreaInsets and layoutMargins bridge (#685)
* [ASDisplayNode] Add safeAreaInsets, layoutMargins and related properties to ASDisplayNode

* Add layoutMargins bridged to the underlying view

* Add safeAreaInsets bridged to the underlying view

* Add fallback calculation of safeAreaInsets for old iOS versions

* Add automaticallyRelayoutOnSafeAreaChanges and automaticallyRelayoutOnLayoutMarginsChanges properties

* Add additionalSafeAreaInsets property to ASViewController for compatibility with old iOS versions

* Provide safeAreaInsets for layer-backed nodes.

This also fixes tests.

* Fix crash when insetsLayoutMarginsFromSafeArea is set from a background thread

* Changes requested at code review:
* Update documentation for layoutMargins and safeAreaInsets properties. Suggest that users set the automaticallyRelayout* flags to ensure that their layout is synchronized to the margin's values.
* Fix accessing ASDisplayNode internal structures without a lock.
* Add shortcut in -[ASDisplayNode _fallbackUpdateSafeAreaOnChildren] to skip a child when possible.
* Add shortcut in ASViewController to avoid fallback safe area insets recalculation in iOS 11. Fix fallback safe area insets recalculation when the additionalSafeAreaInsets are set.
* Add debug check that a view controller's node is never reused without its view controller, so the viewControllerRoot flag value is always consistent.
* Use getters instead of reading ivars directly in -layoutMarginsDidChange and -safeAreaInsetsDidChange.

* Minor change in CHANGELOG

* Minor change in ASDisplayNodeTests.mm
2018-03-27 14:29:17 +01:00
Peter Iakovlev
69369cef5f no message 2018-03-27 12:59:18 +04:00
Peter Iakovlev
671fb6dd7e no message 2018-03-27 12:58:03 +04:00
Peter Iakovlev
33cc8132be no message 2018-03-27 12:03:39 +04:00
Peter Iakovlev
aa60d76fd8 no message 2018-03-27 12:03:25 +04:00
Adlai Holler
063194cb1d Make ASBatchContext lock-free (#854) 2018-03-26 10:46:52 -07:00
Adlai Holler
27fac9f586 Create a centralized configuration API (#747)
* Update the dangerfile

* Make a trivial change to test new dangerfile

* Try out the new value with another trivial change

* Add a configuration API to make a unified place for pulling config from clients safely

* Specify properties for delegate

* Finish removing text experiment global enable

* Generate the config file

* Clean up configuration to fix tests

* Work on making it serializable

* Finish it up

* Fix example code

* Update sample project

* Clean up a few things

* Align with new project order

* Make it faster and update license header

* Add an option to specify your config at compile time

* Update another license header

* Add a version field, and bring interface state coalescing into configuration

* Update CA queue code

* Update CATransactionQueue tests

* Turn transaction queue on by default (for now, see comment)

* Update the tests

* Update the tests AGAIN

* Remove unused ordered set
2018-03-25 12:52:57 -07:00
Max Wang
3d9fe8c3a7 Make cache support animated image (#850)
* fix SIMULATE_WEB_RESPONSE not imported #449

* Fix to make rangeMode update in right time

* support animated image for cache

* Modify change log
2018-03-25 12:32:00 -07:00
Adlai Holler
bd24015691 [ASNetworkImageNode] Replace NSUUID sentinel with integer #trivial (#852)
* Replace NSUUID sentinel with an integer

* Update ASNetworkImageNode.mm
2018-03-25 12:31:32 -07:00
Adlai Holler
0f9b1e6789 Make objects conform to NSLocking (#851)
* Make display node, layout spec, and style conform to NSLocking so that users/subclasses can access their locks

* Update the changelog

* Align slashes

* Put it back, when we're in ASDisplayNode

* Go a little further

* Put back the changes I didn't mean to commit

* Kick the CI

* Fix yoga build

* Put back non-locking change

* Address comments from Scott
2018-03-25 10:46:04 -07:00
Oleksiy Ivanov
255aec5839 Order items in XCode project navigator by name (#835)
* Order items in XCode project navigator by name

It is a bit hard to find file in folders with long list of file, for example Tests. Sorting items by name makes this a bit easier and brings order.
If there are child folders, they are ordered before files. Keeping folders sorted by name may be reasonable alternative as well.

* Re-sort after merge.

ASNetworkImageLoadInfo.h is still here, not sure why showing removed in this commit. Had this file duplicated  reference previously?
2018-03-23 22:57:22 -07:00
Peter Iakovlev
a8eb80c044 Merge commit '9a5ff8dcf147162fe819328984c3cd72bc4aa062' 2018-03-24 02:04:03 +04:00
Peter Iakovlev
4566f3b2a4 Merge branch 'tmp'
# Conflicts:
#	LegacyComponents/HPGrowingTextView.m
2018-03-24 02:03:57 +04:00
Ilya Laktyushin
9a5ff8dcf1 Merge branch 'tmp' 2018-03-24 01:07:24 +04:00
Ilya Laktyushin
074886ae46 no message 2018-03-24 00:58:22 +04:00
Brandon Withrow
8c9a728676 Merge pull request #592 from revolter/fork
Fixed animation loading from Asset Catalog
2018-03-23 09:25:29 -07:00
Brandon Withrow
c70c1cbbba Merge pull request #590 from sanekgusev/idle-rasterization
Rasterize _compContainer when not animating
2018-03-23 09:23:37 -07:00
Ilya Laktyushin
aff3b56e0a no message 2018-03-23 14:49:57 +04:00
Peter Iakovlev
242505b5f5 Merge branch 'develop' into feature/secureid 2018-03-23 13:58:55 +04:00
Peter Iakovlev
71f0f43439 no message 2018-03-23 13:58:49 +04:00
Peter Iakovlev
d67854a097 no message 2018-03-23 03:11:22 +04:00
Peter Iakovlev
abf6efd433 no message 2018-03-23 03:04:23 +04:00
Peter Iakovlev
b43bdd403d no message 2018-03-22 16:22:43 +04:00
Peter Iakovlev
01a635dd38 no message 2018-03-22 16:21:54 +04:00
Adlai Holler
2b12654810 Use NS_RETURNS_RETAINED macro to save time (#843)
* Use NS_RETURNS_RETAINED macro to save time

* Update changelog and do the thing with the license headers
2018-03-21 08:13:09 -07:00
Iulian Onofrei
7ec9981216 Fixed animation loading from Asset Catalog 2018-03-21 15:04:04 +02:00
Yevgen Pogribnyi
e954b1045a [ASPrimitiveTraitCollection] Always treat preferredContentSize as a potential nil #trivial (#757)
* Fix ASPrimitiveTraitCollection initialization on iOS 9.
Add nil-value checks for preferredContentSizeCategory.

* * Mark -[ASTraitCollection init] as deprecated.
* Mark [ASViewController overrideDisplayTraitsWithWindowSize] as deprecated.

Code review changes:
* Remove unneeded nonnull annotations
* Add null check in ASTraitCollection constructor implementation
* Codestyle
* Add some documentation about ASPrimitiveTraitCollection vs ASTraitCollection usage

* Rename safeContentSizeCategory to AS_safeContentSizeCategory.

Remove safePrimitiveContentSizeCategory in favour of AS_safeContentSizeCategory.
2018-03-21 12:44:30 +00:00
Peter Iakovlev
bd1ab209ab no message 2018-03-21 00:58:01 +04:00
Peter Iakovlev
1c6cfdb7f6 no message 2018-03-21 00:56:38 +04:00
Mikhail Filimonov
c1f26363fd Merge branch 'feature/secureid' of https://github.com/peter-iakovlev/TelegramCoreDev into feature/secureid 2018-03-21 00:01:24 +04:00
Peter Iakovlev
2bf793676c no message 2018-03-20 23:10:46 +04:00
Ariel Elkin
5385d8b3ed Update layout2-layout-element-properties.md (#844) 2018-03-20 15:32:52 +00:00
Mikhail Filimonov
6ad54f3920 Merge branch 'master' into feature/secureid
# Conflicts:
#	TelegramCore.xcodeproj/project.pbxproj
2018-03-20 17:02:27 +04:00
Mikhail Filimonov
bb0c2da7b7 no message 2018-03-20 17:02:06 +04:00
Peter Iakovlev
257a4bac1b no message 2018-03-20 16:43:29 +04:00
Peter Iakovlev
5eeaed40c2 no message 2018-03-20 16:08:15 +04:00
Aleksandr Gusev
4e7d864d3c Simplify the logic around _shouldRasterizeWhenIdle 2018-03-19 18:04:26 -04:00
Brandon Withrow
35432383d8 Merge pull request #589 from sanekgusev/fix-inititilizer-chaining
Fix initializer chain
2018-03-19 13:17:16 -07:00
Aleksandr Gusev
208e00824f Add support for automatically rasterizing _compContainer layer's contents when not animating 2018-03-19 13:58:44 -04:00
Aleksandr Gusev
13b9dab478 Correctly override -initWithFrame: in LOTAnimationView and funnel other initializers through it 2018-03-19 12:50:15 -04:00
Michael Schneider
0b101135ba Handle nil backgroundColor in ASTextNode2 #trivial (#841)
* Handle nil backgroundColor

* Small improvement
2018-03-16 20:08:19 -07:00
Adlai Holler
15b695c917 Put back a flag that I removed (#839) 2018-03-16 15:21:38 -07:00
Adlai Holler
e6c98d364f [NoCopyRendering] Use vm instead of malloc (#833)
* [Contexts] Use mmap directly for possible perf gain and to tag the memory as CGImage

* Wrap the mmap in an object

* Go straight to dataprovider

* Tweak it

* Remove wrong comment

* Finish that comment

* Address warnings
2018-03-16 15:13:26 -07:00
Peter Iakovlev
2eada4dfcf no message 2018-03-16 02:03:00 +04:00
Ilya Laktyushin
9a29d1d131 no message 2018-03-16 01:33:46 +04:00
Ilya Laktyushin
d45b180681 Merge commit '39381dd1895dc77ced7b31b4bb6aa6047c0907d2' 2018-03-16 01:02:26 +04:00