diff options
author | mkosiba@chromium.org <mkosiba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-18 23:21:33 +0000 |
---|---|---|
committer | mkosiba@chromium.org <mkosiba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-18 23:21:33 +0000 |
commit | d01b2a644559414d0c4632f3829f3165e4054d84 (patch) | |
tree | 48843cb49f78c4c4541ce0def3e9c2dc0f0b0e1a /android_webview/renderer/aw_render_view_ext.h | |
parent | 6ffe7a770dcaa9ded997ccc55619d4b18c257d43 (diff) | |
download | chromium_src-d01b2a644559414d0c4632f3829f3165e4054d84.zip chromium_src-d01b2a644559414d0c4632f3829f3165e4054d84.tar.gz chromium_src-d01b2a644559414d0c4632f3829f3165e4054d84.tar.bz2 |
Use contents size for android_webview layout size.
Currently android_webview uses RenderView::preferredSize (which is
based off of documentElement.height) to drive the android.view.View
layout size.
WebViewClassic would use content size for that purpose which meant
that absolute-positioned elements can cause the Classic WebView to
grow.
This CL makes AwContents use the contents size for driving layout.
BUG=286336
Review URL: https://chromiumcodereview.appspot.com/23899004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223984 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/renderer/aw_render_view_ext.h')
-rw-r--r-- | android_webview/renderer/aw_render_view_ext.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/android_webview/renderer/aw_render_view_ext.h b/android_webview/renderer/aw_render_view_ext.h index af5089e..aaa565f 100644 --- a/android_webview/renderer/aw_render_view_ext.h +++ b/android_webview/renderer/aw_render_view_ext.h @@ -7,6 +7,7 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/timer/timer.h" #include "content/public/renderer/render_view_observer.h" #include "third_party/WebKit/public/web/WebPermissionClient.h" #include "third_party/skia/include/core/SkColor.h" @@ -39,6 +40,7 @@ class AwRenderViewExt : public content::RenderViewObserver, bool is_new_navigation) OVERRIDE; virtual void FocusedNodeChanged(const WebKit::WebNode& node) OVERRIDE; virtual void DidCommitCompositorFrame() OVERRIDE; + virtual void DidUpdateLayout() OVERRIDE; virtual void Navigate(const GURL& url) OVERRIDE; void OnDocumentHasImagesRequest(int id); @@ -57,6 +59,8 @@ class AwRenderViewExt : public content::RenderViewObserver, void UpdatePageScaleFactor(); + void CheckContentsSize(); + // WebKit::WebPermissionClient implementation. virtual bool allowDisplayingInsecureContent( WebKit::WebFrame* frame, @@ -73,6 +77,9 @@ class AwRenderViewExt : public content::RenderViewObserver, float page_scale_factor_; + gfx::Size last_sent_contents_size_; + base::OneShotTimer<AwRenderViewExt> check_contents_size_timer_; + DISALLOW_COPY_AND_ASSIGN(AwRenderViewExt); }; |