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