| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "platform/graphics/paint/ClipPaintPropertyNode.h" | 42 #include "platform/graphics/paint/ClipPaintPropertyNode.h" |
| 43 #include "platform/graphics/paint/TransformPaintPropertyNode.h" | 43 #include "platform/graphics/paint/TransformPaintPropertyNode.h" |
| 44 #include "platform/scroll/ScrollTypes.h" | 44 #include "platform/scroll/ScrollTypes.h" |
| 45 #include "platform/scroll/Scrollbar.h" | 45 #include "platform/scroll/Scrollbar.h" |
| 46 #include "public/platform/WebDisplayMode.h" | 46 #include "public/platform/WebDisplayMode.h" |
| 47 #include "public/platform/WebRect.h" | 47 #include "public/platform/WebRect.h" |
| 48 #include "wtf/Allocator.h" | 48 #include "wtf/Allocator.h" |
| 49 #include "wtf/Forward.h" | 49 #include "wtf/Forward.h" |
| 50 #include "wtf/HashSet.h" | 50 #include "wtf/HashSet.h" |
| 51 #include "wtf/ListHashSet.h" | 51 #include "wtf/ListHashSet.h" |
| 52 #include "wtf/OwnPtr.h" |
| 52 #include "wtf/TemporaryChange.h" | 53 #include "wtf/TemporaryChange.h" |
| 53 #include "wtf/text/WTFString.h" | 54 #include "wtf/text/WTFString.h" |
| 54 #include <memory> | |
| 55 | 55 |
| 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; |
| (...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 void adjustScrollPositionFromUpdateScrollbars(); | 751 void adjustScrollPositionFromUpdateScrollbars(); |
| 752 bool visualViewportSuppliesScrollbars() const; | 752 bool visualViewportSuppliesScrollbars() const; |
| 753 | 753 |
| 754 IntRect rectToCopyOnScroll() const; | 754 IntRect rectToCopyOnScroll() const; |
| 755 | 755 |
| 756 bool isFrameViewScrollbar(const Widget* child) const { return horizontalScro
llbar() == child || verticalScrollbar() == child; } | 756 bool isFrameViewScrollbar(const Widget* child) const { return horizontalScro
llbar() == child || verticalScrollbar() == child; } |
| 757 | 757 |
| 758 ScrollingCoordinator* scrollingCoordinator() const; | 758 ScrollingCoordinator* scrollingCoordinator() const; |
| 759 | 759 |
| 760 void prepareLayoutAnalyzer(); | 760 void prepareLayoutAnalyzer(); |
| 761 std::unique_ptr<TracedValue> analyzerCounters(); | 761 PassOwnPtr<TracedValue> analyzerCounters(); |
| 762 | 762 |
| 763 // LayoutObject for the viewport-defining element (see Document::viewportDef
iningElement). | 763 // LayoutObject for the viewport-defining element (see Document::viewportDef
iningElement). |
| 764 LayoutObject* viewportLayoutObject(); | 764 LayoutObject* viewportLayoutObject(); |
| 765 | 765 |
| 766 void collectAnnotatedRegions(LayoutObject&, Vector<AnnotatedRegionValue>&) c
onst; | 766 void collectAnnotatedRegions(LayoutObject&, Vector<AnnotatedRegionValue>&) c
onst; |
| 767 | 767 |
| 768 template <typename Function> void forAllNonThrottledFrameViews(const Functio
n&); | 768 template <typename Function> void forAllNonThrottledFrameViews(const Functio
n&); |
| 769 | 769 |
| 770 void setNeedsUpdateViewportIntersection(); | 770 void setNeedsUpdateViewportIntersection(); |
| 771 void updateViewportIntersectionsForSubtree(LifeCycleUpdateOption); | 771 void updateViewportIntersectionsForSubtree(LifeCycleUpdateOption); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 bool m_hasPendingLayout; | 803 bool m_hasPendingLayout; |
| 804 LayoutSubtreeRootList m_layoutSubtreeRootList; | 804 LayoutSubtreeRootList m_layoutSubtreeRootList; |
| 805 DepthOrderedLayoutObjectList m_orthogonalWritingModeRootList; | 805 DepthOrderedLayoutObjectList m_orthogonalWritingModeRootList; |
| 806 | 806 |
| 807 bool m_layoutSchedulingEnabled; | 807 bool m_layoutSchedulingEnabled; |
| 808 bool m_inSynchronousPostLayout; | 808 bool m_inSynchronousPostLayout; |
| 809 int m_layoutCount; | 809 int m_layoutCount; |
| 810 unsigned m_nestedLayoutCount; | 810 unsigned m_nestedLayoutCount; |
| 811 Timer<FrameView> m_postLayoutTasksTimer; | 811 Timer<FrameView> m_postLayoutTasksTimer; |
| 812 Timer<FrameView> m_updateWidgetsTimer; | 812 Timer<FrameView> m_updateWidgetsTimer; |
| 813 std::unique_ptr<CancellableTaskFactory> m_renderThrottlingObserverNotificati
onFactory; | 813 OwnPtr<CancellableTaskFactory> m_renderThrottlingObserverNotificationFactory
; |
| 814 | 814 |
| 815 bool m_firstLayout; | 815 bool m_firstLayout; |
| 816 bool m_isTransparent; | 816 bool m_isTransparent; |
| 817 Color m_baseBackgroundColor; | 817 Color m_baseBackgroundColor; |
| 818 IntSize m_lastViewportSize; | 818 IntSize m_lastViewportSize; |
| 819 float m_lastZoomFactor; | 819 float m_lastZoomFactor; |
| 820 | 820 |
| 821 AtomicString m_mediaType; | 821 AtomicString m_mediaType; |
| 822 AtomicString m_mediaTypeWhenNotPrinting; | 822 AtomicString m_mediaTypeWhenNotPrinting; |
| 823 | 823 |
| 824 bool m_safeToPropagateScrollToParent; | 824 bool m_safeToPropagateScrollToParent; |
| 825 | 825 |
| 826 unsigned m_visuallyNonEmptyCharacterCount; | 826 unsigned m_visuallyNonEmptyCharacterCount; |
| 827 unsigned m_visuallyNonEmptyPixelCount; | 827 unsigned m_visuallyNonEmptyPixelCount; |
| 828 bool m_isVisuallyNonEmpty; | 828 bool m_isVisuallyNonEmpty; |
| 829 | 829 |
| 830 Member<Node> m_fragmentAnchor; | 830 Member<Node> m_fragmentAnchor; |
| 831 | 831 |
| 832 // layoutObject to hold our custom scroll corner. | 832 // layoutObject to hold our custom scroll corner. |
| 833 LayoutScrollbarPart* m_scrollCorner; | 833 LayoutScrollbarPart* m_scrollCorner; |
| 834 | 834 |
| 835 Member<ScrollableAreaSet> m_scrollableAreas; | 835 Member<ScrollableAreaSet> m_scrollableAreas; |
| 836 Member<ScrollableAreaSet> m_animatingScrollableAreas; | 836 Member<ScrollableAreaSet> m_animatingScrollableAreas; |
| 837 std::unique_ptr<ResizerAreaSet> m_resizerAreas; | 837 OwnPtr<ResizerAreaSet> m_resizerAreas; |
| 838 std::unique_ptr<ViewportConstrainedObjectSet> m_viewportConstrainedObjects; | 838 OwnPtr<ViewportConstrainedObjectSet> m_viewportConstrainedObjects; |
| 839 unsigned m_stickyPositionObjectCount; | 839 unsigned m_stickyPositionObjectCount; |
| 840 ViewportConstrainedObjectSet m_backgroundAttachmentFixedObjects; | 840 ViewportConstrainedObjectSet m_backgroundAttachmentFixedObjects; |
| 841 Member<FrameViewAutoSizeInfo> m_autoSizeInfo; | 841 Member<FrameViewAutoSizeInfo> m_autoSizeInfo; |
| 842 | 842 |
| 843 IntSize m_inputEventsOffsetForEmulation; | 843 IntSize m_inputEventsOffsetForEmulation; |
| 844 float m_inputEventsScaleFactorForEmulation; | 844 float m_inputEventsScaleFactorForEmulation; |
| 845 | 845 |
| 846 IntSize m_layoutSize; | 846 IntSize m_layoutSize; |
| 847 bool m_layoutSizeFixedToFrameSize; | 847 bool m_layoutSizeFixedToFrameSize; |
| 848 | 848 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 873 | 873 |
| 874 DoubleSize m_pendingScrollDelta; | 874 DoubleSize m_pendingScrollDelta; |
| 875 DoublePoint m_scrollPosition; | 875 DoublePoint m_scrollPosition; |
| 876 IntSize m_contentsSize; | 876 IntSize m_contentsSize; |
| 877 | 877 |
| 878 int m_scrollbarsAvoidingResizer; | 878 int m_scrollbarsAvoidingResizer; |
| 879 bool m_scrollbarsSuppressed; | 879 bool m_scrollbarsSuppressed; |
| 880 | 880 |
| 881 bool m_inUpdateScrollbars; | 881 bool m_inUpdateScrollbars; |
| 882 | 882 |
| 883 std::unique_ptr<LayoutAnalyzer> m_analyzer; | 883 OwnPtr<LayoutAnalyzer> m_analyzer; |
| 884 | 884 |
| 885 // Mark if something has changed in the mapping from Frame to GraphicsLayer | 885 // Mark if something has changed in the mapping from Frame to GraphicsLayer |
| 886 // and the Frame Timing regions should be recalculated. | 886 // and the Frame Timing regions should be recalculated. |
| 887 bool m_frameTimingRequestsDirty; | 887 bool m_frameTimingRequestsDirty; |
| 888 | 888 |
| 889 // Exists only on root frame. | 889 // Exists only on root frame. |
| 890 // TODO(bokan): crbug.com/484188. We should specialize FrameView for the | 890 // TODO(bokan): crbug.com/484188. We should specialize FrameView for the |
| 891 // main frame. | 891 // main frame. |
| 892 Member<ScrollableArea> m_viewportScrollableArea; | 892 Member<ScrollableArea> m_viewportScrollableArea; |
| 893 | 893 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 919 | 919 |
| 920 bool m_needsScrollbarsUpdate; | 920 bool m_needsScrollbarsUpdate; |
| 921 bool m_suppressAdjustViewSize; | 921 bool m_suppressAdjustViewSize; |
| 922 bool m_inPluginUpdate; | 922 bool m_inPluginUpdate; |
| 923 | 923 |
| 924 // For testing. | 924 // For testing. |
| 925 struct ObjectPaintInvalidation { | 925 struct ObjectPaintInvalidation { |
| 926 String name; | 926 String name; |
| 927 PaintInvalidationReason reason; | 927 PaintInvalidationReason reason; |
| 928 }; | 928 }; |
| 929 std::unique_ptr<Vector<ObjectPaintInvalidation>> m_trackedObjectPaintInvalid
ations; | 929 OwnPtr<Vector<ObjectPaintInvalidation>> m_trackedObjectPaintInvalidations; |
| 930 }; | 930 }; |
| 931 | 931 |
| 932 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) | 932 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) |
| 933 { | 933 { |
| 934 if (m_isVisuallyNonEmpty) | 934 if (m_isVisuallyNonEmpty) |
| 935 return; | 935 return; |
| 936 m_visuallyNonEmptyCharacterCount += count; | 936 m_visuallyNonEmptyCharacterCount += count; |
| 937 // 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. |
| 938 // 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. |
| 939 static const unsigned visualCharacterThreshold = 200; | 939 static const unsigned visualCharacterThreshold = 200; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 951 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) | 951 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
| 952 setIsVisuallyNonEmpty(); | 952 setIsVisuallyNonEmpty(); |
| 953 } | 953 } |
| 954 | 954 |
| 955 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); | 955 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); |
| 956 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); | 956 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); |
| 957 | 957 |
| 958 } // namespace blink | 958 } // namespace blink |
| 959 | 959 |
| 960 #endif // FrameView_h | 960 #endif // FrameView_h |
| OLD | NEW |