| 183 | } |
| 184 | } |
| 185 | |
| 186 | void ViewNodeAttribute::replaceValue(const Value& value) { |
| 187 | // TODO(simon): In replaceValue() we are overidding values |
| 188 | // in every existing attribute. This is so that attributes |
| 189 | // updated from platform side can be reflected here. We should |
| 190 | // remove this concept at some point and instead have contentOffset |
| 191 | // and others not exposed as an attribute. |
| 192 | |
| 193 | if (_hasSingleAttribute) { |
| 194 | auto& attributeValue = getSingleAttributeValue(); |
| 195 | attributeValue.value = value; |
| 196 | attributeValue.preprocessedValue = PreprocessedValue(value); |
| 197 | } else if (_hasAttributeCollection) { |
| 198 | for (auto& attributeValue : getAttributeValueCollection().values) { |
| 199 | attributeValue.value = value; |
| 200 | attributeValue.preprocessedValue = PreprocessedValue(value); |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | _appliedValueDirty = false; |
| 205 | _hasAppliedValue = true; |
| 206 | } |
| 207 | |
| 208 | Value ViewNodeAttribute::getResolvedValue() const { |
no test coverage detected