Fabric: De-virtualizing LayoutableShadowNode::setLayoutMetrics()

Summary:
Removing `virtual` qualifier for `LayoutableShadowNode::setLayoutMetrics()`. Original design implied that some subclass might override that method to provide additional functionality but we never used that and seems not it does not much the overall design: we store `layoutMetrics` *inside* `LayoutableShadowNode`.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: sammy-SC

Differential Revision: D20268042

fbshipit-source-id: 2aa9b3da316b97f26493fb04d19ca8290bd5d2a6
This commit is contained in:
Valentin Shergin
2020-03-09 16:36:45 -07:00
committed by Facebook Github Bot
parent 2a61c4ec53
commit b5aaa25b9e
2 changed files with 6 additions and 10 deletions
@@ -98,6 +98,12 @@ class LayoutableShadowNode : public ShadowNode {
LayoutableShadowNode const &ancestorLayoutableShadowNode,
LayoutInspectingPolicy policy) const;
/*
* Sets layout metrics for the shadow node.
* Returns true if the metrics are different from previous ones.
*/
bool setLayoutMetrics(LayoutMetrics layoutMetrics);
/*
* Returns the ShadowNode that is rendered at the Point received as a
* parameter.
@@ -140,12 +146,6 @@ class LayoutableShadowNode : public ShadowNode {
*/
LayoutableShadowNode::UnsharedList getLayoutableChildNodes() const;
/*
* Sets layout metrics for the shadow node.
* Returns true if the metrics are different from previous ones.
*/
virtual bool setLayoutMetrics(LayoutMetrics layoutMetrics);
#pragma mark - DebugStringConvertible
#if RN_DEBUG_STRING_CONVERTIBLE
@@ -55,10 +55,6 @@ class TestShadowNode : public ConcreteViewShadowNode<
Transform _transform{Transform::Identity()};
bool setLayoutMetrics(LayoutMetrics layoutMetrics) override {
return YogaLayoutableShadowNode::setLayoutMetrics(layoutMetrics);
}
Transform getTransform() const override {
return _transform;
}