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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 namespace blink { | 56 namespace blink { |
57 | 57 |
58 class AXObjectCache; | 58 class AXObjectCache; |
59 class CancellableTaskFactory; | 59 class CancellableTaskFactory; |
60 class ComputedStyle; | 60 class ComputedStyle; |
61 class DocumentLifecycle; | 61 class DocumentLifecycle; |
62 class Cursor; | 62 class Cursor; |
63 class Element; | 63 class Element; |
64 class FloatSize; | 64 class FloatSize; |
65 class HTMLFrameOwnerElement; | 65 class HTMLFrameOwnerElement; |
| 66 class JSONArray; |
66 class LayoutPart; | 67 class LayoutPart; |
67 class LocalFrame; | 68 class LocalFrame; |
68 class KURL; | 69 class KURL; |
69 class Node; | 70 class Node; |
70 class LayoutAnalyzer; | 71 class LayoutAnalyzer; |
71 class LayoutBox; | 72 class LayoutBox; |
72 class LayoutEmbeddedObject; | 73 class LayoutEmbeddedObject; |
73 class LayoutObject; | 74 class LayoutObject; |
74 class LayoutReplaced; | 75 class LayoutReplaced; |
75 class LayoutScrollbarPart; | 76 class LayoutScrollbarPart; |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 // FIXME: Remove this method once plugin loading is decoupled from layout. | 315 // FIXME: Remove this method once plugin loading is decoupled from layout. |
315 void flushAnyPendingPostLayoutTasks(); | 316 void flushAnyPendingPostLayoutTasks(); |
316 | 317 |
317 bool shouldSuspendScrollAnimations() const override; | 318 bool shouldSuspendScrollAnimations() const override; |
318 void scrollbarStyleChanged() override; | 319 void scrollbarStyleChanged() override; |
319 | 320 |
320 LayoutReplaced* embeddedReplacedContent() const; | 321 LayoutReplaced* embeddedReplacedContent() const; |
321 | 322 |
322 static void setInitialTracksPaintInvalidationsForTesting(bool); | 323 static void setInitialTracksPaintInvalidationsForTesting(bool); |
323 | 324 |
| 325 // These methods are for testing. |
324 void setTracksPaintInvalidations(bool); | 326 void setTracksPaintInvalidations(bool); |
325 bool isTrackingPaintInvalidations() const { return m_isTrackingPaintInvalida
tions; } | 327 bool isTrackingPaintInvalidations() const { return m_trackedObjectPaintInval
idations.get(); } |
| 328 void trackObjectPaintInvalidation(const DisplayItemClient&, PaintInvalidatio
nReason); |
| 329 PassRefPtr<JSONArray> trackedObjectPaintInvalidationsAsJSON() const; |
326 | 330 |
327 using ScrollableAreaSet = HeapHashSet<Member<ScrollableArea>>; | 331 using ScrollableAreaSet = HeapHashSet<Member<ScrollableArea>>; |
328 void addScrollableArea(ScrollableArea*); | 332 void addScrollableArea(ScrollableArea*); |
329 void removeScrollableArea(ScrollableArea*); | 333 void removeScrollableArea(ScrollableArea*); |
330 const ScrollableAreaSet* scrollableAreas() const { return m_scrollableAreas.
get(); } | 334 const ScrollableAreaSet* scrollableAreas() const { return m_scrollableAreas.
get(); } |
331 | 335 |
332 void addAnimatingScrollableArea(ScrollableArea*); | 336 void addAnimatingScrollableArea(ScrollableArea*); |
333 void removeAnimatingScrollableArea(ScrollableArea*); | 337 void removeAnimatingScrollableArea(ScrollableArea*); |
334 const ScrollableAreaSet* animatingScrollableAreas() const { return m_animati
ngScrollableAreas.get(); } | 338 const ScrollableAreaSet* animatingScrollableAreas() const { return m_animati
ngScrollableAreas.get(); } |
335 | 339 |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 bool m_isTransparent; | 816 bool m_isTransparent; |
813 Color m_baseBackgroundColor; | 817 Color m_baseBackgroundColor; |
814 IntSize m_lastViewportSize; | 818 IntSize m_lastViewportSize; |
815 float m_lastZoomFactor; | 819 float m_lastZoomFactor; |
816 | 820 |
817 AtomicString m_mediaType; | 821 AtomicString m_mediaType; |
818 AtomicString m_mediaTypeWhenNotPrinting; | 822 AtomicString m_mediaTypeWhenNotPrinting; |
819 | 823 |
820 bool m_safeToPropagateScrollToParent; | 824 bool m_safeToPropagateScrollToParent; |
821 | 825 |
822 bool m_isTrackingPaintInvalidations; // Used for testing. | |
823 | |
824 unsigned m_visuallyNonEmptyCharacterCount; | 826 unsigned m_visuallyNonEmptyCharacterCount; |
825 unsigned m_visuallyNonEmptyPixelCount; | 827 unsigned m_visuallyNonEmptyPixelCount; |
826 bool m_isVisuallyNonEmpty; | 828 bool m_isVisuallyNonEmpty; |
827 | 829 |
828 Member<Node> m_fragmentAnchor; | 830 Member<Node> m_fragmentAnchor; |
829 | 831 |
830 // layoutObject to hold our custom scroll corner. | 832 // layoutObject to hold our custom scroll corner. |
831 LayoutScrollbarPart* m_scrollCorner; | 833 LayoutScrollbarPart* m_scrollCorner; |
832 | 834 |
833 Member<ScrollableAreaSet> m_scrollableAreas; | 835 Member<ScrollableAreaSet> m_scrollableAreas; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 // The content clip clips the document (= LayoutView) but not the scrollbars
. | 913 // The content clip clips the document (= LayoutView) but not the scrollbars
. |
912 // TODO(trchen): This will not be needed once settings->rootLayerScrolls() i
s enabled. | 914 // TODO(trchen): This will not be needed once settings->rootLayerScrolls() i
s enabled. |
913 RefPtr<ClipPaintPropertyNode> m_contentClip; | 915 RefPtr<ClipPaintPropertyNode> m_contentClip; |
914 | 916 |
915 bool m_isUpdatingAllLifecyclePhases; | 917 bool m_isUpdatingAllLifecyclePhases; |
916 ScrollAnchor m_scrollAnchor; | 918 ScrollAnchor m_scrollAnchor; |
917 | 919 |
918 bool m_needsScrollbarsUpdate; | 920 bool m_needsScrollbarsUpdate; |
919 bool m_suppressAdjustViewSize; | 921 bool m_suppressAdjustViewSize; |
920 bool m_inPluginUpdate; | 922 bool m_inPluginUpdate; |
| 923 |
| 924 // For testing. |
| 925 struct ObjectPaintInvalidation { |
| 926 String name; |
| 927 PaintInvalidationReason reason; |
| 928 }; |
| 929 OwnPtr<Vector<ObjectPaintInvalidation>> m_trackedObjectPaintInvalidations; |
921 }; | 930 }; |
922 | 931 |
923 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) | 932 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) |
924 { | 933 { |
925 if (m_isVisuallyNonEmpty) | 934 if (m_isVisuallyNonEmpty) |
926 return; | 935 return; |
927 m_visuallyNonEmptyCharacterCount += count; | 936 m_visuallyNonEmptyCharacterCount += count; |
928 // Use a threshold value to prevent very small amounts of visible content fr
om triggering didMeaningfulLayout. | 937 // Use a threshold value to prevent very small amounts of visible content fr
om triggering didMeaningfulLayout. |
929 // The first few hundred characters rarely contain the interesting content o
f the page. | 938 // The first few hundred characters rarely contain the interesting content o
f the page. |
930 static const unsigned visualCharacterThreshold = 200; | 939 static const unsigned visualCharacterThreshold = 200; |
(...skipping 11 matching lines...) Expand all Loading... |
942 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) | 951 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
943 setIsVisuallyNonEmpty(); | 952 setIsVisuallyNonEmpty(); |
944 } | 953 } |
945 | 954 |
946 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); | 955 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); |
947 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); | 956 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); |
948 | 957 |
949 } // namespace blink | 958 } // namespace blink |
950 | 959 |
951 #endif // FrameView_h | 960 #endif // FrameView_h |
OLD | NEW |