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

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2884423003: Use scroll-boundary-behavior to control overscroll-refresh/glow on android. (Closed)
Patch Set: format Created 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1824 matching lines...) Expand 10 before | Expand all | Expand 10 after
1835 ResizeViewportAnchor::ResizeScope resize_scope(*resize_viewport_anchor_); 1835 ResizeViewportAnchor::ResizeScope resize_scope(*resize_viewport_anchor_);
1836 1836
1837 float browser_controls_viewport_adjustment = 1837 float browser_controls_viewport_adjustment =
1838 GetBrowserControls().LayoutHeight() - 1838 GetBrowserControls().LayoutHeight() -
1839 GetBrowserControls().ContentOffset(); 1839 GetBrowserControls().ContentOffset();
1840 visual_viewport.SetBrowserControlsAdjustment( 1840 visual_viewport.SetBrowserControlsAdjustment(
1841 browser_controls_viewport_adjustment); 1841 browser_controls_viewport_adjustment);
1842 } 1842 }
1843 } 1843 }
1844 1844
1845 void WebViewImpl::SetScrollBoundaryBehavior(
1846 const WebScrollBoundaryBehavior& scroll_boundary_behavior) {
1847 if (layer_tree_view_)
1848 layer_tree_view_->SetScrollBoundaryBehavior(scroll_boundary_behavior);
1849 }
1850
1845 BrowserControls& WebViewImpl::GetBrowserControls() { 1851 BrowserControls& WebViewImpl::GetBrowserControls() {
1846 return GetPage()->GetBrowserControls(); 1852 return GetPage()->GetBrowserControls();
1847 } 1853 }
1848 1854
1849 void WebViewImpl::ResizeViewWhileAnchored(float browser_controls_height, 1855 void WebViewImpl::ResizeViewWhileAnchored(float browser_controls_height,
1850 bool browser_controls_shrink_layout) { 1856 bool browser_controls_shrink_layout) {
1851 DCHECK(MainFrameImpl()); 1857 DCHECK(MainFrameImpl());
1852 1858
1853 GetBrowserControls().SetHeight(browser_controls_height, 1859 GetBrowserControls().SetHeight(browser_controls_height,
1854 browser_controls_shrink_layout); 1860 browser_controls_shrink_layout);
(...skipping 2265 matching lines...) Expand 10 before | Expand all | Expand 10 after
4120 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) 4126 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame())
4121 return nullptr; 4127 return nullptr;
4122 return focused_frame; 4128 return focused_frame;
4123 } 4129 }
4124 4130
4125 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { 4131 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const {
4126 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; 4132 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr;
4127 } 4133 }
4128 4134
4129 } // namespace blink 4135 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698