#include "core/rendering/RenderBox.h"
#include "core/rendering/RenderView.h"
-using namespace std;
using namespace WTF;
-namespace WebCore {
+namespace blink {
struct SameSizeAsFloatingObject {
void* pointers[2];
, m_shouldPaint(true)
, m_isDescendant(false)
, m_isPlaced(false)
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
, m_isInPlacedTree(false)
#endif
{
, m_shouldPaint(shouldPaint)
, m_isDescendant(isDescendant)
, m_isPlaced(true)
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
, m_isInPlacedTree(false)
#endif
{
return getCachedlowestFloatLogicalBottom(floatType);
} else {
if (hasLowestFloatLogicalBottomCached(isInHorizontalWritingMode, FloatingObject::FloatLeft) && hasLowestFloatLogicalBottomCached(isInHorizontalWritingMode, FloatingObject::FloatRight)) {
- return max(getCachedlowestFloatLogicalBottom(FloatingObject::FloatLeft),
+ return std::max(getCachedlowestFloatLogicalBottom(FloatingObject::FloatLeft),
getCachedlowestFloatLogicalBottom(FloatingObject::FloatRight));
}
}
FloatingObject::Type curType = floatingObject->type();
LayoutUnit curFloatLogicalBottom = m_renderer->logicalBottomForFloat(floatingObject);
if (curType & FloatingObject::FloatLeft)
- lowestFloatBottomLeft = max(lowestFloatBottomLeft, curFloatLogicalBottom);
+ lowestFloatBottomLeft = std::max(lowestFloatBottomLeft, curFloatLogicalBottom);
if (curType & FloatingObject::FloatRight)
- lowestFloatBottomRight = max(lowestFloatBottomRight, curFloatLogicalBottom);
+ lowestFloatBottomRight = std::max(lowestFloatBottomRight, curFloatLogicalBottom);
}
}
- lowestFloatBottom = max(lowestFloatBottomLeft, lowestFloatBottomRight);
+ lowestFloatBottom = std::max(lowestFloatBottomLeft, lowestFloatBottomRight);
setCachedLowestFloatLogicalBottom(isInHorizontalWritingMode, FloatingObject::FloatLeft, lowestFloatBottomLeft);
setCachedLowestFloatLogicalBottom(isInHorizontalWritingMode, FloatingObject::FloatRight, lowestFloatBottomRight);
} else {
for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
FloatingObject* floatingObject = it->get();
if (floatingObject->isPlaced() && floatingObject->type() == floatType)
- lowestFloatBottom = max(lowestFloatBottom, m_renderer->logicalBottomForFloat(floatingObject));
+ lowestFloatBottom = std::max(lowestFloatBottom, m_renderer->logicalBottomForFloat(floatingObject));
}
setCachedLowestFloatLogicalBottom(isInHorizontalWritingMode, floatType, lowestFloatBottom);
}
if (m_placedFloatsTree.isInitialized())
m_placedFloatsTree.add(intervalForFloatingObject(floatingObject));
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
floatingObject->setIsInPlacedTree(true);
#endif
markLowestFloatLogicalBottomCacheAsDirty();
}
floatingObject->setIsPlaced(false);
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
floatingObject->setIsInPlacedTree(false);
#endif
markLowestFloatLogicalBottomCacheAsDirty();
if (heightRemaining)
*heightRemaining = adapter.heightRemaining();
- return min(fixedOffset, adapter.offset());
+ return std::min(fixedOffset, adapter.offset());
}
LayoutUnit FloatingObjects::logicalLeftOffset(LayoutUnit fixedOffset, LayoutUnit logicalTop, LayoutUnit logicalHeight)
ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatRight> adapter(m_renderer, roundToInt(logicalTop), roundToInt(logicalTop + logicalHeight), fixedOffset);
placedFloatsTree().allOverlapsWithAdapter(adapter);
- return min(fixedOffset, adapter.offset());
+ return std::min(fixedOffset, adapter.offset());
}
FloatingObjects::FloatBottomCachedValue::FloatBottomCachedValue()
#endif
-} // namespace WebCore
+} // namespace blink