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

Issue 2764313002: Move plugins to be stored in HTMLPlugInElement. (Closed)

Created:
3 years, 9 months ago by joelhockey
Modified:
3 years, 8 months ago
Reviewers:
haraken, dcheng
CC:
blink-layers+watch_chromium.org, blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-frames_chromium.org, blink-reviews-html_chromium.org, blink-reviews-layout_chromium.org, blink-reviews-paint_chromium.org, chromium-reviews, dglazkov+blink, dshwang, eae+blinkwatch, jchaffraix+rendering, kenneth.christiansen, kinuko+watch, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, rwlbuis, sof, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Move plugins to be stored in HTMLPlugInElement. Move plugins from being part of the widget tree in HTMLFrameOwnerElement to being stored directly on the related HTMLPlugInElement DOM node. Plugins are also stored in FrameView as a list of plugin children to be used in updateStyleAndLayoutIfNeededRecursiveInternal. Now all calls to HTMLFrameOwnerElement::ownedWidget, or to LayoutPart::frameViewBase (which calls onwedWidget) will no longer return the plugin. Callers of these methods should call HTMLPlugInElement::plugin or LayoutPart::plugin if they require the plugin. I have checked all callers. Many were obvious about whether they expect/require FrameView, PluginView or Scrollbar. But I have left comments in places where I am not sure. The next step is to stop PluginView from inheriting from FrameViewBase and duplicate any required methods into PluginView. This will complete removing Plugins from the widget tree. BUG=637460 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Review-Url: https://codereview.chromium.org/2764313002 Cr-Commit-Position: refs/heads/master@{#462243} Committed: https://chromium.googlesource.com/chromium/src/+/d927e98fb228fb205e54152165e238432372df85

Patch Set 1 #

Total comments: 22

Patch Set 2 : Set parent for plugin #

Patch Set 3 : Check for Plugin in Document::frameViewBaseForElement #

Patch Set 4 : Fix PartPainter CHECK to !plugin rather than must be frame. #

Total comments: 17

Patch Set 5 : Fix places in LayoutPart where plugin and frame must be considered together. #

Patch Set 6 : Add DCHECK and modify comments as per CL feedback. #

Patch Set 7 : Remove unneeded TODOs. #

Patch Set 8 : Remove invalid check #

Patch Set 9 : Use plugin and frame in updateGeometries #

Total comments: 6

Patch Set 10 : Don't forget plugins when processing children in FrameView. #

Patch Set 11 : Rebase and merge #

Total comments: 10

Patch Set 12 : Update comments about duplicating code #

Patch Set 13 : Update comments about duplicating code #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+178 lines, -97 lines) Patch
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +8 lines, -0 lines 2 comments Download
M third_party/WebKit/Source/core/frame/FrameView.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameView.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 9 chunks +34 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLPlugInElement.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +8 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +56 lines, -25 lines 2 comments Download
M third_party/WebKit/Source/core/html/PluginDocument.cpp View 2 chunks +4 lines, -9 lines 2 comments Download
M third_party/WebKit/Source/core/layout/LayoutEmbeddedObject.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutPart.h View 1 2 3 4 5 6 7 3 chunks +8 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutPart.cpp View 1 2 3 4 5 6 7 8 9 10 11 11 chunks +26 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp View 1 chunk +4 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/paint/EmbeddedObjectPaintInvalidator.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PartPainter.cpp View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/ChromeClientImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/ContextMenuClientImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/WebNode.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +7 lines, -8 lines 0 comments Download

Messages

