| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
| 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "platform/PODFreeListArena.h" | 28 #include "platform/PODFreeListArena.h" |
| 29 #include "platform/PODIntervalTree.h" | 29 #include "platform/PODIntervalTree.h" |
| 30 #include "wtf/ListHashSet.h" | 30 #include "wtf/ListHashSet.h" |
| 31 #include "wtf/OwnPtr.h" | 31 #include "wtf/OwnPtr.h" |
| 32 | 32 |
| 33 namespace blink { | 33 namespace blink { |
| 34 | 34 |
| 35 class LayoutBlockFlow; | 35 class LayoutBlockFlow; |
| 36 class LayoutBox; | 36 class LayoutBox; |
| 37 | 37 |
| 38 // FIXME this should be removed once LayoutBlockFlow::nextFloatLogicalBottomBelo
w doesn't need it anymore. (Bug 123931) | |
| 39 enum ShapeOutsideFloatOffsetMode { ShapeOutsideFloatShapeOffset, ShapeOutsideFlo
atMarginBoxOffset }; | |
| 40 | |
| 41 class FloatingObject { | 38 class FloatingObject { |
| 42 WTF_MAKE_NONCOPYABLE(FloatingObject); WTF_MAKE_FAST_ALLOCATED(FloatingObject
); | 39 WTF_MAKE_NONCOPYABLE(FloatingObject); WTF_MAKE_FAST_ALLOCATED(FloatingObject
); |
| 43 public: | 40 public: |
| 44 #ifndef NDEBUG | 41 #ifndef NDEBUG |
| 45 // Used by the PODIntervalTree for debugging the FloatingObject. | 42 // Used by the PODIntervalTree for debugging the FloatingObject. |
| 46 template <class> friend struct ValueToString; | 43 template <class> friend struct ValueToString; |
| 47 #endif | 44 #endif |
| 48 | 45 |
| 49 // Note that Type uses bits so you can use FloatLeftRight as a mask to query
for both left and right. | 46 // Note that Type uses bits so you can use FloatLeftRight as a mask to query
for both left and right. |
| 50 enum Type { FloatLeft = 1, FloatRight = 2, FloatLeftRight = 3 }; | 47 enum Type { FloatLeft = 1, FloatRight = 2, FloatLeftRight = 3 }; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 bool hasLeftObjects() const { return m_leftObjectsCount > 0; } | 149 bool hasLeftObjects() const { return m_leftObjectsCount > 0; } |
| 153 bool hasRightObjects() const { return m_rightObjectsCount > 0; } | 150 bool hasRightObjects() const { return m_rightObjectsCount > 0; } |
| 154 const FloatingObjectSet& set() const { return m_set; } | 151 const FloatingObjectSet& set() const { return m_set; } |
| 155 void clearLineBoxTreePointers(); | 152 void clearLineBoxTreePointers(); |
| 156 | 153 |
| 157 LayoutUnit logicalLeftOffset(LayoutUnit fixedOffset, LayoutUnit logicalTop,
LayoutUnit logicalHeight); | 154 LayoutUnit logicalLeftOffset(LayoutUnit fixedOffset, LayoutUnit logicalTop,
LayoutUnit logicalHeight); |
| 158 LayoutUnit logicalRightOffset(LayoutUnit fixedOffset, LayoutUnit logicalTop,
LayoutUnit logicalHeight); | 155 LayoutUnit logicalRightOffset(LayoutUnit fixedOffset, LayoutUnit logicalTop,
LayoutUnit logicalHeight); |
| 159 | 156 |
| 160 LayoutUnit logicalLeftOffsetForPositioningFloat(LayoutUnit fixedOffset, Layo
utUnit logicalTop, LayoutUnit* heightRemaining); | 157 LayoutUnit logicalLeftOffsetForPositioningFloat(LayoutUnit fixedOffset, Layo
utUnit logicalTop, LayoutUnit* heightRemaining); |
| 161 LayoutUnit logicalRightOffsetForPositioningFloat(LayoutUnit fixedOffset, Lay
outUnit logicalTop, LayoutUnit* heightRemaining); | 158 LayoutUnit logicalRightOffsetForPositioningFloat(LayoutUnit fixedOffset, Lay
outUnit logicalTop, LayoutUnit* heightRemaining); |
| 159 LayoutUnit findNextFloatLogicalBottomBelow(LayoutUnit logicalHeight); |
| 160 LayoutUnit findNextFloatLogicalBottomBelowForBlock(LayoutUnit logicalHeight)
; |
| 162 | 161 |
| 163 LayoutUnit lowestFloatLogicalBottom(FloatingObject::Type); | 162 LayoutUnit lowestFloatLogicalBottom(FloatingObject::Type); |
| 164 FloatingObject* lowestFloatingObject() const; | 163 FloatingObject* lowestFloatingObject() const; |
| 165 | 164 |
| 166 private: | 165 private: |
| 167 bool hasLowestFloatLogicalBottomCached(bool isHorizontal, FloatingObject::Ty
pe floatType) const; | 166 bool hasLowestFloatLogicalBottomCached(bool isHorizontal, FloatingObject::Ty
pe floatType) const; |
| 168 LayoutUnit getCachedlowestFloatLogicalBottom(FloatingObject::Type floatType)
const; | 167 LayoutUnit getCachedlowestFloatLogicalBottom(FloatingObject::Type floatType)
const; |
| 169 void setCachedLowestFloatLogicalBottom(bool isHorizontal, FloatingObject::Ty
pe floatType, FloatingObject*); | 168 void setCachedLowestFloatLogicalBottom(bool isHorizontal, FloatingObject::Ty
pe floatType, FloatingObject*); |
| 170 void markLowestFloatLogicalBottomCacheAsDirty(); | 169 void markLowestFloatLogicalBottomCacheAsDirty(); |
| 171 | 170 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 202 static String string(const int value); | 201 static String string(const int value); |
| 203 }; | 202 }; |
| 204 template<> struct ValueToString<FloatingObject*> { | 203 template<> struct ValueToString<FloatingObject*> { |
| 205 static String string(const FloatingObject*); | 204 static String string(const FloatingObject*); |
| 206 }; | 205 }; |
| 207 #endif | 206 #endif |
| 208 | 207 |
| 209 } // namespace blink | 208 } // namespace blink |
| 210 | 209 |
| 211 #endif // FloatingObjects_h | 210 #endif // FloatingObjects_h |
| OLD | NEW |