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

Side by Side Diff: third_party/WebKit/Source/core/exported/WebViewImpl.cpp

Issue 2884423003: Use scroll-boundary-behavior to control overscroll-refresh/glow on android. (Closed)
Patch Set: Update ScrollManager to pass the test. Created 3 years, 4 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 1845 matching lines...) Expand 10 before | Expand all | Expand 10 after
1856 ResizeViewportAnchor::ResizeScope resize_scope(*resize_viewport_anchor_); 1856 ResizeViewportAnchor::ResizeScope resize_scope(*resize_viewport_anchor_);
1857 1857
1858 float browser_controls_viewport_adjustment = 1858 float browser_controls_viewport_adjustment =
1859 GetBrowserControls().LayoutHeight() - 1859 GetBrowserControls().LayoutHeight() -
1860 GetBrowserControls().ContentOffset(); 1860 GetBrowserControls().ContentOffset();
1861 visual_viewport.SetBrowserControlsAdjustment( 1861 visual_viewport.SetBrowserControlsAdjustment(
1862 browser_controls_viewport_adjustment); 1862 browser_controls_viewport_adjustment);
1863 } 1863 }
1864 } 1864 }
1865 1865
1866 void WebViewImpl::SetScrollBoundaryBehavior(
1867 const WebScrollBoundaryBehavior& scroll_boundary_behavior) {
1868 if (layer_tree_view_)
1869 layer_tree_view_->SetScrollBoundaryBehavior(scroll_boundary_behavior);
1870 }
1871
1866 BrowserControls& WebViewImpl::GetBrowserControls() { 1872 BrowserControls& WebViewImpl::GetBrowserControls() {
1867 return GetPage()->GetBrowserControls(); 1873 return GetPage()->GetBrowserControls();
1868 } 1874 }
1869 1875
1870 void WebViewImpl::ResizeViewWhileAnchored(float top_controls_height, 1876 void WebViewImpl::ResizeViewWhileAnchored(float top_controls_height,
1871 float bottom_controls_height, 1877 float bottom_controls_height,
1872 bool browser_controls_shrink_layout) { 1878 bool browser_controls_shrink_layout) {
1873 DCHECK(MainFrameImpl()); 1879 DCHECK(MainFrameImpl());
1874 1880
1875 GetBrowserControls().SetHeight(top_controls_height, bottom_controls_height, 1881 GetBrowserControls().SetHeight(top_controls_height, bottom_controls_height,
(...skipping 2255 matching lines...) Expand 10 before | Expand all | Expand 10 after
4131 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) 4137 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame())
4132 return nullptr; 4138 return nullptr;
4133 return focused_frame; 4139 return focused_frame;
4134 } 4140 }
4135 4141
4136 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { 4142 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const {
4137 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; 4143 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr;
4138 } 4144 }
4139 4145
4140 } // namespace blink 4146 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698