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

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

Issue 1308273010: Adapt and reland old position sticky implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Store ancestor overflow layer on PaintLayer to compute before other dependent compositing inputs. Created 4 years, 9 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 WebDisplayMode displayMode() { return m_displayMode; } 192 WebDisplayMode displayMode() { return m_displayMode; }
193 void setDisplayMode(WebDisplayMode); 193 void setDisplayMode(WebDisplayMode);
194 194
195 // Fixed-position objects. 195 // Fixed-position objects.
196 typedef HashSet<LayoutObject*> ViewportConstrainedObjectSet; 196 typedef HashSet<LayoutObject*> ViewportConstrainedObjectSet;
197 void addViewportConstrainedObject(LayoutObject*); 197 void addViewportConstrainedObject(LayoutObject*);
198 void removeViewportConstrainedObject(LayoutObject*); 198 void removeViewportConstrainedObject(LayoutObject*);
199 const ViewportConstrainedObjectSet* viewportConstrainedObjects() const { ret urn m_viewportConstrainedObjects.get(); } 199 const ViewportConstrainedObjectSet* viewportConstrainedObjects() const { ret urn m_viewportConstrainedObjects.get(); }
200 bool hasViewportConstrainedObjects() const { return m_viewportConstrainedObj ects && m_viewportConstrainedObjects->size() > 0; } 200 bool hasViewportConstrainedObjects() const { return m_viewportConstrainedObj ects && m_viewportConstrainedObjects->size() > 0; }
201 201
202 // Sticky objects.
203 void addStickyPositionObject() { ++m_stickyPositionObjectCount; }
204 void removeStickyPositionObject() { --m_stickyPositionObjectCount; }
205 bool hasStickyPositionObjects() const { return m_stickyPositionObjectCount; }
206
202 // Objects with background-attachment:fixed. 207 // Objects with background-attachment:fixed.
203 void addBackgroundAttachmentFixedObject(LayoutObject*); 208 void addBackgroundAttachmentFixedObject(LayoutObject*);
204 void removeBackgroundAttachmentFixedObject(LayoutObject*); 209 void removeBackgroundAttachmentFixedObject(LayoutObject*);
205 bool hasBackgroundAttachmentFixedObjects() const { return m_backgroundAttach mentFixedObjects.size(); } 210 bool hasBackgroundAttachmentFixedObjects() const { return m_backgroundAttach mentFixedObjects.size(); }
206 void invalidateBackgroundAttachmentFixedObjects(); 211 void invalidateBackgroundAttachmentFixedObjects();
207 212
208 void handleLoadCompleted(); 213 void handleLoadCompleted();
209 214
210 void updateDocumentAnnotatedRegions() const; 215 void updateDocumentAnnotatedRegions() const;
211 216
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 824
820 RefPtrWillBeMember<Node> m_fragmentAnchor; 825 RefPtrWillBeMember<Node> m_fragmentAnchor;
821 826
822 // layoutObject to hold our custom scroll corner. 827 // layoutObject to hold our custom scroll corner.
823 LayoutScrollbarPart* m_scrollCorner; 828 LayoutScrollbarPart* m_scrollCorner;
824 829
825 OwnPtrWillBeMember<ScrollableAreaSet> m_scrollableAreas; 830 OwnPtrWillBeMember<ScrollableAreaSet> m_scrollableAreas;
826 OwnPtrWillBeMember<ScrollableAreaSet> m_animatingScrollableAreas; 831 OwnPtrWillBeMember<ScrollableAreaSet> m_animatingScrollableAreas;
827 OwnPtr<ResizerAreaSet> m_resizerAreas; 832 OwnPtr<ResizerAreaSet> m_resizerAreas;
828 OwnPtr<ViewportConstrainedObjectSet> m_viewportConstrainedObjects; 833 OwnPtr<ViewportConstrainedObjectSet> m_viewportConstrainedObjects;
834 unsigned m_stickyPositionObjectCount;
829 ViewportConstrainedObjectSet m_backgroundAttachmentFixedObjects; 835 ViewportConstrainedObjectSet m_backgroundAttachmentFixedObjects;
830 OwnPtrWillBeMember<FrameViewAutoSizeInfo> m_autoSizeInfo; 836 OwnPtrWillBeMember<FrameViewAutoSizeInfo> m_autoSizeInfo;
831 837
832 IntSize m_inputEventsOffsetForEmulation; 838 IntSize m_inputEventsOffsetForEmulation;
833 float m_inputEventsScaleFactorForEmulation; 839 float m_inputEventsScaleFactorForEmulation;
834 840
835 IntSize m_layoutSize; 841 IntSize m_layoutSize;
836 bool m_layoutSizeFixedToFrameSize; 842 bool m_layoutSizeFixedToFrameSize;
837 843
838 Timer<FrameView> m_didScrollTimer; 844 Timer<FrameView> m_didScrollTimer;
(...skipping 89 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

Powered by Google App Engine
This is Rietveld 408576698