Commit Graph

441 Commits

Author SHA1 Message Date
Colin Eberhardt
73b1e63bd7 1.1.0 v1.1.0 2015-11-11 07:27:17 +00:00
Christopher Chedeau
f5eefe51f8 Merge pull request #148 from moneppo/master
Add C usage to documentation.
2015-11-07 08:39:01 -08:00
Michael
aac6694127 Add C usage to documentation.
Fixes #114.
2015-11-07 08:29:12 -08:00
Krzysztof Magiera
6e499300ff Merge pull request #146 from lucasr/style-getters
New style getters and cleanups in CSSNode
2015-10-21 16:42:46 +01:00
Lucas Rocha
d3b702e1ad Rename getStylePadding() to getPadding() for consistency
So that we're consistent with other style-only methods. Move existing
getters to be close to their matching setters in CSSNode.
2015-10-21 14:31:35 +01:00
Lucas Rocha
eb1d1726b9 Add getters for all style properties
For consistency and because now we have some use cases for it.
2015-10-21 10:37:09 +01:00
Christopher Chedeau
8f7632bc7f Merge pull request #144 from woehrl01/woehrl01-width
return correct value from Width property (C#)
2015-10-14 08:45:59 -07:00
Lukas Wöhrl
d2e66a8d82 return correct value from Width property 2015-10-14 08:50:49 +02:00
Lucas Rocha
4b4cd06be2 Merge pull request #140 from lucasr/fast-reset 2015-10-08 15:06:49 +01:00
Lucas Rocha
a821f6c555 Add reset() method to CSSNode
This allows users of css-layout in Java to perform faster resets on
CSSNode in cases when you want to recycle instances.
2015-10-08 14:49:28 +01:00
Colin Eberhardt
fbeef4542d Merge pull request #139 from ColinEberhardt/eslint
Eslint - enforces many more rules.
2015-10-07 22:26:04 +01:00
Colin Eberhardt
f02fbfc10c Changed from '"typeof foo === 'undefined'" to "foo === undefined" 2015-10-07 22:18:27 +01:00
Colin Eberhardt
e4c93e8c59 Updated to use eslint from fbjs-scripts 2015-10-07 21:52:22 +01:00
Krzysztof Magiera
35bd01e3f2 Merge pull request #141 from lucasr/enum-comparison
Faster enum comparisons in CSSNode
2015-10-07 13:19:56 +01:00
Colin Eberhardt
040f0f3e7c relaxed the eqeqeq rule to permit 'foo != null' 2015-10-07 06:40:17 +01:00
Lucas Rocha
af09213d1a Faster enum comparisons in CSSNode
Enums are singletons by design so it's safe (and faster) to compare by
reference. This also covers the null case.
2015-10-05 17:07:23 +01:00
Colin Eberhardt
538cb2e940 Fixed build
(I was using an older verson of eslint locally)
2015-10-05 13:30:59 +01:00
Colin Eberhardt
45f62c424c Widened scope of CI eslint to all JavaScript files 2015-10-05 13:21:19 +01:00
Colin Eberhardt
c33e255182 Enforced quote style and indentation 2015-10-05 13:18:27 +01:00
Colin Eberhardt
0f43977bb2 Enforced the eqeqeq rule 2015-10-05 12:50:54 +01:00
Colin Eberhardt
9b75493988 auto-configured eslint and fixed gruntfile linting failures 2015-10-05 08:08:57 +01:00
Christopher Chedeau
0faaabb78c Merge pull request #138 from devongovett/js-caching
Implement caching in the JS version
2015-10-04 16:07:45 -07:00
Devon Govett
e510c72111 Update based on feedback 2015-10-04 14:36:44 -07:00
Devon Govett
57d41f3e35 Add a shouldUpdate property to nodes whose layout changed 2015-10-04 14:19:02 -07:00
Devon Govett
e9d880a105 Add isDirty support 2015-10-04 14:11:55 -07:00
Devon Govett
221510cfcf Fix nits 2015-10-04 14:11:07 -07:00
Devon Govett
2636a4fbed Merge branch 'master' of github.com:facebook/css-layout into js-caching 2015-10-04 12:33:17 -07:00
Devon Govett
7b2140d7f9 Implement caching in the JS version 2015-10-04 11:45:54 -07:00
Christopher Chedeau
3042bac0bb Merge pull request #137 from devongovett/js-optimization
JS optimization
2015-10-04 07:24:43 -07:00
Devon Govett
5af85c5ef6 Inline some isUndefined calls 2015-10-03 23:14:04 -07:00
Devon Govett
0f5d3ae8f0 Don't use the in operator 2015-10-03 23:13:33 -07:00
Devon Govett
39b45c65c1 Speed up margin/padding/border lookups 2015-10-03 23:11:09 -07:00
Christopher Chedeau
948241b659 Merge pull request #136 from getsetbro/patch-1
Update README.md
2015-10-02 15:51:43 -07:00
Seth Broweleit
2cf795c118 Update README.md
"alignContent" is not supported - see image: https://raw.githubusercontent.com/getsetbro/images/gh-pages/screenshots/reactnative.no.flexbox.aligncontent.png
2015-10-02 16:36:29 -05:00
Christopher Chedeau
9eb00949ae Merge pull request #135 from pragmatrix/csharp5-pr
Don't use C#6 language features for the time being
2015-09-30 09:21:05 -07:00
Armin Sander
2e908bfdee don't use C#6 language features for the time being 2015-09-30 07:57:59 +02:00
Christopher Chedeau
cefd6ccb96 Merge pull request #134 from vjeux/fix_dim_0
Fix width being ignored when has a value of 0
2015-09-25 14:43:52 -07:00
Christopher Chedeau
e280a577ae Fix width being ignored when has a value of 0
8f6a96adbc added a test in isDimDefined that checks if `value > 0.0`, but unfortunately, it did not faithfully port the JavaScript version which is `value >= 0.0`. Sadly, no test covered this so it went unnoticed.
2015-09-25 13:10:21 -07:00
Christopher Chedeau
246005cc84 Update dist/ to be the latest version 2015-09-24 11:56:18 -07:00
Christopher Chedeau
4ca2ea3466 Merge pull request #129 from pragmatrix/csharp-fb-pr
C# Transpiler, API, and Tests
2015-09-23 09:08:15 -07:00
Armin Sander
4de0721a24 C# transpiler, API, and tests 2015-09-23 09:27:45 +02:00
Lucas Rocha
4ef24028be Merge pull request #126 from AaaChiuuu/master 2015-09-16 08:20:50 +01:00
Aaron Chiu
a353a11bf4 Merge pull request #1 from AaaChiuuu/publicConstants
Make CSSLayout constants public
2015-09-15 11:43:10 +01:00
Aaron Chiu
4a7936aa24 Make CSSLayout constants public 2015-09-15 11:42:30 +01:00
Aaron Chiu
f51c2d004d Merge pull request #123 from lucasr/omg-faster-flexbox
Even faster flexbox
2015-09-15 04:37:43 +01:00
Lucas Rocha
e43a8b28d6 Add 'package' comment in CSSNode for consistency 2015-09-14 18:23:36 +01:00
Lucas Rocha
cf94d35b51 Implement cascasing checks via bitwise flags
It turns the spacing resolution in Java is fairly expensive right now
because it doesn't a bunch of unnecessary checks in the array,
especially when the Spacing instance doesn't have any values set on it.

This diff changes Spacing to store the state of the defined values in a
bitwise flag so that padding/border/margin queries are a lot faster
during layout calculations. This gives us as extra 20% performance win
in my local benchmarks on Android
2015-09-14 18:23:36 +01:00
Lucas Rocha
ebc56fee59 Inline private methods at build time in Java
Unfortunately, Java doesn't have any build-time inlining solution and
method invocations do have a big performance impact on Android. This
changes Java's transpiler to inline almost all internal methods at build
time. This gives us a 30% performance win in my local benchmarks.

There's a drawback from moving code to the transpiler but I think this
is worth it (given the massive perf wins here) and the inlined methods
are fairly simple.
2015-09-14 18:23:36 +01:00
Christopher Chedeau
2120285467 Merge pull request #122 from lucasr/even-faster-flexbox
Even faster flexbox
2015-09-10 14:25:41 -07:00
Lucas Rocha
765ff8463e Add fast path for simple stack layouts
Change the initial line loop to opportunistically position children in
the in container with simple stacking params i.e. vertical/horizontal
stacking on non-flexible STRETCH/FLEX_START aligned. This allows us to
skip the main and cross axis loops (Loop C and D, respectively)
partially and even completely in many common scenarios.

In my benchamrks, this gives us about ~15% performance win in many
setups.
2015-09-10 11:19:28 +01:00