| 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. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
| 6 * All rights reserved. | |
| 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 8 * | 7 * |
| 9 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 11 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| 12 * version 2 of the License, or (at your option) any later version. | 11 * version 2 of the License, or (at your option) any later version. |
| 13 * | 12 * |
| 14 * This library is distributed in the hope that it will be useful, | 13 * This library is distributed in the hope that it will be useful, |
| 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| (...skipping 24 matching lines...) Expand all Loading... |
| 41 WTF_MAKE_NONCOPYABLE(FloatingObject); | 40 WTF_MAKE_NONCOPYABLE(FloatingObject); |
| 42 USING_FAST_MALLOC(FloatingObject); | 41 USING_FAST_MALLOC(FloatingObject); |
| 43 | 42 |
| 44 public: | 43 public: |
| 45 #ifndef NDEBUG | 44 #ifndef NDEBUG |
| 46 // Used by the PODIntervalTree for debugging the FloatingObject. | 45 // Used by the PODIntervalTree for debugging the FloatingObject. |
| 47 template <class> | 46 template <class> |
| 48 friend struct ValueToString; | 47 friend struct ValueToString; |
| 49 #endif | 48 #endif |
| 50 | 49 |
| 51 // Note that Type uses bits so you can use FloatLeftRight as a mask to query | 50 // Note that Type uses bits so you can use FloatLeftRight as a mask to query f
or both left and right. |
| 52 // for both left and right. | |
| 53 enum Type { FloatLeft = 1, FloatRight = 2, FloatLeftRight = 3 }; | 51 enum Type { FloatLeft = 1, FloatRight = 2, FloatLeftRight = 3 }; |
| 54 | 52 |
| 55 static std::unique_ptr<FloatingObject> create(LayoutBox*); | 53 static std::unique_ptr<FloatingObject> create(LayoutBox*); |
| 56 | 54 |
| 57 std::unique_ptr<FloatingObject> copyToNewContainer( | 55 std::unique_ptr<FloatingObject> copyToNewContainer( |
| 58 LayoutSize, | 56 LayoutSize, |
| 59 bool shouldPaint = false, | 57 bool shouldPaint = false, |
| 60 bool isDescendant = false) const; | 58 bool isDescendant = false) const; |
| 61 | 59 |
| 62 std::unique_ptr<FloatingObject> unsafeClone() const; | 60 std::unique_ptr<FloatingObject> unsafeClone() const; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 bool isDescendant() const { return m_isDescendant; } | 116 bool isDescendant() const { return m_isDescendant; } |
| 119 void setIsDescendant(bool isDescendant) { m_isDescendant = isDescendant; } | 117 void setIsDescendant(bool isDescendant) { m_isDescendant = isDescendant; } |
| 120 bool isLowestNonOverhangingFloatInChild() const { | 118 bool isLowestNonOverhangingFloatInChild() const { |
| 121 return m_isLowestNonOverhangingFloatInChild; | 119 return m_isLowestNonOverhangingFloatInChild; |
| 122 } | 120 } |
| 123 void setIsLowestNonOverhangingFloatInChild( | 121 void setIsLowestNonOverhangingFloatInChild( |
| 124 bool isLowestNonOverhangingFloatInChild) { | 122 bool isLowestNonOverhangingFloatInChild) { |
| 125 m_isLowestNonOverhangingFloatInChild = isLowestNonOverhangingFloatInChild; | 123 m_isLowestNonOverhangingFloatInChild = isLowestNonOverhangingFloatInChild; |
| 126 } | 124 } |
| 127 | 125 |
| 128 // FIXME: Callers of these methods are dangerous and should be whitelisted | 126 // FIXME: Callers of these methods are dangerous and should be whitelisted exp
licitly or removed. |
| 129 // explicitly or removed. | |
| 130 RootInlineBox* originatingLine() const { return m_originatingLine; } | 127 RootInlineBox* originatingLine() const { return m_originatingLine; } |
| 131 void setOriginatingLine(RootInlineBox* line) { m_originatingLine = line; } | 128 void setOriginatingLine(RootInlineBox* line) { m_originatingLine = line; } |
| 132 | 129 |
| 133 private: | 130 private: |
| 134 explicit FloatingObject(LayoutBox*); | 131 explicit FloatingObject(LayoutBox*); |
| 135 FloatingObject(LayoutBox*, | 132 FloatingObject(LayoutBox*, |
| 136 Type, | 133 Type, |
| 137 const LayoutRect&, | 134 const LayoutRect&, |
| 138 bool shouldPaint, | 135 bool shouldPaint, |
| 139 bool isDescendant, | 136 bool isDescendant, |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 }; | 280 }; |
| 284 template <> | 281 template <> |
| 285 struct ValueToString<FloatingObject*> { | 282 struct ValueToString<FloatingObject*> { |
| 286 static String toString(const FloatingObject*); | 283 static String toString(const FloatingObject*); |
| 287 }; | 284 }; |
| 288 #endif | 285 #endif |
| 289 | 286 |
| 290 } // namespace blink | 287 } // namespace blink |
| 291 | 288 |
| 292 #endif // FloatingObjects_h | 289 #endif // FloatingObjects_h |
| OLD | NEW |