| 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 22 matching lines...) Expand all Loading... |
| 33 #include "platform/PODFreeListArena.h" | 33 #include "platform/PODFreeListArena.h" |
| 34 #include "platform/RuntimeEnabledFeatures.h" | 34 #include "platform/RuntimeEnabledFeatures.h" |
| 35 #include "platform/heap/Handle.h" | 35 #include "platform/heap/Handle.h" |
| 36 #include "platform/scroll/ScrollableArea.h" | 36 #include "platform/scroll/ScrollableArea.h" |
| 37 #include "wtf/OwnPtr.h" | 37 #include "wtf/OwnPtr.h" |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 | 40 |
| 41 class DeprecatedPaintLayerCompositor; | 41 class DeprecatedPaintLayerCompositor; |
| 42 class LayoutQuote; | 42 class LayoutQuote; |
| 43 class LayoutMedia; |
| 43 | 44 |
| 44 // LayoutView is the root of the layout tree and the Document's LayoutObject. | 45 // LayoutView is the root of the layout tree and the Document's LayoutObject. |
| 45 // | 46 // |
| 46 // It corresponds to the CSS concept of 'initial containing block' (or ICB). | 47 // It corresponds to the CSS concept of 'initial containing block' (or ICB). |
| 47 // http://www.w3.org/TR/CSS2/visudet.html#containing-block-details | 48 // http://www.w3.org/TR/CSS2/visudet.html#containing-block-details |
| 48 // | 49 // |
| 49 // Its dimensions match that of the layout viewport. This viewport is used to | 50 // Its dimensions match that of the layout viewport. This viewport is used to |
| 50 // size elements, in particular fixed positioned elements. | 51 // size elements, in particular fixed positioned elements. |
| 51 // LayoutView is always at position (0,0) relative to the document (and so isn't | 52 // LayoutView is always at position (0,0) relative to the document (and so isn't |
| 52 // necessarily in view). | 53 // necessarily in view). |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 void pushLayoutState(LayoutState& layoutState) { m_layoutState = &layoutStat
e; } | 192 void pushLayoutState(LayoutState& layoutState) { m_layoutState = &layoutStat
e; } |
| 192 void popLayoutState() { ASSERT(m_layoutState); m_layoutState = m_layoutState
->next(); } | 193 void popLayoutState() { ASSERT(m_layoutState); m_layoutState = m_layoutState
->next(); } |
| 193 void invalidateTreeIfNeeded(PaintInvalidationState&) final; | 194 void invalidateTreeIfNeeded(PaintInvalidationState&) final; |
| 194 | 195 |
| 195 LayoutRect visualOverflowRect() const override; | 196 LayoutRect visualOverflowRect() const override; |
| 196 | 197 |
| 197 // Invalidates paint for the entire view, including composited descendants,
but not including child frames. | 198 // Invalidates paint for the entire view, including composited descendants,
but not including child frames. |
| 198 // It is very likely you do not want to call this method. | 199 // It is very likely you do not want to call this method. |
| 199 void setShouldDoFullPaintInvalidationForViewAndAllDescendants(); | 200 void setShouldDoFullPaintInvalidationForViewAndAllDescendants(); |
| 200 | 201 |
| 202 // Some LayoutMedias want to know about their viewport visibility for |
| 203 // crbug.com/487345,402044 . This facility will be removed once those |
| 204 // experiments complete. |
| 205 void registerMediaForPositionChangeNotification(LayoutMedia*); |
| 206 void unregisterMediaForPositionChangeNotification(LayoutMedia*); |
| 207 // Notify all registered LayoutMedias that their position on-screen might |
| 208 // have changed. |
| 209 void sendMediaPositionChangeNotifications(); |
| 210 |
| 201 private: | 211 private: |
| 202 void mapLocalToContainer(const LayoutBoxModelObject* paintInvalidationContai
ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed =
nullptr, const PaintInvalidationState* = nullptr) const override; | 212 void mapLocalToContainer(const LayoutBoxModelObject* paintInvalidationContai
ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed =
nullptr, const PaintInvalidationState* = nullptr) const override; |
| 203 | 213 |
| 204 const LayoutObject* pushMappingToContainer(const LayoutBoxModelObject* ances
torToStopAt, LayoutGeometryMap&) const override; | 214 const LayoutObject* pushMappingToContainer(const LayoutBoxModelObject* ances
torToStopAt, LayoutGeometryMap&) const override; |
| 205 void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) const ove
rride; | 215 void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) const ove
rride; |
| 206 void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOf
fset) const override; | 216 void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOf
fset) const override; |
| 207 | 217 |
| 208 void layoutContent(); | 218 void layoutContent(); |
| 209 #if ENABLE(ASSERT) | 219 #if ENABLE(ASSERT) |
| 210 void checkLayoutState(); | 220 void checkLayoutState(); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 | 263 |
| 254 OwnPtr<DeprecatedPaintLayerCompositor> m_compositor; | 264 OwnPtr<DeprecatedPaintLayerCompositor> m_compositor; |
| 255 RefPtr<IntervalArena> m_intervalArena; | 265 RefPtr<IntervalArena> m_intervalArena; |
| 256 | 266 |
| 257 LayoutQuote* m_layoutQuoteHead; | 267 LayoutQuote* m_layoutQuoteHead; |
| 258 unsigned m_layoutCounterCount; | 268 unsigned m_layoutCounterCount; |
| 259 | 269 |
| 260 unsigned m_hitTestCount; | 270 unsigned m_hitTestCount; |
| 261 unsigned m_hitTestCacheHits; | 271 unsigned m_hitTestCacheHits; |
| 262 OwnPtrWillBePersistent<HitTestCache> m_hitTestCache; | 272 OwnPtrWillBePersistent<HitTestCache> m_hitTestCache; |
| 273 |
| 274 Vector<LayoutMedia*> m_mediaForPositionNotification; |
| 263 }; | 275 }; |
| 264 | 276 |
| 265 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView()); | 277 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView()); |
| 266 | 278 |
| 267 // Suspends the PaintInvalidationState cached offset and clipRect optimization.
Used under transforms | 279 // Suspends the PaintInvalidationState cached offset and clipRect optimization.
Used under transforms |
| 268 // that cannot be represented by PaintInvalidationState (common in SVG) and when
paint invalidation | 280 // that cannot be represented by PaintInvalidationState (common in SVG) and when
paint invalidation |
| 269 // containers don't follow the common tree-walk algorithm (e.g. when an absolute
positioned descendant | 281 // containers don't follow the common tree-walk algorithm (e.g. when an absolute
positioned descendant |
| 270 // is nested under a relatively positioned inline-block child). | 282 // is nested under a relatively positioned inline-block child). |
| 271 class ForceHorriblySlowRectMapping { | 283 class ForceHorriblySlowRectMapping { |
| 272 STACK_ALLOCATED(); | 284 STACK_ALLOCATED(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 286 m_paintInvalidationState->m_cachedOffsetsEnabled = true; | 298 m_paintInvalidationState->m_cachedOffsetsEnabled = true; |
| 287 } | 299 } |
| 288 private: | 300 private: |
| 289 const PaintInvalidationState* m_paintInvalidationState; | 301 const PaintInvalidationState* m_paintInvalidationState; |
| 290 bool m_didDisable; | 302 bool m_didDisable; |
| 291 }; | 303 }; |
| 292 | 304 |
| 293 } // namespace blink | 305 } // namespace blink |
| 294 | 306 |
| 295 #endif // LayoutView_h | 307 #endif // LayoutView_h |
| OLD | NEW |