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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 class ScrollingCoordinator; | 75 class ScrollingCoordinator; |
76 class TracedValue; | 76 class TracedValue; |
77 struct AnnotatedRegionValue; | 77 struct AnnotatedRegionValue; |
78 struct CompositedSelection; | 78 struct CompositedSelection; |
79 | 79 |
80 typedef unsigned long long DOMTimeStamp; | 80 typedef unsigned long long DOMTimeStamp; |
81 | 81 |
82 class CORE_EXPORT FrameView final : public Widget, public ScrollableArea { | 82 class CORE_EXPORT FrameView final : public Widget, public ScrollableArea { |
83 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(FrameView); | 83 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(FrameView); |
84 | 84 |
85 friend class PaintControllerPaintTestForSlimmingPaintV2; | 85 friend class PaintControllerPaintTestBase; |
86 friend class Internals; | 86 friend class Internals; |
87 friend class LayoutPart; // for invalidateTreeIfNeeded | 87 friend class LayoutPart; // for invalidateTreeIfNeeded |
88 | 88 |
89 public: | 89 public: |
90 static PassRefPtrWillBeRawPtr<FrameView> create(LocalFrame*); | 90 static PassRefPtrWillBeRawPtr<FrameView> create(LocalFrame*); |
91 static PassRefPtrWillBeRawPtr<FrameView> create(LocalFrame*, const IntSize&
initialSize); | 91 static PassRefPtrWillBeRawPtr<FrameView> create(LocalFrame*, const IntSize&
initialSize); |
92 | 92 |
93 ~FrameView() override; | 93 ~FrameView() override; |
94 | 94 |
95 void invalidateRect(const IntRect&) override; | 95 void invalidateRect(const IntRect&) override; |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 bool isPainting() const; | 225 bool isPainting() const; |
226 | 226 |
227 void setNodeToDraw(Node*); | 227 void setNodeToDraw(Node*); |
228 Node* nodeToDraw() const { return m_nodeToDraw.get(); } | 228 Node* nodeToDraw() const { return m_nodeToDraw.get(); } |
229 | 229 |
230 Color documentBackgroundColor() const; | 230 Color documentBackgroundColor() const; |
231 | 231 |
232 // Run all needed lifecycle stages. After calling this method, all frames wi
ll be in the lifecycle state PaintInvalidationClean. | 232 // Run all needed lifecycle stages. After calling this method, all frames wi
ll be in the lifecycle state PaintInvalidationClean. |
233 // If lifecycle throttling is allowed (see DocumentLifecycle::PreventThrottl
ingScope), some frames may skip the lifecycle update | 233 // If lifecycle throttling is allowed (see DocumentLifecycle::PreventThrottl
ingScope), some frames may skip the lifecycle update |
234 // (e.g., based on visibility) and will not end up being PaintInvalidationCl
ean. | 234 // (e.g., based on visibility) and will not end up being PaintInvalidationCl
ean. |
235 // TODO(pdr): Update callers to pass in the interest rect. | 235 void updateAllLifecyclePhases(); |
236 void updateAllLifecyclePhases(const LayoutRect* interestRect = nullptr); | |
237 | 236 |
238 // Computes the style, layout and compositing lifecycle stages if needed. Af
ter calling this method, all frames wil lbe in a lifecycle | 237 // Computes the style, layout and compositing lifecycle stages if needed. Af
ter calling this method, all frames wil lbe in a lifecycle |
239 // state >= CompositingClean, and scrolling has been updated (unless throttl
ing is allowed). | 238 // state >= CompositingClean, and scrolling has been updated (unless throttl
ing is allowed). |
240 void updateLifecycleToCompositingCleanPlusScrolling(); | 239 void updateLifecycleToCompositingCleanPlusScrolling(); |
241 | 240 |
242 // Computes only the style and layout lifecycle stages. | 241 // Computes only the style and layout lifecycle stages. |
243 // After calling this method, all frames will be in a lifecycle state >= Lay
outClean (unless throttling is allowed). | 242 // After calling this method, all frames will be in a lifecycle state >= Lay
outClean (unless throttling is allowed). |
244 void updateLifecycleToLayoutClean(); | 243 void updateLifecycleToLayoutClean(); |
245 | 244 |
246 bool invalidateViewportConstrainedObjects(); | 245 bool invalidateViewportConstrainedObjects(); |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 | 624 |
626 void setScrollOffset(const IntPoint&, ScrollType) override; | 625 void setScrollOffset(const IntPoint&, ScrollType) override; |
627 void setScrollOffset(const DoublePoint&, ScrollType) override; | 626 void setScrollOffset(const DoublePoint&, ScrollType) override; |
628 | 627 |
629 enum LifeCycleUpdateOption { | 628 enum LifeCycleUpdateOption { |
630 OnlyUpToLayoutClean, | 629 OnlyUpToLayoutClean, |
631 OnlyUpToCompositingCleanPlusScrolling, | 630 OnlyUpToCompositingCleanPlusScrolling, |
632 AllPhases, | 631 AllPhases, |
633 }; | 632 }; |
634 | 633 |
635 void updateLifecyclePhasesInternal(LifeCycleUpdateOption, const LayoutRect*
interestRect); | 634 void updateLifecyclePhasesInternal(LifeCycleUpdateOption); |
636 void invalidateTreeIfNeededRecursive(); | 635 void invalidateTreeIfNeededRecursive(); |
637 void scrollContentsIfNeededRecursive(); | 636 void scrollContentsIfNeededRecursive(); |
638 void updateStyleAndLayoutIfNeededRecursive(); | 637 void updateStyleAndLayoutIfNeededRecursive(); |
639 void updatePaintProperties(); | 638 void updatePaintProperties(); |
640 void synchronizedPaint(const LayoutRect* interestRect); | 639 void synchronizedPaint(); |
641 void synchronizedPaintRecursively(GraphicsLayer*, const LayoutRect* interest
Rect); | 640 void synchronizedPaintRecursively(GraphicsLayer*); |
642 void compositeForSlimmingPaintV2(); | 641 void compositeForSlimmingPaintV2(); |
643 | 642 |
644 void reset(); | 643 void reset(); |
645 void init(); | 644 void init(); |
646 | 645 |
647 void clearLayoutSubtreeRootsAndMarkContainingBlocks(); | 646 void clearLayoutSubtreeRootsAndMarkContainingBlocks(); |
648 | 647 |
649 // Called when our frame rect changes (or the rect/scroll position of an anc
estor changes). | 648 // Called when our frame rect changes (or the rect/scroll position of an anc
estor changes). |
650 void frameRectsChanged() override; | 649 void frameRectsChanged() override; |
651 | 650 |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
905 static const unsigned visualPixelThreshold = 32 * 32; | 904 static const unsigned visualPixelThreshold = 32 * 32; |
906 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) | 905 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
907 setIsVisuallyNonEmpty(); | 906 setIsVisuallyNonEmpty(); |
908 } | 907 } |
909 | 908 |
910 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); | 909 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); |
911 | 910 |
912 } // namespace blink | 911 } // namespace blink |
913 | 912 |
914 #endif // FrameView_h | 913 #endif // FrameView_h |
OLD | NEW |