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

Issue 2259533003: Use bounds instead of size for prerender requests (Closed)

Created:
4 years, 4 months ago by Yusuf
Modified:
4 years, 4 months ago
Reviewers:
Benoit L, sky, Maria, hubbe, pasko, mmenke
CC:
chromium-reviews, tburkard+watch_chromium.org, gavinp+prer_chromium.org, cbentzel+watch_chromium.org, lizeb+watch-custom-tabs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use bounds instead of size for prerender requests This changes the pipeline that initializes prerender contents with a size to use bounds instead. Note that not all addPrerenderX calls are switched to use Rect since for everywhere except Android this won't be needed. Android needs bounds instead of size to get info about the Physical Backing Size, also the top container height (to be used for toolbar hide on scroll). With a Rect, all these can be initialized and we can avoid extra Resizes that happen when the native View is properly tied to the Android View hierarcy on swap. This change only updates the params and shouldn't be making any functional changes. A follow up Android only patch will start setting the value to the origin. BUG=628302 Committed: https://crrev.com/7c8d964d95350a8a63ed75d761ae37a36ade3e85 Cr-Commit-Position: refs/heads/master@{#413469}

Patch Set 1 #

Patch Set 2 : Updates tests and fixed compile #

Patch Set 3 : fix java test #

Patch Set 4 : Fixed compile in All #

Patch Set 5 : ... #

Patch Set 6 : Compile #

Total comments: 12

Patch Set 7 : Nits and include fixes for prerender #

Patch Set 8 : Fix compile on mac, update .mm #

Total comments: 2

Patch Set 9 : comments nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -81 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/prerender/ExternalPrerenderHandler.java View 4 chunks +11 lines, -11 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/prerender/ExternalPrerenderHandlerTest.java View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/android/offline_pages/prerender_adapter_unittest.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/tab_capture/offscreen_tab.cc View 1 2 3 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/prerender/external_prerender_handler_android.h View 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/prerender/external_prerender_handler_android.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/prerender/prerender_contents.h View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/prerender/prerender_contents.cc View 1 2 3 4 5 6 4 chunks +6 lines, -7 lines 0 comments Download
M chrome/browser/prerender/prerender_manager.h View 1 2 3 4 5 6 4 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/prerender/prerender_manager.cc View 1 2 3 4 5 6 9 chunks +15 lines, -14 lines 0 comments Download
M chrome/browser/prerender/prerender_unittest.cc View 1 2 3 4 5 6 5 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/ui/apps/chrome_app_delegate.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/browser_tabrestore.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/exclusive_access/fullscreen_controller.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/search/instant_search_prerenderer_unittest.cc View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/tabs/tab_strip_model.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/web_contents_sizer.h View 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/ui/web_contents_sizer.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/web_contents_sizer.mm View 1 2 3 4 5 6 7 1 chunk +6 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/extensions/extension_settings_browsertest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/android/javatests/src/org/chromium/chrome/test/util/PrerenderTestHelper.java View 1 2 3 4 5 6 2 chunks +8 lines, -5 lines 0 comments Download

Messages

