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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 void removeLayoutCounter() { ASSERT(m_layoutCounterCount > 0); m_layoutCount
erCount--; } | 181 void removeLayoutCounter() { ASSERT(m_layoutCounterCount > 0); m_layoutCount
erCount--; } |
182 bool hasLayoutCounters() { return m_layoutCounterCount; } | 182 bool hasLayoutCounters() { return m_layoutCounterCount; } |
183 | 183 |
184 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const ov
erride; | 184 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const ov
erride; |
185 | 185 |
186 // Returns the viewport size in (CSS pixels) that vh and vw units are calcul
ated from. | 186 // Returns the viewport size in (CSS pixels) that vh and vw units are calcul
ated from. |
187 FloatSize viewportSizeForViewportUnits() const; | 187 FloatSize viewportSizeForViewportUnits() const; |
188 | 188 |
189 void pushLayoutState(LayoutState& layoutState) { m_layoutState = &layoutStat
e; } | 189 void pushLayoutState(LayoutState& layoutState) { m_layoutState = &layoutStat
e; } |
190 void popLayoutState() { ASSERT(m_layoutState); m_layoutState = m_layoutState
->next(); } | 190 void popLayoutState() { ASSERT(m_layoutState); m_layoutState = m_layoutState
->next(); } |
191 void invalidateTreeIfNeeded(PaintInvalidationState&) final; | 191 void invalidateTreeIfNeeded(const PaintInvalidationState&) final; |
192 | 192 |
193 LayoutRect visualOverflowRect() const override; | 193 LayoutRect visualOverflowRect() const override; |
194 | 194 |
195 // Invalidates paint for the entire view, including composited descendants,
but not including child frames. | 195 // Invalidates paint for the entire view, including composited descendants,
but not including child frames. |
196 // It is very likely you do not want to call this method. | 196 // It is very likely you do not want to call this method. |
197 void setShouldDoFullPaintInvalidationForViewAndAllDescendants(); | 197 void setShouldDoFullPaintInvalidationForViewAndAllDescendants(); |
198 | 198 |
199 // The document scrollbar is always on the right, even in RTL. This is to pr
event it from moving around on navigations. | 199 // The document scrollbar is always on the right, even in RTL. This is to pr
event it from moving around on navigations. |
200 // TODO(skobes): This is not quite the ideal behavior, see http://crbug.com/
250514 and http://crbug.com/249860. | 200 // TODO(skobes): This is not quite the ideal behavior, see http://crbug.com/
250514 and http://crbug.com/249860. |
201 bool shouldPlaceBlockDirectionScrollbarOnLogicalLeft() const override { retu
rn false; } | 201 bool shouldPlaceBlockDirectionScrollbarOnLogicalLeft() const override { retu
rn false; } |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 | 278 |
279 unsigned m_hitTestCount; | 279 unsigned m_hitTestCount; |
280 unsigned m_hitTestCacheHits; | 280 unsigned m_hitTestCacheHits; |
281 OwnPtrWillBePersistent<HitTestCache> m_hitTestCache; | 281 OwnPtrWillBePersistent<HitTestCache> m_hitTestCache; |
282 | 282 |
283 Vector<LayoutMedia*> m_mediaForPositionNotification; | 283 Vector<LayoutMedia*> m_mediaForPositionNotification; |
284 }; | 284 }; |
285 | 285 |
286 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView()); | 286 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView()); |
287 | 287 |
288 // Suspends the PaintInvalidationState cached offset and clipRect optimization.
Used under transforms | |
289 // that cannot be represented by PaintInvalidationState (common in SVG) and when
paint invalidation | |
290 // containers don't follow the common tree-walk algorithm (e.g. when an absolute
positioned descendant | |
291 // is nested under a relatively positioned inline-block child). | |
292 class ForceHorriblySlowRectMapping { | |
293 STACK_ALLOCATED(); | |
294 WTF_MAKE_NONCOPYABLE(ForceHorriblySlowRectMapping); | |
295 public: | |
296 ForceHorriblySlowRectMapping(const PaintInvalidationState* paintInvalidation
State) | |
297 : m_paintInvalidationState(paintInvalidationState) | |
298 , m_didDisable(m_paintInvalidationState && m_paintInvalidationState->cac
hedOffsetsEnabled()) | |
299 { | |
300 if (m_paintInvalidationState) | |
301 m_paintInvalidationState->m_cachedOffsetsEnabled = false; | |
302 } | |
303 | |
304 ~ForceHorriblySlowRectMapping() | |
305 { | |
306 if (m_didDisable) | |
307 m_paintInvalidationState->m_cachedOffsetsEnabled = true; | |
308 } | |
309 private: | |
310 const PaintInvalidationState* m_paintInvalidationState; | |
311 bool m_didDisable; | |
312 }; | |
313 | |
314 } // namespace blink | 288 } // namespace blink |
315 | 289 |
316 #endif // LayoutView_h | 290 #endif // LayoutView_h |
OLD | NEW |