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 24 matching lines...) Expand all Loading... |
35 #include "core/paint/FirstMeaningfulPaintDetector.h" | 35 #include "core/paint/FirstMeaningfulPaintDetector.h" |
36 #include "core/paint/PaintInvalidationCapableScrollableArea.h" | 36 #include "core/paint/PaintInvalidationCapableScrollableArea.h" |
37 #include "core/paint/PaintPhase.h" | 37 #include "core/paint/PaintPhase.h" |
38 #include "platform/RuntimeEnabledFeatures.h" | 38 #include "platform/RuntimeEnabledFeatures.h" |
39 #include "platform/Widget.h" | 39 #include "platform/Widget.h" |
40 #include "platform/geometry/IntRect.h" | 40 #include "platform/geometry/IntRect.h" |
41 #include "platform/geometry/LayoutRect.h" | 41 #include "platform/geometry/LayoutRect.h" |
42 #include "platform/graphics/Color.h" | 42 #include "platform/graphics/Color.h" |
43 #include "platform/graphics/paint/ClipPaintPropertyNode.h" | 43 #include "platform/graphics/paint/ClipPaintPropertyNode.h" |
44 #include "platform/graphics/paint/EffectPaintPropertyNode.h" | 44 #include "platform/graphics/paint/EffectPaintPropertyNode.h" |
| 45 #include "platform/graphics/paint/ScrollPaintPropertyNode.h" |
45 #include "platform/graphics/paint/TransformPaintPropertyNode.h" | 46 #include "platform/graphics/paint/TransformPaintPropertyNode.h" |
46 #include "platform/scroll/ScrollTypes.h" | 47 #include "platform/scroll/ScrollTypes.h" |
47 #include "platform/scroll/Scrollbar.h" | 48 #include "platform/scroll/Scrollbar.h" |
48 #include "public/platform/WebDisplayMode.h" | 49 #include "public/platform/WebDisplayMode.h" |
49 #include "public/platform/WebRect.h" | 50 #include "public/platform/WebRect.h" |
50 #include "wtf/Allocator.h" | 51 #include "wtf/Allocator.h" |
51 #include "wtf/AutoReset.h" | 52 #include "wtf/AutoReset.h" |
52 #include "wtf/Forward.h" | 53 #include "wtf/Forward.h" |
53 #include "wtf/HashSet.h" | 54 #include "wtf/HashSet.h" |
54 #include "wtf/ListHashSet.h" | 55 #include "wtf/ListHashSet.h" |
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 // For testing, run pending intersection observer notifications for this fra
me. | 596 // For testing, run pending intersection observer notifications for this fra
me. |
596 void notifyRenderThrottlingObserversForTesting(); | 597 void notifyRenderThrottlingObserversForTesting(); |
597 | 598 |
598 // Paint properties for SPv2 Only. | 599 // Paint properties for SPv2 Only. |
599 void setPreTranslation(PassRefPtr<TransformPaintPropertyNode> preTranslation
) { m_preTranslation = preTranslation; } | 600 void setPreTranslation(PassRefPtr<TransformPaintPropertyNode> preTranslation
) { m_preTranslation = preTranslation; } |
600 TransformPaintPropertyNode* preTranslation() const { return m_preTranslation
.get(); } | 601 TransformPaintPropertyNode* preTranslation() const { return m_preTranslation
.get(); } |
601 | 602 |
602 void setScrollTranslation(PassRefPtr<TransformPaintPropertyNode> scrollTrans
lation) { m_scrollTranslation = scrollTranslation; } | 603 void setScrollTranslation(PassRefPtr<TransformPaintPropertyNode> scrollTrans
lation) { m_scrollTranslation = scrollTranslation; } |
603 TransformPaintPropertyNode* scrollTranslation() const { return m_scrollTrans
lation.get(); } | 604 TransformPaintPropertyNode* scrollTranslation() const { return m_scrollTrans
lation.get(); } |
604 | 605 |
| 606 void setScroll(PassRefPtr<ScrollPaintPropertyNode> scroll) { m_scroll = scro
ll; } |
| 607 ScrollPaintPropertyNode* scroll() const { return m_scroll.get(); } |
| 608 |
605 void setContentClip(PassRefPtr<ClipPaintPropertyNode> contentClip) { m_conte
ntClip = contentClip; } | 609 void setContentClip(PassRefPtr<ClipPaintPropertyNode> contentClip) { m_conte
ntClip = contentClip; } |
606 ClipPaintPropertyNode* contentClip() const { return m_contentClip.get(); } | 610 ClipPaintPropertyNode* contentClip() const { return m_contentClip.get(); } |
607 | 611 |
608 void setRootTransform(PassRefPtr<TransformPaintPropertyNode> rootTransform)
{ m_rootTransform = rootTransform; } | 612 void setRootTransform(PassRefPtr<TransformPaintPropertyNode> rootTransform)
{ m_rootTransform = rootTransform; } |
609 TransformPaintPropertyNode* rootTransform() const { return m_rootTransform.g
et(); } | 613 TransformPaintPropertyNode* rootTransform() const { return m_rootTransform.g
et(); } |
610 | 614 |
611 void setRootClip(PassRefPtr<ClipPaintPropertyNode> rootClip) { m_rootClip =
rootClip; } | 615 void setRootClip(PassRefPtr<ClipPaintPropertyNode> rootClip) { m_rootClip =
rootClip; } |
612 ClipPaintPropertyNode* rootClip() const { return m_rootClip.get(); } | 616 ClipPaintPropertyNode* rootClip() const { return m_rootClip.get(); } |
613 | 617 |
614 void setRootEffect(PassRefPtr<EffectPaintPropertyNode> rootEffect) { m_rootE
ffect = rootEffect; } | 618 void setRootEffect(PassRefPtr<EffectPaintPropertyNode> rootEffect) { m_rootE
ffect = rootEffect; } |
615 EffectPaintPropertyNode* rootEffect() const { return m_rootEffect.get(); } | 619 EffectPaintPropertyNode* rootEffect() const { return m_rootEffect.get(); } |
616 | 620 |
| 621 void setRootScroll(PassRefPtr<ScrollPaintPropertyNode> rootScroll) { m_rootS
croll = rootScroll; } |
| 622 ScrollPaintPropertyNode* rootScroll() const { return m_rootScroll.get(); } |
| 623 |
617 // TODO(ojan): Merge this with IntersectionObserver once it lands. | 624 // TODO(ojan): Merge this with IntersectionObserver once it lands. |
618 IntRect computeVisibleArea(); | 625 IntRect computeVisibleArea(); |
619 | 626 |
620 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). | 627 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). |
621 FloatSize viewportSizeForViewportUnits() const; | 628 FloatSize viewportSizeForViewportUnits() const; |
622 | 629 |
623 ScrollAnchor& scrollAnchor() { return m_scrollAnchor; } | 630 ScrollAnchor& scrollAnchor() { return m_scrollAnchor; } |
624 void clearScrollAnchor(); | 631 void clearScrollAnchor(); |
625 bool shouldPerformScrollAnchoring() const override; | 632 bool shouldPerformScrollAnchoring() const override; |
626 | 633 |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
913 bool m_crossOriginForThrottling; | 920 bool m_crossOriginForThrottling; |
914 bool m_subtreeThrottled; | 921 bool m_subtreeThrottled; |
915 | 922 |
916 // Paint properties for SPv2 Only. | 923 // Paint properties for SPv2 Only. |
917 // The hierarchy of transform subtree created by a FrameView. | 924 // The hierarchy of transform subtree created by a FrameView. |
918 // [ preTranslation ] The offset from Widget::frameRect. Estab
lishes viewport. | 925 // [ preTranslation ] The offset from Widget::frameRect. Estab
lishes viewport. |
919 // +---[ scrollTranslation ] Frame scrolling. | 926 // +---[ scrollTranslation ] Frame scrolling. |
920 // TODO(trchen): These will not be needed once settings->rootLayerScrolls()
is enabled. | 927 // TODO(trchen): These will not be needed once settings->rootLayerScrolls()
is enabled. |
921 RefPtr<TransformPaintPropertyNode> m_preTranslation; | 928 RefPtr<TransformPaintPropertyNode> m_preTranslation; |
922 RefPtr<TransformPaintPropertyNode> m_scrollTranslation; | 929 RefPtr<TransformPaintPropertyNode> m_scrollTranslation; |
| 930 RefPtr<ScrollPaintPropertyNode> m_scroll; |
923 // The content clip clips the document (= LayoutView) but not the scrollbars
. | 931 // The content clip clips the document (= LayoutView) but not the scrollbars
. |
924 // TODO(trchen): This will not be needed once settings->rootLayerScrolls() i
s enabled. | 932 // TODO(trchen): This will not be needed once settings->rootLayerScrolls() i
s enabled. |
925 RefPtr<ClipPaintPropertyNode> m_contentClip; | 933 RefPtr<ClipPaintPropertyNode> m_contentClip; |
926 | 934 |
927 // These nodes represent the root nodes of each property tree. | 935 // These nodes represent the root nodes of each property tree. |
928 // Only the root frame should create them and they will be no-op. | 936 // Only the root frame should create them and they will be no-op. |
929 RefPtr<TransformPaintPropertyNode> m_rootTransform; | 937 RefPtr<TransformPaintPropertyNode> m_rootTransform; |
930 RefPtr<ClipPaintPropertyNode> m_rootClip; | 938 RefPtr<ClipPaintPropertyNode> m_rootClip; |
931 RefPtr<EffectPaintPropertyNode> m_rootEffect; | 939 RefPtr<EffectPaintPropertyNode> m_rootEffect; |
| 940 RefPtr<ScrollPaintPropertyNode> m_rootScroll; |
932 | 941 |
933 // This is set on the local root frame view only. | 942 // This is set on the local root frame view only. |
934 DocumentLifecycle::LifecycleState m_currentUpdateLifecyclePhasesTargetState; | 943 DocumentLifecycle::LifecycleState m_currentUpdateLifecyclePhasesTargetState; |
935 | 944 |
936 ScrollAnchor m_scrollAnchor; | 945 ScrollAnchor m_scrollAnchor; |
937 | 946 |
938 bool m_needsScrollbarsUpdate; | 947 bool m_needsScrollbarsUpdate; |
939 bool m_suppressAdjustViewSize; | 948 bool m_suppressAdjustViewSize; |
940 bool m_allowsLayoutInvalidationAfterLayoutClean; | 949 bool m_allowsLayoutInvalidationAfterLayoutClean; |
941 | 950 |
(...skipping 27 matching lines...) Expand all Loading... |
969 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) | 978 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
970 setIsVisuallyNonEmpty(); | 979 setIsVisuallyNonEmpty(); |
971 } | 980 } |
972 | 981 |
973 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); | 982 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); |
974 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); | 983 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); |
975 | 984 |
976 } // namespace blink | 985 } // namespace blink |
977 | 986 |
978 #endif // FrameView_h | 987 #endif // FrameView_h |
OLD | NEW |