| 309 | } |
| 310 | |
| 311 | void FlexboxLayer::onLayout() { |
| 312 | Layer::onLayout(); |
| 313 | |
| 314 | auto node = mustGetFlexboxNode(this); |
| 315 | if (YGNodeGetOwner(node->yogaNode) == nullptr) { |
| 316 | // we are the root node, calculate the layout starting from us |
| 317 | node->calculateLayout(getFrame().size(), isRightToLeft()); |
| 318 | } |
| 319 | |
| 320 | auto childrenSize = getChildrenSize(); |
| 321 | for (size_t i = 0; i < childrenSize; i++) { |
| 322 | auto child = getChild(i); |
| 323 | auto childNode = mustGetFlexboxNode(child.get()); |
| 324 | |
| 325 | child->setFrame(childNode->getFrame()); |
| 326 | } |
| 327 | } |
| 328 | |
| 329 | FlexboxAttributes FlexboxLayer::updateLayoutAttributes() { |
| 330 | return updateLayoutAttributesForLayer(this); |
nothing calls this directly
no test coverage detected