Total messages: 75 (46 generated)
joelhockey
This is quite a big change to move Plugins to be stored on HTMLPlugInElement and ...
3 years, 9 months ago (2017-03-22 12:25:01 UTC) #4
haraken
https://codereview.chromium.org/2764313002/diff/1/third_party/WebKit/Source/core/frame/FrameView.h File third_party/WebKit/Source/core/frame/FrameView.h (right): https://codereview.chromium.org/2764313002/diff/1/third_party/WebKit/Source/core/frame/FrameView.h#newcode1145 third_party/WebKit/Source/core/frame/FrameView.h:1145: PluginsSet m_plugins; You don't need to address this in ...
3 years, 9 months ago (2017-03-22 15:32:33 UTC) #9
dcheng
https://codereview.chromium.org/2764313002/diff/1/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/2764313002/diff/1/third_party/WebKit/Source/core/dom/Document.cpp#newcode4047 third_party/WebKit/Source/core/dom/Document.cpp:4047: // TODO(joelhockey): Do we need spcial handling for plugins? ...
3 years, 9 months ago (2017-03-23 07:21:42 UTC) #10
joelhockey
I think this CL is ready to go. I have noted a further few CLs ...
3 years, 8 months ago (2017-03-27 06:42:21 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2764313002/40001
3 years, 8 months ago (2017-03-27 06:42:39 UTC) #17
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started once the ...
3 years, 8 months ago (2017-03-27 06:42:41 UTC) #19
dcheng
Also, I'm kind of curious: do you have a long-term vision of what you see ...
3 years, 8 months ago (2017-03-27 22:30:42 UTC) #28
haraken
Mostly looks good. https://codereview.chromium.org/2764313002/diff/1/third_party/WebKit/Source/core/frame/FrameView.h File third_party/WebKit/Source/core/frame/FrameView.h (right): https://codereview.chromium.org/2764313002/diff/1/third_party/WebKit/Source/core/frame/FrameView.h#newcode1145 third_party/WebKit/Source/core/frame/FrameView.h:1145: PluginsSet m_plugins; On 2017/03/27 06:42:21, joelhockey ...
3 years, 8 months ago (2017-03-28 07:39:41 UTC) #29
joelhockey
On Tue, Mar 28, 2017 at 9:30 AM, <dcheng@chromium.org> wrote: > > Also, I'm kind ...
3 years, 8 months ago (2017-03-28 10:05:27 UTC) #34
joelhockey
On Tue, Mar 28, 2017 at 9:30 AM, <dcheng@chromium.org> wrote: > > Also, I'm kind ...
3 years, 8 months ago (2017-03-28 10:05:27 UTC) #35
dglazkov
On 2017/03/27 at 22:30:42, dcheng wrote: > Also, I'm kind of curious: do you have ...
3 years, 8 months ago (2017-03-28 16:01:54 UTC) #42
dcheng
On 2017/03/28 16:01:54, dglazkov wrote: > On 2017/03/27 at 22:30:42, dcheng wrote: > > Also, ...
3 years, 8 months ago (2017-03-28 21:29:38 UTC) #43
joelhockey
It turns out that in all of the places particularly in LayoutPart where I wasn't ...
3 years, 8 months ago (2017-03-28 22:56:23 UTC) #44
haraken
https://codereview.chromium.org/2764313002/diff/1/third_party/WebKit/Source/core/layout/LayoutPart.cpp File third_party/WebKit/Source/core/layout/LayoutPart.cpp (right): https://codereview.chromium.org/2764313002/diff/1/third_party/WebKit/Source/core/layout/LayoutPart.cpp#newcode260 third_party/WebKit/Source/core/layout/LayoutPart.cpp:260: frameViewBase->hide(); On 2017/03/28 22:56:23, joelhockey wrote: > On 2017/03/28 ...
3 years, 8 months ago (2017-03-29 11:04:46 UTC) #45
dcheng
sorry for the slow review, i've been feeling a bit under the weather. https://codereview.chromium.org/2764313002/diff/60001/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp File ...
3 years, 8 months ago (2017-03-30 04:43:07 UTC) #46
joelhockey
Thanks for the reviews haraken and dcheng. Latest code updates are to make sure that ...
3 years, 8 months ago (2017-03-30 06:40:57 UTC) #53
haraken
https://codereview.chromium.org/2764313002/diff/60001/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp File third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp (right): https://codereview.chromium.org/2764313002/diff/60001/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp#newcode106 third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp:106: document().view()->removePlugin(m_plugin); On 2017/03/30 06:40:56, joelhockey wrote: > > I'm ...
3 years, 8 months ago (2017-03-30 14:29:12 UTC) #56
joelhockey
https://codereview.chromium.org/2764313002/diff/60001/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp File third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp (right): https://codereview.chromium.org/2764313002/diff/60001/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp#newcode106 third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp:106: document().view()->removePlugin(m_plugin); > If this breaks something, what will break? ...
3 years, 8 months ago (2017-03-31 01:03:55 UTC) #57
dcheng
On 2017/03/31 01:03:55, joelhockey wrote: > https://codereview.chromium.org/2764313002/diff/60001/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp > File third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp (right): > > https://codereview.chromium.org/2764313002/diff/60001/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp#newcode106 > ...
3 years, 8 months ago (2017-03-31 01:16:43 UTC) #58
haraken
On 2017/03/31 01:16:43, dcheng wrote: > On 2017/03/31 01:03:55, joelhockey wrote: > > > https://codereview.chromium.org/2764313002/diff/60001/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp ...
3 years, 8 months ago (2017-03-31 01:43:05 UTC) #59
dcheng
On 2017/03/31 01:43:05, haraken wrote: > On 2017/03/31 01:16:43, dcheng wrote: > > On 2017/03/31 ...
3 years, 8 months ago (2017-03-31 02:02:26 UTC) #60
dcheng
On 2017/03/31 02:02:26, dcheng wrote: > On 2017/03/31 01:43:05, haraken wrote: > > On 2017/03/31 ...
3 years, 8 months ago (2017-03-31 02:03:20 UTC) #61
dcheng
https://codereview.chromium.org/2764313002/diff/200001/third_party/WebKit/Source/core/frame/FrameView.cpp File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2764313002/diff/200001/third_party/WebKit/Source/core/frame/FrameView.cpp#newcode3783 third_party/WebKit/Source/core/frame/FrameView.cpp:3783: CHECK(child->parent() == this); Nit: DCHECK is the equivalent of ...
3 years, 8 months ago (2017-04-04 07:20:12 UTC) #62
joelhockey
https://codereview.chromium.org/2764313002/diff/200001/third_party/WebKit/Source/core/frame/FrameView.cpp File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2764313002/diff/200001/third_party/WebKit/Source/core/frame/FrameView.cpp#newcode3783 third_party/WebKit/Source/core/frame/FrameView.cpp:3783: CHECK(child->parent() == this); On 2017/04/04 at 07:20:12, dcheng wrote: ...
3 years, 8 months ago (2017-04-04 23:39:05 UTC) #63
dcheng
LGTM https://codereview.chromium.org/2764313002/diff/240001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/2764313002/diff/240001/third_party/WebKit/Source/core/dom/Document.cpp#newcode376 third_party/WebKit/Source/core/dom/Document.cpp:376: return toHTMLPlugInElement(focusedElement).plugin(); Btw, I would suggest just changing ...
3 years, 8 months ago (2017-04-05 09:12:24 UTC) #68
haraken
LGTM You're working on a very complex thing! Amazing :) https://codereview.chromium.org/2764313002/diff/240001/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp File third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp (right): https://codereview.chromium.org/2764313002/diff/240001/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp#newcode139 ...
3 years, 8 months ago (2017-04-05 12:34:00 UTC) #69
joelhockey
https://codereview.chromium.org/2764313002/diff/240001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/2764313002/diff/240001/third_party/WebKit/Source/core/dom/Document.cpp#newcode376 third_party/WebKit/Source/core/dom/Document.cpp:376: return toHTMLPlugInElement(focusedElement).plugin(); On 2017/04/05 at 09:12:24, dcheng wrote: > ...
3 years, 8 months ago (2017-04-05 22:10:31 UTC) #70
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2764313002/240001
3 years, 8 months ago (2017-04-05 22:11:33 UTC) #72
commit-bot: I haz the power
3 years, 8 months ago (2017-04-05 22:23:09 UTC) #75
Message was sent while issue was closed.
Committed patchset #13 (id:240001) as
https://chromium.googlesource.com/chromium/src/+/d927e98fb228fb205e54152165e2...

Powered by Google App Engine
This is Rietveld 408576698