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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.h

Issue 2531603003: Only scroll on main if the targeted frames need to scroll on main (Closed)
Patch Set: Resolve conflict Created 4 years 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 9e1f4485e8107fb77553a45a3a93ca47de7a72fa..497a1c0838bb49cba798958a4123b2276e07ba9f 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.h
+++ b/third_party/WebKit/Source/core/frame/FrameView.h
@@ -64,6 +64,7 @@ class DocumentLifecycle;
class Cursor;
class Element;
class ElementVisibilityObserver;
+class Frame;
class FloatSize;
class JSONArray;
class JSONObject;
@@ -331,14 +332,15 @@ class CORE_EXPORT FrameView final
NotScrollableExplicitlyDisabled
};
- ScrollingReasons getScrollingReasons();
+ ScrollingReasons getScrollingReasons() const;
bool isScrollable();
bool isProgrammaticallyScrollable() override;
enum ScrollbarModesCalculationStrategy { RulesFromWebContentOnly, AnyRule };
- void calculateScrollbarModes(ScrollbarMode& hMode,
- ScrollbarMode& vMode,
- ScrollbarModesCalculationStrategy = AnyRule);
+ void calculateScrollbarModes(
+ ScrollbarMode& hMode,
+ ScrollbarMode& vMode,
+ ScrollbarModesCalculationStrategy = AnyRule) const;
IntPoint lastKnownMousePosition() const override;
bool shouldSetCursor() const;
@@ -785,6 +787,26 @@ class CORE_EXPORT FrameView final
// Only for SPv2.
std::unique_ptr<JSONObject> compositedLayersAsJSON(LayerTreeFlags);
+ // Recursively update frame tree. Each frame has its only
+ // scroll on main reason. Given the following frame tree
+ //.. A...
+ //../.\..
+ //.B...C.
+ //.|.....
+ //.D.....
+ // If B has fixed background-attachment but other frames
+ // don't, both A and C should scroll on cc. Frame D should
+ // scrolled on main thread as its ancestor B.
+ void updateSubFrameScrollOnMainReason(const Frame&,
+ MainThreadScrollingReasons);
+ String mainThreadScrollingReasonsAsText() const;
+ // Main thread scrolling reasons including reasons from ancestors.
+ MainThreadScrollingReasons mainThreadScrollingReasons() const;
+ // Main thread scrolling reasons for this object only. For all reasons,
+ // see: mainThreadScrollingReasons().
+ MainThreadScrollingReasons mainThreadScrollingReasonsPerFrame() const;
+ bool hasVisibleSlowRepaintViewportConstrainedObjects() const;
+
protected:
// Scroll the content via the compositor.
bool scrollContentsFastPath(const IntSize& scrollDelta);
@@ -874,7 +896,7 @@ class CORE_EXPORT FrameView final
void calculateScrollbarModesFromOverflowStyle(const ComputedStyle*,
ScrollbarMode& hMode,
- ScrollbarMode& vMode);
+ ScrollbarMode& vMode) const;
void updateCounters();
void forceLayoutParentViewIfNeeded();
@@ -1151,7 +1173,9 @@ class CORE_EXPORT FrameView final
// For Slimming Paint v2 only.
std::unique_ptr<PaintController> m_paintController;
std::unique_ptr<PaintArtifactCompositor> m_paintArtifactCompositor;
+
bool m_isStoringCompositedLayerDebugInfo;
+ MainThreadScrollingReasons m_mainThreadScrollingReasons;
};
inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) {

Powered by Google App Engine
This is Rietveld 408576698