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. |
6 * All rights reserved. | 6 * All rights reserved. |
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 std::unique_ptr<FloatingObject> unsafeClone() const; | 62 std::unique_ptr<FloatingObject> unsafeClone() const; |
63 | 63 |
64 Type getType() const { return static_cast<Type>(m_type); } | 64 Type getType() const { return static_cast<Type>(m_type); } |
65 LayoutBox* layoutObject() const { return m_layoutObject; } | 65 LayoutBox* layoutObject() const { return m_layoutObject; } |
66 | 66 |
67 bool isPlaced() const { return m_isPlaced; } | 67 bool isPlaced() const { return m_isPlaced; } |
68 void setIsPlaced(bool placed = true) { m_isPlaced = placed; } | 68 void setIsPlaced(bool placed = true) { m_isPlaced = placed; } |
69 | 69 |
70 LayoutUnit x() const { | 70 LayoutUnit x() const { |
71 ASSERT(isPlaced()); | 71 DCHECK(isPlaced()); |
72 return m_frameRect.x(); | 72 return m_frameRect.x(); |
73 } | 73 } |
74 LayoutUnit maxX() const { | 74 LayoutUnit maxX() const { |
75 ASSERT(isPlaced()); | 75 DCHECK(isPlaced()); |
76 return m_frameRect.maxX(); | 76 return m_frameRect.maxX(); |
77 } | 77 } |
78 LayoutUnit y() const { | 78 LayoutUnit y() const { |
79 ASSERT(isPlaced()); | 79 DCHECK(isPlaced()); |
80 return m_frameRect.y(); | 80 return m_frameRect.y(); |
81 } | 81 } |
82 LayoutUnit maxY() const { | 82 LayoutUnit maxY() const { |
83 ASSERT(isPlaced()); | 83 DCHECK(isPlaced()); |
84 return m_frameRect.maxY(); | 84 return m_frameRect.maxY(); |
85 } | 85 } |
86 LayoutUnit width() const { return m_frameRect.width(); } | 86 LayoutUnit width() const { return m_frameRect.width(); } |
87 LayoutUnit height() const { return m_frameRect.height(); } | 87 LayoutUnit height() const { return m_frameRect.height(); } |
88 | 88 |
89 void setX(LayoutUnit x) { | 89 void setX(LayoutUnit x) { |
90 ASSERT(!isInPlacedTree()); | 90 DCHECK(!isInPlacedTree()); |
91 m_frameRect.setX(x); | 91 m_frameRect.setX(x); |
92 } | 92 } |
93 void setY(LayoutUnit y) { | 93 void setY(LayoutUnit y) { |
94 ASSERT(!isInPlacedTree()); | 94 DCHECK(!isInPlacedTree()); |
95 m_frameRect.setY(y); | 95 m_frameRect.setY(y); |
96 } | 96 } |
97 void setWidth(LayoutUnit width) { | 97 void setWidth(LayoutUnit width) { |
98 ASSERT(!isInPlacedTree()); | 98 DCHECK(!isInPlacedTree()); |
99 m_frameRect.setWidth(width); | 99 m_frameRect.setWidth(width); |
100 } | 100 } |
101 void setHeight(LayoutUnit height) { | 101 void setHeight(LayoutUnit height) { |
102 ASSERT(!isInPlacedTree()); | 102 DCHECK(!isInPlacedTree()); |
103 m_frameRect.setHeight(height); | 103 m_frameRect.setHeight(height); |
104 } | 104 } |
105 | 105 |
106 const LayoutRect& frameRect() const { | 106 const LayoutRect& frameRect() const { |
107 ASSERT(isPlaced()); | 107 DCHECK(isPlaced()); |
108 return m_frameRect; | 108 return m_frameRect; |
109 } | 109 } |
110 | 110 |
111 bool isInPlacedTree() const { return m_isInPlacedTree; } | 111 bool isInPlacedTree() const { return m_isInPlacedTree; } |
112 void setIsInPlacedTree(bool value) { m_isInPlacedTree = value; } | 112 void setIsInPlacedTree(bool value) { m_isInPlacedTree = value; } |
113 | 113 |
114 bool shouldPaint() const { return m_shouldPaint; } | 114 bool shouldPaint() const { return m_shouldPaint; } |
115 void setShouldPaint(bool shouldPaint) { m_shouldPaint = shouldPaint; } | 115 void setShouldPaint(bool shouldPaint) { m_shouldPaint = shouldPaint; } |
116 bool isDescendant() const { return m_isDescendant; } | 116 bool isDescendant() const { return m_isDescendant; } |
117 void setIsDescendant(bool isDescendant) { m_isDescendant = isDescendant; } | 117 void setIsDescendant(bool isDescendant) { m_isDescendant = isDescendant; } |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 }; | 276 }; |
277 template <> | 277 template <> |
278 struct ValueToString<FloatingObject*> { | 278 struct ValueToString<FloatingObject*> { |
279 static String toString(const FloatingObject*); | 279 static String toString(const FloatingObject*); |
280 }; | 280 }; |
281 #endif | 281 #endif |
282 | 282 |
283 } // namespace blink | 283 } // namespace blink |
284 | 284 |
285 #endif // FloatingObjects_h | 285 #endif // FloatingObjects_h |
OLD | NEW |