本文整理汇总了C++中FloatingObject::isPlaced方法的典型用法代码示例。如果您正苦于以下问题:C++ FloatingObject::isPlaced方法的具体用法?C++ FloatingObject::isPlaced怎么用?C++ FloatingObject::isPlaced使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FloatingObject
的用法示例。
在下文中一共展示了FloatingObject::isPlaced方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: add
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;
}
示例2: computePlacedFloatsTree
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));
}
}
示例3: removePlacedObject
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();
}