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

Issue 11360106: Browser Plugin: Implement AutoSize (Closed)

Created:
8 years, 1 month ago by Fady Samuel
Modified:
8 years, 1 month ago
Reviewers:
jam, lazyboy
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Visibility:
Public.

Description

Browser Plugin: Implement AutoSize How it works: There are five new properties on BrowserPlugin: autoSize minHeight minWidth maxHeight maxWidth If autoSize is enabled, then we ask the guest for autosize. A lot of the complexity comes from the fact that the guest's size may change, while the backing store is fixed in size to avoid excessive back and forth allocation of a shared memory buffer. The damage buffer is created to fit a guest of size (maxWidth, maxHeight). ViewHostMsg_UpdateRect_Params has a view_size parameter that indicates the size of guest. We carry that value into the embedder. Some code was added to the embedder's backing store to clear the backing store. This is called when view_size changes to clear out any pixels outside the current view_size's bounds. The basic plumbing was landed already. This patch completes this work. BUG=157620 Test=BrowserPluginHostTest.AutoSizeBeforeNavigation, BrowserPluginHostTest.AutoSizeAfterNavigation, BrowserPluginTest.AutoSizeAttributes Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=166948

Patch Set 1 #

Patch Set 2 : Removed unnecessary code #

Patch Set 3 : Fixed setting max_width_/max_height_. If we left either at 0, then they take the container's size. #

Patch Set 4 : Reupload #

Total comments: 17

Patch Set 5 : Addressed nits + added tests #

Total comments: 6

Patch Set 6 : Fixed nits + added more tests #

Patch Set 7 : Merged with ToT #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+360 lines, -82 lines) Patch
M content/browser/browser_plugin/browser_plugin_embedder.h View 2 chunks +5 lines, -0 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_embedder.cc View 1 2 3 4 5 6 1 chunk +9 lines, -0 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_embedder_helper.h View 2 chunks +5 lines, -0 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_embedder_helper.cc View 1 2 3 4 2 chunks +8 lines, -0 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.h View 1 2 3 4 4 chunks +9 lines, -4 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.cc View 1 2 3 4 5 chunks +38 lines, -10 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_host_browsertest.cc View 1 2 3 4 5 6 2 chunks +63 lines, -0 lines 0 comments Download
M content/browser/browser_plugin/test_browser_plugin_guest.h View 1 2 3 4 5 6 3 chunks +5 lines, -0 lines 0 comments Download
M content/browser/browser_plugin/test_browser_plugin_guest.cc View 1 2 3 4 5 6 2 chunks +22 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 3 comments Download
M content/common/browser_plugin_messages.h View 1 2 3 4 2 chunks +7 lines, -7 lines 0 comments Download
M content/renderer/browser_plugin/browser_plugin.h View 1 2 3 4 5 6 3 chunks +14 lines, -2 lines 0 comments Download
M content/renderer/browser_plugin/browser_plugin.cc View 1 2 3 4 5 6 9 chunks +144 lines, -44 lines 0 comments Download
M content/renderer/browser_plugin/browser_plugin_backing_store.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/browser_plugin/browser_plugin_backing_store.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/browser_plugin/browser_plugin_browsertest.cc View 1 2 3 4 2 chunks +14 lines, -15 lines 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M content/test/data/browser_plugin_embedder.html View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Fady Samuel
8 years, 1 month ago (2012-11-06 19:03:05 UTC) #1
lazyboy
Some comments/questions, I'm still trying to understand the flow completely. https://codereview.chromium.org/11360106/diff/5005/content/browser/browser_plugin/browser_plugin_embedder_helper.cc File content/browser/browser_plugin/browser_plugin_embedder_helper.cc (right): https://codereview.chromium.org/11360106/diff/5005/content/browser/browser_plugin/browser_plugin_embedder_helper.cc#newcode56 ...
8 years, 1 month ago (2012-11-06 22:22:35 UTC) #2
Fady Samuel
Addressed nits + added tests: PTAL. https://codereview.chromium.org/11360106/diff/5005/content/browser/browser_plugin/browser_plugin_embedder_helper.cc File content/browser/browser_plugin/browser_plugin_embedder_helper.cc (right): https://codereview.chromium.org/11360106/diff/5005/content/browser/browser_plugin/browser_plugin_embedder_helper.cc#newcode56 content/browser/browser_plugin/browser_plugin_embedder_helper.cc:56: IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetAutoSize, On 2012/11/06 ...
8 years, 1 month ago (2012-11-06 23:52:34 UTC) #3
lazyboy
lgtm */browser_plugin/* looks good, thanks. http://chromiumcodereview.appspot.com/11360106/diff/5005/content/renderer/browser_plugin/browser_plugin.cc File content/renderer/browser_plugin/browser_plugin.cc (right): http://chromiumcodereview.appspot.com/11360106/diff/5005/content/renderer/browser_plugin/browser_plugin.cc#newcode513 content/renderer/browser_plugin/browser_plugin.cc:513: // the backing store ...
8 years, 1 month ago (2012-11-07 07:39:08 UTC) #4
Fady Samuel
+jam@ for content OWNER review. http://codereview.chromium.org/11360106/diff/7005/content/browser/browser_plugin/browser_plugin_host_browsertest.cc File content/browser/browser_plugin/browser_plugin_host_browsertest.cc (right): http://codereview.chromium.org/11360106/diff/7005/content/browser/browser_plugin/browser_plugin_host_browsertest.cc#newcode1149 content/browser/browser_plugin/browser_plugin_host_browsertest.cc:1149: "document.getElementById('plugin').autoSize = true;")); On ...
8 years, 1 month ago (2012-11-07 20:21:10 UTC) #5
jam
lgtm, sorry for the delay I just saw this. in the future feel free to ...
8 years, 1 month ago (2012-11-09 17:11:09 UTC) #6
Fady Samuel
https://codereview.chromium.org/11360106/diff/6020/content/browser/renderer_host/render_view_host_impl.cc File content/browser/renderer_host/render_view_host_impl.cc (right): https://codereview.chromium.org/11360106/diff/6020/content/browser/renderer_host/render_view_host_impl.cc#newcode931 content/browser/renderer_host/render_view_host_impl.cc:931: msg.type() != BrowserPluginHostMsg_SetAutoSize::ID && On 2012/11/09 17:11:10, John Abd-El-Malek ...
8 years, 1 month ago (2012-11-09 17:41:09 UTC) #7
Fady Samuel
https://codereview.chromium.org/11360106/diff/6020/content/browser/renderer_host/render_view_host_impl.cc File content/browser/renderer_host/render_view_host_impl.cc (right): https://codereview.chromium.org/11360106/diff/6020/content/browser/renderer_host/render_view_host_impl.cc#newcode931 content/browser/renderer_host/render_view_host_impl.cc:931: msg.type() != BrowserPluginHostMsg_SetAutoSize::ID && On 2012/11/09 17:41:10, Fady Samuel ...
8 years, 1 month ago (2012-11-09 18:02:53 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fsamuel@chromium.org/11360106/6020
8 years, 1 month ago (2012-11-09 18:03:04 UTC) #9
commit-bot: I haz the power
8 years, 1 month ago (2012-11-09 19:17:20 UTC) #10
Change committed as 166948

Powered by Google App Engine
This is Rietveld 408576698