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

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: Make sticky vertical ref tests expectations not dependent on font size. 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 605 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
« 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