-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace dim and pos arrays #1373
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This pull request was exported from Phabricator. Differential Revision: D49134566 |
This pull request was exported from Phabricator. Differential Revision: D49134566 |
NickGerleman
added a commit
to NickGerleman/yoga
that referenced
this pull request
Sep 12, 2023
Summary: X-link: facebook/react-native#39397 Pull Request resolved: facebook#1373 These are used to get the position origin edge from axis (same as leading edge), and dimension from axis. Replace them with function usage, so that we can call into them from other files than `CalculateLayout.cpp`, and so that we can later use scoped enums not implicitly convertible to ints. Reviewed By: rshest Differential Revision: D49134566 fbshipit-source-id: c561603c41bff22eaadb547ceba3eccb62e3cbe8
NickGerleman
force-pushed
the
export-D49134566
branch
from
September 12, 2023 00:35
f5ef6f0
to
82095f8
Compare
NickGerleman
added a commit
to NickGerleman/react-native
that referenced
this pull request
Sep 12, 2023
Summary: Pull Request resolved: facebook#39397 X-link: facebook/yoga#1373 These are used to get the position origin edge from axis (same as leading edge), and dimension from axis. Replace them with function usage, so that we can call into them from other files than `CalculateLayout.cpp`, and so that we can later use scoped enums not implicitly convertible to ints. Reviewed By: rshest Differential Revision: D49134566 fbshipit-source-id: b52677c7c513fede666a87fa4ce9b1d14b1a2a27
This pull request was exported from Phabricator. Differential Revision: D49134566 |
NickGerleman
added a commit
to NickGerleman/yoga
that referenced
this pull request
Sep 12, 2023
Summary: X-link: facebook/react-native#39397 Pull Request resolved: facebook#1373 These are used to get the position origin edge from axis (same as leading edge), and dimension from axis. Replace them with function usage, so that we can call into them from other files than `CalculateLayout.cpp`, and so that we can later use scoped enums not implicitly convertible to ints. Reviewed By: rshest Differential Revision: D49134566 fbshipit-source-id: 2706ab7e1949b0b349dc8581b95fcaddaaed556a
NickGerleman
force-pushed
the
export-D49134566
branch
from
September 12, 2023 01:34
82095f8
to
3653b1d
Compare
NickGerleman
added a commit
to NickGerleman/react-native
that referenced
this pull request
Sep 12, 2023
Summary: Pull Request resolved: facebook#39397 X-link: facebook/yoga#1373 These are used to get the position origin edge from axis (same as leading edge), and dimension from axis. Replace them with function usage, so that we can call into them from other files than `CalculateLayout.cpp`, and so that we can later use scoped enums not implicitly convertible to ints. Reviewed By: rshest Differential Revision: D49134566 fbshipit-source-id: 5c852178effd25df6f4c74f18115c3b2889b486b
Summary: This changes public Yoga API to in more places accept const structures where before they required mutable ones. This tries to avoid more breaking changes yet, e.g. changing callbacks to require clients do not modify nodes when they are passed for logging. We also don't have const variants for returning child structures which would allow mutation of dependencies of the const object. These would need new names under the public API, since we do not have operator overloading in C. Differential Revision: D49130412 fbshipit-source-id: 6cf09885ad3e9d4c152eb3b910be418302ad647d
Summary: Pull Request resolved: facebook#1369 X-link: facebook/react-native#39370 This fixes const-correctness of callbacks (e.g. not letting a logger function modify nodes during layout). This helps us to continue to fix const-correctness issues inside of Yoga. This change is breaking to the public API, since it requires a change in signature passed to Yoga. Changelog: [Internal] Differential Revision: https://internalfb.com/D49130714 fbshipit-source-id: 9e45ee99f1ead499558c948778fcdf03f77357e9
Summary: Yoga's public API exposes indices most often as `uint32_t`, with exception of clone callbacks which are `int32_t`. Yoga internally represents these indices as `size_t` when dealing with the child vector, and this is the true index. This changes the API to consistently be `size_t`. This should not be breaking for most users, but will cause breaks where: 1. Users set a clone node callback (I think this should be rare. RN uses it, but only because it relies on a separate private API). 2. Callers of `YGNodeGetChildCount()` are assigning to an int with less width than `size_t` and have strong warnings enabled. 3. Using a newer Yoga binary with older source, since we are not preserving ABI compatibility (Yoga in general does not aim to be ABI stable between major versions, only ABI safe for a given set of sources). Differential Revision: D49130914 fbshipit-source-id: f409fec9a35ca2713db4d6195bfc44795a216e28
Summary: This was added in facebook#497 specifically for tests related to memory leaks in the C# bindings to count how often YGConfigFree. This is the wrong layer for this check, we don't have officially supported C# bindings anymore, and this API is not safe when Yoga runs on multiple threads. This removes it. Differential Revision: D49131207 fbshipit-source-id: fd31e294655ab7d37a81adf7ea6c3f8d3e87c0d6
Summary: These were marked as deprecated as part of the public Yoga 2.0 release, and were alredy emitting deprecation warnings. Remove them. Differential Revision: https://internalfb.com/D49131250 fbshipit-source-id: c9e3a7b35b2bd30c02c64669518dd91c0de3e1ea
Summary: Moves some messiness around conditionally using Android's logger to `Log.cpp`, isolated to within a single function. Differential Revision: D49131964 fbshipit-source-id: 7dee6f25d9488287054e135bc315f9ee4cb70de3
Differential Revision: https://internalfb.com/D49132476 fbshipit-source-id: 763197c14a6898176bce87342da33bfc445d063d
Summary: D18029030 added `-fvisibility-hidden`, and a corresponding `YOGA_EXPORT` macro for defining shared library visibility. There was already a `WIN_EXPORT` macro doing the same thing when building a DLL, but in the header, instead of CPP files, and sometimes missing for important parts of the public API? This reconciles those into a single visiblity macro, that we always place with declaration instead of definition. Differential Revision: D49132643 fbshipit-source-id: 27dc91380707ff289c1e0ff88cce24b5e84a1e00
Differential Revision: D49133837 fbshipit-source-id: 9673ff32901593a1971f53022ef35fcbbb587ad9
Summary: X-link: facebook/react-native#39397 Pull Request resolved: facebook#1373 These are used to get the position origin edge from axis (same as leading edge), and dimension from axis. Replace them with function usage, so that we can call into them from other files than `CalculateLayout.cpp`, and so that we can later use scoped enums not implicitly convertible to ints. Reviewed By: rshest Differential Revision: D49134566 fbshipit-source-id: 8148376f40b3560c1d1bc3193412caa0f0de6bc6
This pull request was exported from Phabricator. Differential Revision: D49134566 |
NickGerleman
force-pushed
the
export-D49134566
branch
from
September 12, 2023 02:02
3653b1d
to
dd77410
Compare
NickGerleman
added a commit
to NickGerleman/react-native
that referenced
this pull request
Sep 12, 2023
Summary: Pull Request resolved: facebook#39397 X-link: facebook/yoga#1373 These are used to get the position origin edge from axis (same as leading edge), and dimension from axis. Replace them with function usage, so that we can call into them from other files than `CalculateLayout.cpp`, and so that we can later use scoped enums not implicitly convertible to ints. Reviewed By: rshest Differential Revision: D49134566 fbshipit-source-id: d618b4a523303ad90321eac0b6411c9baaaae914
facebook-github-bot
pushed a commit
to facebook/litho
that referenced
this pull request
Sep 12, 2023
Summary: X-link: facebook/react-native#39397 X-link: facebook/yoga#1373 These are used to get the position origin edge from axis (same as leading edge), and dimension from axis. Replace them with function usage, so that we can call into them from other files than `CalculateLayout.cpp`, and so that we can later use scoped enums not implicitly convertible to ints. Reviewed By: rshest Differential Revision: D49134566 fbshipit-source-id: cb806539ba0733a5773c594713720d465987e469
facebook-github-bot
pushed a commit
to facebook/react-native
that referenced
this pull request
Sep 12, 2023
Summary: Pull Request resolved: #39397 X-link: facebook/yoga#1373 These are used to get the position origin edge from axis (same as leading edge), and dimension from axis. Replace them with function usage, so that we can call into them from other files than `CalculateLayout.cpp`, and so that we can later use scoped enums not implicitly convertible to ints. Reviewed By: rshest Differential Revision: D49134566 fbshipit-source-id: cb806539ba0733a5773c594713720d465987e469
This pull request has been merged in 62ba8eb. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
These are used to get the position origin edge from axis (same as leading edge), and dimension from axis.
Replace them with function usage, so that we can call into them from other files than
CalculateLayout.cpp
, and so that we can later use scoped enums not implicitly convertible to ints.Reviewed By: rshest
Differential Revision: D49134566