| 17 | |
| 18 | template <auto LayoutMember> |
| 19 | float getResolvedLayoutProperty(const YGNodeConstRef nodeRef, const Edge edge) { |
| 20 | const auto node = resolveRef(nodeRef); |
| 21 | yoga::assertFatalWithNode( |
| 22 | node, |
| 23 | edge <= Edge::End, |
| 24 | "Cannot get layout properties of multi-edge shorthands"); |
| 25 | |
| 26 | if (edge == Edge::Start) { |
| 27 | if (node->getLayout().direction() == Direction::RTL) { |
| 28 | return (node->getLayout().*LayoutMember)(PhysicalEdge::Right); |
| 29 | } else { |
| 30 | return (node->getLayout().*LayoutMember)(PhysicalEdge::Left); |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | if (edge == Edge::End) { |
| 35 | if (node->getLayout().direction() == Direction::RTL) { |
| 36 | return (node->getLayout().*LayoutMember)(PhysicalEdge::Left); |
| 37 | } else { |
| 38 | return (node->getLayout().*LayoutMember)(PhysicalEdge::Right); |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | return (node->getLayout().*LayoutMember)(static_cast<PhysicalEdge>(edge)); |
| 43 | } |
| 44 | |
| 45 | } // namespace |
| 46 |
nothing calls this directly
no test coverage detected