コード例 #1
0
void FloatingObjects::clear() {
  m_set.clear();
  m_placedFloatsTree.clear();
  m_leftObjectsCount = 0;
  m_rightObjectsCount = 0;
  markLowestFloatLogicalBottomCacheAsDirty();
}
コード例 #2
0
void FloatingObjects::remove(FloatingObject* toBeRemoved) {
  decreaseObjectsCount(toBeRemoved->getType());
  std::unique_ptr<FloatingObject> floatingObject = m_set.take(toBeRemoved);
  ASSERT(floatingObject->isPlaced() || !floatingObject->isInPlacedTree());
  if (floatingObject->isPlaced())
    removePlacedObject(*floatingObject);
  markLowestFloatLogicalBottomCacheAsDirty();
  ASSERT(!floatingObject->originatingLine());
}
コード例 #3
0
ファイル: FloatingObjects.cpp プロジェクト: dstockwell/blink
FloatingObject* FloatingObjects::add(PassOwnPtr<FloatingObject> floatingObject)
{
    FloatingObject* newObject = floatingObject.leakPtr();
    increaseObjectsCount(newObject->type());
    m_set.add(adoptPtr(newObject));
    if (newObject->isPlaced())
        addPlacedObject(*newObject);
    markLowestFloatLogicalBottomCacheAsDirty();
    return newObject;
}
コード例 #4
0
FloatingObject* FloatingObjects::add(
    std::unique_ptr<FloatingObject> floatingObject) {
  FloatingObject* newObject = floatingObject.release();
  increaseObjectsCount(newObject->getType());
  m_set.add(WTF::wrapUnique(newObject));
  if (newObject->isPlaced())
    addPlacedObject(*newObject);
  markLowestFloatLogicalBottomCacheAsDirty();
  return newObject;
}
コード例 #5
0
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();
}
コード例 #6
0
ファイル: FloatingObjects.cpp プロジェクト: dstockwell/blink
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();
}