Fix uses of ContentsSize under RootLayerScrolls

In https://crbug.com/757634, LocalFrameView::ContentsSize was modified
to return the frame size when RootLayerScrolls is turned on. This makes
sense since the Frame's "content" is the LayoutView which is sized to
the frame and clips when RLS is turned on.

However, this is wrong if the call site really was looking for the
document/page size and the original patch missed a few call sites like
this:

 * AwRenderViewExt::CheckContentsSize is looking for changes to the
   document size so this breaks the WebView Integration tests in the bug

 * ContainerNode::GetUpperLeftCorner uses this to determine how far to
   scroll to get to the bottom of the document. This should definitely
   be the document size. Added empty-anchor.html test for this case.

 * TextFinder::UpdateFindMatchRects appears to use the changing content
   size as a signal to recompute the match rects. If we use the frame
   rect here this will never be triggered. Added to TestFinderTest to
   cover this bug.

 * WebViewImpl::WidenRectWithinPageBounds is used in a page scale
   animation (i.e. Android double-tap-to-zoom, zoom in on text input
   focus). This is trying to calculate a rect in the page to zoom and
   scroll to so it should be document rect.

Since "ContentsSize" is ambiguous at best (and misleading at worst)
I've changed the name to DocumentSize in WebLocalFrame. The FrameView
version is a member of ScrollableArea so once RLS is turned on it will
be removed when FrameView is removed from the ScrollableArea hierarchy.

Bug: 800549
Change-Id: I5831bed046931d819c4c86751b245bc514a390f5
Reviewed-on: https://chromium-review.googlesource.com/876724
Reviewed-by: Chris Harrelson <[email protected]>
Reviewed-by: Bo <[email protected]>
Reviewed-by: Steve Kobes <[email protected]>
Commit-Queue: David Bokan <[email protected]>
Cr-Commit-Position: refs/heads/master@{#531244}
diff --git a/android_webview/renderer/aw_render_view_ext.cc b/android_webview/renderer/aw_render_view_ext.cc
index add2084..b0e5fdb 100644
--- a/android_webview/renderer/aw_render_view_ext.cc
+++ b/android_webview/renderer/aw_render_view_ext.cc
@@ -56,7 +56,7 @@
   if (!webview || !main_render_frame)
     return;
 
-  gfx::Size contents_size = main_render_frame->GetWebFrame()->ContentsSize();
+  gfx::Size contents_size = main_render_frame->GetWebFrame()->DocumentSize();
 
   // Fall back to contentsPreferredMinimumSize if the mainFrame is reporting a
   // 0x0 size (this happens during initial load).