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

Issue 244643008: Merge 262276 "Remove references to WebContentsView::SizeContents..." (Closed)

Created:
6 years, 8 months ago by erikchen
Modified:
6 years, 8 months ago
Reviewers:
erikchen
CC:
chromium-reviews, davidben+watch_chromium.org, cbentzel+watch_chromium.org, tburkard+watch_chromium.org, tfarina, gavinp+prer_chromium.org, dominich+watch_chromium.org, chromium-apps-reviews_chromium.org
Visibility:
Public.

Description

Merge 262276 "Remove references to WebContentsView::SizeContents..." > Remove references to WebContentsView::SizeContents from chrome/ and app/ > > WebContentsView::SizeContents was initially introduced as a hack to allow the > content module to resize a WebContentsView. This is odd because the embedder > should be in full control of the layout of the WebContentsView. Unfortunately, > SizeContents started being used as a platform-agnostic way for the embedder to > change the size of a WebContentsView. > > The mac implementation of SizeContents has never been correct. The > implementation would work correctly when SizeContents was used by the embedder, > but it did not work when used by the content module. See > https://code.google.com/p/chromium/issues/detail?id=264207 for details. I > changed the mac implementation of SizeContents to be a no-op, which fixed the > use of SizeContents from the content module, and broke its usage from the > embedder. > > This CL introduces a new platform agnostic utility method to resize a > WebContents. I've replaced all calls to SizeContents from chrome/ and app/ with > a call to the new utility method. There is no expected behavioral change on > aura, gtk, or android. This should fix the problems that have arisen from my > change to the mac implementation of SizeContents. > > Ideally, the utility method would take a gfx::NativeView as its parameter. > Unfortunately, I was unable perform the resizing on a ui::AndroidView*, and I > was forced to pass in the whole WebContents to mimic the behavior of > WebContentsViewAndroid::SizeContents. > > BUG=354769 > TEST=Follow steps listed in bug. > > Review URL: https://codereview.chromium.org/209023003 TBR=erikchen@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=265022

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -10 lines) Patch
M apps/app_window.cc View 2 chunks +2 lines, -1 line 0 comments Download
M apps/apps.gypi View 1 chunk +10 lines, -0 lines 0 comments Download
A + apps/ui/web_contents_sizer.h View 0 chunks +-1 lines, --1 lines 0 comments Download
A + apps/ui/web_contents_sizer.cc View 0 chunks +-1 lines, --1 lines 0 comments Download
A + apps/ui/web_contents_sizer.mm View 0 chunks +-1 lines, --1 lines 0 comments Download
M chrome/browser/prerender/prerender_contents.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/browser_tabrestore.cc View 2 chunks +9 lines, -8 lines 0 comments Download
M chrome/browser/ui/fullscreen/fullscreen_controller.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/tabs/tab_strip_model.cc View 2 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
erikchen
6 years, 8 months ago (2014-04-21 18:16:04 UTC) #1
erikchen
6 years, 8 months ago (2014-04-21 18:16:27 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 manually as r265022 (tree was closed).

Powered by Google App Engine
This is Rietveld 408576698