void FloatingObjects::addPlacedObject(FloatingObject& floatingObject) { ASSERT(!floatingObject.isInPlacedTree()); floatingObject.setIsPlaced(true); if (m_placedFloatsTree.isInitialized()) m_placedFloatsTree.add(intervalForFloatingObject(floatingObject)); #if ENABLE(ASSERT) floatingObject.setIsInPlacedTree(true); #endif markLowestFloatLogicalBottomCacheAsDirty(); }
void FloatingObjects::computePlacedFloatsTree() { ASSERT(!m_placedFloatsTree.isInitialized()); if (m_set.isEmpty()) return; m_placedFloatsTree.initIfNeeded(m_renderer->view().intervalArena()); for (auto it = m_set.begin(), end = m_set.end(); it != end; ++it) { FloatingObject* floatingObject = it->get(); if (floatingObject->isPlaced()) m_placedFloatsTree.add(intervalForFloatingObject(floatingObject)); } }
void FloatingObjects::addPlacedObject(FloatingObject* floatingObject) { ASSERT(!floatingObject->isInPlacedTree()); floatingObject->setIsPlaced(true); if (m_placedFloatsTree.isInitialized()) m_placedFloatsTree.add(intervalForFloatingObject(floatingObject)); #ifndef NDEBUG floatingObject->setIsInPlacedTree(true); #endif }
void FloatingObjects::computePlacedFloatsTree() { ASSERT(!m_placedFloatsTree.isInitialized()); if (m_set.isEmpty()) return; m_placedFloatsTree.initIfNeeded(m_layoutObject->view()->intervalArena()); FloatingObjectSetIterator it = m_set.begin(); FloatingObjectSetIterator end = m_set.end(); for (; it != end; ++it) { FloatingObject& floatingObject = *it->get(); if (floatingObject.isPlaced()) m_placedFloatsTree.add(intervalForFloatingObject(floatingObject)); } }
void FloatingObjects::computePlacedFloatsTree() { ASSERT(!m_placedFloatsTree); if (m_set.isEmpty()) return; m_placedFloatsTree = std::make_unique<FloatingObjectTree>(); for (auto it = m_set.begin(), end = m_set.end(); it != end; ++it) { FloatingObject* floatingObject = it->get(); if (floatingObject->isPlaced()) m_placedFloatsTree->add(intervalForFloatingObject(floatingObject)); } }
void FloatingObjects::removePlacedObject(FloatingObject* floatingObject) { ASSERT(floatingObject->isPlaced() && floatingObject->isInPlacedTree()); if (m_placedFloatsTree.isInitialized()) { bool removed = m_placedFloatsTree.remove(intervalForFloatingObject(floatingObject)); ASSERT_UNUSED(removed, removed); } floatingObject->setIsPlaced(false); #ifndef NDEBUG floatingObject->setIsInPlacedTree(false); #endif }
void FloatingObjects::removePlacedObject(FloatingObject& floatingObject) { ASSERT(floatingObject.isPlaced() && floatingObject.isInPlacedTree()); if (m_placedFloatsTree.isInitialized()) { bool removed = m_placedFloatsTree.remove(intervalForFloatingObject(floatingObject)); ASSERT_UNUSED(removed, removed); } floatingObject.setIsPlaced(false); #if ENABLE(ASSERT) floatingObject.setIsInPlacedTree(false); #endif markLowestFloatLogicalBottomCacheAsDirty(); }