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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 class LocalFrame; | 72 class LocalFrame; |
73 class KURL; | 73 class KURL; |
74 class Node; | 74 class Node; |
75 class LayoutAnalyzer; | 75 class LayoutAnalyzer; |
76 class LayoutBox; | 76 class LayoutBox; |
77 class LayoutEmbeddedObject; | 77 class LayoutEmbeddedObject; |
78 class LayoutObject; | 78 class LayoutObject; |
79 class LayoutReplaced; | 79 class LayoutReplaced; |
80 class LayoutScrollbarPart; | 80 class LayoutScrollbarPart; |
81 class LayoutView; | 81 class LayoutView; |
| 82 class PaintController; |
82 class PaintInvalidationState; | 83 class PaintInvalidationState; |
83 class Page; | 84 class Page; |
84 class ScrollingCoordinator; | 85 class ScrollingCoordinator; |
85 class TracedValue; | 86 class TracedValue; |
86 struct AnnotatedRegionValue; | 87 struct AnnotatedRegionValue; |
87 struct CompositedSelection; | 88 struct CompositedSelection; |
88 | 89 |
89 typedef unsigned long long DOMTimeStamp; | 90 typedef unsigned long long DOMTimeStamp; |
90 | 91 |
91 class CORE_EXPORT FrameView final : public Widget, public PaintInvalidationCapab
leScrollableArea { | 92 class CORE_EXPORT FrameView final : public Widget, public PaintInvalidationCapab
leScrollableArea { |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 Color documentBackgroundColor() const; | 244 Color documentBackgroundColor() const; |
244 | 245 |
245 // Run all needed lifecycle stages. After calling this method, all frames wi
ll be in the lifecycle state PaintInvalidationClean. | 246 // Run all needed lifecycle stages. After calling this method, all frames wi
ll be in the lifecycle state PaintInvalidationClean. |
246 // If lifecycle throttling is allowed (see DocumentLifecycle::AllowThrottlin
gScope), some frames may skip the lifecycle update | 247 // If lifecycle throttling is allowed (see DocumentLifecycle::AllowThrottlin
gScope), some frames may skip the lifecycle update |
247 // (e.g., based on visibility) and will not end up being PaintInvalidationCl
ean. | 248 // (e.g., based on visibility) and will not end up being PaintInvalidationCl
ean. |
248 void updateAllLifecyclePhases(); | 249 void updateAllLifecyclePhases(); |
249 | 250 |
250 // Everything except paint (the last phase). | 251 // Everything except paint (the last phase). |
251 void updateAllLifecyclePhasesExceptPaint(); | 252 void updateAllLifecyclePhasesExceptPaint(); |
252 | 253 |
253 // Computes the style, layout and compositing lifecycle stages if needed. Af
ter calling this method, all frames will be in a lifecycle | |
254 // state >= CompositingClean, and scrolling has been updated (unless throttl
ing is allowed). | |
255 void updateLifecycleToCompositingCleanPlusScrolling(); | |
256 | |
257 // Computes only the style and layout lifecycle stages. | 254 // Computes only the style and layout lifecycle stages. |
258 // After calling this method, all frames will be in a lifecycle state >= Lay
outClean (unless throttling is allowed). | 255 // After calling this method, all frames will be in a lifecycle state >= Lay
outClean (unless throttling is allowed). |
259 void updateLifecycleToLayoutClean(); | 256 void updateLifecycleToLayoutClean(); |
260 | 257 |
261 void scheduleVisualUpdateForPaintInvalidationIfNeeded(); | 258 void scheduleVisualUpdateForPaintInvalidationIfNeeded(); |
262 | 259 |
263 bool invalidateViewportConstrainedObjects(); | 260 bool invalidateViewportConstrainedObjects(); |
264 | 261 |
265 void incrementLayoutObjectCount() { m_layoutObjectCounter.increment(); } | 262 void incrementLayoutObjectCount() { m_layoutObjectCounter.increment(); } |
266 void incrementVisuallyNonEmptyCharacterCount(unsigned); | 263 void incrementVisuallyNonEmptyCharacterCount(unsigned); |
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
944 bool m_needsScrollbarsUpdate; | 941 bool m_needsScrollbarsUpdate; |
945 bool m_suppressAdjustViewSize; | 942 bool m_suppressAdjustViewSize; |
946 bool m_allowsLayoutInvalidationAfterLayoutClean; | 943 bool m_allowsLayoutInvalidationAfterLayoutClean; |
947 | 944 |
948 // For testing. | 945 // For testing. |
949 struct ObjectPaintInvalidation { | 946 struct ObjectPaintInvalidation { |
950 String name; | 947 String name; |
951 PaintInvalidationReason reason; | 948 PaintInvalidationReason reason; |
952 }; | 949 }; |
953 std::unique_ptr<Vector<ObjectPaintInvalidation>> m_trackedObjectPaintInvalid
ations; | 950 std::unique_ptr<Vector<ObjectPaintInvalidation>> m_trackedObjectPaintInvalid
ations; |
| 951 |
| 952 // For Slimming Paint v2 only. |
| 953 std::unique_ptr<PaintController> m_paintController; |
954 }; | 954 }; |
955 | 955 |
956 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) | 956 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) |
957 { | 957 { |
958 if (m_isVisuallyNonEmpty) | 958 if (m_isVisuallyNonEmpty) |
959 return; | 959 return; |
960 m_visuallyNonEmptyCharacterCount += count; | 960 m_visuallyNonEmptyCharacterCount += count; |
961 // Use a threshold value to prevent very small amounts of visible content fr
om triggering didMeaningfulLayout. | 961 // Use a threshold value to prevent very small amounts of visible content fr
om triggering didMeaningfulLayout. |
962 // The first few hundred characters rarely contain the interesting content o
f the page. | 962 // The first few hundred characters rarely contain the interesting content o
f the page. |
963 static const unsigned visualCharacterThreshold = 200; | 963 static const unsigned visualCharacterThreshold = 200; |
(...skipping 11 matching lines...) Expand all Loading... |
975 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) | 975 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
976 setIsVisuallyNonEmpty(); | 976 setIsVisuallyNonEmpty(); |
977 } | 977 } |
978 | 978 |
979 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); | 979 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); |
980 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); | 980 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); |
981 | 981 |
982 } // namespace blink | 982 } // namespace blink |
983 | 983 |
984 #endif // FrameView_h | 984 #endif // FrameView_h |
OLD | NEW |