Summary: X-link: https://github.com/facebook/react-native/pull/44791 Pull Request resolved: https://github.com/facebook/yoga/pull/1662 This should fix https://github.com/facebook/yoga/issues/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
30 lines
1.1 KiB
HTML
30 lines
1.1 KiB
HTML
<div id="padding_no_size" style="padding: 10px;">
|
|
</div>
|
|
|
|
<div id="padding_container_match_child" style="padding: 10px;">
|
|
<div style="width: 10px; height: 10px;"></div>
|
|
</div>
|
|
|
|
<div id="padding_flex_child" style="width: 100px; height: 100px; padding: 10px;">
|
|
<div style="width: 10px; flex-grow:1"></div>
|
|
</div>
|
|
|
|
<div id="padding_stretch_child" style="width: 100px; height: 100px; padding: 10px;">
|
|
<div style="height: 10px;"></div>
|
|
</div>
|
|
|
|
<div id="padding_center_child"
|
|
style="width: 100px; height: 100px; padding-start: 10px; padding-top: 10; padding-end: 20px; padding-bottom: 20px; align-items: center; justify-content: center;">
|
|
<div style="height: 10px; width: 10px;"></div>
|
|
</div>
|
|
|
|
<div id="child_with_padding_align_end"
|
|
style="width: 200px; height: 200px; justify-content: flex-end; align-items: flex-end;">
|
|
<div style="width: 100px; height: 100px; padding: 20px;"></div>
|
|
</div>
|
|
|
|
<div id="physical_and_relative_edge_defined"
|
|
style="width: 200px; height: 200px; padding-left: 20px; padding-end: 50px;">
|
|
<div style="width: 100%; height: 50px;"></div>
|
|
</div>
|