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

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

Issue 2096633002: Adds scroll position/scale emulation to DevTools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 // Scale used to convert incoming input events. 184 // Scale used to convert incoming input events.
185 float inputEventsScaleFactor() const; 185 float inputEventsScaleFactor() const;
186 186
187 // Offset used to convert incoming input events while emulating device metic s. 187 // Offset used to convert incoming input events while emulating device metic s.
188 IntSize inputEventsOffsetForEmulation() const; 188 IntSize inputEventsOffsetForEmulation() const;
189 void setInputEventsTransformForEmulation(const IntSize&, float); 189 void setInputEventsTransformForEmulation(const IntSize&, float);
190 190
191 void setScrollPosition(const DoublePoint&, ScrollType, ScrollBehavior = Scro llBehaviorInstant) override; 191 void setScrollPosition(const DoublePoint&, ScrollType, ScrollBehavior = Scro llBehaviorInstant) override;
192 192
193 // Override the scroll position with a fixed value.
194 void setScrollOverride(const DoublePoint& position);
195 // Clear the scroll position override.
196 void clearScrollOverride();
197
193 void didUpdateElasticOverscroll(); 198 void didUpdateElasticOverscroll();
194 199
195 void viewportSizeChanged(bool widthChanged, bool heightChanged); 200 void viewportSizeChanged(bool widthChanged, bool heightChanged);
196 201
197 AtomicString mediaType() const; 202 AtomicString mediaType() const;
198 void setMediaType(const AtomicString&); 203 void setMediaType(const AtomicString&);
199 void adjustMediaTypeForPrinting(bool printing); 204 void adjustMediaTypeForPrinting(bool printing);
200 205
201 WebDisplayMode displayMode() { return m_displayMode; } 206 WebDisplayMode displayMode() { return m_displayMode; }
202 void setDisplayMode(WebDisplayMode); 207 void setDisplayMode(WebDisplayMode);
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 TemporaryChange<bool> m_scope; 645 TemporaryChange<bool> m_scope;
641 }; 646 };
642 647
643 // Only for LayoutPart to traverse into sub frames during paint invalidation . 648 // Only for LayoutPart to traverse into sub frames during paint invalidation .
644 void invalidateTreeIfNeeded(PaintInvalidationState&); 649 void invalidateTreeIfNeeded(PaintInvalidationState&);
645 650
646 private: 651 private:
647 explicit FrameView(LocalFrame*); 652 explicit FrameView(LocalFrame*);
648 653
649 void setScrollOffset(const DoublePoint&, ScrollType) override; 654 void setScrollOffset(const DoublePoint&, ScrollType) override;
655 DoublePoint applyScrollOverrideToPosition(const DoublePoint& position);
650 656
651 enum LifeCycleUpdateOption { 657 enum LifeCycleUpdateOption {
652 OnlyUpToLayoutClean, 658 OnlyUpToLayoutClean,
653 OnlyUpToCompositingCleanPlusScrolling, 659 OnlyUpToCompositingCleanPlusScrolling,
654 AllPhasesExceptPaint, 660 AllPhasesExceptPaint,
655 AllPhases, 661 AllPhases,
656 }; 662 };
657 663
658 void updateLifecyclePhasesInternal(LifeCycleUpdateOption); 664 void updateLifecyclePhasesInternal(LifeCycleUpdateOption);
659 void invalidateTreeIfNeededRecursive(); 665 void invalidateTreeIfNeededRecursive();
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 869
864 bool m_horizontalScrollbarLock; 870 bool m_horizontalScrollbarLock;
865 bool m_verticalScrollbarLock; 871 bool m_verticalScrollbarLock;
866 872
867 ChildrenWidgetSet m_children; 873 ChildrenWidgetSet m_children;
868 874
869 DoubleSize m_pendingScrollDelta; 875 DoubleSize m_pendingScrollDelta;
870 DoublePoint m_scrollPosition; 876 DoublePoint m_scrollPosition;
871 IntSize m_contentsSize; 877 IntSize m_contentsSize;
872 878
879 bool m_scrollOverrideEnabled;
880 DoublePoint m_scrollOverridePosition;
881
873 int m_scrollbarsAvoidingResizer; 882 int m_scrollbarsAvoidingResizer;
874 bool m_scrollbarsSuppressed; 883 bool m_scrollbarsSuppressed;
875 884
876 bool m_inUpdateScrollbars; 885 bool m_inUpdateScrollbars;
877 886
878 OwnPtr<LayoutAnalyzer> m_analyzer; 887 OwnPtr<LayoutAnalyzer> m_analyzer;
879 888
880 // Mark if something has changed in the mapping from Frame to GraphicsLayer 889 // Mark if something has changed in the mapping from Frame to GraphicsLayer
881 // and the Frame Timing regions should be recalculated. 890 // and the Frame Timing regions should be recalculated.
882 bool m_frameTimingRequestsDirty; 891 bool m_frameTimingRequestsDirty;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 947 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
939 setIsVisuallyNonEmpty(); 948 setIsVisuallyNonEmpty();
940 } 949 }
941 950
942 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 951 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
943 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView()); 952 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView());
944 953
945 } // namespace blink 954 } // namespace blink
946 955
947 #endif // FrameView_h 956 #endif // FrameView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698