OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 // PaintLayerClipper and thus ignores this optimization. | 128 // PaintLayerClipper and thus ignores this optimization. |
129 // | 129 // |
130 // Visual overflow covers self visual overflow, and if the box doesn't clip | 130 // Visual overflow covers self visual overflow, and if the box doesn't clip |
131 // overflow, also content visual overflow. OverflowModel doesn't keep visual | 131 // overflow, also content visual overflow. OverflowModel doesn't keep visual |
132 // overflow, but keeps self visual overflow and contents visual overflow | 132 // overflow, but keeps self visual overflow and contents visual overflow |
133 // separately. The box should use self visual overflow as visual overflow if | 133 // separately. The box should use self visual overflow as visual overflow if |
134 // it clips overflow, otherwise union of self visual overflow and contents | 134 // it clips overflow, otherwise union of self visual overflow and contents |
135 // visual overflow. | 135 // visual overflow. |
136 | 136 |
137 class BoxOverflowModel { | 137 class BoxOverflowModel { |
| 138 WTF_MAKE_NONCOPYABLE(BoxOverflowModel); |
| 139 USING_FAST_MALLOC(BoxOverflowModel); |
138 public: | 140 public: |
139 BoxOverflowModel(const LayoutRect& layoutRect, const LayoutRect& selfVisualO
verflowRect) | 141 BoxOverflowModel(const LayoutRect& layoutRect, const LayoutRect& selfVisualO
verflowRect) |
140 : m_layoutOverflow(layoutRect) | 142 : m_layoutOverflow(layoutRect) |
141 , m_selfVisualOverflow(selfVisualOverflowRect) | 143 , m_selfVisualOverflow(selfVisualOverflowRect) |
142 { | 144 { |
143 } | 145 } |
144 | 146 |
145 const LayoutRect& layoutOverflowRect() const { return m_layoutOverflow; } | 147 const LayoutRect& layoutOverflowRect() const { return m_layoutOverflow; } |
146 void setLayoutOverflow(const LayoutRect& rect) { m_layoutOverflow = rect; } | 148 void setLayoutOverflow(const LayoutRect& rect) { m_layoutOverflow = rect; } |
147 void addLayoutOverflow(const LayoutRect& rect) { uniteLayoutOverflowRect(m_l
ayoutOverflow, rect); } | 149 void addLayoutOverflow(const LayoutRect& rect) { uniteLayoutOverflowRect(m_l
ayoutOverflow, rect); } |
(...skipping 17 matching lines...) Expand all Loading... |
165 private: | 167 private: |
166 LayoutRect m_layoutOverflow; | 168 LayoutRect m_layoutOverflow; |
167 LayoutRect m_selfVisualOverflow; | 169 LayoutRect m_selfVisualOverflow; |
168 LayoutRect m_contentsVisualOverflow; | 170 LayoutRect m_contentsVisualOverflow; |
169 LayoutUnit m_layoutClientAfterEdge; | 171 LayoutUnit m_layoutClientAfterEdge; |
170 }; | 172 }; |
171 | 173 |
172 } // namespace blink | 174 } // namespace blink |
173 | 175 |
174 #endif // OverflowModel_h | 176 #endif // OverflowModel_h |
OLD | NEW |