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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include "wtf/text/WTFString.h" | 43 #include "wtf/text/WTFString.h" |
44 | 44 |
45 namespace blink { | 45 namespace blink { |
46 | 46 |
47 class AXObjectCache; | 47 class AXObjectCache; |
48 class DocumentLifecycle; | 48 class DocumentLifecycle; |
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 LayoutPart; |
53 class LocalFrame; | 54 class LocalFrame; |
54 class KURL; | 55 class KURL; |
55 class Node; | 56 class Node; |
56 class Page; | 57 class Page; |
57 class RenderBox; | 58 class RenderBox; |
58 class RenderEmbeddedObject; | 59 class RenderEmbeddedObject; |
59 class LayoutObject; | 60 class LayoutObject; |
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: |
70 friend class RenderView; | 70 friend class RenderView; |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 void restoreScrollbar(); | 199 void restoreScrollbar(); |
200 | 200 |
201 void postLayoutTimerFired(Timer<FrameView>*); | 201 void postLayoutTimerFired(Timer<FrameView>*); |
202 | 202 |
203 bool wasScrolledByUser() const; | 203 bool wasScrolledByUser() const; |
204 void setWasScrolledByUser(bool); | 204 void setWasScrolledByUser(bool); |
205 | 205 |
206 bool safeToPropagateScrollToParent() const { return m_safeToPropagateScrollT
oParent; } | 206 bool safeToPropagateScrollToParent() const { return m_safeToPropagateScrollT
oParent; } |
207 void setSafeToPropagateScrollToParent(bool isSafe) { m_safeToPropagateScroll
ToParent = isSafe; } | 207 void setSafeToPropagateScrollToParent(bool isSafe) { m_safeToPropagateScroll
ToParent = isSafe; } |
208 | 208 |
209 void addPart(RenderPart*); | 209 void addPart(LayoutPart*); |
210 void removePart(RenderPart*); | 210 void removePart(LayoutPart*); |
211 | 211 |
212 void updateWidgetPositions(); | 212 void updateWidgetPositions(); |
213 | 213 |
214 void addPartToUpdate(RenderEmbeddedObject&); | 214 void addPartToUpdate(RenderEmbeddedObject&); |
215 | 215 |
216 void setPaintBehavior(PaintBehavior); | 216 void setPaintBehavior(PaintBehavior); |
217 PaintBehavior paintBehavior() const; | 217 PaintBehavior paintBehavior() const; |
218 void setIsPainting(bool val) { m_isPainting = val; } | 218 void setIsPainting(bool val) { m_isPainting = val; } |
219 bool isPainting() const; | 219 bool isPainting() const; |
220 void setLastPaintTime(double val) { m_lastPaintTime = val; } | 220 void setLastPaintTime(double val) { m_lastPaintTime = val; } |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 private: | 598 private: |
599 explicit FrameView(LocalFrame*); | 599 explicit FrameView(LocalFrame*); |
600 | 600 |
601 void dispose() override; | 601 void dispose() override; |
602 void reset(); | 602 void reset(); |
603 void init(); | 603 void init(); |
604 | 604 |
605 // Called when our frame rect changes (or the rect/scroll position of an anc
estor changes). | 605 // Called when our frame rect changes (or the rect/scroll position of an anc
estor changes). |
606 virtual void frameRectsChanged() override; | 606 virtual void frameRectsChanged() override; |
607 | 607 |
608 friend class RenderPart; | 608 friend class LayoutPart; |
609 | 609 |
610 bool contentsInCompositedLayer() const; | 610 bool contentsInCompositedLayer() const; |
611 | 611 |
612 void applyOverflowToViewportAndSetRenderer(LayoutObject*, ScrollbarMode& hMo
de, ScrollbarMode& vMode); | 612 void applyOverflowToViewportAndSetRenderer(LayoutObject*, ScrollbarMode& hMo
de, ScrollbarMode& vMode); |
613 void updateOverflowStatus(bool horizontalOverflow, bool verticalOverflow); | 613 void updateOverflowStatus(bool horizontalOverflow, bool verticalOverflow); |
614 | 614 |
615 void updateCounters(); | 615 void updateCounters(); |
616 void forceLayoutParentViewIfNeeded(); | 616 void forceLayoutParentViewIfNeeded(); |
617 void performPreLayoutTasks(); | 617 void performPreLayoutTasks(); |
618 void performLayout(LayoutObject* rootForThisLayout, bool inSubtreeLayout); | 618 void performLayout(LayoutObject* rootForThisLayout, bool inSubtreeLayout); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 ScrollingCoordinator* scrollingCoordinator(); | 692 ScrollingCoordinator* scrollingCoordinator(); |
693 | 693 |
694 static double s_currentFrameTimeStamp; // used for detecting decoded resourc
e thrash in the cache | 694 static double s_currentFrameTimeStamp; // used for detecting decoded resourc
e thrash in the cache |
695 | 695 |
696 LayoutSize m_size; | 696 LayoutSize m_size; |
697 | 697 |
698 typedef HashSet<RefPtr<RenderEmbeddedObject>> EmbeddedObjectSet; | 698 typedef HashSet<RefPtr<RenderEmbeddedObject>> EmbeddedObjectSet; |
699 EmbeddedObjectSet m_partUpdateSet; | 699 EmbeddedObjectSet m_partUpdateSet; |
700 | 700 |
701 // FIXME: These are just "children" of the FrameView and should be RefPtrWil
lBeMember<Widget> instead. | 701 // FIXME: These are just "children" of the FrameView and should be RefPtrWil
lBeMember<Widget> instead. |
702 HashSet<RefPtr<RenderPart>> m_parts; | 702 HashSet<RefPtr<LayoutPart>> m_parts; |
703 | 703 |
704 // The RefPtr cycle between LocalFrame and FrameView is broken | 704 // The RefPtr cycle between LocalFrame and FrameView is broken |
705 // when a LocalFrame is detached by FrameLoader::detachFromParent(). | 705 // when a LocalFrame is detached by FrameLoader::detachFromParent(). |
706 // It clears the LocalFrame's m_view reference via setView(nullptr). | 706 // It clears the LocalFrame's m_view reference via setView(nullptr). |
707 // | 707 // |
708 // For Oilpan, Member reference cycles pose no problem, but | 708 // For Oilpan, Member reference cycles pose no problem, but |
709 // LocalFrame's FrameView is also cleared by setView(). This additionally | 709 // LocalFrame's FrameView is also cleared by setView(). This additionally |
710 // triggers FrameView::dispose(), which performs the operations | 710 // triggers FrameView::dispose(), which performs the operations |
711 // that cannot be delayed until finalization time. | 711 // that cannot be delayed until finalization time. |
712 RefPtrWillBeMember<LocalFrame> m_frame; | 712 RefPtrWillBeMember<LocalFrame> m_frame; |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
844 static const unsigned visualPixelThreshold = 32 * 32; | 844 static const unsigned visualPixelThreshold = 32 * 32; |
845 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) | 845 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
846 setIsVisuallyNonEmpty(); | 846 setIsVisuallyNonEmpty(); |
847 } | 847 } |
848 | 848 |
849 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); | 849 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); |
850 | 850 |
851 } // namespace blink | 851 } // namespace blink |
852 | 852 |
853 #endif // FrameView_h | 853 #endif // FrameView_h |
OLD | NEW |