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

Issue 23618022: BrowserPlugin/WebView - Move plugin lifetime to DOM (Closed)

Created:
7 years, 3 months ago by wjmaclean
Modified:
6 years, 8 months ago
CC:
lazyboy, abarth-chromium, esprehn, Julien - ping for review, dcheng
Visibility:
Public.

Description

BrowserPlugin/WebView - Move plugin lifetime to DOM This CL adds a mechanism whereby a plugin can have its lifetime managed within an HTMLPlugInElement, including early plugin creation (i.e. before it has been attached to the DOM and assigned a renderer), and persistent lifetime so that it is not killed if its renderer is deleted (e.g. display = 'none' is set on the element). The CL is motivated by the desire to make WebView a sutom element, though the approach used should extend to other plugins on an opt-in basis. BUG=156219 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170791

Patch Set 1 : Basic approach #

Patch Set 2 : Cleaned up. #

Total comments: 1

Patch Set 3 : Rebase CL. #

Patch Set 4 : Don't store plugin (widget) pointer in RenderWidget. #

Total comments: 20

Patch Set 5 : Revised method for widget lifetime management. #

Total comments: 10

Patch Set 6 : Move suspend-update machinery to HTMLFrameOwnerElement, fix nits. #

Patch Set 7 : Add tests, make plugin creation synchronous. #

Total comments: 13

Patch Set 8 : Rebase, no code changes here. #

Patch Set 9 : Address suggestions. #

Patch Set 10 : Rebase, no code changes. #

Patch Set 11 : Fix mac compile issue. #

Total comments: 24

Patch Set 12 : Address comments. #

Total comments: 6

Patch Set 13 : Address comments. #

Patch Set 14 : ASSERT on ownerElement->widget() == this causes many tests to fail. #

Total comments: 2

Patch Set 15 : Add guards for client() pointer in ProgressTracker. #

Patch Set 16 : Extensive re-base. (trunk@168397) #

Patch Set 17 : Removing guards on frame loader client. #

Patch Set 18 : WebPluginContainer now notifies is WebPlugin on detach from parent. #

Patch Set 19 : Fixing layout test. #

Patch Set 20 : Rebase to trunk@170181 #

Patch Set 21 : Don't assume FrameView has a renderer in createFrameview() [Fixes layout tests]. #

Patch Set 22 : Churn! Churn!! CHURN!!! #

