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

Issue 12567020: [android] Resize the android_webview if it's 0x0 initially. (Closed)

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

Description

[android] Resize the android_webview if it's 0x0 initially. This changes the content size update path for android_webview to use the preferred size RenderView mechanism instead of the CompositorFrameMetadata. The reason for the change is due to the fact that the CompositorFrameMetadata is not updated when the view size is 0x0, which is a common use case for the WebView when it's layout mode is set to "wrap content". BUG=b/8187850 TEST=AndroidWebViewTests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=195135

Patch Set 1 #

Total comments: 18

Patch Set 2 : #

Patch Set 3 : simplify test #

Patch Set 4 : rebase #

Total comments: 9

Patch Set 5 : use page scale from RenderView #

Patch Set 6 : remove unrelated changes #

Patch Set 7 : don't re-layout while pinch-zooming #

Total comments: 7

Patch Set 8 : remove AwContents.DependencyFactory #

Patch Set 9 : update comment #

Total comments: 4

Patch Set 10 : addressed nits #

Patch Set 11 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+851 lines, -228 lines) Patch
M android_webview/browser/browser_view_renderer.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M android_webview/browser/browser_view_renderer_impl.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M android_webview/browser/browser_view_renderer_impl.cc View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download
M android_webview/browser/renderer_host/view_renderer_host.h View 1 2 3 4 2 chunks +4 lines, -0 lines 0 comments Download
M android_webview/browser/renderer_host/view_renderer_host.cc View 1 2 3 4 4 chunks +12 lines, -4 lines 0 comments Download
M android_webview/common/render_view_messages.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwContents.java View 1 2 3 4 5 6 7 8 9 12 chunks +56 lines, -19 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwContentsClient.java View 1 2 3 4 5 6 7 3 chunks +0 lines, -118 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwLayoutSizer.java View 1 2 3 4 5 6 7 8 9 3 chunks +99 lines, -17 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
A android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java View 1 1 chunk +152 lines, -0 lines 0 comments Download
A android_webview/javatests/src/org/chromium/android_webview/test/AndroidViewIntegrationTest.java View 1 2 3 4 5 6 7 1 chunk +191 lines, -0 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/AwLayoutSizerTest.java View 1 2 3 4 5 6 7 2 chunks +159 lines, -28 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java View 1 2 3 4 5 6 7 2 chunks +34 lines, -7 lines 0 comments Download
M android_webview/native/aw_contents.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M android_webview/native/aw_contents.cc View 1 2 3 4 5 6 7 2 chunks +10 lines, -1 line 0 comments Download
M android_webview/native/aw_settings.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -0 lines 0 comments Download
M android_webview/native/aw_settings.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +38 lines, -3 lines 0 comments Download
M android_webview/native/aw_web_contents_delegate.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M android_webview/native/aw_web_contents_delegate.cc View 1 2 3 4 5 6 1 chunk +11 lines, -0 lines 0 comments Download
M android_webview/renderer/aw_render_view_ext.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +5 lines, -0 lines 0 comments Download
M android_webview/renderer/aw_render_view_ext.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +13 lines, -1 line 0 comments Download
M build/android/adb_run_android_webview_shell View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java View 1 2 3 4 1 chunk +0 lines, -8 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java View 1 2 3 4 5 6 7 8 9 10 6 chunks +30 lines, -21 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
mkosiba (inactive)
Needs a bit more work on the test side (I'd appreciate suggestions on how to ...
7 years, 9 months ago (2013-03-26 18:57:52 UTC) #1
joth
general comments - structurally seems good to me. didn't read the tests in detail... I ...
7 years, 9 months ago (2013-03-26 22:12:49 UTC) #2
mnaganov (inactive)
https://codereview.chromium.org/12567020/diff/1/android_webview/native/aw_settings.cc File android_webview/native/aw_settings.cc (right): https://codereview.chromium.org/12567020/diff/1/android_webview/native/aw_settings.cc#newcode106 android_webview/native/aw_settings.cc:106: render_view_host->EnablePreferredSizeMode(); On 2013/03/26 22:12:49, joth wrote: > for consistency ...
7 years, 9 months ago (2013-03-27 11:06:31 UTC) #3
mkosiba (inactive)
+ yfriedman for content/public/test/android/... OWNERS approval https://codereview.chromium.org/12567020/diff/1/android_webview/java/src/org/chromium/android_webview/AwContents.java File android_webview/java/src/org/chromium/android_webview/AwContents.java (right): https://codereview.chromium.org/12567020/diff/1/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode258 android_webview/java/src/org/chromium/android_webview/AwContents.java:258: mLayoutSizer.onPageScaleChanged(newScale); On 2013/03/26 ...
7 years, 8 months ago (2013-03-27 16:46:41 UTC) #4
mkosiba (inactive)
+CC:aelias (fyi) Ping? https://codereview.chromium.org/12567020/diff/11018/android_webview/native/aw_settings.cc File android_webview/native/aw_settings.cc (right): https://codereview.chromium.org/12567020/diff/11018/android_webview/native/aw_settings.cc#newcode128 android_webview/native/aw_settings.cc:128: DCHECK(web_contents()->GetRenderViewHost() == render_view_host); this fails on ...
7 years, 8 months ago (2013-03-28 14:20:36 UTC) #5
Yaron
content/public/test/android lgtm
7 years, 8 months ago (2013-03-28 22:11:05 UTC) #6
joth
mostly nits, other than moving updatePreferredSize out of the shared component into aw/ .... https://codereview.chromium.org/12567020/diff/1/components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/WebContentsDelegateAndroid.java ...
7 years, 8 months ago (2013-03-28 22:51:08 UTC) #7
aelias_OOO_until_Jul13
Hmm, pageScaleFactor comes in the metadata so you're mixing information from two sources. That makes ...
7 years, 8 months ago (2013-03-28 23:01:14 UTC) #8
mkosiba (inactive)
@alex - Agree about mixing stuff from cc/ and RenderView being wrong. I've uploaded an ...
7 years, 8 months ago (2013-04-03 16:25:28 UTC) #9
aelias_OOO_until_Jul13
Hmm, based on jreck's email feedback pinch-zoom for resizable views never worked very well anyway ...
7 years, 8 months ago (2013-04-04 04:44:37 UTC) #10
mkosiba (inactive)
On 2013/04/04 04:44:37, aelias wrote: > Hmm, based on jreck's email feedback pinch-zoom for resizable ...
7 years, 8 months ago (2013-04-04 15:53:24 UTC) #11
mkosiba (inactive)
ok, turns out pausing layout for the duration of a pinch gesture wasn't that complex ...
7 years, 8 months ago (2013-04-05 15:47:42 UTC) #12
joth
(sorry I read this code several times but never got the comments sent for some ...
7 years, 8 months ago (2013-04-10 22:06:23 UTC) #13
mkosiba (inactive)
https://codereview.chromium.org/12567020/diff/42001/android_webview/java/src/org/chromium/android_webview/AwContents.java File android_webview/java/src/org/chromium/android_webview/AwContents.java (right): https://codereview.chromium.org/12567020/diff/42001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode279 android_webview/java/src/org/chromium/android_webview/AwContents.java:279: public static class DependencyFactory { On 2013/04/10 22:06:23, joth ...
7 years, 8 months ago (2013-04-12 16:42:19 UTC) #14
mnaganov (inactive)
On 2013/04/12 16:42:19, mkosiba wrote: > https://codereview.chromium.org/12567020/diff/42001/android_webview/java/src/org/chromium/android_webview/AwContents.java > File android_webview/java/src/org/chromium/android_webview/AwContents.java > (right): > > https://codereview.chromium.org/12567020/diff/42001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode279 ...
7 years, 8 months ago (2013-04-14 20:53:22 UTC) #15
joth
lgtm https://codereview.chromium.org/12567020/diff/86001/android_webview/java/src/org/chromium/android_webview/AwContents.java File android_webview/java/src/org/chromium/android_webview/AwContents.java (right): https://codereview.chromium.org/12567020/diff/86001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode342 android_webview/java/src/org/chromium/android_webview/AwContents.java:342: nit: spurious \n https://codereview.chromium.org/12567020/diff/86001/android_webview/java/src/org/chromium/android_webview/AwLayoutSizer.java File android_webview/java/src/org/chromium/android_webview/AwLayoutSizer.java (right): https://codereview.chromium.org/12567020/diff/86001/android_webview/java/src/org/chromium/android_webview/AwLayoutSizer.java#newcode45 ...
7 years, 8 months ago (2013-04-17 00:41:50 UTC) #16
mkosiba (inactive)
+jln for android_webview/common/render_view_messages.h https://codereview.chromium.org/12567020/diff/86001/android_webview/java/src/org/chromium/android_webview/AwContents.java File android_webview/java/src/org/chromium/android_webview/AwContents.java (right): https://codereview.chromium.org/12567020/diff/86001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode342 android_webview/java/src/org/chromium/android_webview/AwContents.java:342: On 2013/04/17 00:41:50, joth wrote: > ...
7 years, 8 months ago (2013-04-17 10:15:44 UTC) #17
joth
+palmer for android_webview/common/render_**view_messages.h as I think he is most familiar with the android-y side of ...
7 years, 8 months ago (2013-04-17 20:39:00 UTC) #18
mkosiba (inactive)
+palmer,-jln for android_webview/common/render_**view_messages.h
7 years, 8 months ago (2013-04-18 13:22:44 UTC) #19
palmer
IPC security LGTM
7 years, 8 months ago (2013-04-18 19:21:59 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mkosiba@chromium.org/12567020/99001
7 years, 8 months ago (2013-04-19 08:35:40 UTC) #21
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 8 months ago (2013-04-19 08:37:27 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mkosiba@chromium.org/12567020/99001
7 years, 8 months ago (2013-04-19 08:52:26 UTC) #23
commit-bot: I haz the power
7 years, 8 months ago (2013-04-19 12:46:40 UTC) #24
Message was sent while issue was closed.
Change committed as 195135

Powered by Google App Engine
This is Rietveld 408576698