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

Unified Diff: content/browser/android/overscroll_refresh.h

Issue 910373002: [Android] Disable pull-to-refresh with overflow:hidden (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pass overflow:hidden via metadata Created 5 years, 10 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: content/browser/android/overscroll_refresh.h
diff --git a/content/browser/android/overscroll_refresh.h b/content/browser/android/overscroll_refresh.h
index 074b3adeb78d69af5df398c7fa08431090f5f6ec..2ddb6a12fc6a2728a0e3875f141f7fb3a36be063 100644
--- a/content/browser/android/overscroll_refresh.h
+++ b/content/browser/android/overscroll_refresh.h
@@ -37,7 +37,8 @@ class CONTENT_EXPORT OverscrollRefreshClient {
// Simple pull-to-refresh styled effect. Listens to scroll events, conditionally
// activating when:
-// 1) The scroll begins when the page has no vertical scroll offset.
+// 1) The scroll begins when the page's root layer 1) has no vertical scroll
+// offset and 2) lacks the overflow-y:hidden property.
// 2) The page doesn't consume the initial scroll events.
// 3) The initial scroll direction is upward.
// The actual page reload action is triggered only when the effect is active
@@ -76,7 +77,8 @@ class CONTENT_EXPORT OverscrollRefresh {
// Update the effect according to the most recent display parameters,
// Note: All dimensions are in device pixels.
void UpdateDisplay(const gfx::SizeF& viewport_size,
- const gfx::Vector2dF& content_scroll_offset);
+ const gfx::Vector2dF& content_scroll_offset,
+ bool root_overflow_y_hidden);
// Reset the effect to its inactive state, immediately detaching and
// disabling any active effects.
@@ -95,6 +97,7 @@ class CONTENT_EXPORT OverscrollRefresh {
gfx::SizeF viewport_size_;
bool scrolled_to_top_;
+ bool overflow_y_hidden_;
enum ScrollConsumptionState {
DISABLED,

Powered by Google App Engine
This is Rietveld 408576698