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

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: bokan and skobes comments addressed 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/LocalFrameView.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 // resizer. 412 // resizer.
414 typedef HashSet<LayoutBox*> ResizerAreaSet; 413 typedef HashSet<LayoutBox*> ResizerAreaSet;
415 void AddResizerArea(LayoutBox&); 414 void AddResizerArea(LayoutBox&);
416 void RemoveResizerArea(LayoutBox&); 415 void RemoveResizerArea(LayoutBox&);
417 const ResizerAreaSet* ResizerAreas() const { return resizer_areas_.get(); } 416 const ResizerAreaSet* ResizerAreas() const { return resizer_areas_.get(); }
418 417
419 bool ShouldUseIntegerScrollOffset() const override; 418 bool ShouldUseIntegerScrollOffset() const override;
420 419
421 bool IsActive() const override; 420 bool IsActive() const override;
422 421
423 // Override scrollbar notifications to update the AXObject cache.
424 void DidAddScrollbar(Scrollbar&, ScrollbarOrientation) override;
425
426 // FIXME: This should probably be renamed as the 'inSubtreeLayout' parameter 422 // FIXME: This should probably be renamed as the 'inSubtreeLayout' parameter
427 // passed around the LocalFrameView layout methods can be true while this 423 // passed around the LocalFrameView layout methods can be true while this
428 // returns false. 424 // returns false.
429 bool IsSubtreeLayout() const { return !layout_subtree_root_list_.IsEmpty(); } 425 bool IsSubtreeLayout() const { return !layout_subtree_root_list_.IsEmpty(); }
430 426
431 // Sets the tickmarks for the LocalFrameView, overriding the default behavior 427 // Sets the tickmarks for the LocalFrameView, overriding the default behavior
432 // which is to display the tickmarks corresponding to find results. 428 // which is to display the tickmarks corresponding to find results.
433 // If |m_tickmarks| is empty, the default behavior is restored. 429 // If |m_tickmarks| is empty, the default behavior is restored.
434 void SetTickmarks(const Vector<IntRect>& tickmarks) { 430 void SetTickmarks(const Vector<IntRect>& tickmarks) {
435 tickmarks_ = tickmarks; 431 tickmarks_ = tickmarks;
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 class ScrollbarManager : public blink::ScrollbarManager { 886 class ScrollbarManager : public blink::ScrollbarManager {
891 DISALLOW_NEW(); 887 DISALLOW_NEW();
892 888
893 // Helper class to manage the life cycle of Scrollbar objects. 889 // Helper class to manage the life cycle of Scrollbar objects.
894 public: 890 public:
895 ScrollbarManager(LocalFrameView& scroller) 891 ScrollbarManager(LocalFrameView& scroller)
896 : blink::ScrollbarManager(scroller) {} 892 : blink::ScrollbarManager(scroller) {}
897 893
898 void SetHasHorizontalScrollbar(bool has_scrollbar) override; 894 void SetHasHorizontalScrollbar(bool has_scrollbar) override;
899 void SetHasVerticalScrollbar(bool has_scrollbar) override; 895 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 }; 896 };
908 897
909 LocalFrameView* ParentFrameView() const; 898 LocalFrameView* ParentFrameView() const;
910 899
911 void UpdateScrollOffset(const ScrollOffset&, ScrollType) override; 900 void UpdateScrollOffset(const ScrollOffset&, ScrollType) override;
912 901
913 void UpdateScrollbarEnabledState(); 902 void UpdateScrollbarEnabledState();
914 903
915 void DispatchEventsForPrintingOnAllFrames(); 904 void DispatchEventsForPrintingOnAllFrames();
916 905
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 void ScheduleOrPerformPostLayoutTasks(); 940 void ScheduleOrPerformPostLayoutTasks();
952 void PerformPostLayoutTasks(); 941 void PerformPostLayoutTasks();
953 942
954 void RecordDeferredLoadingStats(); 943 void RecordDeferredLoadingStats();
955 944
956 DocumentLifecycle& Lifecycle() const; 945 DocumentLifecycle& Lifecycle() const;
957 946
958 void ContentsResized() override; 947 void ContentsResized() override;
959 void ScrollbarExistenceMaybeChanged(); 948 void ScrollbarExistenceMaybeChanged();
960 949
950 LayoutObject* LayoutObjectForScrollbarStyle() const override;
951
961 // Methods to do point conversion via layoutObjects, in order to take 952 // Methods to do point conversion via layoutObjects, in order to take
962 // transforms into account. 953 // transforms into account.
963 IntRect ConvertToContainingEmbeddedContentView(const IntRect&) const; 954 IntRect ConvertToContainingEmbeddedContentView(const IntRect&) const;
964 IntPoint ConvertToContainingEmbeddedContentView(const IntPoint&) const; 955 IntPoint ConvertToContainingEmbeddedContentView(const IntPoint&) const;
965 IntRect ConvertFromContainingEmbeddedContentView(const IntRect&) const; 956 IntRect ConvertFromContainingEmbeddedContentView(const IntRect&) const;
966 IntPoint ConvertFromContainingEmbeddedContentView(const IntPoint&) const; 957 IntPoint ConvertFromContainingEmbeddedContentView(const IntPoint&) const;
967 958
968 void DidChangeGlobalRootScroller() override; 959 void DidChangeGlobalRootScroller() override;
969 960
970 void UpdateGeometriesIfNeeded(); 961 void UpdateGeometriesIfNeeded();
(...skipping 15 matching lines...) Expand all
986 void UpdateLayersAndCompositingAfterScrollIfNeeded(); 977 void UpdateLayersAndCompositingAfterScrollIfNeeded();
987 978
988 static bool ComputeCompositedSelection(LocalFrame&, CompositedSelection&); 979 static bool ComputeCompositedSelection(LocalFrame&, CompositedSelection&);
989 void UpdateCompositedSelectionIfNeeded(); 980 void UpdateCompositedSelectionIfNeeded();
990 void SetNeedsCompositingUpdate(CompositingUpdateType); 981 void SetNeedsCompositingUpdate(CompositingUpdateType);
991 982
992 // Returns true if the LocalFrameView's own scrollbars overlay its content 983 // Returns true if the LocalFrameView's own scrollbars overlay its content
993 // when visible. 984 // when visible.
994 bool HasOverlayScrollbars() const; 985 bool HasOverlayScrollbars() const;
995 986
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 987 // Returns true if a scrollbar needs to go from native -> custom or vice
1002 // versa, or if a custom scrollbar has a stale owner. 988 // versa, or if a custom scrollbar has a stale owner.
1003 bool NeedsScrollbarReconstruction() const; 989 bool NeedsScrollbarReconstruction() const;
1004 990
1005 bool ShouldIgnoreOverflowHidden() const; 991 bool ShouldIgnoreOverflowHidden() const;
1006 992
1007 void UpdateScrollCorner(); 993 void UpdateScrollCorner();
1008 994
1009 AXObjectCache* AxObjectCache() const; 995 AXObjectCache* AxObjectCache() const;
1010 996
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 embedded_content_view.IsLocalFrameView()); 1258 embedded_content_view.IsLocalFrameView());
1273 DEFINE_TYPE_CASTS(LocalFrameView, 1259 DEFINE_TYPE_CASTS(LocalFrameView,
1274 ScrollableArea, 1260 ScrollableArea,
1275 scrollableArea, 1261 scrollableArea,
1276 scrollableArea->IsLocalFrameView(), 1262 scrollableArea->IsLocalFrameView(),
1277 scrollableArea.IsLocalFrameView()); 1263 scrollableArea.IsLocalFrameView());
1278 1264
1279 } // namespace blink 1265 } // namespace blink
1280 1266
1281 #endif // LocalFrameView_h 1267 #endif // LocalFrameView_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/LocalFrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698