Patch Set 23 : Handle shared-renderer case. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+399 lines, -165 lines) Patch
A LayoutTests/plugins/can-create-without-renderer.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +35 lines, -0 lines 0 comments Download
A LayoutTests/plugins/can-create-without-renderer-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -0 lines 0 comments Download
A LayoutTests/plugins/plugin-persists.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +42 lines, -0 lines 0 comments Download
A LayoutTests/plugins/plugin-persists-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +6 lines, -0 lines 0 comments Download
M Source/core/dom/ContainerNode.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +3 lines, -3 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +1 line, -2 lines 0 comments Download
M Source/core/dom/Element.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +1 line, -2 lines 0 comments Download
M Source/core/frame/FrameView.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/frame/LocalFrame.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +5 lines, -2 lines 0 comments Download
M Source/core/frame/RemoteFrame.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +5 lines, -3 lines 0 comments Download
M Source/core/html/HTMLAppletElement.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLEmbedElement.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/html/HTMLFrameElementBase.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/html/HTMLFrameOwnerElement.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +13 lines, -0 lines 0 comments Download
M Source/core/html/HTMLFrameOwnerElement.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +94 lines, -2 lines 0 comments Download
M Source/core/html/HTMLObjectElement.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/html/HTMLPlugInElement.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +11 lines, -1 line 0 comments Download
M Source/core/html/HTMLPlugInElement.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 8 chunks +63 lines, -9 lines 0 comments Download
M Source/core/loader/EmptyClients.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/loader/FrameLoaderClient.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/rendering/RenderPart.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderPart.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +0 lines, -9 lines 0 comments Download
M Source/core/rendering/RenderWidget.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +4 lines, -13 lines 0 comments Download
M Source/core/rendering/RenderWidget.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 13 chunks +77 lines, -111 lines 0 comments Download
M Source/platform/Widget.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -0 lines 0 comments Download
M Source/web/FrameLoaderClientImpl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -0 lines 0 comments Download
M Source/web/FrameLoaderClientImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +8 lines, -0 lines 0 comments Download
M Source/web/WebPluginContainerImpl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M Source/web/WebPluginContainerImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +7 lines, -0 lines 0 comments Download
M public/web/WebFrameClient.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +3 lines, -0 lines 0 comments Download
M public/web/WebPlugin.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 49 (0 generated)
wjmaclean
Eric - I've cleaned this up, can you take a look? The companion (Chromium-side) CL ...
7 years, 2 months ago (2013-10-07 19:16:14 UTC) #1
eseidel
I think the idea of moving more plugin logic out of the renderers and into ...
7 years, 2 months ago (2013-10-17 14:40:44 UTC) #2
wjmaclean
On 2013/10/17 14:40:44, eseidel wrote: > I think the idea of moving more plugin logic ...
7 years, 2 months ago (2013-10-23 14:53:27 UTC) #3
eseidel
So this is a Widget which can exist before, and persist after a RenderWidget, correct? ...
7 years, 1 month ago (2013-10-28 16:59:29 UTC) #4
eseidel
7 years, 1 month ago (2013-10-28 17:01:47 UTC) #5
eseidel
What happens when you reparent one of these into a differnet DOM tree?
7 years, 1 month ago (2013-10-28 17:11:00 UTC) #6
abarth-chromium
sutom -> custom
7 years, 1 month ago (2013-10-28 17:50:34 UTC) #7
eseidel
Discussed offline: <browser>, <webview> and <adview> are apps-only features. We want to load all plugins ...
7 years, 1 month ago (2013-10-28 17:54:59 UTC) #8
Fady Samuel
On 2013/10/28 16:59:29, eseidel wrote: > So this is a Widget which can exist before, ...
7 years, 1 month ago (2013-10-28 17:59:23 UTC) #9
eseidel
We talked a bit offline. My two issues with this patch: 1. There are now ...
7 years, 1 month ago (2013-10-31 17:59:24 UTC) #10
wjmaclean
Eric, can you please take a look? Is this sort of what you had in ...
7 years, 1 month ago (2013-11-11 22:15:50 UTC) #11
wjmaclean
On 2013/11/11 22:15:50, wjmaclean wrote: > Eric, can you please take a look? Is this ...
7 years, 1 month ago (2013-11-12 14:57:35 UTC) #12
eseidel
https://codereview.chromium.org/23618022/diff/351001/Source/core/rendering/RenderWidget.cpp File Source/core/rendering/RenderWidget.cpp (right): https://codereview.chromium.org/23618022/diff/351001/Source/core/rendering/RenderWidget.cpp#newcode133 Source/core/rendering/RenderWidget.cpp:133: if (m_widget.get()) Can we just remove RenderWidget's m_widget pointer? ...
7 years, 1 month ago (2013-11-18 22:09:53 UTC) #13
eseidel
I think this is the right direction. But I think we should complete the "move ...
7 years, 1 month ago (2013-11-18 22:26:44 UTC) #14
wjmaclean
Here's a WIP patch that (I think) addresses your comments, but still needs some work ...
7 years ago (2013-11-25 17:51:55 UTC) #15
eseidel
This looks great! All we need is testing and this looks good to land. https://codereview.chromium.org/23618022/diff/461001/Source/core/html/HTMLObjectElement.cpp ...
7 years ago (2013-12-02 16:28:34 UTC) #16
wjmaclean
This version of the CL fixes a lot of layout tests ... still working on ...
7 years ago (2013-12-02 21:51:55 UTC) #17
wjmaclean
PTAL Tests added. This likely needs to be re-based, but otherwise I think we're (one ...
7 years ago (2013-12-12 20:30:46 UTC) #18
eseidel
I have a meeting to run to, but I'm happy to look again this afternoon. ...
7 years ago (2013-12-12 20:40:12 UTC) #19
wjmaclean
Revised ... ptal :-) https://codereview.chromium.org/23618022/diff/501001/LayoutTests/plugins/can-create-without-renderer.html File LayoutTests/plugins/can-create-without-renderer.html (right): https://codereview.chromium.org/23618022/diff/501001/LayoutTests/plugins/can-create-without-renderer.html#newcode34 LayoutTests/plugins/can-create-without-renderer.html:34: document.body.offsetTop; On 2013/12/12 20:40:13, eseidel ...
7 years ago (2013-12-12 22:31:14 UTC) #20
eseidel
What's the benefit to using an extension to the mimetyp instead of just adding a ...
7 years ago (2013-12-18 18:38:17 UTC) #21
eseidel
https://codereview.chromium.org/23618022/diff/581001/Source/core/html/HTMLPlugInElement.h File Source/core/html/HTMLPlugInElement.h (right): https://codereview.chromium.org/23618022/diff/581001/Source/core/html/HTMLPlugInElement.h#newcode137 Source/core/html/HTMLPlugInElement.h:137: RefPtr<Widget> m_persistedPluginWidget; I would add a comment here explaining ...
7 years ago (2013-12-18 18:41:52 UTC) #22
wjmaclean
CL updated to address comments, and split (new cl is https://codereview.chromium.org/105633011) to accommodate the move ...
7 years ago (2013-12-23 23:49:52 UTC) #23
eseidel
This looks good. I'll need to give it another read though. (I'm not technically in ...
7 years ago (2013-12-24 00:02:04 UTC) #24
wjmaclean
On 2013/12/24 00:02:04, eseidel wrote: > This looks good. I'll need to give it another ...
7 years ago (2013-12-24 00:04:30 UTC) #25
wjmaclean
Comments addressed. https://codereview.chromium.org/23618022/diff/601001/Source/core/frame/FrameView.cpp File Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/23618022/diff/601001/Source/core/frame/FrameView.cpp#newcode245 Source/core/frame/FrameView.cpp:245: if (ownerElement && ownerElement->widget() == this) On ...
7 years ago (2013-12-24 00:14:31 UTC) #26
eseidel
lgtm. I suspect we could test more. I also suspect that you may have fallout ...
6 years, 11 months ago (2014-01-07 22:54:27 UTC) #27
wjmaclean
https://codereview.chromium.org/23618022/diff/701001/Source/core/frame/FrameView.cpp File Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/23618022/diff/701001/Source/core/frame/FrameView.cpp#newcode245 Source/core/frame/FrameView.cpp:245: if (ownerElement && ownerElement->widget() == this) On 2014/01/07 22:54:28, ...
6 years, 11 months ago (2014-01-08 14:36:19 UTC) #28
wjmaclean
I've rebased this patch, and found I needed to add some guards on access to ...
6 years, 11 months ago (2014-01-08 15:59:21 UTC) #29
eseidel
Frame and FrameLoader client lifetimes have been changign as of late thanks to some OOPI ...
6 years, 11 months ago (2014-01-08 17:22:34 UTC) #30
dcheng
https://codereview.chromium.org/23618022/diff/1951001/Source/core/loader/ProgressTracker.cpp File Source/core/loader/ProgressTracker.cpp (right): https://codereview.chromium.org/23618022/diff/1951001/Source/core/loader/ProgressTracker.cpp#newcode139 Source/core/loader/ProgressTracker.cpp:139: if (!m_finalProgressChangedSent && frame->loader().client()) { Do you still need ...
6 years, 10 months ago (2014-02-25 07:02:33 UTC) #31
wjmaclean
On 2014/02/25 07:02:33, dcheng wrote: > https://codereview.chromium.org/23618022/diff/1951001/Source/core/loader/ProgressTracker.cpp > File Source/core/loader/ProgressTracker.cpp (right): > > https://codereview.chromium.org/23618022/diff/1951001/Source/core/loader/ProgressTracker.cpp#newcode139 > ...
6 years, 10 months ago (2014-02-25 14:07:11 UTC) #32
wjmaclean
eseidel@ - I think this is ready to try, did you want to give it ...
6 years, 9 months ago (2014-03-11 16:00:08 UTC) #33
eseidel
lgtm
6 years, 9 months ago (2014-03-11 18:00:54 UTC) #34
wjmaclean
The CQ bit was checked by wjmaclean@chromium.org
6 years, 9 months ago (2014-03-11 19:33:58 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjmaclean@chromium.org/23618022/2281001
6 years, 9 months ago (2014-03-11 19:34:07 UTC) #36
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-11 20:20:59 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: mac_blink_rel
6 years, 9 months ago (2014-03-11 20:21:00 UTC) #38
wjmaclean
The CQ bit was checked by wjmaclean@chromium.org
6 years, 9 months ago (2014-03-27 19:07:58 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjmaclean@chromium.org/23618022/2361001
6 years, 9 months ago (2014-03-27 19:08:25 UTC) #40
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-27 19:08:39 UTC) #41
commit-bot: I haz the power
Failed to apply patch for Source/core/loader/ProgressTracker.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 9 months ago (2014-03-27 19:08:40 UTC) #42
wjmaclean
The CQ bit was checked by wjmaclean@chromium.org
6 years, 9 months ago (2014-03-27 19:24:48 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjmaclean@chromium.org/23618022/2371001
6 years, 9 months ago (2014-03-27 19:24:53 UTC) #44
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-27 19:58:34 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on mac_blink_rel
6 years, 9 months ago (2014-03-27 19:58:35 UTC) #46
wjmaclean
The CQ bit was checked by wjmaclean@chromium.org
6 years, 8 months ago (2014-04-03 19:33:57 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjmaclean@chromium.org/23618022/2391001
6 years, 8 months ago (2014-04-03 19:34:09 UTC) #48
commit-bot: I haz the power
6 years, 8 months ago (2014-04-03 20:51:48 UTC) #49
Message was sent while issue was closed.
Change committed as 170791

Powered by Google App Engine
This is Rietveld 408576698