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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 OwnPtrWillBePersistent<PendingSelection> m_pendingSelection; | 236 OwnPtrWillBePersistent<PendingSelection> m_pendingSelection; |
237 }; | 237 }; |
238 | 238 |
239 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView()); | 239 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView()); |
240 | 240 |
241 // Suspends the PaintInvalidationState cached offset and clipRect optimization.
Used under transforms | 241 // Suspends the PaintInvalidationState cached offset and clipRect optimization.
Used under transforms |
242 // that cannot be represented by PaintInvalidationState (common in SVG) and when
paint invalidation | 242 // that cannot be represented by PaintInvalidationState (common in SVG) and when
paint invalidation |
243 // containers don't follow the common tree-walk algorithm (e.g. when an absolute
positioned descendant | 243 // containers don't follow the common tree-walk algorithm (e.g. when an absolute
positioned descendant |
244 // is nested under a relatively positioned inline-block child). | 244 // is nested under a relatively positioned inline-block child). |
245 class ForceHorriblySlowRectMapping { | 245 class ForceHorriblySlowRectMapping { |
| 246 STACK_ALLOCATED(); |
246 WTF_MAKE_NONCOPYABLE(ForceHorriblySlowRectMapping); | 247 WTF_MAKE_NONCOPYABLE(ForceHorriblySlowRectMapping); |
247 public: | 248 public: |
248 ForceHorriblySlowRectMapping(const PaintInvalidationState* paintInvalidation
State) | 249 ForceHorriblySlowRectMapping(const PaintInvalidationState* paintInvalidation
State) |
249 : m_paintInvalidationState(paintInvalidationState) | 250 : m_paintInvalidationState(paintInvalidationState) |
250 , m_didDisable(m_paintInvalidationState && m_paintInvalidationState->cac
hedOffsetsEnabled()) | 251 , m_didDisable(m_paintInvalidationState && m_paintInvalidationState->cac
hedOffsetsEnabled()) |
251 { | 252 { |
252 if (m_paintInvalidationState) | 253 if (m_paintInvalidationState) |
253 m_paintInvalidationState->m_cachedOffsetsEnabled = false; | 254 m_paintInvalidationState->m_cachedOffsetsEnabled = false; |
254 } | 255 } |
255 | 256 |
256 ~ForceHorriblySlowRectMapping() | 257 ~ForceHorriblySlowRectMapping() |
257 { | 258 { |
258 if (m_didDisable) | 259 if (m_didDisable) |
259 m_paintInvalidationState->m_cachedOffsetsEnabled = true; | 260 m_paintInvalidationState->m_cachedOffsetsEnabled = true; |
260 } | 261 } |
261 private: | 262 private: |
262 const PaintInvalidationState* m_paintInvalidationState; | 263 const PaintInvalidationState* m_paintInvalidationState; |
263 bool m_didDisable; | 264 bool m_didDisable; |
264 }; | 265 }; |
265 | 266 |
266 } // namespace blink | 267 } // namespace blink |
267 | 268 |
268 #endif // LayoutView_h | 269 #endif // LayoutView_h |
OLD | NEW |