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

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

Issue 1870663002: Reland main thread position sticky implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Only descend into children which have an ancestor overflow layer. Created 4 years, 8 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
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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 WebDisplayMode displayMode() { return m_displayMode; } 194 WebDisplayMode displayMode() { return m_displayMode; }
195 void setDisplayMode(WebDisplayMode); 195 void setDisplayMode(WebDisplayMode);
196 196
197 // Fixed-position objects. 197 // Fixed-position objects.
198 typedef HashSet<LayoutObject*> ViewportConstrainedObjectSet; 198 typedef HashSet<LayoutObject*> ViewportConstrainedObjectSet;
199 void addViewportConstrainedObject(LayoutObject*); 199 void addViewportConstrainedObject(LayoutObject*);
200 void removeViewportConstrainedObject(LayoutObject*); 200 void removeViewportConstrainedObject(LayoutObject*);
201 const ViewportConstrainedObjectSet* viewportConstrainedObjects() const { ret urn m_viewportConstrainedObjects.get(); } 201 const ViewportConstrainedObjectSet* viewportConstrainedObjects() const { ret urn m_viewportConstrainedObjects.get(); }
202 bool hasViewportConstrainedObjects() const { return m_viewportConstrainedObj ects && m_viewportConstrainedObjects->size() > 0; } 202 bool hasViewportConstrainedObjects() const { return m_viewportConstrainedObj ects && m_viewportConstrainedObjects->size() > 0; }
203 203
204 // Sticky objects.
205 void addStickyPositionObject() { ++m_stickyPositionObjectCount; }
206 void removeStickyPositionObject() { --m_stickyPositionObjectCount; }
207 bool hasStickyPositionObjects() const { return m_stickyPositionObjectCount; }
208
204 // Objects with background-attachment:fixed. 209 // Objects with background-attachment:fixed.
205 void addBackgroundAttachmentFixedObject(LayoutObject*); 210 void addBackgroundAttachmentFixedObject(LayoutObject*);
206 void removeBackgroundAttachmentFixedObject(LayoutObject*); 211 void removeBackgroundAttachmentFixedObject(LayoutObject*);
207 bool hasBackgroundAttachmentFixedObjects() const { return m_backgroundAttach mentFixedObjects.size(); } 212 bool hasBackgroundAttachmentFixedObjects() const { return m_backgroundAttach mentFixedObjects.size(); }
208 void invalidateBackgroundAttachmentFixedObjects(); 213 void invalidateBackgroundAttachmentFixedObjects();
209 214
210 void handleLoadCompleted(); 215 void handleLoadCompleted();
211 216
212 void updateDocumentAnnotatedRegions() const; 217 void updateDocumentAnnotatedRegions() const;
213 218
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 822
818 Member<Node> m_fragmentAnchor; 823 Member<Node> m_fragmentAnchor;
819 824
820 // layoutObject to hold our custom scroll corner. 825 // layoutObject to hold our custom scroll corner.
821 LayoutScrollbarPart* m_scrollCorner; 826 LayoutScrollbarPart* m_scrollCorner;
822 827
823 Member<ScrollableAreaSet> m_scrollableAreas; 828 Member<ScrollableAreaSet> m_scrollableAreas;
824 Member<ScrollableAreaSet> m_animatingScrollableAreas; 829 Member<ScrollableAreaSet> m_animatingScrollableAreas;
825 OwnPtr<ResizerAreaSet> m_resizerAreas; 830 OwnPtr<ResizerAreaSet> m_resizerAreas;
826 OwnPtr<ViewportConstrainedObjectSet> m_viewportConstrainedObjects; 831 OwnPtr<ViewportConstrainedObjectSet> m_viewportConstrainedObjects;
832 unsigned m_stickyPositionObjectCount;
827 ViewportConstrainedObjectSet m_backgroundAttachmentFixedObjects; 833 ViewportConstrainedObjectSet m_backgroundAttachmentFixedObjects;
828 Member<FrameViewAutoSizeInfo> m_autoSizeInfo; 834 Member<FrameViewAutoSizeInfo> m_autoSizeInfo;
829 835
830 IntSize m_inputEventsOffsetForEmulation; 836 IntSize m_inputEventsOffsetForEmulation;
831 float m_inputEventsScaleFactorForEmulation; 837 float m_inputEventsScaleFactorForEmulation;
832 838
833 IntSize m_layoutSize; 839 IntSize m_layoutSize;
834 bool m_layoutSizeFixedToFrameSize; 840 bool m_layoutSizeFixedToFrameSize;
835 841
836 Timer<FrameView> m_didScrollTimer; 842 Timer<FrameView> m_didScrollTimer;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 934 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
929 setIsVisuallyNonEmpty(); 935 setIsVisuallyNonEmpty();
930 } 936 }
931 937
932 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 938 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
933 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView()); 939 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView());
934 940
935 } // namespace blink 941 } // namespace blink
936 942
937 #endif // FrameView_h 943 #endif // FrameView_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp ('k') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698