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 22 matching lines...) Expand all Loading... |
33 #include "core/layout/ScrollAnchor.h" | 33 #include "core/layout/ScrollAnchor.h" |
34 #include "core/layout/api/LayoutViewItem.h" | 34 #include "core/layout/api/LayoutViewItem.h" |
35 #include "core/paint/PaintInvalidationCapableScrollableArea.h" | 35 #include "core/paint/PaintInvalidationCapableScrollableArea.h" |
36 #include "core/paint/PaintPhase.h" | 36 #include "core/paint/PaintPhase.h" |
37 #include "platform/RuntimeEnabledFeatures.h" | 37 #include "platform/RuntimeEnabledFeatures.h" |
38 #include "platform/Widget.h" | 38 #include "platform/Widget.h" |
39 #include "platform/geometry/IntRect.h" | 39 #include "platform/geometry/IntRect.h" |
40 #include "platform/geometry/LayoutRect.h" | 40 #include "platform/geometry/LayoutRect.h" |
41 #include "platform/graphics/Color.h" | 41 #include "platform/graphics/Color.h" |
42 #include "platform/graphics/paint/ClipPaintPropertyNode.h" | 42 #include "platform/graphics/paint/ClipPaintPropertyNode.h" |
| 43 #include "platform/graphics/paint/EffectPaintPropertyNode.h" |
43 #include "platform/graphics/paint/TransformPaintPropertyNode.h" | 44 #include "platform/graphics/paint/TransformPaintPropertyNode.h" |
44 #include "platform/scroll/ScrollTypes.h" | 45 #include "platform/scroll/ScrollTypes.h" |
45 #include "platform/scroll/Scrollbar.h" | 46 #include "platform/scroll/Scrollbar.h" |
46 #include "public/platform/WebDisplayMode.h" | 47 #include "public/platform/WebDisplayMode.h" |
47 #include "public/platform/WebRect.h" | 48 #include "public/platform/WebRect.h" |
48 #include "wtf/Allocator.h" | 49 #include "wtf/Allocator.h" |
49 #include "wtf/Forward.h" | 50 #include "wtf/Forward.h" |
50 #include "wtf/HashSet.h" | 51 #include "wtf/HashSet.h" |
51 #include "wtf/ListHashSet.h" | 52 #include "wtf/ListHashSet.h" |
52 #include "wtf/TemporaryChange.h" | 53 #include "wtf/TemporaryChange.h" |
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 // Paint properties for SPv2 Only. | 594 // Paint properties for SPv2 Only. |
594 void setPreTranslation(PassRefPtr<TransformPaintPropertyNode> preTranslation
) { m_preTranslation = preTranslation; } | 595 void setPreTranslation(PassRefPtr<TransformPaintPropertyNode> preTranslation
) { m_preTranslation = preTranslation; } |
595 TransformPaintPropertyNode* preTranslation() const { return m_preTranslation
.get(); } | 596 TransformPaintPropertyNode* preTranslation() const { return m_preTranslation
.get(); } |
596 | 597 |
597 void setScrollTranslation(PassRefPtr<TransformPaintPropertyNode> scrollTrans
lation) { m_scrollTranslation = scrollTranslation; } | 598 void setScrollTranslation(PassRefPtr<TransformPaintPropertyNode> scrollTrans
lation) { m_scrollTranslation = scrollTranslation; } |
598 TransformPaintPropertyNode* scrollTranslation() const { return m_scrollTrans
lation.get(); } | 599 TransformPaintPropertyNode* scrollTranslation() const { return m_scrollTrans
lation.get(); } |
599 | 600 |
600 void setContentClip(PassRefPtr<ClipPaintPropertyNode> contentClip) { m_conte
ntClip = contentClip; } | 601 void setContentClip(PassRefPtr<ClipPaintPropertyNode> contentClip) { m_conte
ntClip = contentClip; } |
601 ClipPaintPropertyNode* contentClip() const { return m_contentClip.get(); } | 602 ClipPaintPropertyNode* contentClip() const { return m_contentClip.get(); } |
602 | 603 |
| 604 void setRootTransform(PassRefPtr<TransformPaintPropertyNode> rootTransform)
{ m_rootTransform = rootTransform; } |
| 605 TransformPaintPropertyNode* rootTransform() const { return m_rootTransform.g
et(); } |
| 606 |
| 607 void setRootClip(PassRefPtr<ClipPaintPropertyNode> rootClip) { m_rootClip =
rootClip; } |
| 608 ClipPaintPropertyNode* rootClip() const { return m_rootClip.get(); } |
| 609 |
| 610 void setRootEffect(PassRefPtr<EffectPaintPropertyNode> rootEffect) { m_rootE
ffect = rootEffect; } |
| 611 EffectPaintPropertyNode* rootEffect() const { return m_rootEffect.get(); } |
| 612 |
603 // TODO(ojan): Merge this with IntersectionObserver once it lands. | 613 // TODO(ojan): Merge this with IntersectionObserver once it lands. |
604 IntRect computeVisibleArea(); | 614 IntRect computeVisibleArea(); |
605 | 615 |
606 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). | 616 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). |
607 FloatSize viewportSizeForViewportUnits() const; | 617 FloatSize viewportSizeForViewportUnits() const; |
608 | 618 |
609 ScrollAnchor& scrollAnchor() { return m_scrollAnchor; } | 619 ScrollAnchor& scrollAnchor() { return m_scrollAnchor; } |
610 void clearScrollAnchor(); | 620 void clearScrollAnchor(); |
611 | 621 |
612 // For PaintInvalidator temporarily. TODO(wangxianzhu): Move into PaintInval
idator. | 622 // For PaintInvalidator temporarily. TODO(wangxianzhu): Move into PaintInval
idator. |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
903 // The hierarchy of transform subtree created by a FrameView. | 913 // The hierarchy of transform subtree created by a FrameView. |
904 // [ preTranslation ] The offset from Widget::frameRect. Estab
lishes viewport. | 914 // [ preTranslation ] The offset from Widget::frameRect. Estab
lishes viewport. |
905 // +---[ scrollTranslation ] Frame scrolling. | 915 // +---[ scrollTranslation ] Frame scrolling. |
906 // TODO(trchen): These will not be needed once settings->rootLayerScrolls()
is enabled. | 916 // TODO(trchen): These will not be needed once settings->rootLayerScrolls()
is enabled. |
907 RefPtr<TransformPaintPropertyNode> m_preTranslation; | 917 RefPtr<TransformPaintPropertyNode> m_preTranslation; |
908 RefPtr<TransformPaintPropertyNode> m_scrollTranslation; | 918 RefPtr<TransformPaintPropertyNode> m_scrollTranslation; |
909 // The content clip clips the document (= LayoutView) but not the scrollbars
. | 919 // The content clip clips the document (= LayoutView) but not the scrollbars
. |
910 // TODO(trchen): This will not be needed once settings->rootLayerScrolls() i
s enabled. | 920 // TODO(trchen): This will not be needed once settings->rootLayerScrolls() i
s enabled. |
911 RefPtr<ClipPaintPropertyNode> m_contentClip; | 921 RefPtr<ClipPaintPropertyNode> m_contentClip; |
912 | 922 |
| 923 // These nodes represent the root nodes of each property tree. |
| 924 // Only the root frame should create them and they will be no-op. |
| 925 RefPtr<TransformPaintPropertyNode> m_rootTransform; |
| 926 RefPtr<ClipPaintPropertyNode> m_rootClip; |
| 927 RefPtr<EffectPaintPropertyNode> m_rootEffect; |
| 928 |
913 // This is set on the local root frame view only. | 929 // This is set on the local root frame view only. |
914 DocumentLifecycle::LifecycleState m_currentUpdateLifecyclePhasesTargetState; | 930 DocumentLifecycle::LifecycleState m_currentUpdateLifecyclePhasesTargetState; |
915 | 931 |
916 ScrollAnchor m_scrollAnchor; | 932 ScrollAnchor m_scrollAnchor; |
917 | 933 |
918 bool m_needsScrollbarsUpdate; | 934 bool m_needsScrollbarsUpdate; |
919 bool m_suppressAdjustViewSize; | 935 bool m_suppressAdjustViewSize; |
920 bool m_allowsLayoutInvalidationAfterLayoutClean; | 936 bool m_allowsLayoutInvalidationAfterLayoutClean; |
921 | 937 |
922 // For testing. | 938 // For testing. |
(...skipping 26 matching lines...) Expand all Loading... |
949 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) | 965 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
950 setIsVisuallyNonEmpty(); | 966 setIsVisuallyNonEmpty(); |
951 } | 967 } |
952 | 968 |
953 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); | 969 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); |
954 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); | 970 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); |
955 | 971 |
956 } // namespace blink | 972 } // namespace blink |
957 | 973 |
958 #endif // FrameView_h | 974 #endif // FrameView_h |
OLD | NEW |