Emil Sjolander
6526548b50
Move measure code for known dimensions out of main layout function
...
Reviewed By: gkassabli
Differential Revision: D4213339
fbshipit-source-id: 5ca35ca307594f3419fd0dee81321d3c2e06710f
2016-11-21 11:13:40 -08:00
Emil Sjolander
85d0dab9bf
Move measure code for empty containers out of main layout function
...
Reviewed By: gkassabli
Differential Revision: D4213313
fbshipit-source-id: 2061a809202f7f948bff1b3ee8dc4c230692a223
2016-11-21 11:13:40 -08:00
Emil Sjolander
cf796248ec
Move custom measure code out of main layout function
...
Reviewed By: gkassabli
Differential Revision: D4213302
fbshipit-source-id: df4bc43848325e99ad338a2fa6d5c9404315b0e6
2016-11-21 11:13:39 -08:00
Emil Sjolander
e1df3c8782
Add aspectRatio style property
...
Reviewed By: gkassabli
Differential Revision: D4211458
fbshipit-source-id: f8d0d318369c7b529ee29e61a52b17d0cf3b396d
2016-11-21 10:13:34 -08:00
Emil Sjolander
15f848e8d8
Only skip updating computed flex basis within the same generation
...
Reviewed By: dshahidehpour
Differential Revision: D4207106
fbshipit-source-id: fc1063ca79ecf75f6101aadded53bca96cb0585d
2016-11-20 05:13:28 -08:00
Lukas Wöhrl
687ae48cc7
use fmaxf to prevent casting from and to double
...
Summary:
Use ```fmaxf``` to prevent double casting.
Closes https://github.com/facebook/css-layout/pull/251
Reviewed By: emilsjolander
Differential Revision: D4199342
Pulled By: splhack
fbshipit-source-id: c04bc68a3c9c97b92e910e885457cf2fe00da28b
2016-11-17 20:43:44 -08:00
Lukas Wöhrl
ee285876d2
Change more method arguments to const
...
Summary:
Change more method arguments to ```const```
Closes https://github.com/facebook/css-layout/pull/252
Reviewed By: emilsjolander
Differential Revision: D4199335
Pulled By: splhack
fbshipit-source-id: f54fccaea8051a49c6cdf0fcaf1a68c025ba26da
2016-11-17 20:43:44 -08:00
Lukas Wöhrl
fb4d9f204a
do not redefine isnan if already defined via math.h
...
Summary:
```isnan``` is already defined in ```math.h``` (at least when using VS13) so there is no need to redefine it. it also is a nan for float and not for double opposed to ```_isnan```
Closes https://github.com/facebook/css-layout/pull/253
Reviewed By: emilsjolander
Differential Revision: D4199331
Pulled By: splhack
fbshipit-source-id: 139fb0efd68dd5df79bbaef863a8e8b9246c795d
2016-11-17 20:43:44 -08:00
Lukas Wöhrl
1430458906
use size_t instead of unsigned long
...
Summary:
Use ```size_t```instead of ```unsinged long``` as this is the "offical" return type of ```strlen```. Is VS13 ```size_t``` is defined as ```unsigned long long``` which leads to a compiler warning.
Closes https://github.com/facebook/css-layout/pull/254
Reviewed By: emilsjolander
Differential Revision: D4199327
Pulled By: splhack
fbshipit-source-id: 5e1a91f282bf776e4d9f5806e6467dfe36c7a633
2016-11-17 20:43:43 -08:00
Kazuki Sakamoto
39a59caac1
Introduce CSSNodeCopyStyle
...
Reviewed By: emilsjolander
Differential Revision: D4188514
fbshipit-source-id: af8d7fb5e8688c64aea05ce7ad23fff9233fb441
2016-11-17 09:13:31 -08:00
Kazuki Sakamoto
c5f6e864f9
Workaround fix for Visual Studio
...
Reviewed By: emilsjolander
Differential Revision: D4191268
fbshipit-source-id: 53fdcc388292e76c2b97ad071f0d7c27d0613ecf
2016-11-17 08:58:55 -08:00
Kazuki Sakamoto
0d0f44439c
Fix memory func test
...
Reviewed By: emilsjolander
Differential Revision: D4193712
fbshipit-source-id: a4aba84d054d98a7baf438e213a90bd7ef34e979
2016-11-17 07:43:27 -08:00
Kazuki Sakamoto
e864c40be8
Introduce CSSLayoutSetMemoryFuncs
...
Reviewed By: emilsjolander
Differential Revision: D4178386
fbshipit-source-id: a79dbdaf82a512f42cc43f99dbc49faba296903b
2016-11-15 20:28:30 -08:00
Emil Sjolander
ffcdf25281
Autogenerate enum defenitions for all languages
...
Reviewed By: gkassabli
Differential Revision: D4174263
fbshipit-source-id: 478961a8f683e196704d3c6ea1505a05c85fcb10
2016-11-15 08:44:30 -08:00
Andy Street
3b20a39f7b
Move ReactCommon/CSSLayout to ReactCommon/CSSLayout/CSSLayout
...
Reviewed By: emilsjolander
Differential Revision: D4182345
fbshipit-source-id: 05cb4f0b0e7971d4f66e656ea89d876264a61bd4
2016-11-15 06:28:45 -08:00
Fred Liu
1f125e3d41
Revert D4157971: [csslayout] BREAKING - Fix sizing of container with child overflowing parent
...
Differential Revision: D4157971
fbshipit-source-id: be055cf018fd39b3cee9af0bc777831fcf757190
2016-11-14 12:28:40 -08:00
Andy Street
07ef5a8fe9
Build C-version of CSSLayout in open source
...
Summary: Builds and ships libcsslayout.so with Android builds. This is not used yet, but a follow up diff will shortly move us from CSSNodeDEPRECATED to CSSNode (which uses libcsslayout)
Reviewed By: emilsjolander
Differential Revision: D4168140
fbshipit-source-id: d72bded88df81e4d54df31a08e4b101834770a73
2016-11-14 06:13:48 -08:00
Emil Sjolander
307871e854
Implement standard interface for toggling experimental features
...
Reviewed By: gkassabli
Differential Revision: D4174260
fbshipit-source-id: ad3667183810c02833fba9a1276f89286e848fcd
2016-11-14 03:28:39 -08:00
Emil Sjolander
a2cafb062e
rename CSSWrapType to shorter CSSWrap matching java and csharp
...
Reviewed By: gkassabli
Differential Revision: D4174257
fbshipit-source-id: ba0bfab996ba158b07863d8c72cf2a41262c9592
2016-11-14 03:28:38 -08:00
Emil Sjolander
e2e3a27571
BREAKING - Fix sizing of container with child overflowing parent
...
Reviewed By: gkassabli
Differential Revision: D4157971
fbshipit-source-id: 3cfae15ac8b65b70f01789444099ee684e1b099a
2016-11-14 02:13:51 -08:00
Emil Sjolander
bd1f22c4bd
Fix flex within max size if max size is not constraint to
...
Reviewed By: gkassabli
Differential Revision: D4162104
fbshipit-source-id: 08feba6cb4e789c9aa12179e2cdeadc66b011841
2016-11-11 08:13:34 -08:00
Pieter De Baets
5aad13b691
Remove useless store in CSSLayout.c
...
Reviewed By: emilsjolander
Differential Revision: D4159938
fbshipit-source-id: 8b9ff3896c0e222e8e89546881129214bc6ba566
2016-11-10 08:58:41 -08:00
Kazuki Sakamoto
1d9d8e93fb
Remove CSSAssertSetFailFunc
...
Reviewed By: emilsjolander
Differential Revision: D4155452
fbshipit-source-id: 5a19c79a212f204d13064527fd6e5843bab76e6b
2016-11-09 17:28:38 -08:00
Emil Sjolander
744965800f
Absolute positioned items should apear inside padding but outside border
...
Reviewed By: gkassabli
Differential Revision: D4153332
fbshipit-source-id: 251e29e02018a433f60349b78c03feb121512797
2016-11-09 11:59:37 -08:00
Emil Sjolander
a4a02f6b57
Dont measure single flex grow+shrink child
...
Reviewed By: gkassabli
Differential Revision: D4153133
fbshipit-source-id: 2333150a83857cc30078cc8d52761cbd00652830
2016-11-09 11:29:02 -08:00
Andy Street
a731a23d91
Update logging to support levels, print messages in Android logcat on assertion failures
...
Summary: The goal of this diff is to have assertion failures show up as error logs on Android. To do this, I updated the logging API to take calls with log levels. We now have to pass around va_list unfortunately since you can't re-expand or pass along var-args to a subcall.
Reviewed By: emilsjolander
Differential Revision: D4140898
fbshipit-source-id: e0eb9a1f0b08a7d90a8233f66bb857d5b871b6ad
2016-11-09 09:58:59 -08:00
Dustin Shahidehpour
39798ae368
Allow MeasureFunc to be set to NULL no matter how many children a node has.
...
Reviewed By: emilsjolander
Differential Revision: D4148727
fbshipit-source-id: 79a0f3ef1bf7b1dce9a14de96f870e35c042b78b
2016-11-09 08:43:32 -08:00
Jing Chen
653e8d9b9a
Reverted commit D4147298
...
Reviewed By: gkassabli
Differential Revision: D4147298
fbshipit-source-id: 8416508a31e8d317bf59d956abdbe5760b55bb6d
2016-11-09 00:14:02 -08:00
Emil Sjolander
4500e4d0ff
Dont measure single flex grow+shrink child
...
Reviewed By: gkassabli
Differential Revision: D4147298
fbshipit-source-id: 51152e57eff8e322a833a6d698c30f8c5e2dcc35
2016-11-08 15:28:42 -08:00
Emil Sjolander
72d11912f4
Fix flex within max width constraint
...
Reviewed By: gkassabli
Differential Revision: D4147199
fbshipit-source-id: feb335eb8687a1b7939ee8cd8649e455e0c069a9
2016-11-08 09:59:03 -08:00
Emil Sjolander
81e4139edc
Remove isTextNode optimization
...
Reviewed By: astreet
Differential Revision: D4146785
fbshipit-source-id: e20d780fbd5759b8f38b809e8cadf29cedee82a8
2016-11-08 09:13:43 -08:00
安秋亮
7839a9fd60
Add inline definition for Microsoft Visual Studio
...
Summary:
The inline keyword is available only in C++. The __inline and __forceinline keywords are available in both C and C++. For compatibility with previous versions, _inline is a synonym for __inline.
https://msdn.microsoft.com/en-us/library/z8y1yy88(v=vs.120).aspx
Closes https://github.com/facebook/css-layout/pull/239
Reviewed By: astreet
Differential Revision: D4138941
Pulled By: emilsjolander
fbshipit-source-id: cb59dc91ef285e5378036c4912217fd4ec8d9f79
2016-11-07 12:58:33 -08:00
Andy Street
96a581f6c2
Assert that node can have measure function <==> node is a leaf node
...
Summary: Instead of silently ignorning non-leaf nodes with measure functions, we should assert that we don't create those kinds of trees.
Reviewed By: emilsjolander
Differential Revision: D4130770
fbshipit-source-id: a3ef10a2e63bbc12b5aa07977e4b84c8d59e3ffe
2016-11-07 05:28:52 -08:00
Dustin Shahidehpour
07fb9040d9
Only mark Nodes dirty if an actual node is removed.
...
Reviewed By: gkassabli
Differential Revision: D4125453
fbshipit-source-id: 745cfc55269415fea106a80c72401eb3074f2d31
2016-11-03 13:43:57 -07:00
Georgiy Kassabli
e7dc71ba84
Exposing layout cache check publicly
...
Reviewed By: emilsjolander
Differential Revision: D4124705
fbshipit-source-id: 23284967900585fa20dcb51c9cc1bee829b32975
2016-11-03 10:43:53 -07:00
Dustin Shahidehpour
bb84c37dce
Prevent crash when accessing child count, but child list is NULL.
...
Reviewed By: emilsjolander
Differential Revision: D4104093
fbshipit-source-id: cd7b09818759aa76415b97e241f1a6746a2bc50c
2016-10-31 12:44:09 -07:00
Emil Sjolander
df7d61bbbb
Some small simplifications for function return values
...
Reviewed By: gkassabli
Differential Revision: D4101772
fbshipit-source-id: 626df10c0fc76278c330c86be4dc82fdda5f5156
2016-10-31 11:13:39 -07:00
Emil Sjolander
d0f8e7f35c
void* -> CSSNodeRef in CSSNodeList
...
Reviewed By: gkassabli
Differential Revision: D4101773
fbshipit-source-id: 8a5c9066da796967bd02ce6b1fc74ff40e15dfe1
2016-10-31 11:13:39 -07:00
Emil Sjolander
8e69a9f695
BREAKING - Make first parameter of measure and print functions CSSNodeRef instead of just context
...
Reviewed By: javache
Differential Revision: D4081544
fbshipit-source-id: d49679025cea027cf7b8482898de0a01fe0f9d40
2016-10-27 10:58:42 -07:00
Scott Wolchok
d932c96ddc
Don't preallocate child lists
...
Reviewed By: emilsjolander
Differential Revision: D4078012
fbshipit-source-id: 7cdcab03ec4067550a5fee5e1baea14344f3a8f9
2016-10-25 17:13:36 -07:00
Emil Sjolander
942f724166
Suggest the compiler to inline smaller functions
...
Reviewed By: gkassabli
Differential Revision: D4074580
fbshipit-source-id: 69b63fadf2011cb688af58f09d67c2cb711a0e20
2016-10-25 10:43:41 -07:00
Kazuki Sakamoto
31d3926784
Update CSSNodeFree for C#, Java and Objective-C
...
Reviewed By: emilsjolander
Differential Revision: D4069655
fbshipit-source-id: 1fd764059784d7968af38b6aaf7fb6f70fdee8ee
2016-10-25 07:43:44 -07:00
Emil Sjolander
3c5a7ae859
Fix bug in canUseCachedMeasurement causing unneeded double measure
...
Reviewed By: gkassabli
Differential Revision: D4071621
fbshipit-source-id: 19d87d939051ddf8ee2e1c6e60efee22d173bbb9
2016-10-25 07:43:44 -07:00
Emil Sjolander
1ba4e8b9c6
Reduce duplicate function calls
...
Reviewed By: gkassabli
Differential Revision: D4068140
fbshipit-source-id: 91261afb73e1c5e23c2cfc84df6ecc5c844a4e78
2016-10-24 12:28:39 -07:00
Emil Sjolander
58b5e28e71
Simplify memory model between managed and unmanaged memory
...
Differential Revision: D4051454
fbshipit-source-id: 8f5d010be520b3d1c981a7f85e5e6d95773ea6c1
2016-10-24 10:43:43 -07:00
Emil Sjolander
ea6458b63e
Remove flex shorthand getter because it doesnt make a lot of sense
...
Reviewed By: gkassabli
Differential Revision: D4064674
fbshipit-source-id: 69935b85042020b4e8c61a393c1be8f4d42a6674
2016-10-24 03:44:22 -07:00
Emil Sjolander
dc142ad8f9
Dont override flexShrink, flexGrow, and flexBasis with shorthand flex
...
Reviewed By: gkassabli
Differential Revision: D4064696
fbshipit-source-id: db2d4b8e60209f0a9eed6794a167b85e453be41c
2016-10-24 03:44:18 -07:00
Emil Sjolander
978d45ddef
Forward gLogger output to adb on android platforms
...
Reviewed By: splhack
Differential Revision: D4064619
fbshipit-source-id: de23e72844e25106d0db756064f5699959f45ed2
2016-10-23 10:58:40 -07:00
Emil Sjolander
9ed8cae47e
Fixup format file for hopefully the last time in a while and re-format code
...
Reviewed By: gkassabli
Differential Revision: D4044545
fbshipit-source-id: 60ebb73cfdd9dbc9b5fae62ddebf37e9b1e6eecf
2016-10-20 06:28:33 -07:00
Kazuki Sakamoto
1607ff2466
Introduce CSSLayoutSetLogger to pass the print result to C# side
...
Reviewed By: emilsjolander
Differential Revision: D4027044
fbshipit-source-id: 90e2e449260888770f71fa7ea790ca9764d91c44
2016-10-19 11:13:59 -07:00