Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(641)

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.h

Issue 2320463002: [SPV2] Implement the blink-side scroll property tree (Closed)
Patch Set: Prevent circular reference caught by lsan Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/BlockPainter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 // For testing, run pending intersection observer notifications for this fra me. 594 // For testing, run pending intersection observer notifications for this fra me.
594 void notifyRenderThrottlingObserversForTesting(); 595 void notifyRenderThrottlingObserversForTesting();
595 596
596 // Paint properties for SPv2 Only. 597 // Paint properties for SPv2 Only.
597 void setPreTranslation(PassRefPtr<TransformPaintPropertyNode> preTranslation ) { m_preTranslation = preTranslation; } 598 void setPreTranslation(PassRefPtr<TransformPaintPropertyNode> preTranslation ) { m_preTranslation = preTranslation; }
598 TransformPaintPropertyNode* preTranslation() const { return m_preTranslation .get(); } 599 TransformPaintPropertyNode* preTranslation() const { return m_preTranslation .get(); }
599 600
600 void setScrollTranslation(PassRefPtr<TransformPaintPropertyNode> scrollTrans lation) { m_scrollTranslation = scrollTranslation; } 601 void setScrollTranslation(PassRefPtr<TransformPaintPropertyNode> scrollTrans lation) { m_scrollTranslation = scrollTranslation; }
601 TransformPaintPropertyNode* scrollTranslation() const { return m_scrollTrans lation.get(); } 602 TransformPaintPropertyNode* scrollTranslation() const { return m_scrollTrans lation.get(); }
602 603
604 void setScroll(PassRefPtr<ScrollPaintPropertyNode> scroll) { m_scroll = scro ll; }
605 ScrollPaintPropertyNode* scroll() const { return m_scroll.get(); }
606
603 void setContentClip(PassRefPtr<ClipPaintPropertyNode> contentClip) { m_conte ntClip = contentClip; } 607 void setContentClip(PassRefPtr<ClipPaintPropertyNode> contentClip) { m_conte ntClip = contentClip; }
604 ClipPaintPropertyNode* contentClip() const { return m_contentClip.get(); } 608 ClipPaintPropertyNode* contentClip() const { return m_contentClip.get(); }
605 609
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
606 void setRootTransform(PassRefPtr<TransformPaintPropertyNode> rootTransform) { m_rootTransform = rootTransform; } 612 void setRootTransform(PassRefPtr<TransformPaintPropertyNode> rootTransform) { m_rootTransform = rootTransform; }
607 TransformPaintPropertyNode* rootTransform() const { return m_rootTransform.g et(); } 613 TransformPaintPropertyNode* rootTransform() const { return m_rootTransform.g et(); }
608
609 void setRootClip(PassRefPtr<ClipPaintPropertyNode> rootClip) { m_rootClip = rootClip; } 614 void setRootClip(PassRefPtr<ClipPaintPropertyNode> rootClip) { m_rootClip = rootClip; }
610 ClipPaintPropertyNode* rootClip() const { return m_rootClip.get(); } 615 ClipPaintPropertyNode* rootClip() const { return m_rootClip.get(); }
611
612 void setRootEffect(PassRefPtr<EffectPaintPropertyNode> rootEffect) { m_rootE ffect = rootEffect; } 616 void setRootEffect(PassRefPtr<EffectPaintPropertyNode> rootEffect) { m_rootE ffect = rootEffect; }
613 EffectPaintPropertyNode* rootEffect() const { return m_rootEffect.get(); } 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(); }
614 620
615 // TODO(ojan): Merge this with IntersectionObserver once it lands. 621 // TODO(ojan): Merge this with IntersectionObserver once it lands.
616 IntRect computeVisibleArea(); 622 IntRect computeVisibleArea();
617 623
618 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw'). 624 // Viewport size that should be used for viewport units (i.e. 'vh'/'vw').
619 FloatSize viewportSizeForViewportUnits() const; 625 FloatSize viewportSizeForViewportUnits() const;
620 626
621 ScrollAnchor& scrollAnchor() { return m_scrollAnchor; } 627 ScrollAnchor& scrollAnchor() { return m_scrollAnchor; }
622 void clearScrollAnchor(); 628 void clearScrollAnchor();
623 bool shouldPerformScrollAnchoring() const override; 629 bool shouldPerformScrollAnchoring() const override;
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 bool m_crossOriginForThrottling; 917 bool m_crossOriginForThrottling;
912 bool m_subtreeThrottled; 918 bool m_subtreeThrottled;
913 919
914 // Paint properties for SPv2 Only. 920 // Paint properties for SPv2 Only.
915 // The hierarchy of transform subtree created by a FrameView. 921 // The hierarchy of transform subtree created by a FrameView.
916 // [ preTranslation ] The offset from Widget::frameRect. Estab lishes viewport. 922 // [ preTranslation ] The offset from Widget::frameRect. Estab lishes viewport.
917 // +---[ scrollTranslation ] Frame scrolling. 923 // +---[ scrollTranslation ] Frame scrolling.
918 // TODO(trchen): These will not be needed once settings->rootLayerScrolls() is enabled. 924 // TODO(trchen): These will not be needed once settings->rootLayerScrolls() is enabled.
919 RefPtr<TransformPaintPropertyNode> m_preTranslation; 925 RefPtr<TransformPaintPropertyNode> m_preTranslation;
920 RefPtr<TransformPaintPropertyNode> m_scrollTranslation; 926 RefPtr<TransformPaintPropertyNode> m_scrollTranslation;
927 RefPtr<ScrollPaintPropertyNode> m_scroll;
921 // The content clip clips the document (= LayoutView) but not the scrollbars . 928 // The content clip clips the document (= LayoutView) but not the scrollbars .
922 // TODO(trchen): This will not be needed once settings->rootLayerScrolls() i s enabled. 929 // TODO(trchen): This will not be needed once settings->rootLayerScrolls() i s enabled.
923 RefPtr<ClipPaintPropertyNode> m_contentClip; 930 RefPtr<ClipPaintPropertyNode> m_contentClip;
924 931
925 // These nodes represent the root nodes of each property tree. 932 // These nodes represent the root nodes of each property tree.
926 // Only the root frame should create them and they will be no-op. 933 // Only the root frame should create them and they will be no-op.
927 RefPtr<TransformPaintPropertyNode> m_rootTransform; 934 RefPtr<TransformPaintPropertyNode> m_rootTransform;
928 RefPtr<ClipPaintPropertyNode> m_rootClip; 935 RefPtr<ClipPaintPropertyNode> m_rootClip;
929 RefPtr<EffectPaintPropertyNode> m_rootEffect; 936 RefPtr<EffectPaintPropertyNode> m_rootEffect;
937 RefPtr<ScrollPaintPropertyNode> m_rootScroll;
930 938
931 // This is set on the local root frame view only. 939 // This is set on the local root frame view only.
932 DocumentLifecycle::LifecycleState m_currentUpdateLifecyclePhasesTargetState; 940 DocumentLifecycle::LifecycleState m_currentUpdateLifecyclePhasesTargetState;
933 941
934 ScrollAnchor m_scrollAnchor; 942 ScrollAnchor m_scrollAnchor;
935 943
936 bool m_needsScrollbarsUpdate; 944 bool m_needsScrollbarsUpdate;
937 bool m_suppressAdjustViewSize; 945 bool m_suppressAdjustViewSize;
938 bool m_allowsLayoutInvalidationAfterLayoutClean; 946 bool m_allowsLayoutInvalidationAfterLayoutClean;
939 947
(...skipping 27 matching lines...) Expand all
967 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 975 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
968 setIsVisuallyNonEmpty(); 976 setIsVisuallyNonEmpty();
969 } 977 }
970 978
971 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 979 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
972 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView()); 980 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView());
973 981
974 } // namespace blink 982 } // namespace blink
975 983
976 #endif // FrameView_h 984 #endif // FrameView_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/BlockPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698