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

Issue 1990343002: Fix navigator.plugins and navigator.mimeTypes for OOPIFs. (Closed)

Created:
4 years, 7 months ago by alexmos
Modified:
4 years, 7 months ago
Reviewers:
haraken, Nate Chapin, dcheng
CC:
blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, gavinp+loader_chromium.org, loading-reviews_chromium.org, rwlbuis, sof, site-isolation-reviews_chromium.org, tyoshino+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix navigator.plugins and navigator.mimeTypes for OOPIFs. Previously, Page::pluginData() returned nullptr when the Page's main frame was a RemoteFrame. This caused navigator.plugins and navigator.mimeTypes to both return empty arrays from an OOPIF. Page::pluginData() needed the main frame to run the FrameLoader::allowPlugins check on it. This CL moves this check to happen on the actual LocalFrame that needs to access Page::pluginData(). BUG=612200, 607981 Committed: https://crrev.com/fb92f3e718335521cf454e53651235fbf30c10e2 Cr-Commit-Position: refs/heads/master@{#394942}

Patch Set 1 #

Patch Set 2 : Rebase #

Total comments: 5

Patch Set 3 : Re-enable test that's fixed by this #

Patch Set 4 : Undo accidental blank line #

Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -20 lines) Patch
M third_party/WebKit/LayoutTests/FlagExpectations/site-per-process View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/plugins/navigator-plugins-in-cross-origin-frame.html View 1 chunk +29 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/plugins/navigator-plugins-in-cross-origin-frame-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/plugins/resources/navigator-plugins.js View 1 chunk +5 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/plugins/resources/navigator-plugins-frame.html View 1 chunk +15 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/DOMImplementation.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrame.h View 1 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrame.cpp View 1 3 2 chunks +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentLoader.cpp View 1 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/page/Page.cpp View 1 chunk +0 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/plugins/DOMMimeTypeArray.cpp View 1 chunk +1 line, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/plugins/DOMPluginArray.cpp View 1 chunk +1 line, -4 lines 0 comments Download
M third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 17 (7 generated)
alexmos
Nate, can you please take a look? https://codereview.chromium.org/1990343002/diff/20001/third_party/WebKit/LayoutTests/http/tests/plugins/navigator-plugins-in-cross-origin-frame.html File third_party/WebKit/LayoutTests/http/tests/plugins/navigator-plugins-in-cross-origin-frame.html (right): https://codereview.chromium.org/1990343002/diff/20001/third_party/WebKit/LayoutTests/http/tests/plugins/navigator-plugins-in-cross-origin-frame.html#newcode16 third_party/WebKit/LayoutTests/http/tests/plugins/navigator-plugins-in-cross-origin-frame.html:16: log("FAIL: mismatch ...
4 years, 7 months ago (2016-05-19 18:21:56 UTC) #2
Nate Chapin
LGTM with a cleanup question/suggestion https://codereview.chromium.org/1990343002/diff/20001/third_party/WebKit/Source/core/page/Page.cpp File third_party/WebKit/Source/core/page/Page.cpp (left): https://codereview.chromium.org/1990343002/diff/20001/third_party/WebKit/Source/core/page/Page.cpp#oldcode266 third_party/WebKit/Source/core/page/Page.cpp:266: return m_pluginData.get(); Semi-tangential: What ...
4 years, 7 months ago (2016-05-19 19:44:41 UTC) #3
dcheng
https://codereview.chromium.org/1990343002/diff/20001/third_party/WebKit/Source/core/page/Page.cpp File third_party/WebKit/Source/core/page/Page.cpp (left): https://codereview.chromium.org/1990343002/diff/20001/third_party/WebKit/Source/core/page/Page.cpp#oldcode266 third_party/WebKit/Source/core/page/Page.cpp:266: return m_pluginData.get(); On 2016/05/19 at 19:44:40, Nate Chapin wrote: ...
4 years, 7 months ago (2016-05-19 20:04:38 UTC) #5
alexmos
Thanks! Thanks to lukasza@, I realized that this also fixes another layout test with --site-per-process, ...
4 years, 7 months ago (2016-05-19 22:23:27 UTC) #7
alexmos
haraken@: can you please review Source/modules for OWNERS?
4 years, 7 months ago (2016-05-19 22:26:13 UTC) #9
Nate Chapin
On 2016/05/19 22:23:27, alexmos wrote: > Thanks! > > Thanks to lukasza@, I realized that ...
4 years, 7 months ago (2016-05-19 22:26:20 UTC) #10
haraken
modules/ LGTM
4 years, 7 months ago (2016-05-19 23:38:19 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1990343002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1990343002/60001
4 years, 7 months ago (2016-05-20 00:02:00 UTC) #14
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 7 months ago (2016-05-20 01:04:12 UTC) #15
commit-bot: I haz the power
4 years, 7 months ago (2016-05-20 01:05:21 UTC) #17
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/fb92f3e718335521cf454e53651235fbf30c10e2
Cr-Commit-Position: refs/heads/master@{#394942}

Powered by Google App Engine
This is Rietveld 408576698