Total messages: 64 (43 generated)
Yusuf
4 years, 4 months ago (2016-08-18 18:40:52 UTC) #2
Yusuf
mmenke@ for prerender/ pasko@, lizeb@ for ExternalPrerenderHandler
4 years, 4 months ago (2016-08-18 21:29:59 UTC) #4
Benoit L
Only 2 minor comments. But the bots still seem angry. https://codereview.chromium.org/2259533003/diff/100001/chrome/browser/prerender/prerender_contents.cc File chrome/browser/prerender/prerender_contents.cc (right): https://codereview.chromium.org/2259533003/diff/100001/chrome/browser/prerender/prerender_contents.cc#newcode241 ...
4 years, 4 months ago (2016-08-19 12:49:49 UTC) #29
mmenke
https://codereview.chromium.org/2259533003/diff/100001/chrome/browser/prerender/external_prerender_handler_android.cc File chrome/browser/prerender/external_prerender_handler_android.cc (right): https://codereview.chromium.org/2259533003/diff/100001/chrome/browser/prerender/external_prerender_handler_android.cc#newcode96 chrome/browser/prerender/external_prerender_handler_android.cc:96: gfx::Rect(top, left, bottom, right)); include gfx::Rect header. https://codereview.chromium.org/2259533003/diff/100001/chrome/browser/prerender/prerender_contents.h File ...
4 years, 4 months ago (2016-08-19 15:22:29 UTC) #30
Yusuf
Apologies folks, it seems I sent the review a bit preemptively after I built chrome ...
4 years, 4 months ago (2016-08-19 17:20:33 UTC) #31
mmenke
prerender/ LGTM, didn't look at the rest
4 years, 4 months ago (2016-08-19 17:40:50 UTC) #34
Yusuf
sky@ for chrome/browser/ui sky@ the most important bit here is changing ResizeWebContents in web_contents_sizer to ...
4 years, 4 months ago (2016-08-19 17:48:35 UTC) #36
sky
LGTM
4 years, 4 months ago (2016-08-19 19:36:19 UTC) #39
sky
And thanks for a great description that clearly indicates why this is needed.
4 years, 4 months ago (2016-08-19 19:36:55 UTC) #40
Benoit L
LGTM
4 years, 4 months ago (2016-08-22 07:43:28 UTC) #45
pasko
lgtm, thank you https://codereview.chromium.org/2259533003/diff/140001/chrome/browser/prerender/prerender_contents.h File chrome/browser/prerender/prerender_contents.h (right): https://codereview.chromium.org/2259533003/diff/140001/chrome/browser/prerender/prerender_contents.h#newcode114 chrome/browser/prerender/prerender_contents.h:114: // indicates the rectangular dimensions that ...
4 years, 4 months ago (2016-08-22 15:17:58 UTC) #46
mmenke
Also, should we have a browser test for this? Make sure the prerender isn't resized ...
4 years, 4 months ago (2016-08-22 15:19:01 UTC) #47
pasko
On 2016/08/22 15:19:01, mmenke wrote: > Also, should we have a browser test for this? ...
4 years, 4 months ago (2016-08-22 15:23:59 UTC) #48
Yusuf
On 2016/08/22 15:23:59, pasko wrote: > On 2016/08/22 15:19:01, mmenke wrote: > > Also, should ...
4 years, 4 months ago (2016-08-22 16:29:58 UTC) #49
mmenke
On 2016/08/22 16:29:58, Yusuf wrote: > On 2016/08/22 15:23:59, pasko wrote: > > On 2016/08/22 ...
4 years, 4 months ago (2016-08-22 16:32:29 UTC) #50
Yusuf
hubbe@ for /extensions/api/tab_capture/offline_tab mariakhomenko@ for chrome/android https://codereview.chromium.org/2259533003/diff/140001/chrome/browser/prerender/prerender_contents.h File chrome/browser/prerender/prerender_contents.h (right): https://codereview.chromium.org/2259533003/diff/140001/chrome/browser/prerender/prerender_contents.h#newcode114 chrome/browser/prerender/prerender_contents.h:114: // indicates the ...
4 years, 4 months ago (2016-08-22 16:38:49 UTC) #52
Maria
lgtm
4 years, 4 months ago (2016-08-22 17:06:46 UTC) #55
hubbe
lgtm
4 years, 4 months ago (2016-08-22 17:13:22 UTC) #56
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2259533003/160001
4 years, 4 months ago (2016-08-22 17:36:04 UTC) #61
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 4 months ago (2016-08-22 17:41:32 UTC) #62
commit-bot: I haz the power
4 years, 4 months ago (2016-08-22 17:43:13 UTC) #64
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/7c8d964d95350a8a63ed75d761ae37a36ade3e85
Cr-Commit-Position: refs/heads/master@{#413469}

Powered by Google App Engine
This is Rietveld 408576698