Fabric: `LayoutableShadowNodeList::getChildren` renamed to `getLayoutableChildNodes`

Summary:
The previous name conflicts with the method with same (but with different semantic) name in `ShadowNode` class.
That was bad idea to use same name especially because the different semantic.

Reviewed By: fkgozali

Differential Revision: D7554549

fbshipit-source-id: 0bccbaacd0812f8a26592b2008f15ddb5bc34ebc
This commit is contained in:
Valentin Shergin 2018-04-10 16:37:22 -07:00 committed by Facebook Github Bot
parent 711abeda79
commit b13d5beb11
5 changed files with 6 additions and 6 deletions

View File

@ -64,7 +64,7 @@ Float LayoutableShadowNode::lastBaseline(Size size) const {
void LayoutableShadowNode::layout(LayoutContext layoutContext) {
layoutChildren(layoutContext);
for (auto child : getChildren()) {
for (auto child : getLayoutableChildNodes()) {
if (!child->getHasNewLayout()) {
continue;
}

View File

@ -88,7 +88,7 @@ protected:
/*
* Returns layoutable children to interate on.
*/
virtual SharedLayoutableShadowNodeList getChildren() const = 0;
virtual SharedLayoutableShadowNodeList getLayoutableChildNodes() const = 0;
/*
* In case layout algorithm needs to mutate this (probably sealed) node,

View File

@ -75,7 +75,7 @@ void ViewShadowNode::appendChild(const SharedShadowNode &child) {
#pragma mark - YogaLayoutableShadowNode
SharedLayoutableShadowNodeList ViewShadowNode::getChildren() const {
SharedLayoutableShadowNodeList ViewShadowNode::getLayoutableChildNodes() const {
SharedLayoutableShadowNodeList sharedLayoutableShadowNodeList = {};
for (auto child : *children_) {
const SharedLayoutableShadowNode layoutableShadowNode = std::dynamic_pointer_cast<const LayoutableShadowNode>(child);

View File

@ -60,7 +60,7 @@ private:
#pragma mark - LayoutableShadowNode
SharedLayoutableShadowNodeList getChildren() const override;
SharedLayoutableShadowNodeList getLayoutableChildNodes() const override;
SharedLayoutableShadowNode cloneAndReplaceChild(const SharedLayoutableShadowNode &child) override;
};

View File

@ -114,7 +114,7 @@ void YogaLayoutableShadowNode::layout(LayoutContext layoutContext) {
}
void YogaLayoutableShadowNode::layoutChildren(LayoutContext layoutContext) {
for (auto child : getChildren()) {
for (auto child : getLayoutableChildNodes()) {
auto yogaLayoutableChild = std::dynamic_pointer_cast<const YogaLayoutableShadowNode>(child);
if (!yogaLayoutableChild) {
continue;
@ -183,7 +183,7 @@ YGNode *YogaLayoutableShadowNode::yogaNodeCloneCallbackConnector(YGNode *oldYoga
// * Create a new `shared_ptr` with empty deleter.
// * Using `childIndex` to find exact node.
SharedLayoutableShadowNode oldShadowNode = nullptr;
for (auto child : parentShadowNodeRawPtr->getChildren()) {
for (auto child : parentShadowNodeRawPtr->getLayoutableChildNodes()) {
if (child.get() == oldShadowNodeRawPtr) {
oldShadowNode = child;
break;