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 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 class Cursor; | 49 class Cursor; |
50 class Element; | 50 class Element; |
51 class FloatSize; | 51 class FloatSize; |
52 class HTMLFrameOwnerElement; | 52 class HTMLFrameOwnerElement; |
53 class LocalFrame; | 53 class LocalFrame; |
54 class KURL; | 54 class KURL; |
55 class Node; | 55 class Node; |
56 class Page; | 56 class Page; |
57 class RenderBox; | 57 class RenderBox; |
58 class RenderEmbeddedObject; | 58 class RenderEmbeddedObject; |
59 class RenderObject; | 59 class LayoutObject; |
60 class RenderPart; | 60 class RenderPart; |
61 class RenderScrollbarPart; | 61 class RenderScrollbarPart; |
62 class RenderView; | 62 class RenderView; |
63 class ScrollingCoordinator; | 63 class ScrollingCoordinator; |
64 struct CompositedSelectionBound; | 64 struct CompositedSelectionBound; |
65 | 65 |
66 typedef unsigned long long DOMTimeStamp; | 66 typedef unsigned long long DOMTimeStamp; |
67 | 67 |
68 class FrameView final : public Widget, public ScrollableArea { | 68 class FrameView final : public Widget, public ScrollableArea { |
69 public: | 69 public: |
(...skipping 21 matching lines...) Expand all Loading... |
91 void setCanHaveScrollbars(bool); | 91 void setCanHaveScrollbars(bool); |
92 | 92 |
93 PassRefPtrWillBeRawPtr<Scrollbar> createScrollbar(ScrollbarOrientation); | 93 PassRefPtrWillBeRawPtr<Scrollbar> createScrollbar(ScrollbarOrientation); |
94 | 94 |
95 void setContentsSize(const IntSize&); | 95 void setContentsSize(const IntSize&); |
96 IntPoint clampOffsetAtScale(const IntPoint& offset, float scale) const; | 96 IntPoint clampOffsetAtScale(const IntPoint& offset, float scale) const; |
97 | 97 |
98 void layout(bool allowSubtree = true); | 98 void layout(bool allowSubtree = true); |
99 bool didFirstLayout() const; | 99 bool didFirstLayout() const; |
100 void scheduleRelayout(); | 100 void scheduleRelayout(); |
101 void scheduleRelayoutOfSubtree(RenderObject*); | 101 void scheduleRelayoutOfSubtree(LayoutObject*); |
102 bool layoutPending() const; | 102 bool layoutPending() const; |
103 bool isInPerformLayout() const; | 103 bool isInPerformLayout() const; |
104 | 104 |
105 void setCanInvalidatePaintDuringPerformLayout(bool b) { m_canInvalidatePaint
DuringPerformLayout = b; } | 105 void setCanInvalidatePaintDuringPerformLayout(bool b) { m_canInvalidatePaint
DuringPerformLayout = b; } |
106 bool canInvalidatePaintDuringPerformLayout() const { return m_canInvalidateP
aintDuringPerformLayout; } | 106 bool canInvalidatePaintDuringPerformLayout() const { return m_canInvalidateP
aintDuringPerformLayout; } |
107 | 107 |
108 RenderObject* layoutRoot(bool onlyDuringLayout = false) const; | 108 LayoutObject* layoutRoot(bool onlyDuringLayout = false) const; |
109 void clearLayoutSubtreeRoot() { m_layoutSubtreeRoot = nullptr; } | 109 void clearLayoutSubtreeRoot() { m_layoutSubtreeRoot = nullptr; } |
110 int layoutCount() const { return m_layoutCount; } | 110 int layoutCount() const { return m_layoutCount; } |
111 | 111 |
112 bool needsLayout() const; | 112 bool needsLayout() const; |
113 void setNeedsLayout(); | 113 void setNeedsLayout(); |
114 | 114 |
115 void setNeedsUpdateWidgetPositions() { m_needsUpdateWidgetPositions = true;
} | 115 void setNeedsUpdateWidgetPositions() { m_needsUpdateWidgetPositions = true;
} |
116 | 116 |
117 // Methods for getting/setting the size Blink should use to layout the conte
nts. | 117 // Methods for getting/setting the size Blink should use to layout the conte
nts. |
118 IntSize layoutSize(IncludeScrollbarsInRect = ExcludeScrollbars) const; | 118 IntSize layoutSize(IncludeScrollbarsInRect = ExcludeScrollbars) const; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 void adjustMediaTypeForPrinting(bool printing); | 182 void adjustMediaTypeForPrinting(bool printing); |
183 | 183 |
184 WebDisplayMode displayMode() { return m_displayMode; } | 184 WebDisplayMode displayMode() { return m_displayMode; } |
185 void setDisplayMode(WebDisplayMode); | 185 void setDisplayMode(WebDisplayMode); |
186 | 186 |
187 void addSlowRepaintObject(); | 187 void addSlowRepaintObject(); |
188 void removeSlowRepaintObject(); | 188 void removeSlowRepaintObject(); |
189 bool hasSlowRepaintObjects() const { return m_slowRepaintObjectCount; } | 189 bool hasSlowRepaintObjects() const { return m_slowRepaintObjectCount; } |
190 | 190 |
191 // Fixed-position objects. | 191 // Fixed-position objects. |
192 typedef HashSet<RenderObject*> ViewportConstrainedObjectSet; | 192 typedef HashSet<LayoutObject*> ViewportConstrainedObjectSet; |
193 void addViewportConstrainedObject(RenderObject*); | 193 void addViewportConstrainedObject(LayoutObject*); |
194 void removeViewportConstrainedObject(RenderObject*); | 194 void removeViewportConstrainedObject(LayoutObject*); |
195 const ViewportConstrainedObjectSet* viewportConstrainedObjects() const { ret
urn m_viewportConstrainedObjects.get(); } | 195 const ViewportConstrainedObjectSet* viewportConstrainedObjects() const { ret
urn m_viewportConstrainedObjects.get(); } |
196 bool hasViewportConstrainedObjects() const { return m_viewportConstrainedObj
ects && m_viewportConstrainedObjects->size() > 0; } | 196 bool hasViewportConstrainedObjects() const { return m_viewportConstrainedObj
ects && m_viewportConstrainedObjects->size() > 0; } |
197 | 197 |
198 void handleLoadCompleted(); | 198 void handleLoadCompleted(); |
199 | 199 |
200 void updateAnnotatedRegions(); | 200 void updateAnnotatedRegions(); |
201 | 201 |
202 void restoreScrollbar(); | 202 void restoreScrollbar(); |
203 | 203 |
204 void postLayoutTimerFired(Timer<FrameView>*); | 204 void postLayoutTimerFired(Timer<FrameView>*); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 void forceLayout(bool allowSubtree = false); | 244 void forceLayout(bool allowSubtree = false); |
245 void forceLayoutForPagination(const FloatSize& pageSize, const FloatSize& or
iginalPageSize, float maximumShrinkFactor); | 245 void forceLayoutForPagination(const FloatSize& pageSize, const FloatSize& or
iginalPageSize, float maximumShrinkFactor); |
246 | 246 |
247 bool scrollToFragment(const KURL&); | 247 bool scrollToFragment(const KURL&); |
248 bool scrollToAnchor(const String&); | 248 bool scrollToAnchor(const String&); |
249 void maintainScrollPositionAtAnchor(Node*); | 249 void maintainScrollPositionAtAnchor(Node*); |
250 void scrollElementToRect(Element*, const IntRect&); | 250 void scrollElementToRect(Element*, const IntRect&); |
251 void scrollContentsIfNeededRecursive(); | 251 void scrollContentsIfNeededRecursive(); |
252 | 252 |
253 // Methods to convert points and rects between the coordinate space of the r
enderer, and this view. | 253 // Methods to convert points and rects between the coordinate space of the r
enderer, and this view. |
254 IntRect convertFromRenderer(const RenderObject&, const IntRect&) const; | 254 IntRect convertFromRenderer(const LayoutObject&, const IntRect&) const; |
255 IntRect convertToRenderer(const RenderObject&, const IntRect&) const; | 255 IntRect convertToRenderer(const LayoutObject&, const IntRect&) const; |
256 IntPoint convertFromRenderer(const RenderObject&, const IntPoint&) const; | 256 IntPoint convertFromRenderer(const LayoutObject&, const IntPoint&) const; |
257 IntPoint convertToRenderer(const RenderObject&, const IntPoint&) const; | 257 IntPoint convertToRenderer(const LayoutObject&, const IntPoint&) const; |
258 | 258 |
259 bool isFrameViewScrollCorner(RenderScrollbarPart* scrollCorner) const { retu
rn m_scrollCorner == scrollCorner; } | 259 bool isFrameViewScrollCorner(RenderScrollbarPart* scrollCorner) const { retu
rn m_scrollCorner == scrollCorner; } |
260 | 260 |
261 enum ScrollingReasons { | 261 enum ScrollingReasons { |
262 Scrollable, | 262 Scrollable, |
263 NotScrollableNoOverflow, | 263 NotScrollableNoOverflow, |
264 NotScrollableNotVisible, | 264 NotScrollableNotVisible, |
265 NotScrollableExplicitlyDisabled | 265 NotScrollableExplicitlyDisabled |
266 }; | 266 }; |
267 | 267 |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 void reset(); | 606 void reset(); |
607 void init(); | 607 void init(); |
608 | 608 |
609 // Called when our frame rect changes (or the rect/scroll position of an anc
estor changes). | 609 // Called when our frame rect changes (or the rect/scroll position of an anc
estor changes). |
610 virtual void frameRectsChanged() override; | 610 virtual void frameRectsChanged() override; |
611 | 611 |
612 friend class RenderPart; | 612 friend class RenderPart; |
613 | 613 |
614 bool contentsInCompositedLayer() const; | 614 bool contentsInCompositedLayer() const; |
615 | 615 |
616 void applyOverflowToViewportAndSetRenderer(RenderObject*, ScrollbarMode& hMo
de, ScrollbarMode& vMode); | 616 void applyOverflowToViewportAndSetRenderer(LayoutObject*, ScrollbarMode& hMo
de, ScrollbarMode& vMode); |
617 void updateOverflowStatus(bool horizontalOverflow, bool verticalOverflow); | 617 void updateOverflowStatus(bool horizontalOverflow, bool verticalOverflow); |
618 | 618 |
619 void updateCounters(); | 619 void updateCounters(); |
620 void forceLayoutParentViewIfNeeded(); | 620 void forceLayoutParentViewIfNeeded(); |
621 void performPreLayoutTasks(); | 621 void performPreLayoutTasks(); |
622 void performLayout(RenderObject* rootForThisLayout, bool inSubtreeLayout); | 622 void performLayout(LayoutObject* rootForThisLayout, bool inSubtreeLayout); |
623 void scheduleOrPerformPostLayoutTasks(); | 623 void scheduleOrPerformPostLayoutTasks(); |
624 void performPostLayoutTasks(); | 624 void performPostLayoutTasks(); |
625 | 625 |
626 void invalidateTreeIfNeeded(); | 626 void invalidateTreeIfNeeded(); |
627 | 627 |
628 void gatherDebugLayoutRects(RenderObject* layoutRoot); | 628 void gatherDebugLayoutRects(LayoutObject* layoutRoot); |
629 | 629 |
630 DocumentLifecycle& lifecycle() const; | 630 DocumentLifecycle& lifecycle() const; |
631 | 631 |
632 void contentRectangleForPaintInvalidation(const IntRect&); | 632 void contentRectangleForPaintInvalidation(const IntRect&); |
633 virtual void contentsResized() override; | 633 virtual void contentsResized() override; |
634 void scrollbarExistenceDidChange(); | 634 void scrollbarExistenceDidChange(); |
635 | 635 |
636 // Override Widget methods to do point conversion via renderers, in order to | 636 // Override Widget methods to do point conversion via renderers, in order to |
637 // take transforms into account. | 637 // take transforms into account. |
638 virtual IntRect convertToContainingView(const IntRect&) const override; | 638 virtual IntRect convertToContainingView(const IntRect&) const override; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 RefPtrWillBeMember<LocalFrame> m_frame; | 718 RefPtrWillBeMember<LocalFrame> m_frame; |
719 | 719 |
720 WebDisplayMode m_displayMode; | 720 WebDisplayMode m_displayMode; |
721 | 721 |
722 bool m_doFullPaintInvalidation; | 722 bool m_doFullPaintInvalidation; |
723 | 723 |
724 bool m_canHaveScrollbars; | 724 bool m_canHaveScrollbars; |
725 unsigned m_slowRepaintObjectCount; | 725 unsigned m_slowRepaintObjectCount; |
726 | 726 |
727 bool m_hasPendingLayout; | 727 bool m_hasPendingLayout; |
728 RenderObject* m_layoutSubtreeRoot; | 728 LayoutObject* m_layoutSubtreeRoot; |
729 | 729 |
730 bool m_layoutSchedulingEnabled; | 730 bool m_layoutSchedulingEnabled; |
731 bool m_inPerformLayout; | 731 bool m_inPerformLayout; |
732 bool m_canInvalidatePaintDuringPerformLayout; | 732 bool m_canInvalidatePaintDuringPerformLayout; |
733 bool m_inSynchronousPostLayout; | 733 bool m_inSynchronousPostLayout; |
734 int m_layoutCount; | 734 int m_layoutCount; |
735 unsigned m_nestedLayoutCount; | 735 unsigned m_nestedLayoutCount; |
736 Timer<FrameView> m_postLayoutTasksTimer; | 736 Timer<FrameView> m_postLayoutTasksTimer; |
737 Timer<FrameView> m_updateWidgetsTimer; | 737 Timer<FrameView> m_updateWidgetsTimer; |
738 bool m_firstLayoutCallbackPending; | 738 bool m_firstLayoutCallbackPending; |
739 | 739 |
740 bool m_firstLayout; | 740 bool m_firstLayout; |
741 bool m_isTransparent; | 741 bool m_isTransparent; |
742 Color m_baseBackgroundColor; | 742 Color m_baseBackgroundColor; |
743 IntSize m_lastViewportSize; | 743 IntSize m_lastViewportSize; |
744 float m_lastZoomFactor; | 744 float m_lastZoomFactor; |
745 | 745 |
746 AtomicString m_mediaType; | 746 AtomicString m_mediaType; |
747 AtomicString m_mediaTypeWhenNotPrinting; | 747 AtomicString m_mediaTypeWhenNotPrinting; |
748 | 748 |
749 bool m_overflowStatusDirty; | 749 bool m_overflowStatusDirty; |
750 bool m_horizontalOverflow; | 750 bool m_horizontalOverflow; |
751 bool m_verticalOverflow; | 751 bool m_verticalOverflow; |
752 RenderObject* m_viewportRenderer; | 752 LayoutObject* m_viewportRenderer; |
753 | 753 |
754 bool m_wasScrolledByUser; | 754 bool m_wasScrolledByUser; |
755 bool m_inProgrammaticScroll; | 755 bool m_inProgrammaticScroll; |
756 bool m_safeToPropagateScrollToParent; | 756 bool m_safeToPropagateScrollToParent; |
757 | 757 |
758 double m_lastPaintTime; | 758 double m_lastPaintTime; |
759 | 759 |
760 bool m_isTrackingPaintInvalidations; // Used for testing. | 760 bool m_isTrackingPaintInvalidations; // Used for testing. |
761 Vector<IntRect> m_trackedPaintInvalidationRects; | 761 Vector<IntRect> m_trackedPaintInvalidationRects; |
762 | 762 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
877 } | 877 } |
878 | 878 |
879 private: | 879 private: |
880 RawPtrWillBeMember<FrameView> m_view; | 880 RawPtrWillBeMember<FrameView> m_view; |
881 bool m_originalValue; | 881 bool m_originalValue; |
882 }; | 882 }; |
883 | 883 |
884 } // namespace blink | 884 } // namespace blink |
885 | 885 |
886 #endif // FrameView_h | 886 #endif // FrameView_h |
OLD | NEW |