Skip to content
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

Implement clientTop/clientLeft in ReadOnlyElement #39308

Closed
wants to merge 3 commits into from

Conversation

rubennorte
Copy link
Contributor

Summary:
This adds a new method in Fabric to get the border size for an element, and uses it to implement the following methods as defined in react-native-community/discussions-and-proposals#607 :

  • clientLeft: left border width of the element.
  • clientTop: top border width of the element.
    If the element isn't displayed or it has display: inline, it return 0 in both cases.

These APIs provide rounded integers.

Changelog: [internal]

Differential Revision: D49009140

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner fb-exported labels Sep 6, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49009140

@analysis-bot
Copy link

analysis-bot commented Sep 6, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,964,630 +2,104
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 9,556,413 +2,128
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: 2608a37
Branch: main

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49009140

rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 6, 2023
Summary:
Pull Request resolved: facebook#39308

This adds a new method in Fabric to get the border size for an element, and uses it to implement the following methods as defined in react-native-community/discussions-and-proposals#607 :
* `clientLeft`: left border width of the element.
* `clientTop`: top border width of the element.
If the element isn't displayed or it has display: inline, it return 0 in both cases.

These APIs provide rounded integers.

Changelog: [internal]

Reviewed By: mdvacca

Differential Revision: D49009140

fbshipit-source-id: aec2d2f907339aa45e28271100c89b954f816cef
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49009140

rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 7, 2023
Summary:
Pull Request resolved: facebook#39308

This adds a new method in Fabric to get the border size for an element, and uses it to implement the following methods as defined in react-native-community/discussions-and-proposals#607 :
* `clientLeft`: left border width of the element.
* `clientTop`: top border width of the element.
If the element isn't displayed or it has display: inline, it return 0 in both cases.

These APIs provide rounded integers.

Changelog: [internal]

Reviewed By: mdvacca

Differential Revision: D49009140

fbshipit-source-id: 477f41537c7eba550cd7f1c1f3e1844617de61ab
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49009140

rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 7, 2023
Summary:
Pull Request resolved: facebook#39308

This adds a new method in Fabric to get the border size for an element, and uses it to implement the following methods as defined in react-native-community/discussions-and-proposals#607 :
* `clientLeft`: left border width of the element.
* `clientTop`: top border width of the element.
If the element isn't displayed or it has display: inline, it return 0 in both cases.

These APIs provide rounded integers.

Changelog: [internal]

Reviewed By: mdvacca

Differential Revision: D49009140

fbshipit-source-id: 18118bf965ef7f3f3fde79e85a41d83c04e97cdf
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49009140

rubennorte added a commit to rubennorte/react-native that referenced this pull request Sep 7, 2023
Summary:
Pull Request resolved: facebook#39308

This adds a new method in Fabric to get the border size for an element, and uses it to implement the following methods as defined in react-native-community/discussions-and-proposals#607 :
* `clientLeft`: left border width of the element.
* `clientTop`: top border width of the element.
If the element isn't displayed or it has display: inline, it return 0 in both cases.

These APIs provide rounded integers.

Changelog: [internal]

Reviewed By: mdvacca

Differential Revision: D49009140

fbshipit-source-id: 0b2ed15de4ea1e7fcb8961f879a77c1488558153
rubennorte and others added 3 commits September 7, 2023 09:51
Differential Revision: D48951824

fbshipit-source-id: 1bb73a87c65cd0be283a4887d21a0548d75157ec
Differential Revision: D49008698

fbshipit-source-id: 1db1f8d2d35caaab883556896fed7115536c90dc
Summary:
Pull Request resolved: facebook#39308

This adds a new method in Fabric to get the border size for an element, and uses it to implement the following methods as defined in react-native-community/discussions-and-proposals#607 :
* `clientLeft`: left border width of the element.
* `clientTop`: top border width of the element.
If the element isn't displayed or it has display: inline, it return 0 in both cases.

These APIs provide rounded integers.

Changelog: [internal]

Reviewed By: mdvacca

Differential Revision: D49009140

fbshipit-source-id: 7cc2fac1ec0526a5ad441bf71039333e10ff9696
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49009140

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Sep 7, 2023
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in eb5e7b2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants