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