| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 class FloatingObjects { | 135 class FloatingObjects { |
| 136 WTF_MAKE_NONCOPYABLE(FloatingObjects); WTF_MAKE_FAST_ALLOCATED(FloatingObjec
ts); | 136 WTF_MAKE_NONCOPYABLE(FloatingObjects); WTF_MAKE_FAST_ALLOCATED(FloatingObjec
ts); |
| 137 public: | 137 public: |
| 138 FloatingObjects(const LayoutBlockFlow*, bool horizontalWritingMode); | 138 FloatingObjects(const LayoutBlockFlow*, bool horizontalWritingMode); |
| 139 ~FloatingObjects(); | 139 ~FloatingObjects(); |
| 140 | 140 |
| 141 void clear(); | 141 void clear(); |
| 142 void moveAllToFloatInfoMap(LayoutBoxToFloatInfoMap&); | 142 void moveAllToFloatInfoMap(LayoutBoxToFloatInfoMap&); |
| 143 FloatingObject* add(PassOwnPtr<FloatingObject>); | 143 FloatingObject* add(PassOwnPtr<FloatingObject>); |
| 144 void remove(FloatingObject*); | 144 void remove(FloatingObject*); |
| 145 void addPlacedObject(FloatingObject*); | 145 void addPlacedObject(FloatingObject&); |
| 146 void removePlacedObject(FloatingObject*); | 146 void removePlacedObject(FloatingObject&); |
| 147 void setHorizontalWritingMode(bool b = true) { m_horizontalWritingMode = b;
} | 147 void setHorizontalWritingMode(bool b = true) { m_horizontalWritingMode = b;
} |
| 148 | 148 |
| 149 bool hasLeftObjects() const { return m_leftObjectsCount > 0; } | 149 bool hasLeftObjects() const { return m_leftObjectsCount > 0; } |
| 150 bool hasRightObjects() const { return m_rightObjectsCount > 0; } | 150 bool hasRightObjects() const { return m_rightObjectsCount > 0; } |
| 151 const FloatingObjectSet& set() const { return m_set; } | 151 const FloatingObjectSet& set() const { return m_set; } |
| 152 void clearLineBoxTreePointers(); | 152 void clearLineBoxTreePointers(); |
| 153 | 153 |
| 154 LayoutUnit logicalLeftOffset(LayoutUnit fixedOffset, LayoutUnit logicalTop,
LayoutUnit logicalHeight); | 154 LayoutUnit logicalLeftOffset(LayoutUnit fixedOffset, LayoutUnit logicalTop,
LayoutUnit logicalHeight); |
| 155 LayoutUnit logicalRightOffset(LayoutUnit fixedOffset, LayoutUnit logicalTop,
LayoutUnit logicalHeight); | 155 LayoutUnit logicalRightOffset(LayoutUnit fixedOffset, LayoutUnit logicalTop,
LayoutUnit logicalHeight); |
| 156 | 156 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 167 | 167 |
| 168 void computePlacedFloatsTree(); | 168 void computePlacedFloatsTree(); |
| 169 const FloatingObjectTree& placedFloatsTree() | 169 const FloatingObjectTree& placedFloatsTree() |
| 170 { | 170 { |
| 171 if (!m_placedFloatsTree.isInitialized()) | 171 if (!m_placedFloatsTree.isInitialized()) |
| 172 computePlacedFloatsTree(); | 172 computePlacedFloatsTree(); |
| 173 return m_placedFloatsTree; | 173 return m_placedFloatsTree; |
| 174 } | 174 } |
| 175 void increaseObjectsCount(FloatingObject::Type); | 175 void increaseObjectsCount(FloatingObject::Type); |
| 176 void decreaseObjectsCount(FloatingObject::Type); | 176 void decreaseObjectsCount(FloatingObject::Type); |
| 177 FloatingObjectInterval intervalForFloatingObject(FloatingObject*); | 177 FloatingObjectInterval intervalForFloatingObject(FloatingObject&); |
| 178 | 178 |
| 179 FloatingObjectSet m_set; | 179 FloatingObjectSet m_set; |
| 180 FloatingObjectTree m_placedFloatsTree; | 180 FloatingObjectTree m_placedFloatsTree; |
| 181 unsigned m_leftObjectsCount; | 181 unsigned m_leftObjectsCount; |
| 182 unsigned m_rightObjectsCount; | 182 unsigned m_rightObjectsCount; |
| 183 bool m_horizontalWritingMode; | 183 bool m_horizontalWritingMode; |
| 184 const LayoutBlockFlow* m_layoutObject; | 184 const LayoutBlockFlow* m_layoutObject; |
| 185 | 185 |
| 186 struct FloatBottomCachedValue { | 186 struct FloatBottomCachedValue { |
| 187 FloatBottomCachedValue(); | 187 FloatBottomCachedValue(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 198 static String string(const int value); | 198 static String string(const int value); |
| 199 }; | 199 }; |
| 200 template<> struct ValueToString<FloatingObject*> { | 200 template<> struct ValueToString<FloatingObject*> { |
| 201 static String string(const FloatingObject*); | 201 static String string(const FloatingObject*); |
| 202 }; | 202 }; |
| 203 #endif | 203 #endif |
| 204 | 204 |
| 205 } // namespace blink | 205 } // namespace blink |
| 206 | 206 |
| 207 #endif // FloatingObjects_h | 207 #endif // FloatingObjects_h |
| OLD | NEW |