| 3445 | int ViewNode::getStickyPosition() const { |
| 3446 | return _stickyPosition; |
| 3447 | } |
| 3448 | |
| 3449 | void ViewNode::setNativeStickyEnabled(bool enabled) { |
| 3450 | auto& scrollState = getOrCreateScrollState(); |
| 3451 | bool previous = scrollState.getNativeStickyEnabled(); |
| 3452 | scrollState.setNativeStickyEnabled(enabled); |
| 3453 | |
| 3454 | // Runtime toggle false -> true: build the sticky measurement cache now so the |
| 3455 | // next scroll frame doesn't read default 0.0f values and misposition headers. |