-
Notifications
You must be signed in to change notification settings - Fork 24.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue where % width would be wrong if physical and relative paddi…
…ng defined on parent (#44791) Summary: Pull Request resolved: #44791 X-link: facebook/yoga#1662 This should fix facebook/yoga#1657. Rather insidious bug but we had code like ``` // The total padding/border for a given axis does not depend on the direction // so hardcoding LTR here to avoid piping direction to this function return node->style().computeInlineStartPaddingAndBorder( axis, Direction::LTR, widthSize) + node->style().computeInlineEndPaddingAndBorder( axis, Direction::LTR, widthSize); ``` That comment is NOT true if someone sets both the physical edge and relative edge. So like paddingLeft and paddingEnd for RTL. This diff simply pipes the direction to that spot to use instead of hardcoding LTR. Every file changed is just to pipe `direction`. Changelog: [Internal] Reviewed By: NickGerleman Differential Revision: D58169843 fbshipit-source-id: 5b4854dddc019285076bd06955557edf73ef7ec5
- Loading branch information
1 parent
e686b43
commit 940d738
Showing
3 changed files
with
68 additions
and
20 deletions.
There are no files selected for viewing
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 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 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