| 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 <memory> | 35 #include <memory> |
| 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; | |
| 43 class ViewFragmentationContext; | 42 class ViewFragmentationContext; |
| 44 | 43 |
| 45 // 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. |
| 46 // | 45 // |
| 47 // 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). |
| 48 // http://www.w3.org/TR/CSS2/visudet.html#containing-block-details | 47 // http://www.w3.org/TR/CSS2/visudet.html#containing-block-details |
| 49 // | 48 // |
| 50 // 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 |
| 51 // size elements, in particular fixed positioned elements. | 50 // size elements, in particular fixed positioned elements. |
| 52 // 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 |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 bool heightChanged); | 224 bool heightChanged); |
| 226 | 225 |
| 227 // The document scrollbar is always on the right, even in RTL. This is to | 226 // The document scrollbar is always on the right, even in RTL. This is to |
| 228 // prevent it from moving around on navigations. | 227 // prevent it from moving around on navigations. |
| 229 // TODO(skobes): This is not quite the ideal behavior, see | 228 // TODO(skobes): This is not quite the ideal behavior, see |
| 230 // http://crbug.com/250514 and http://crbug.com/249860. | 229 // http://crbug.com/250514 and http://crbug.com/249860. |
| 231 bool shouldPlaceBlockDirectionScrollbarOnLogicalLeft() const override { | 230 bool shouldPlaceBlockDirectionScrollbarOnLogicalLeft() const override { |
| 232 return false; | 231 return false; |
| 233 } | 232 } |
| 234 | 233 |
| 235 // Some LayoutMedias want to know about their viewport visibility for | |
| 236 // crbug.com/487345,402044 . This facility will be removed once those | |
| 237 // experiments complete. | |
| 238 // TODO(ojan): Merge this with IntersectionObserver once it lands. | |
| 239 void registerMediaForPositionChangeNotification(LayoutMedia&); | |
| 240 void unregisterMediaForPositionChangeNotification(LayoutMedia&); | |
| 241 // Notify all registered LayoutMedias that their position on-screen might | |
| 242 // have changed. visibleRect is the clipping boundary. | |
| 243 void sendMediaPositionChangeNotifications(const IntRect& visibleRect); | |
| 244 | |
| 245 // The rootLayerScrolls setting will ultimately determine whether FrameView | 234 // The rootLayerScrolls setting will ultimately determine whether FrameView |
| 246 // or PaintLayerScrollableArea handle the scroll. | 235 // or PaintLayerScrollableArea handle the scroll. |
| 247 ScrollResult scroll(ScrollGranularity, const FloatSize&) override; | 236 ScrollResult scroll(ScrollGranularity, const FloatSize&) override; |
| 248 | 237 |
| 249 LayoutRect debugRect() const override; | 238 LayoutRect debugRect() const override; |
| 250 | 239 |
| 251 private: | 240 private: |
| 252 void mapLocalToAncestor( | 241 void mapLocalToAncestor( |
| 253 const LayoutBoxModelObject* ancestor, | 242 const LayoutBoxModelObject* ancestor, |
| 254 TransformState&, | 243 TransformState&, |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 std::unique_ptr<ViewFragmentationContext> m_fragmentationContext; | 300 std::unique_ptr<ViewFragmentationContext> m_fragmentationContext; |
| 312 std::unique_ptr<PaintLayerCompositor> m_compositor; | 301 std::unique_ptr<PaintLayerCompositor> m_compositor; |
| 313 RefPtr<IntervalArena> m_intervalArena; | 302 RefPtr<IntervalArena> m_intervalArena; |
| 314 | 303 |
| 315 LayoutQuote* m_layoutQuoteHead; | 304 LayoutQuote* m_layoutQuoteHead; |
| 316 unsigned m_layoutCounterCount; | 305 unsigned m_layoutCounterCount; |
| 317 | 306 |
| 318 unsigned m_hitTestCount; | 307 unsigned m_hitTestCount; |
| 319 unsigned m_hitTestCacheHits; | 308 unsigned m_hitTestCacheHits; |
| 320 Persistent<HitTestCache> m_hitTestCache; | 309 Persistent<HitTestCache> m_hitTestCache; |
| 321 | |
| 322 Vector<LayoutMedia*> m_mediaForPositionNotification; | |
| 323 }; | 310 }; |
| 324 | 311 |
| 325 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView()); | 312 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView()); |
| 326 | 313 |
| 327 } // namespace blink | 314 } // namespace blink |
| 328 | 315 |
| 329 #endif // LayoutView_h | 316 #endif // LayoutView_h |
| OLD | NEW |