Index: content/browser/web_contents/navigation_controller_impl.cc |
diff --git a/content/browser/web_contents/navigation_controller_impl.cc b/content/browser/web_contents/navigation_controller_impl.cc |
index e5b34b5e0dc5ed468af80f006b04ef9baa26cb70..a4ec35fb626b3b13b14125f0b7c86edc4d305d79 100644 |
--- a/content/browser/web_contents/navigation_controller_impl.cc |
+++ b/content/browser/web_contents/navigation_controller_impl.cc |
@@ -479,8 +479,8 @@ int NavigationControllerImpl::GetIndexForOffset(int offset) const { |
} |
void NavigationControllerImpl::TakeScreenshot() { |
- static bool overscroll_enabled = CommandLine::ForCurrentProcess()-> |
- HasSwitch(switches::kEnableOverscrollHistoryNavigation); |
+ static bool overscroll_enabled = !CommandLine::ForCurrentProcess()-> |
+ HasSwitch(switches::kDisableOverscrollHistoryNavigation); |
if (!overscroll_enabled) |
return; |
@@ -490,6 +490,10 @@ void NavigationControllerImpl::TakeScreenshot() { |
return; |
RenderViewHost* render_view_host = web_contents_->GetRenderViewHost(); |
+ if (!static_cast<RenderViewHostImpl*> |
+ (render_view_host)->overscroll_controller()) { |
+ return; |
+ } |
content::RenderWidgetHostView* view = render_view_host->GetView(); |
if (!view) |
return; |
@@ -527,8 +531,6 @@ void NavigationControllerImpl::OnScreenshotTaken( |
} |
if (!success) { |
- LOG(ERROR) << "Taking snapshot was unsuccessful for " |
- << unique_id; |
ClearScreenshot(entry); |
return; |
} |