Chromium Code Reviews
DescriptionBrowser 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
Messages
Total messages: 10 (0 generated)
|