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

Issue 23899004: Use contents size for android_webview layout. (Closed)

Created:
7 years, 3 months ago by mkosiba (inactive)
Modified:
7 years, 3 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, android-webview-reviews_chromium.org, jamesr
Visibility:
Public.

Description

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 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=223984

Patch Set 1 #

Total comments: 12

Patch Set 2 : #

Patch Set 3 : always use contents size (preferred size is no more) #

Total comments: 2

Patch Set 4 : remove 'enable' IPC #

Total comments: 3

Patch Set 5 : #

Patch Set 6 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -72 lines) Patch
M android_webview/browser/renderer_host/aw_render_view_host_ext.h View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
M android_webview/browser/renderer_host/aw_render_view_host_ext.cc View 1 2 3 4 5 2 chunks +7 lines, -0 lines 0 comments Download
M android_webview/common/render_view_messages.h View 1 2 3 4 5 2 chunks +5 lines, -1 line 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwContents.java View 1 2 3 4 5 2 chunks +7 lines, -2 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwLayoutSizer.java View 1 2 3 4 5 1 chunk +0 lines, -16 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java View 1 2 1 chunk +0 lines, -9 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java View 1 2 2 chunks +0 lines, -20 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/AndroidViewIntegrationTest.java View 1 2 3 4 5 3 chunks +34 lines, -3 lines 0 comments Download
M android_webview/native/aw_contents.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M android_webview/native/aw_contents.cc View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
M android_webview/native/aw_settings.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M android_webview/native/aw_settings.cc View 1 2 3 2 chunks +0 lines, -7 lines 0 comments Download
M android_webview/native/aw_web_contents_delegate.h View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M android_webview/native/aw_web_contents_delegate.cc View 1 2 1 chunk +0 lines, -11 lines 0 comments Download
M android_webview/renderer/aw_render_view_ext.h View 1 2 3 4 5 4 chunks +7 lines, -0 lines 0 comments Download
M android_webview/renderer/aw_render_view_ext.cc View 1 2 3 4 5 3 chunks +33 lines, -0 lines 0 comments Download
M content/public/renderer/render_view_observer.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
mkosiba (inactive)
+benm@ for overall review +aelias@ for reviewing the difference between webview()->mainFrame()->contentsSize() and document->documentElement()->scrollHeight() The one ...
7 years, 3 months ago (2013-09-06 18:03:37 UTC) #1
benm (inactive)
Thanks Marcin, overall flow seems reasonable to me. https://codereview.chromium.org/23899004/diff/1/android_webview/common/render_view_messages.h File android_webview/common/render_view_messages.h (right): https://codereview.chromium.org/23899004/diff/1/android_webview/common/render_view_messages.h#newcode81 android_webview/common/render_view_messages.h:81: IPC_MESSAGE_ROUTED0(AwViewMsg_DisableContentsSizeNotifications) ...
7 years, 3 months ago (2013-09-06 19:27:53 UTC) #2
mnaganov (inactive)
https://codereview.chromium.org/23899004/diff/1/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java File android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java (right): https://codereview.chromium.org/23899004/diff/1/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java#newcode270 android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java:270: mInQuirksMode = value; nit: Perhaps, name the property "mQuirksMode" ...
7 years, 3 months ago (2013-09-06 21:07:04 UTC) #3
aelias_OOO_until_Jul13
Hmm, that distinction is new to me. I've always used contentsSize for scroll bounds in ...
7 years, 3 months ago (2013-09-06 23:29:22 UTC) #4
mkosiba (inactive)
So after a bit more thought about this I decided to move to contentSize. The ...
7 years, 3 months ago (2013-09-09 13:46:21 UTC) #5
mkosiba (inactive)
+jamesr@ for the following question: On 2013/09/06 23:29:22, aelias wrote: > Hmm, that distinction is ...
7 years, 3 months ago (2013-09-09 13:48:12 UTC) #6
jamesr
I don't know. I think aa@ is the originator of this logic.
7 years, 3 months ago (2013-09-10 05:43:14 UTC) #7
benm (inactive)
https://codereview.chromium.org/23899004/diff/19001/android_webview/native/aw_settings.h File android_webview/native/aw_settings.h (right): https://codereview.chromium.org/23899004/diff/19001/android_webview/native/aw_settings.h#newcode37 android_webview/native/aw_settings.h:37: void UpdateContentSizeNotificationMode(JNIEnv* env, jobject obj); nit: if I follow ...
7 years, 3 months ago (2013-09-12 19:13:05 UTC) #8
mkosiba (inactive)
new version up. PTAL https://codereview.chromium.org/23899004/diff/19001/android_webview/native/aw_settings.h File android_webview/native/aw_settings.h (right): https://codereview.chromium.org/23899004/diff/19001/android_webview/native/aw_settings.h#newcode37 android_webview/native/aw_settings.h:37: void UpdateContentSizeNotificationMode(JNIEnv* env, jobject obj); ...
7 years, 3 months ago (2013-09-16 01:49:08 UTC) #9
benm (inactive)
thanks marcin! lgtm % nits. maybe add something into the commit message that we are ...
7 years, 3 months ago (2013-09-16 02:55:07 UTC) #10
mkosiba (inactive)
https://codereview.chromium.org/23899004/diff/31001/android_webview/common/render_view_messages.h File android_webview/common/render_view_messages.h (right): https://codereview.chromium.org/23899004/diff/31001/android_webview/common/render_view_messages.h#newcode72 android_webview/common/render_view_messages.h:72: SkColor) On 2013/09/16 02:55:07, benm wrote: > intentional? yes
7 years, 3 months ago (2013-09-16 03:05:49 UTC) #11
mkosiba (inactive)
+Joi for content/ layer API change.
7 years, 3 months ago (2013-09-16 03:19:42 UTC) #12
Jói
//content/public LGTM.
7 years, 3 months ago (2013-09-16 08:55:17 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mkosiba@chromium.org/23899004/38001
7 years, 3 months ago (2013-09-16 17:10:00 UTC) #14
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=25657
7 years, 3 months ago (2013-09-16 17:22:28 UTC) #15
mkosiba (inactive)
+ jochen for content/renderer + cdn for android_webview IPC
7 years, 3 months ago (2013-09-16 18:47:18 UTC) #16
jochen (gone - plz use gerrit)
lgtm
7 years, 3 months ago (2013-09-17 08:40:28 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mkosiba@chromium.org/23899004/47001
7 years, 3 months ago (2013-09-17 23:34:22 UTC) #18
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=25952
7 years, 3 months ago (2013-09-17 23:54:50 UTC) #19
mkosiba (inactive)
+cdn@ for android_webview/common/render_view_messages.h
7 years, 3 months ago (2013-09-18 00:14:42 UTC) #20
Cris Neckar
IPC changes LGTM
7 years, 3 months ago (2013-09-18 19:01:14 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mkosiba@chromium.org/23899004/47001
7 years, 3 months ago (2013-09-18 19:03:37 UTC) #22
commit-bot: I haz the power
7 years, 3 months ago (2013-09-18 23:21:36 UTC) #23
Message was sent while issue was closed.
Change committed as 223984

Powered by Google App Engine
This is Rietveld 408576698