OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2006 Apple Computer, Inc. | 3 * Copyright (C) 2006 Apple Computer, Inc. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 | 238 |
239 OwnPtrWillBePersistent<PendingSelection> m_pendingSelection; | 239 OwnPtrWillBePersistent<PendingSelection> m_pendingSelection; |
240 | 240 |
241 // TODO(pdr): This is only temporarily here and will be moving | 241 // TODO(pdr): This is only temporarily here and will be moving |
242 // when the API to cc is specified. | 242 // when the API to cc is specified. |
243 OwnPtr<const CompositedDisplayList> m_compositedDisplayList; | 243 OwnPtr<const CompositedDisplayList> m_compositedDisplayList; |
244 }; | 244 }; |
245 | 245 |
246 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView()); | 246 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView()); |
247 | 247 |
248 // Suspends the LayoutState cached offset and clipRect optimization. Used under
transforms | 248 // Suspends the PaintInvalidationState cached offset and clipRect optimization.
Used under transforms |
249 // that cannot be represented by LayoutState (common in SVG) and when manipulati
ng the layout | 249 // that cannot be represented by PaintInvalidationState (common in SVG) and when
paint invalidation |
250 // tree during layout in ways that can trigger paint invalidation of a non-child
(e.g. when a list item | 250 // containers don't follow the common tree-walk algorithm (e.g. when an absolute
positioned descendant |
251 // moves its list marker around). Note that even when disabled, LayoutState is s
till used to | 251 // is nested under a relatively positioned inline-block child). |
252 // store layoutDelta. | |
253 class ForceHorriblySlowRectMapping { | 252 class ForceHorriblySlowRectMapping { |
254 WTF_MAKE_NONCOPYABLE(ForceHorriblySlowRectMapping); | 253 WTF_MAKE_NONCOPYABLE(ForceHorriblySlowRectMapping); |
255 public: | 254 public: |
256 ForceHorriblySlowRectMapping(const PaintInvalidationState* paintInvalidation
State) | 255 ForceHorriblySlowRectMapping(const PaintInvalidationState* paintInvalidation
State) |
257 : m_paintInvalidationState(paintInvalidationState) | 256 : m_paintInvalidationState(paintInvalidationState) |
258 , m_didDisable(m_paintInvalidationState && m_paintInvalidationState->cac
hedOffsetsEnabled()) | 257 , m_didDisable(m_paintInvalidationState && m_paintInvalidationState->cac
hedOffsetsEnabled()) |
259 { | 258 { |
260 if (m_paintInvalidationState) | 259 if (m_paintInvalidationState) |
261 m_paintInvalidationState->m_cachedOffsetsEnabled = false; | 260 m_paintInvalidationState->m_cachedOffsetsEnabled = false; |
262 } | 261 } |
263 | 262 |
264 ~ForceHorriblySlowRectMapping() | 263 ~ForceHorriblySlowRectMapping() |
265 { | 264 { |
266 if (m_didDisable) | 265 if (m_didDisable) |
267 m_paintInvalidationState->m_cachedOffsetsEnabled = true; | 266 m_paintInvalidationState->m_cachedOffsetsEnabled = true; |
268 } | 267 } |
269 private: | 268 private: |
270 const PaintInvalidationState* m_paintInvalidationState; | 269 const PaintInvalidationState* m_paintInvalidationState; |
271 bool m_didDisable; | 270 bool m_didDisable; |
272 }; | 271 }; |
273 | 272 |
274 } // namespace blink | 273 } // namespace blink |
275 | 274 |
276 #endif // LayoutView_h | 275 #endif // LayoutView_h |
OLD | NEW |