| 137 | } |
| 138 | |
| 139 | void AttributeHandler::resetAttribute(ViewTransactionScope& viewTransactionScope, |
| 140 | ViewNode& viewNode, |
| 141 | const SharedAnimator& animator) const { |
| 142 | SC_ASSERT(!requiresView() || viewNode.hasView()); |
| 143 | SC_ASSERT(_delegate != nullptr, "AttributeHandler::resetAttribute called with null delegate"); |
| 144 | |
| 145 | if (_delegate == nullptr) { |
| 146 | return; |
| 147 | } |
| 148 | |
| 149 | _delegate->onReset(viewTransactionScope, viewNode, viewNode.getView(), _name, animator); |
| 150 | } |
| 151 | |
| 152 | void AttributeHandler::appendPreprocessor(Result<Value> (*preprocessor)(const Value&), bool isTrivial) { |
| 153 | appendPreprocessor(AttributePreprocessor(preprocessor), isTrivial); |