OLD | NEW |
---|---|
1 /* | 1 /* |
2 Copyright (C) 1997 Martin Jones (mjones@kde.org) | 2 Copyright (C) 1997 Martin Jones (mjones@kde.org) |
3 (C) 1998 Waldo Bastian (bastian@kde.org) | 3 (C) 1998 Waldo Bastian (bastian@kde.org) |
4 (C) 1998, 1999 Torben Weis (weis@kde.org) | 4 (C) 1998, 1999 Torben Weis (weis@kde.org) |
5 (C) 1999 Lars Knoll (knoll@kde.org) | 5 (C) 1999 Lars Knoll (knoll@kde.org) |
6 (C) 1999 Antti Koivisto (koivisto@kde.org) | 6 (C) 1999 Antti Koivisto (koivisto@kde.org) |
7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights | 7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights |
8 reserved. | 8 reserved. |
9 | 9 |
10 This library is free software; you can redistribute it and/or | 10 This library is free software; you can redistribute it and/or |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
57 #include "platform/wtf/HashSet.h" | 57 #include "platform/wtf/HashSet.h" |
58 #include "platform/wtf/ListHashSet.h" | 58 #include "platform/wtf/ListHashSet.h" |
59 #include "platform/wtf/text/WTFString.h" | 59 #include "platform/wtf/text/WTFString.h" |
60 #include "public/platform/ShapeProperties.h" | 60 #include "public/platform/ShapeProperties.h" |
61 #include "public/platform/WebDisplayMode.h" | 61 #include "public/platform/WebDisplayMode.h" |
62 #include "public/platform/WebRect.h" | 62 #include "public/platform/WebRect.h" |
63 | 63 |
64 namespace blink { | 64 namespace blink { |
65 | 65 |
66 class AXObjectCache; | 66 class AXObjectCache; |
67 class ComputedStyle; | |
68 class Cursor; | 67 class Cursor; |
69 class DocumentLifecycle; | 68 class DocumentLifecycle; |
70 class Element; | 69 class Element; |
71 class ElementVisibilityObserver; | 70 class ElementVisibilityObserver; |
72 class Frame; | 71 class Frame; |
73 class FloatSize; | 72 class FloatSize; |
74 class IntRect; | 73 class IntRect; |
75 class JSONArray; | 74 class JSONArray; |
76 class JSONObject; | 75 class JSONObject; |
77 class LayoutItem; | 76 class LayoutItem; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
138 return *frame_; | 137 return *frame_; |
139 } | 138 } |
140 | 139 |
141 Page* GetPage() const; | 140 Page* GetPage() const; |
142 | 141 |
143 // TODO(pilgrim) replace all instances of layoutView() with layoutViewItem() | 142 // TODO(pilgrim) replace all instances of layoutView() with layoutViewItem() |
144 // https://crbug.com/499321 | 143 // https://crbug.com/499321 |
145 LayoutView* GetLayoutView() const; | 144 LayoutView* GetLayoutView() const; |
146 LayoutViewItem GetLayoutViewItem() const; | 145 LayoutViewItem GetLayoutViewItem() const; |
147 | 146 |
147 // If false, prevents scrollbars on the viewport even if web content would | |
148 // make them appear. Also prevents user-input scrolls (but not programmatic | |
149 // scrolls). | |
150 // This API is root-layer-scrolling-aware (affects root PLSA in RLS mode). | |
148 void SetCanHaveScrollbars(bool); | 151 void SetCanHaveScrollbars(bool); |
152 bool CanHaveScrollbars() const { return can_have_scrollbars_; } | |
149 | 153 |
150 Scrollbar* CreateScrollbar(ScrollbarOrientation); | 154 Scrollbar* CreateScrollbar(ScrollbarOrientation); |
151 | 155 |
152 void SetContentsSize(const IntSize&); | 156 void SetContentsSize(const IntSize&); |
153 | 157 |
154 void UpdateLayout(); | 158 void UpdateLayout(); |
155 bool DidFirstLayout() const; | 159 bool DidFirstLayout() const; |
156 void ScheduleRelayout(); | 160 void ScheduleRelayout(); |
157 void ScheduleRelayoutOfSubtree(LayoutObject*); | 161 void ScheduleRelayoutOfSubtree(LayoutObject*); |
158 bool LayoutPending() const; | 162 bool LayoutPending() const; |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
355 kScrollable, | 359 kScrollable, |
356 kNotScrollableNoOverflow, | 360 kNotScrollableNoOverflow, |
357 kNotScrollableNotVisible, | 361 kNotScrollableNotVisible, |
358 kNotScrollableExplicitlyDisabled | 362 kNotScrollableExplicitlyDisabled |
359 }; | 363 }; |
360 | 364 |
361 ScrollingReasons GetScrollingReasons() const; | 365 ScrollingReasons GetScrollingReasons() const; |
362 bool IsScrollable() const override; | 366 bool IsScrollable() const override; |
363 bool IsProgrammaticallyScrollable() override; | 367 bool IsProgrammaticallyScrollable() override; |
364 | 368 |
365 void CalculateScrollbarModes(ScrollbarMode& h_mode, | |
szager1
2017/05/22 18:29:35
So confusing, thanks for getting rid of this.
| |
366 ScrollbarMode& v_mode) const; | |
367 | |
368 IntPoint LastKnownMousePosition() const override; | 369 IntPoint LastKnownMousePosition() const override; |
369 bool ShouldSetCursor() const; | 370 bool ShouldSetCursor() const; |
370 | 371 |
371 void SetCursor(const Cursor&); | 372 void SetCursor(const Cursor&); |
372 | 373 |
373 bool ScrollbarsCanBeActive() const override; | 374 bool ScrollbarsCanBeActive() const override; |
374 void ScrollbarVisibilityChanged() override; | 375 void ScrollbarVisibilityChanged() override; |
375 void ScrollbarFrameRectChanged() override; | 376 void ScrollbarFrameRectChanged() override; |
376 | 377 |
377 // FIXME: Remove this method once plugin loading is decoupled from layout. | 378 // FIXME: Remove this method once plugin loading is decoupled from layout. |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
545 bool HorizontalScrollbarLock() const { return horizontal_scrollbar_lock_; } | 546 bool HorizontalScrollbarLock() const { return horizontal_scrollbar_lock_; } |
546 void SetVerticalScrollbarLock(bool lock = true) { | 547 void SetVerticalScrollbarLock(bool lock = true) { |
547 vertical_scrollbar_lock_ = lock; | 548 vertical_scrollbar_lock_ = lock; |
548 } | 549 } |
549 bool VerticalScrollbarLock() const { return vertical_scrollbar_lock_; } | 550 bool VerticalScrollbarLock() const { return vertical_scrollbar_lock_; } |
550 | 551 |
551 void SetScrollingModesLock(bool lock = true) { | 552 void SetScrollingModesLock(bool lock = true) { |
552 horizontal_scrollbar_lock_ = vertical_scrollbar_lock_ = lock; | 553 horizontal_scrollbar_lock_ = vertical_scrollbar_lock_ = lock; |
553 } | 554 } |
554 | 555 |
555 bool CanHaveScrollbars() const { | |
556 return HorizontalScrollbarMode() != kScrollbarAlwaysOff || | |
557 VerticalScrollbarMode() != kScrollbarAlwaysOff; | |
558 } | |
559 | |
560 // The visible content rect has a location that is the scrolled offset of | 556 // The visible content rect has a location that is the scrolled offset of |
561 // the document. The width and height are the layout viewport width and | 557 // the document. The width and height are the layout viewport width and |
562 // height. By default the scrollbars themselves are excluded from this | 558 // height. By default the scrollbars themselves are excluded from this |
563 // rectangle, but an optional boolean argument allows them to be included. | 559 // rectangle, but an optional boolean argument allows them to be included. |
564 IntRect VisibleContentRect( | 560 IntRect VisibleContentRect( |
565 IncludeScrollbarsInRect = kExcludeScrollbars) const override; | 561 IncludeScrollbarsInRect = kExcludeScrollbars) const override; |
566 IntSize VisibleContentSize( | 562 IntSize VisibleContentSize( |
567 IncludeScrollbarsInRect = kExcludeScrollbars) const; | 563 IncludeScrollbarsInRect = kExcludeScrollbars) const; |
568 | 564 |
569 // Clips the provided rect to the visible content area. For this purpose, we | 565 // Clips the provided rect to the visible content area. For this purpose, we |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
937 void Init(); | 933 void Init(); |
938 | 934 |
939 void ClearLayoutSubtreeRootsAndMarkContainingBlocks(); | 935 void ClearLayoutSubtreeRootsAndMarkContainingBlocks(); |
940 | 936 |
941 // Called when our frame rect changes (or the rect/scroll offset of an | 937 // Called when our frame rect changes (or the rect/scroll offset of an |
942 // ancestor changes). | 938 // ancestor changes). |
943 void FrameRectsChanged() override; | 939 void FrameRectsChanged() override; |
944 | 940 |
945 bool ContentsInCompositedLayer() const; | 941 bool ContentsInCompositedLayer() const; |
946 | 942 |
947 void CalculateScrollbarModesFromOverflowStyle(const ComputedStyle*, | |
948 ScrollbarMode& h_mode, | |
949 ScrollbarMode& v_mode) const; | |
950 | |
951 void UpdateCounters(); | 943 void UpdateCounters(); |
952 void ForceLayoutParentViewIfNeeded(); | 944 void ForceLayoutParentViewIfNeeded(); |
953 void PerformPreLayoutTasks(); | 945 void PerformPreLayoutTasks(); |
954 void PerformLayout(bool in_subtree_layout); | 946 void PerformLayout(bool in_subtree_layout); |
955 void ScheduleOrPerformPostLayoutTasks(); | 947 void ScheduleOrPerformPostLayoutTasks(); |
956 void PerformPostLayoutTasks(); | 948 void PerformPostLayoutTasks(); |
957 | 949 |
958 void RecordDeferredLoadingStats(); | 950 void RecordDeferredLoadingStats(); |
959 | 951 |
960 DocumentLifecycle& Lifecycle() const; | 952 DocumentLifecycle& Lifecycle() const; |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1276 frame_or_plugin.IsFrameView()); | 1268 frame_or_plugin.IsFrameView()); |
1277 DEFINE_TYPE_CASTS(FrameView, | 1269 DEFINE_TYPE_CASTS(FrameView, |
1278 ScrollableArea, | 1270 ScrollableArea, |
1279 scrollableArea, | 1271 scrollableArea, |
1280 scrollableArea->IsFrameView(), | 1272 scrollableArea->IsFrameView(), |
1281 scrollableArea.IsFrameView()); | 1273 scrollableArea.IsFrameView()); |
1282 | 1274 |
1283 } // namespace blink | 1275 } // namespace blink |
1284 | 1276 |
1285 #endif // FrameView_h | 1277 #endif // FrameView_h |
OLD | NEW |