Summary: To perform some JNI optimizations for java we need a reference to the node in the measure function. This updates the API to provide the whole node as input instead of just the context.
Reviewed By: javache
Differential Revision: D4081544
fbshipit-source-id: d49679025cea027cf7b8482898de0a01fe0f9d40
Summary:
Originally, we thought that skipping the measurement of views that were hidden would be a nice optimiatzion. Upon further review, we saw that according to Apple's `UIView` documentation:
> A hidden view disappears from its window and does not receive input events. It remains in its superview’s list of subviews, however, and participates in autoresizing as usual.
So, to keep parity with common iOS layout APIs, we are going to size and layout views, even if they are hidden.
Reviewed By: emilsjolander
Differential Revision: D4051225
fbshipit-source-id: 0794cbad293a7de83d109dad2b3983d83845d145
Summary: using `IS_THIS_FBOBJC` will break the tests in the open-source repo. This fixes Facebook builds and open source builds.
Reviewed By: WaseemTheDream, mzlee
Differential Revision: D4025580
fbshipit-source-id: 8280520a63134744fd24518aa6f45423aa0ecd03
Summary: Gate it with `THIS_IS_FBOBJC` for now - the better solution is gating with fb_xplat_cxx_library and fb_xplat_cxx_test
Reviewed By: dshahidehpour
Differential Revision: D4024973
fbshipit-source-id: 2ce744fd67630b39b0498d0479a034d0b05c68ed
Summary: Wrote some tests to make sure the associated objects we use for layout live and die with the objects. This was worthwhile because it made me realize UIView+CSSLayout wasn't enabled to ARC. As a result, my tests were failing because they weren't explicitly deallocing nodes.
Reviewed By: rnystrom
Differential Revision: D4023324
fbshipit-source-id: 5356cf4f0522582d75f83b5eb2193d9bc8d63aee
Summary: `sizeThatFits:` can be expensive, this optimizes our measuring function so that we do not call it if we know that we are going to use the exact height and width that were passed-in.
Reviewed By: rnystrom
Differential Revision: D4023715
fbshipit-source-id: dc02703b50bafd168ffab62ed98a7f6342100cc9
Summary: If views are hidden on screen, we don't want to bother including them in layout calculations.
Reviewed By: rnystrom
Differential Revision: D4022992
fbshipit-source-id: 2e93eb911f26223f305ef7ce788f86d050b83e4a
Summary: I'm going to make some changes, but first, I want to get testing setup.
Reviewed By: rnystrom
Differential Revision: D4022585
fbshipit-source-id: a48516faad0bcb1a9cf5610ab21da5ee099c6f16
Summary: Add flexbox support to UIViews via a category
Reviewed By: dshahidehpour
Differential Revision: D4002873
fbshipit-source-id: f89de3acdf8fd89c7801918dcad34ba9011dd025