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