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

Issue 2888203006: Move the logic to retrieve the WebPluginContainer to LocalFrame and Node. (Closed)

Created:
3 years, 7 months ago by slangley
Modified:
3 years, 4 months ago
Reviewers:
haraken, dcheng
CC:
blink-reviews, blink-reviews-api_chromium.org, blink-reviews-dom_chromium.org, blink-reviews-frames_chromium.org, chromium-reviews, dcheng, dglazkov+blink, eae+blinkwatch, kinuko+watch, mlamouri+watch-blink_chromium.org, rwlbuis, sof
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Move the logic to retrieve the WebPluginContainer to LocalFrame and Node. This CL moves the logic to retrieve the WebPluginContainer from static methods in WebLocalFrameImpl & WebNode to member method on LocalFrame and Node. It introduces a virtual method on PluginView to return the PluginContainer, that is overridden in WebPluginContainerBase to remove the need for down casting. Logically this CL should introduce no changes. BUG=708879 Review-Url: https://codereview.chromium.org/2888203006 Cr-Commit-Position: refs/heads/master@{#474176} Committed: https://chromium.googlesource.com/chromium/src/+/171284077b44d0102ffc9065331fb3b1efe3fb67

Patch Set 1 #

Patch Set 2 : Fix typos. #

Patch Set 3 : Rename & format. #

Total comments: 10

Patch Set 4 : Address code review comments. #

Total comments: 7

Patch Set 5 : Address code review comments. #

Patch Set 6 : Ensure we have a valid PluginView before using it. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -99 lines) Patch
M third_party/WebKit/Source/core/dom/Node.h View 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Node.cpp View 1 2 chunks +18 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrame.h View 1 2 3 4 2 chunks +9 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrame.cpp View 1 2 3 4 5 3 chunks +21 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/plugins/PluginView.h View 1 2 3 4 5 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebFrameWidgetImpl.h View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp View 1 2 3 1 chunk +0 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/web/WebInputMethodControllerImpl.cpp View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.h View 1 2 3 4 5 2 chunks +0 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.cpp View 1 2 3 4 5 13 chunks +16 lines, -37 lines 0 comments Download
M third_party/WebKit/Source/web/WebNode.cpp View 1 2 3 4 2 chunks +1 line, -19 lines 0 comments Download
M third_party/WebKit/Source/web/WebPluginContainerImpl.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.h View 1 2 3 2 chunks +0 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.cpp View 1 2 3 4 5 3 chunks +2 lines, -12 lines 0 comments Download
M third_party/WebKit/public/web/WebNode.h View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 23 (11 generated)
slangley
3 years, 7 months ago (2017-05-19 02:09:53 UTC) #3
dcheng
https://codereview.chromium.org/2888203006/diff/40001/third_party/WebKit/Source/core/frame/LocalFrame.h File third_party/WebKit/Source/core/frame/LocalFrame.h (right): https://codereview.chromium.org/2888203006/diff/40001/third_party/WebKit/Source/core/frame/LocalFrame.h#newcode250 third_party/WebKit/Source/core/frame/LocalFrame.h:250: // plugin, then it runs its WebPluginContainerBase. Otherwise, uses ...
3 years, 7 months ago (2017-05-19 09:07:02 UTC) #5
slangley
PTAL https://codereview.chromium.org/2888203006/diff/40001/third_party/WebKit/Source/core/frame/LocalFrame.h File third_party/WebKit/Source/core/frame/LocalFrame.h (right): https://codereview.chromium.org/2888203006/diff/40001/third_party/WebKit/Source/core/frame/LocalFrame.h#newcode250 third_party/WebKit/Source/core/frame/LocalFrame.h:250: // plugin, then it runs its WebPluginContainerBase. Otherwise, ...
3 years, 7 months ago (2017-05-21 23:53:33 UTC) #6
haraken
LGTM https://codereview.chromium.org/2888203006/diff/60001/third_party/WebKit/Source/core/dom/Node.cpp File third_party/WebKit/Source/core/dom/Node.cpp (right): https://codereview.chromium.org/2888203006/diff/60001/third_party/WebKit/Source/core/dom/Node.cpp#newcode2585 third_party/WebKit/Source/core/dom/Node.cpp:2585: if (!isHTMLObjectElement(this) && !isHTMLEmbedElement(this)) { Can we probably ...
3 years, 7 months ago (2017-05-22 04:51:44 UTC) #8
dcheng
LGTM https://codereview.chromium.org/2888203006/diff/60001/third_party/WebKit/Source/core/frame/LocalFrame.h File third_party/WebKit/Source/core/frame/LocalFrame.h (right): https://codereview.chromium.org/2888203006/diff/60001/third_party/WebKit/Source/core/frame/LocalFrame.h#newcode251 third_party/WebKit/Source/core/frame/LocalFrame.h:251: // currently focused element (if any). On 2017/05/22 ...
3 years, 7 months ago (2017-05-22 09:48:29 UTC) #9
haraken
On 2017/05/22 09:48:29, dcheng wrote: > LGTM > > https://codereview.chromium.org/2888203006/diff/60001/third_party/WebKit/Source/core/frame/LocalFrame.h > File third_party/WebKit/Source/core/frame/LocalFrame.h (right): > ...
3 years, 7 months ago (2017-05-22 13:32:56 UTC) #10
slangley
I've added TODO to followup fixing the strange semantics of how these methods are working. ...
3 years, 7 months ago (2017-05-22 23:53:25 UTC) #11
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/2888203006/80001
3 years, 7 months ago (2017-05-22 23:54:06 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/433621)
3 years, 7 months ago (2017-05-23 01:15:43 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/2888203006/100001
3 years, 7 months ago (2017-05-24 03:15:51 UTC) #19
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://chromium.googlesource.com/chromium/src/+/171284077b44d0102ffc9065331fb3b1efe3fb67
3 years, 7 months ago (2017-05-24 05:45:34 UTC) #22
bjohnson
3 years, 4 months ago (2017-08-01 05:37:53 UTC) #23
Message was sent while issue was closed.
On 2017/05/24 05:45:34, commit-bot: I haz the power wrote:
> Committed patchset #6 (id:100001) as
>
https://chromium.googlesource.com/chromium/src/+/171284077b44d0102ffc9065331f...

This does change the logic. Before the patch the methods that called
`PluginContainerFromFrame ` would return 0 if `if (!frame->GetDocument() ||
!frame->GetDocument()->IsPluginDocument())`, but now they continue and return
`node->GetWebPluginContainerBase()` instead which breaks calls to
`SetPageZoomFactor` for instance.

Powered by Google App Engine
This is Rietveld 408576698