| 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 23 matching lines...) Expand all Loading... |
| 34 #include "core/layout/ScrollAnchor.h" | 34 #include "core/layout/ScrollAnchor.h" |
| 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" | |
| 45 #include "platform/graphics/paint/ScrollPaintPropertyNode.h" | 44 #include "platform/graphics/paint/ScrollPaintPropertyNode.h" |
| 46 #include "platform/graphics/paint/TransformPaintPropertyNode.h" | 45 #include "platform/graphics/paint/TransformPaintPropertyNode.h" |
| 47 #include "platform/scroll/ScrollTypes.h" | 46 #include "platform/scroll/ScrollTypes.h" |
| 48 #include "platform/scroll/Scrollbar.h" | 47 #include "platform/scroll/Scrollbar.h" |
| 49 #include "public/platform/WebDisplayMode.h" | 48 #include "public/platform/WebDisplayMode.h" |
| 50 #include "public/platform/WebRect.h" | 49 #include "public/platform/WebRect.h" |
| 51 #include "wtf/Allocator.h" | 50 #include "wtf/Allocator.h" |
| 52 #include "wtf/AutoReset.h" | 51 #include "wtf/AutoReset.h" |
| 53 #include "wtf/Forward.h" | 52 #include "wtf/Forward.h" |
| 54 #include "wtf/HashSet.h" | 53 #include "wtf/HashSet.h" |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 | 599 |
| 601 void setScrollTranslation(PassRefPtr<TransformPaintPropertyNode> scrollTrans
lation) { m_scrollTranslation = scrollTranslation; } | 600 void setScrollTranslation(PassRefPtr<TransformPaintPropertyNode> scrollTrans
lation) { m_scrollTranslation = scrollTranslation; } |
| 602 TransformPaintPropertyNode* scrollTranslation() const { return m_scrollTrans
lation.get(); } | 601 TransformPaintPropertyNode* scrollTranslation() const { return m_scrollTrans
lation.get(); } |
| 603 | 602 |
| 604 void setScroll(PassRefPtr<ScrollPaintPropertyNode> scroll) { m_scroll = scro
ll; } | 603 void setScroll(PassRefPtr<ScrollPaintPropertyNode> scroll) { m_scroll = scro
ll; } |
| 605 ScrollPaintPropertyNode* scroll() const { return m_scroll.get(); } | 604 ScrollPaintPropertyNode* scroll() const { return m_scroll.get(); } |
| 606 | 605 |
| 607 void setContentClip(PassRefPtr<ClipPaintPropertyNode> contentClip) { m_conte
ntClip = contentClip; } | 606 void setContentClip(PassRefPtr<ClipPaintPropertyNode> contentClip) { m_conte
ntClip = contentClip; } |
| 608 ClipPaintPropertyNode* contentClip() const { return m_contentClip.get(); } | 607 ClipPaintPropertyNode* contentClip() const { return m_contentClip.get(); } |
| 609 | 608 |
| 610 // We store no-op paint property tree nodes at the root of the tree. | |
| 611 // TODO(pdr): Remove this concept in favor of null nodes, see: crbug.com/645
615 | |
| 612 void setRootTransform(PassRefPtr<TransformPaintPropertyNode> rootTransform)
{ m_rootTransform = rootTransform; } | |
| 613 TransformPaintPropertyNode* rootTransform() const { return m_rootTransform.g
et(); } | |
| 614 void setRootClip(PassRefPtr<ClipPaintPropertyNode> rootClip) { m_rootClip =
rootClip; } | |
| 615 ClipPaintPropertyNode* rootClip() const { return m_rootClip.get(); } | |
| 616 void setRootEffect(PassRefPtr<EffectPaintPropertyNode> rootEffect) { m_rootE
ffect = rootEffect; } | |
| 617 EffectPaintPropertyNode* rootEffect() const { return m_rootEffect.get(); } | |
| 618 void setRootScroll(PassRefPtr<ScrollPaintPropertyNode> rootScroll) { m_rootS
croll = rootScroll; } | |
| 619 ScrollPaintPropertyNode* rootScroll() const { return m_rootScroll.get(); } | |
| 620 | |
| 621 // TODO(ojan): Merge this with IntersectionObserver once it lands. | 609 // TODO(ojan): Merge this with IntersectionObserver once it lands. |
| 622 IntRect computeVisibleArea(); | 610 IntRect computeVisibleArea(); |
| 623 | 611 |
| 624 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). | 612 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). |
| 625 FloatSize viewportSizeForViewportUnits() const; | 613 FloatSize viewportSizeForViewportUnits() const; |
| 626 | 614 |
| 627 ScrollAnchor& scrollAnchor() { return m_scrollAnchor; } | 615 ScrollAnchor& scrollAnchor() { return m_scrollAnchor; } |
| 628 void clearScrollAnchor(); | 616 void clearScrollAnchor(); |
| 629 bool shouldPerformScrollAnchoring() const override; | 617 bool shouldPerformScrollAnchoring() const override; |
| 630 | 618 |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 // [ preTranslation ] The offset from Widget::frameRect. Estab
lishes viewport. | 910 // [ preTranslation ] The offset from Widget::frameRect. Estab
lishes viewport. |
| 923 // +---[ scrollTranslation ] Frame scrolling. | 911 // +---[ scrollTranslation ] Frame scrolling. |
| 924 // TODO(trchen): These will not be needed once settings->rootLayerScrolls()
is enabled. | 912 // TODO(trchen): These will not be needed once settings->rootLayerScrolls()
is enabled. |
| 925 RefPtr<TransformPaintPropertyNode> m_preTranslation; | 913 RefPtr<TransformPaintPropertyNode> m_preTranslation; |
| 926 RefPtr<TransformPaintPropertyNode> m_scrollTranslation; | 914 RefPtr<TransformPaintPropertyNode> m_scrollTranslation; |
| 927 RefPtr<ScrollPaintPropertyNode> m_scroll; | 915 RefPtr<ScrollPaintPropertyNode> m_scroll; |
| 928 // The content clip clips the document (= LayoutView) but not the scrollbars
. | 916 // The content clip clips the document (= LayoutView) but not the scrollbars
. |
| 929 // TODO(trchen): This will not be needed once settings->rootLayerScrolls() i
s enabled. | 917 // TODO(trchen): This will not be needed once settings->rootLayerScrolls() i
s enabled. |
| 930 RefPtr<ClipPaintPropertyNode> m_contentClip; | 918 RefPtr<ClipPaintPropertyNode> m_contentClip; |
| 931 | 919 |
| 932 // These nodes represent the root nodes of each property tree. | |
| 933 // Only the root frame should create them and they will be no-op. | |
| 934 RefPtr<TransformPaintPropertyNode> m_rootTransform; | |
| 935 RefPtr<ClipPaintPropertyNode> m_rootClip; | |
| 936 RefPtr<EffectPaintPropertyNode> m_rootEffect; | |
| 937 RefPtr<ScrollPaintPropertyNode> m_rootScroll; | |
| 938 | |
| 939 // This is set on the local root frame view only. | 920 // This is set on the local root frame view only. |
| 940 DocumentLifecycle::LifecycleState m_currentUpdateLifecyclePhasesTargetState; | 921 DocumentLifecycle::LifecycleState m_currentUpdateLifecyclePhasesTargetState; |
| 941 | 922 |
| 942 ScrollAnchor m_scrollAnchor; | 923 ScrollAnchor m_scrollAnchor; |
| 943 | 924 |
| 944 bool m_needsScrollbarsUpdate; | 925 bool m_needsScrollbarsUpdate; |
| 945 bool m_suppressAdjustViewSize; | 926 bool m_suppressAdjustViewSize; |
| 946 bool m_allowsLayoutInvalidationAfterLayoutClean; | 927 bool m_allowsLayoutInvalidationAfterLayoutClean; |
| 947 | 928 |
| 948 // For testing. | 929 // For testing. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 975 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) | 956 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
| 976 setIsVisuallyNonEmpty(); | 957 setIsVisuallyNonEmpty(); |
| 977 } | 958 } |
| 978 | 959 |
| 979 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); | 960 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); |
| 980 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); | 961 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF
rameView(), scrollableArea.isFrameView()); |
| 981 | 962 |
| 982 } // namespace blink | 963 } // namespace blink |
| 983 | 964 |
| 984 #endif // FrameView_h | 965 #endif // FrameView_h |
| OLD | NEW |