DescriptionRemove 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.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=262276
Patch Set 1 #Patch Set 2 : Minor fixes #Patch Set 3 : Remove all references to SizeContents from chrome/ and app/ #Patch Set 4 : Comments & styling. #
Total comments: 4
Patch Set 5 : Rebase against top of tree and fix a compile error in prerender_contents.cc #Patch Set 6 : Change WebKit->Blink in a comment as suggested by avi. #
Total comments: 5
Patch Set 7 : Change location of util to ui/base, as per sky's suggestion #Patch Set 8 : clang-format #
Total comments: 3
Patch Set 9 : Move web_contents_sizer to apps/ui/ #Patch Set 10 : Alphabetization. #
Total comments: 6
Patch Set 11 : Remove unused #if. #Patch Set 12 : Respond to sky's comments. #Patch Set 13 : Add missing include to android. #Patch Set 14 : Rebase against top of tree. #Patch Set 15 : Add a missing NULL pointer check to android code. #
Messages
Total messages: 43 (0 generated)
|