| 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 324 void setTracksPaintInvalidations(bool); | 325 void setTracksPaintInvalidations(bool); |
| 325 bool isTrackingPaintInvalidations() const { return m_isTrackingPaintInvalida
tions; } | 326 bool isTrackingPaintInvalidations() const { return m_trackedObjectPaintInval
idations.get(); } |
| 327 |
| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 910 RefPtr<TransformPaintPropertyNode> m_scrollTranslation; | 912 RefPtr<TransformPaintPropertyNode> m_scrollTranslation; |
| 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; |
| 922 |
| 923 struct ObjectPaintInvalidation { |
| 924 String name; |
| 925 PaintInvalidationReason reason; |
| 926 }; |
| 927 OwnPtr<Vector<ObjectPaintInvalidation>> m_trackedObjectPaintInvalidations; |
| 920 }; | 928 }; |
| 921 | 929 |
| 922 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) | 930 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) |
| 923 { | 931 { |
| 924 if (m_isVisuallyNonEmpty) | 932 if (m_isVisuallyNonEmpty) |
| 925 return; | 933 return; |
| 926 m_visuallyNonEmptyCharacterCount += count; | 934 m_visuallyNonEmptyCharacterCount += count; |
| 927 // Use a threshold value to prevent very small amounts of visible content fr
om triggering didMeaningfulLayout. | 935 // Use a threshold value to prevent very small amounts of visible content fr
om triggering didMeaningfulLayout. |
| 928 // The first few hundred characters rarely contain the interesting content o
f the page. | 936 // The first few hundred characters rarely contain the interesting content o
f the page. |
| 929 static const unsigned visualCharacterThreshold = 200; | 937 static const unsigned visualCharacterThreshold = 200; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 941 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) | 949 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
| 942 setIsVisuallyNonEmpty(); | 950 setIsVisuallyNonEmpty(); |
| 943 } | 951 } |
| 944 | 952 |
| 945 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); | 953 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); |
| 946 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); | 954 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); |
| 947 | 955 |
| 948 } // namespace blink | 956 } // namespace blink |
| 949 | 957 |
| 950 #endif // FrameView_h | 958 #endif // FrameView_h |
| OLD | NEW |