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

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

Issue 1854543002: Oilpan: Remove WillBe types (part 7) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 reserv ed. 7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
8 8
9 This library is free software; you can redistribute it and/or 9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public 10 modify it under the terms of the GNU Library General Public
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 class PaintInvalidationState; 77 class PaintInvalidationState;
78 class Page; 78 class Page;
79 class ScrollingCoordinator; 79 class ScrollingCoordinator;
80 class TracedValue; 80 class TracedValue;
81 struct AnnotatedRegionValue; 81 struct AnnotatedRegionValue;
82 struct CompositedSelection; 82 struct CompositedSelection;
83 83
84 typedef unsigned long long DOMTimeStamp; 84 typedef unsigned long long DOMTimeStamp;
85 85
86 class CORE_EXPORT FrameView final : public Widget, public PaintInvalidationCapab leScrollableArea { 86 class CORE_EXPORT FrameView final : public Widget, public PaintInvalidationCapab leScrollableArea {
87 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(FrameView); 87 USING_GARBAGE_COLLECTED_MIXIN(FrameView);
88 88
89 friend class PaintControllerPaintTestBase; 89 friend class PaintControllerPaintTestBase;
90 friend class Internals; 90 friend class Internals;
91 friend class LayoutPart; // for invalidateTreeIfNeeded 91 friend class LayoutPart; // for invalidateTreeIfNeeded
92 92
93 public: 93 public:
94 static PassRefPtrWillBeRawPtr<FrameView> create(LocalFrame*); 94 static RawPtr<FrameView> create(LocalFrame*);
95 static PassRefPtrWillBeRawPtr<FrameView> create(LocalFrame*, const IntSize& initialSize); 95 static RawPtr<FrameView> create(LocalFrame*, const IntSize& initialSize);
96 96
97 ~FrameView() override; 97 ~FrameView() override;
98 98
99 void invalidateRect(const IntRect&) override; 99 void invalidateRect(const IntRect&) override;
100 void setFrameRect(const IntRect&) override; 100 void setFrameRect(const IntRect&) override;
101 101
102 LocalFrame& frame() const 102 LocalFrame& frame() const
103 { 103 {
104 ASSERT(m_frame); 104 ASSERT(m_frame);
105 return *m_frame; 105 return *m_frame;
106 } 106 }
107 107
108 Page* page() const; 108 Page* page() const;
109 109
110 LayoutView* layoutView() const; 110 LayoutView* layoutView() const;
111 111
112 void setCanHaveScrollbars(bool); 112 void setCanHaveScrollbars(bool);
113 113
114 PassRefPtrWillBeRawPtr<Scrollbar> createScrollbar(ScrollbarOrientation); 114 RawPtr<Scrollbar> createScrollbar(ScrollbarOrientation);
115 115
116 void setContentsSize(const IntSize&); 116 void setContentsSize(const IntSize&);
117 117
118 void layout(); 118 void layout();
119 bool didFirstLayout() const; 119 bool didFirstLayout() const;
120 void scheduleRelayout(); 120 void scheduleRelayout();
121 void scheduleRelayoutOfSubtree(LayoutObject*); 121 void scheduleRelayoutOfSubtree(LayoutObject*);
122 bool layoutPending() const; 122 bool layoutPending() const;
123 bool isInPerformLayout() const; 123 bool isInPerformLayout() const;
124 124
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 void scrollbarStyleChanged() override; 305 void scrollbarStyleChanged() override;
306 306
307 LayoutReplaced* embeddedReplacedContent() const; 307 LayoutReplaced* embeddedReplacedContent() const;
308 308
309 static void setInitialTracksPaintInvalidationsForTesting(bool); 309 static void setInitialTracksPaintInvalidationsForTesting(bool);
310 310
311 void setTracksPaintInvalidations(bool); 311 void setTracksPaintInvalidations(bool);
312 bool isTrackingPaintInvalidations() const { return m_isTrackingPaintInvalida tions; } 312 bool isTrackingPaintInvalidations() const { return m_isTrackingPaintInvalida tions; }
313 void resetTrackedPaintInvalidations(); 313 void resetTrackedPaintInvalidations();
314 314
315 using ScrollableAreaSet = WillBeHeapHashSet<RawPtrWillBeMember<ScrollableAre a>>; 315 using ScrollableAreaSet = HeapHashSet<Member<ScrollableArea>>;
316 void addScrollableArea(ScrollableArea*); 316 void addScrollableArea(ScrollableArea*);
317 void removeScrollableArea(ScrollableArea*); 317 void removeScrollableArea(ScrollableArea*);
318 const ScrollableAreaSet* scrollableAreas() const { return m_scrollableAreas. get(); } 318 const ScrollableAreaSet* scrollableAreas() const { return m_scrollableAreas. get(); }
319 319
320 void addAnimatingScrollableArea(ScrollableArea*); 320 void addAnimatingScrollableArea(ScrollableArea*);
321 void removeAnimatingScrollableArea(ScrollableArea*); 321 void removeAnimatingScrollableArea(ScrollableArea*);
322 const ScrollableAreaSet* animatingScrollableAreas() const { return m_animati ngScrollableAreas.get(); } 322 const ScrollableAreaSet* animatingScrollableAreas() const { return m_animati ngScrollableAreas.get(); }
323 323
324 // With CSS style "resize:" enabled, a little resizer handle will appear at the bottom 324 // With CSS style "resize:" enabled, a little resizer handle will appear at the bottom
325 // right of the object. We keep track of these resizer areas for checking if touches 325 // right of the object. We keep track of these resizer areas for checking if touches
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 const ScrollAlignment& alignY, 384 const ScrollAlignment& alignY,
385 ScrollType = ProgrammaticScroll) override; 385 ScrollType = ProgrammaticScroll) override;
386 386
387 // The window that hosts the FrameView. The FrameView will communicate scrol ls and repaints to the 387 // The window that hosts the FrameView. The FrameView will communicate scrol ls and repaints to the
388 // host window in the window's coordinate space. 388 // host window in the window's coordinate space.
389 HostWindow* getHostWindow() const; 389 HostWindow* getHostWindow() const;
390 390
391 // Returns a clip rect in host window coordinates. Used to clip the blit on a scroll. 391 // Returns a clip rect in host window coordinates. Used to clip the blit on a scroll.
392 IntRect windowClipRect(IncludeScrollbarsInRect = ExcludeScrollbars) const; 392 IntRect windowClipRect(IncludeScrollbarsInRect = ExcludeScrollbars) const;
393 393
394 typedef WillBeHeapHashSet<RefPtrWillBeMember<Widget>> ChildrenWidgetSet; 394 typedef HeapHashSet<Member<Widget>> ChildrenWidgetSet;
395 395
396 // Functions for child manipulation and inspection. 396 // Functions for child manipulation and inspection.
397 void setParent(Widget*) override; 397 void setParent(Widget*) override;
398 void removeChild(Widget*); 398 void removeChild(Widget*);
399 void addChild(PassRefPtrWillBeRawPtr<Widget>); 399 void addChild(RawPtr<Widget>);
400 const ChildrenWidgetSet* children() const { return &m_children; } 400 const ChildrenWidgetSet* children() const { return &m_children; }
401 401
402 // If the scroll view does not use a native widget, then it will have cross- platform Scrollbars. These functions 402 // If the scroll view does not use a native widget, then it will have cross- platform Scrollbars. These functions
403 // can be used to obtain those scrollbars. 403 // can be used to obtain those scrollbars.
404 Scrollbar* horizontalScrollbar() const override { return m_horizontalScrollb ar.get(); } 404 Scrollbar* horizontalScrollbar() const override { return m_horizontalScrollb ar.get(); }
405 Scrollbar* verticalScrollbar() const override { return m_verticalScrollbar.g et(); } 405 Scrollbar* verticalScrollbar() const override { return m_verticalScrollbar.g et(); }
406 LayoutScrollbarPart* scrollCorner() const override { return m_scrollCorner; } 406 LayoutScrollbarPart* scrollCorner() const override { return m_scrollCorner; }
407 407
408 void positionScrollbarLayers(); 408 void positionScrollbarLayers();
409 409
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 LayoutViewItem layoutViewItem() const 760 LayoutViewItem layoutViewItem() const
761 { 761 {
762 return LayoutViewItem(this->layoutView()); 762 return LayoutViewItem(this->layoutView());
763 } 763 }
764 764
765 LayoutSize m_size; 765 LayoutSize m_size;
766 766
767 typedef HashSet<RefPtr<LayoutEmbeddedObject>> EmbeddedObjectSet; 767 typedef HashSet<RefPtr<LayoutEmbeddedObject>> EmbeddedObjectSet;
768 EmbeddedObjectSet m_partUpdateSet; 768 EmbeddedObjectSet m_partUpdateSet;
769 769
770 // FIXME: These are just "children" of the FrameView and should be RefPtrWil lBeMember<Widget> instead. 770 // FIXME: These are just "children" of the FrameView and should be Member<Wi dget> instead.
771 HashSet<RefPtr<LayoutPart>> m_parts; 771 HashSet<RefPtr<LayoutPart>> m_parts;
772 772
773 // The RefPtr cycle between LocalFrame and FrameView is broken 773 // The RefPtr cycle between LocalFrame and FrameView is broken
774 // when a LocalFrame is detached by LocalFrame::detach(). 774 // when a LocalFrame is detached by LocalFrame::detach().
775 // It clears the LocalFrame's m_view reference via setView(nullptr). 775 // It clears the LocalFrame's m_view reference via setView(nullptr).
776 // 776 //
777 // For Oilpan, Member reference cycles pose no problem, but 777 // For Oilpan, Member reference cycles pose no problem, but
778 // LocalFrame's FrameView is also cleared by that setView(), so as to 778 // LocalFrame's FrameView is also cleared by that setView(), so as to
779 // keep the observable lifespan of LocalFrame::view() identical. 779 // keep the observable lifespan of LocalFrame::view() identical.
780 RefPtrWillBeMember<LocalFrame> m_frame; 780 Member<LocalFrame> m_frame;
781 781
782 WebDisplayMode m_displayMode; 782 WebDisplayMode m_displayMode;
783 783
784 bool m_doFullPaintInvalidation; 784 bool m_doFullPaintInvalidation;
785 785
786 bool m_canHaveScrollbars; 786 bool m_canHaveScrollbars;
787 787
788 bool m_hasPendingLayout; 788 bool m_hasPendingLayout;
789 LayoutSubtreeRootList m_layoutSubtreeRootList; 789 LayoutSubtreeRootList m_layoutSubtreeRootList;
790 DepthOrderedLayoutObjectList m_orthogonalWritingModeRootList; 790 DepthOrderedLayoutObjectList m_orthogonalWritingModeRootList;
(...skipping 19 matching lines...) Expand all
810 810
811 bool m_isTrackingPaintInvalidations; // Used for testing. 811 bool m_isTrackingPaintInvalidations; // Used for testing.
812 812
813 // TODO(wangxianzhu): Use document cycle state for spv2 and synchronzied pai nting. 813 // TODO(wangxianzhu): Use document cycle state for spv2 and synchronzied pai nting.
814 mutable bool m_isPainting; 814 mutable bool m_isPainting;
815 815
816 unsigned m_visuallyNonEmptyCharacterCount; 816 unsigned m_visuallyNonEmptyCharacterCount;
817 unsigned m_visuallyNonEmptyPixelCount; 817 unsigned m_visuallyNonEmptyPixelCount;
818 bool m_isVisuallyNonEmpty; 818 bool m_isVisuallyNonEmpty;
819 819
820 RefPtrWillBeMember<Node> m_fragmentAnchor; 820 Member<Node> m_fragmentAnchor;
821 821
822 // layoutObject to hold our custom scroll corner. 822 // layoutObject to hold our custom scroll corner.
823 LayoutScrollbarPart* m_scrollCorner; 823 LayoutScrollbarPart* m_scrollCorner;
824 824
825 OwnPtrWillBeMember<ScrollableAreaSet> m_scrollableAreas; 825 Member<ScrollableAreaSet> m_scrollableAreas;
826 OwnPtrWillBeMember<ScrollableAreaSet> m_animatingScrollableAreas; 826 Member<ScrollableAreaSet> m_animatingScrollableAreas;
827 OwnPtr<ResizerAreaSet> m_resizerAreas; 827 OwnPtr<ResizerAreaSet> m_resizerAreas;
828 OwnPtr<ViewportConstrainedObjectSet> m_viewportConstrainedObjects; 828 OwnPtr<ViewportConstrainedObjectSet> m_viewportConstrainedObjects;
829 ViewportConstrainedObjectSet m_backgroundAttachmentFixedObjects; 829 ViewportConstrainedObjectSet m_backgroundAttachmentFixedObjects;
830 OwnPtrWillBeMember<FrameViewAutoSizeInfo> m_autoSizeInfo; 830 Member<FrameViewAutoSizeInfo> m_autoSizeInfo;
831 831
832 IntSize m_inputEventsOffsetForEmulation; 832 IntSize m_inputEventsOffsetForEmulation;
833 float m_inputEventsScaleFactorForEmulation; 833 float m_inputEventsScaleFactorForEmulation;
834 834
835 IntSize m_layoutSize; 835 IntSize m_layoutSize;
836 bool m_layoutSizeFixedToFrameSize; 836 bool m_layoutSizeFixedToFrameSize;
837 837
838 Timer<FrameView> m_didScrollTimer; 838 Timer<FrameView> m_didScrollTimer;
839 839
840 Vector<IntRect> m_tickmarks; 840 Vector<IntRect> m_tickmarks;
841 841
842 float m_topControlsViewportAdjustment; 842 float m_topControlsViewportAdjustment;
843 843
844 bool m_needsUpdateWidgetGeometries; 844 bool m_needsUpdateWidgetGeometries;
845 bool m_needsUpdateViewportIntersection; 845 bool m_needsUpdateViewportIntersection;
846 bool m_needsUpdateViewportIntersectionInSubtree; 846 bool m_needsUpdateViewportIntersectionInSubtree;
847 847
848 #if ENABLE(ASSERT) 848 #if ENABLE(ASSERT)
849 // Verified when finalizing. 849 // Verified when finalizing.
850 bool m_hasBeenDisposed; 850 bool m_hasBeenDisposed;
851 #endif 851 #endif
852 852
853 RefPtrWillBeMember<Scrollbar> m_horizontalScrollbar; 853 Member<Scrollbar> m_horizontalScrollbar;
854 RefPtrWillBeMember<Scrollbar> m_verticalScrollbar; 854 Member<Scrollbar> m_verticalScrollbar;
855 ScrollbarMode m_horizontalScrollbarMode; 855 ScrollbarMode m_horizontalScrollbarMode;
856 ScrollbarMode m_verticalScrollbarMode; 856 ScrollbarMode m_verticalScrollbarMode;
857 857
858 bool m_horizontalScrollbarLock; 858 bool m_horizontalScrollbarLock;
859 bool m_verticalScrollbarLock; 859 bool m_verticalScrollbarLock;
860 860
861 ChildrenWidgetSet m_children; 861 ChildrenWidgetSet m_children;
862 862
863 DoubleSize m_pendingScrollDelta; 863 DoubleSize m_pendingScrollDelta;
864 DoublePoint m_scrollPosition; 864 DoublePoint m_scrollPosition;
865 IntSize m_contentsSize; 865 IntSize m_contentsSize;
866 866
867 int m_scrollbarsAvoidingResizer; 867 int m_scrollbarsAvoidingResizer;
868 bool m_scrollbarsSuppressed; 868 bool m_scrollbarsSuppressed;
869 869
870 bool m_inUpdateScrollbars; 870 bool m_inUpdateScrollbars;
871 871
872 OwnPtr<LayoutAnalyzer> m_analyzer; 872 OwnPtr<LayoutAnalyzer> m_analyzer;
873 873
874 // Mark if something has changed in the mapping from Frame to GraphicsLayer 874 // Mark if something has changed in the mapping from Frame to GraphicsLayer
875 // and the Frame Timing regions should be recalculated. 875 // and the Frame Timing regions should be recalculated.
876 bool m_frameTimingRequestsDirty; 876 bool m_frameTimingRequestsDirty;
877 877
878 // Exists only on root frame. 878 // Exists only on root frame.
879 // TODO(bokan): crbug.com/484188. We should specialize FrameView for the 879 // TODO(bokan): crbug.com/484188. We should specialize FrameView for the
880 // main frame. 880 // main frame.
881 OwnPtrWillBeMember<ScrollableArea> m_viewportScrollableArea; 881 Member<ScrollableArea> m_viewportScrollableArea;
882 882
883 // This frame's bounds in the root frame's content coordinates, clipped 883 // This frame's bounds in the root frame's content coordinates, clipped
884 // recursively through every ancestor view. 884 // recursively through every ancestor view.
885 IntRect m_viewportIntersection; 885 IntRect m_viewportIntersection;
886 bool m_viewportIntersectionValid; 886 bool m_viewportIntersectionValid;
887 887
888 // The following members control rendering pipeline throttling for this 888 // The following members control rendering pipeline throttling for this
889 // frame. They are only updated in response to intersection observer 889 // frame. They are only updated in response to intersection observer
890 // notifications, i.e., not in the middle of the lifecycle. 890 // notifications, i.e., not in the middle of the lifecycle.
891 bool m_hiddenForThrottling; 891 bool m_hiddenForThrottling;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 928 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
929 setIsVisuallyNonEmpty(); 929 setIsVisuallyNonEmpty();
930 } 930 }
931 931
932 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 932 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
933 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView()); 933 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView());
934 934
935 } // namespace blink 935 } // namespace blink
936 936
937 #endif // FrameView_h 937 #endif // FrameView_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameSerializer.cpp ('k') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698