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

Unified 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: Sync, patch in 2169483002 (+ regression test), add DevTools tests. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/FrameView.h
diff --git a/third_party/WebKit/Source/core/frame/FrameView.h b/third_party/WebKit/Source/core/frame/FrameView.h
index 7e5be60fe9195575dd4c54ea41132eb19df2d506..a4647978dc08a2700fa3424a50577f17ce8a59bb 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.h
+++ b/third_party/WebKit/Source/core/frame/FrameView.h
@@ -78,6 +78,7 @@ class LayoutScrollbarPart;
class LayoutView;
class PaintInvalidationState;
class Page;
+class ScrollAndScaleEmulator;
class ScrollingCoordinator;
class TracedValue;
struct AnnotatedRegionValue;
@@ -191,6 +192,9 @@ public:
void setScrollPosition(const DoublePoint&, ScrollType, ScrollBehavior = ScrollBehaviorInstant) override;
+ // Override the scroll position with values from the emulator. Passing |nullptr| clears override.
+ void setScrollAndScaleEmulator(ScrollAndScaleEmulator*);
+
void didUpdateElasticOverscroll();
void viewportSizeChanged(bool widthChanged, bool heightChanged);
@@ -762,6 +766,10 @@ private:
ScrollingCoordinator* scrollingCoordinator() const;
+ // Calculate the physical minimum/maximum scroll positions without any overrides applied.
+ IntPoint calculateMinimumScrollPosition() const;
+ IntPoint calculateMaximumScrollPosition() const;
+
void prepareLayoutAnalyzer();
std::unique_ptr<TracedValue> analyzerCounters();
@@ -879,6 +887,8 @@ private:
DoublePoint m_scrollPosition;
IntSize m_contentsSize;
+ Member<ScrollAndScaleEmulator> m_scrollAndScaleEmulator;
+
int m_scrollbarsAvoidingResizer;
bool m_scrollbarsSuppressed;

Powered by Google App Engine
This is Rietveld 408576698