+ // Set logical height as the max cached height (if the cache is not empty).
+ if (m_logicalHeightHintCache.isEmpty()) {
+ m_logicalHeightHint = 0.0;
+ } else {
+ m_logicalHeightHint = *std::max_element(m_logicalHeightHintCache.begin(), m_logicalHeightHintCache.end());
+ m_minHeightHint = *std::min_element(m_logicalHeightHintCache.begin(), m_logicalHeightHintCache.end());
+ }