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