Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalFrameView.h

Issue 2942163002: [Refactor] Moved scrollbar creation and deletion to ScrollbarManager (Closed)
Patch Set: change ShouldUseCustomScrollbars Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 #include "platform/wtf/text/WTFString.h" 61 #include "platform/wtf/text/WTFString.h"
62 #include "public/platform/ShapeProperties.h" 62 #include "public/platform/ShapeProperties.h"
63 #include "public/platform/WebDisplayMode.h" 63 #include "public/platform/WebDisplayMode.h"
64 #include "public/platform/WebRect.h" 64 #include "public/platform/WebRect.h"
65 65
66 namespace blink { 66 namespace blink {
67 67
68 class AXObjectCache; 68 class AXObjectCache;
69 class Cursor; 69 class Cursor;
70 class DocumentLifecycle; 70 class DocumentLifecycle;
71 class Element;
72 class ElementVisibilityObserver; 71 class ElementVisibilityObserver;
73 class Frame; 72 class Frame;
74 class FloatSize; 73 class FloatSize;
75 class IntRect; 74 class IntRect;
76 class JSONArray; 75 class JSONArray;
77 class JSONObject; 76 class JSONObject;
78 class LayoutEmbeddedContent; 77 class LayoutEmbeddedContent;
79 class LayoutItem; 78 class LayoutItem;
80 class LayoutViewItem; 79 class LayoutViewItem;
81 class LocalFrame; 80 class LocalFrame;
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 class ScrollbarManager : public blink::ScrollbarManager { 889 class ScrollbarManager : public blink::ScrollbarManager {
891 DISALLOW_NEW(); 890 DISALLOW_NEW();
892 891
893 // Helper class to manage the life cycle of Scrollbar objects. 892 // Helper class to manage the life cycle of Scrollbar objects.
894 public: 893 public:
895 ScrollbarManager(LocalFrameView& scroller) 894 ScrollbarManager(LocalFrameView& scroller)
896 : blink::ScrollbarManager(scroller) {} 895 : blink::ScrollbarManager(scroller) {}
897 896
898 void SetHasHorizontalScrollbar(bool has_scrollbar) override; 897 void SetHasHorizontalScrollbar(bool has_scrollbar) override;
899 void SetHasVerticalScrollbar(bool has_scrollbar) override; 898 void SetHasVerticalScrollbar(bool has_scrollbar) override;
900
901 // TODO(ymalik): This should be hidden and all calls should go through
902 // setHas*Scrollbar functions above.
903 Scrollbar* CreateScrollbar(ScrollbarOrientation) override;
904
905 protected:
906 void DestroyScrollbar(ScrollbarOrientation) override;
907 }; 899 };
908 900
909 LocalFrameView* ParentFrameView() const; 901 LocalFrameView* ParentFrameView() const;
910 902
911 void UpdateScrollOffset(const ScrollOffset&, ScrollType) override; 903 void UpdateScrollOffset(const ScrollOffset&, ScrollType) override;
912 904
913 void UpdateScrollbarEnabledState(); 905 void UpdateScrollbarEnabledState();
914 906
915 void DispatchEventsForPrintingOnAllFrames(); 907 void DispatchEventsForPrintingOnAllFrames();
916 908
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 void ScheduleOrPerformPostLayoutTasks(); 943 void ScheduleOrPerformPostLayoutTasks();
952 void PerformPostLayoutTasks(); 944 void PerformPostLayoutTasks();
953 945
954 void RecordDeferredLoadingStats(); 946 void RecordDeferredLoadingStats();
955 947
956 DocumentLifecycle& Lifecycle() const; 948 DocumentLifecycle& Lifecycle() const;
957 949
958 void ContentsResized() override; 950 void ContentsResized() override;
959 void ScrollbarExistenceMaybeChanged(); 951 void ScrollbarExistenceMaybeChanged();
960 952
953 LayoutObject* LayoutObjectForScrollbars() const override;
954
961 // Methods to do point conversion via layoutObjects, in order to take 955 // Methods to do point conversion via layoutObjects, in order to take
962 // transforms into account. 956 // transforms into account.
963 IntRect ConvertToContainingEmbeddedContentView(const IntRect&) const; 957 IntRect ConvertToContainingEmbeddedContentView(const IntRect&) const;
964 IntPoint ConvertToContainingEmbeddedContentView(const IntPoint&) const; 958 IntPoint ConvertToContainingEmbeddedContentView(const IntPoint&) const;
965 IntRect ConvertFromContainingEmbeddedContentView(const IntRect&) const; 959 IntRect ConvertFromContainingEmbeddedContentView(const IntRect&) const;
966 IntPoint ConvertFromContainingEmbeddedContentView(const IntPoint&) const; 960 IntPoint ConvertFromContainingEmbeddedContentView(const IntPoint&) const;
967 961
968 void DidChangeGlobalRootScroller() override; 962 void DidChangeGlobalRootScroller() override;
969 963
970 void UpdateGeometriesIfNeeded(); 964 void UpdateGeometriesIfNeeded();
(...skipping 15 matching lines...) Expand all
986 void UpdateLayersAndCompositingAfterScrollIfNeeded(); 980 void UpdateLayersAndCompositingAfterScrollIfNeeded();
987 981
988 static bool ComputeCompositedSelection(LocalFrame&, CompositedSelection&); 982 static bool ComputeCompositedSelection(LocalFrame&, CompositedSelection&);
989 void UpdateCompositedSelectionIfNeeded(); 983 void UpdateCompositedSelectionIfNeeded();
990 void SetNeedsCompositingUpdate(CompositingUpdateType); 984 void SetNeedsCompositingUpdate(CompositingUpdateType);
991 985
992 // Returns true if the LocalFrameView's own scrollbars overlay its content 986 // Returns true if the LocalFrameView's own scrollbars overlay its content
993 // when visible. 987 // when visible.
994 bool HasOverlayScrollbars() const; 988 bool HasOverlayScrollbars() const;
995 989
996 // Returns true if the frame should use custom scrollbars. If true, sets
997 // customScrollbarElement to the element that supplies the scrollbar's style
998 // information.
999 bool ShouldUseCustomScrollbars(Element*& custom_scrollbar_element) const;
1000
1001 // Returns true if a scrollbar needs to go from native -> custom or vice 990 // Returns true if a scrollbar needs to go from native -> custom or vice
1002 // versa, or if a custom scrollbar has a stale owner. 991 // versa, or if a custom scrollbar has a stale owner.
1003 bool NeedsScrollbarReconstruction() const; 992 bool NeedsScrollbarReconstruction() const;
1004 993
1005 bool ShouldIgnoreOverflowHidden() const; 994 bool ShouldIgnoreOverflowHidden() const;
1006 995
1007 void UpdateScrollCorner(); 996 void UpdateScrollCorner();
1008 997
1009 AXObjectCache* AxObjectCache() const; 998 AXObjectCache* AxObjectCache() const;
1010 999
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 embedded_content_view.IsLocalFrameView()); 1261 embedded_content_view.IsLocalFrameView());
1273 DEFINE_TYPE_CASTS(LocalFrameView, 1262 DEFINE_TYPE_CASTS(LocalFrameView,
1274 ScrollableArea, 1263 ScrollableArea,
1275 scrollableArea, 1264 scrollableArea,
1276 scrollableArea->IsLocalFrameView(), 1265 scrollableArea->IsLocalFrameView(),
1277 scrollableArea.IsLocalFrameView()); 1266 scrollableArea.IsLocalFrameView());
1278 1267
1279 } // namespace blink 1268 } // namespace blink
1280 1269
1281 #endif // LocalFrameView_h 1270 #endif // LocalFrameView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698