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

Issue 516273002: Move plugin placeholder style to CSS, and allow it to bypass main world CSP. (Closed)

Created:
6 years, 3 months ago by jbroman
Modified:
6 years, 2 months ago
CC:
arv+blink, blink-reviews, blink-reviews-bindings_chromium.org, blink-reviews-html_chromium.org, dglazkov+blink
Project:
blink
Visibility:
Public.

Description

Move plugin placeholder style to CSS, and allow it to bypass main world CSP. <style> elements inside UA shadow roots are permitted to load inline style, even if the host document CSP disallows this, since the style is supplied by the user agent. BUG=364716 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=184015

Patch Set 1 #

Patch Set 2 : add ScriptForbiddenScope to ensure script is not run while CSP is bypassed #

Patch Set 3 : add the actual .css file #

Total comments: 4

Patch Set 4 : rebase and rewrite #

Patch Set 5 : fix header #

Patch Set 6 : whitelist an explicit string #

Total comments: 1

Patch Set 7 : new approach #

Patch Set 8 : gn #

Total comments: 11

Patch Set 9 : rebase and rewrite #

Total comments: 5

Patch Set 10 : rebase #

Patch Set 11 : put CSS source in .js for now #

Patch Set 12 : remove excess inline style from js #

Unified diffs Side-by-side diffs Delta from patch set Stats (+63 lines, -53 lines) Patch
A + LayoutTests/fast/plugins/plugin-placeholder.css View 1 2 3 4 5 6 7 8 2 chunks +0 lines, -14 lines 0 comments Download
A LayoutTests/fast/plugins/plugin-placeholder-csp.html View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
A LayoutTests/fast/plugins/plugin-placeholder-csp-expected.html View 1 2 3 1 chunk +13 lines, -0 lines 0 comments Download
M LayoutTests/fast/plugins/plugin-placeholder-structured-expected.html View 1 2 3 4 5 6 7 8 1 chunk +1 line, -22 lines 0 comments Download
M Source/core/dom/StyleElement.cpp View 1 2 3 4 5 6 7 8 3 chunks +17 lines, -6 lines 0 comments Download
M Source/core/html/shadow/PluginPlaceholderElement.js View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +20 lines, -11 lines 0 comments Download

Messages

Total messages: 45 (8 generated)
jbroman
Patchset #2 (id:20001) has been deleted
6 years, 3 months ago (2014-08-29 15:46:28 UTC) #1
PhistucK
Is there any way to use <link> (or some other way) than to punch more ...
6 years, 3 months ago (2014-08-31 06:32:23 UTC) #2
jbroman
On 2014/08/31 06:32:23, PhistucK wrote: > Is there any way to use <link> (or some ...
6 years, 3 months ago (2014-08-31 16:17:20 UTC) #3
jbroman
On 2014/08/31 16:17:20, jbroman wrote: > On 2014/08/31 06:32:23, PhistucK wrote: > > Is there ...
6 years, 3 months ago (2014-09-01 00:19:42 UTC) #4
haraken
https://codereview.chromium.org/516273002/diff/60001/Source/bindings/core/v8/ScriptController.h File Source/bindings/core/v8/ScriptController.h (right): https://codereview.chromium.org/516273002/diff/60001/Source/bindings/core/v8/ScriptController.h#newcode155 Source/bindings/core/v8/ScriptController.h:155: class BypassMainWorldCSP : public TemporaryChange<bool> { The idea of ...
6 years, 3 months ago (2014-09-01 00:59:43 UTC) #6
jbroman
I've rebased on top of the Blink-in-JS version of: https://codereview.chromium.org/522783002/ I've also changed the approach ...
6 years, 3 months ago (2014-09-02 15:44:04 UTC) #7
abarth-chromium
not lgtm Can we whitelist at the shadow root instead?
6 years, 3 months ago (2014-09-02 20:11:10 UTC) #9
jbroman
On 2014/09/02 20:11:10, abarth wrote: > not lgtm > > Can we whitelist at the ...
6 years, 3 months ago (2014-09-02 20:13:57 UTC) #10
abarth-chromium
On 2014/09/02 at 20:13:57, jbroman wrote: > That's an interesting idea. Do you mean "whitelist ...
6 years, 3 months ago (2014-09-02 20:25:42 UTC) #11
jbroman
On 2014/09/02 20:25:42, abarth wrote: > On 2014/09/02 at 20:13:57, jbroman wrote: > > That's ...
6 years, 3 months ago (2014-09-02 22:18:38 UTC) #14
abarth-chromium
Yay, much better! https://codereview.chromium.org/516273002/diff/220001/Source/core/dom/StyleElement.cpp File Source/core/dom/StyleElement.cpp (right): https://codereview.chromium.org/516273002/diff/220001/Source/core/dom/StyleElement.cpp#newcode145 Source/core/dom/StyleElement.cpp:145: inline static bool shouldBypassMainWorldCSP(Element* e) inline ...
6 years, 3 months ago (2014-09-02 22:34:34 UTC) #15
jbroman
Will act on the comments shortly, but had a question about what sort of generic ...
6 years, 3 months ago (2014-09-02 23:53:32 UTC) #16
abarth-chromium
On 2014/09/02 at 23:53:32, jbroman wrote: > 2. Having chrome provide a special scheme for ...
6 years, 3 months ago (2014-09-03 00:38:59 UTC) #17
haraken
On 2014/09/03 00:38:59, abarth wrote: > On 2014/09/02 at 23:53:32, jbroman wrote: > > 2. ...
6 years, 3 months ago (2014-09-03 04:08:33 UTC) #18
haraken
+vivekg, +tasak
6 years, 3 months ago (2014-09-03 04:08:56 UTC) #20
tasak
On 2014/09/03 04:08:56, haraken wrote: > +vivekg, +tasak I'm afraid that I bring up the ...
6 years, 3 months ago (2014-09-03 07:03:01 UTC) #21
abarth-chromium
On 2014/09/03 at 07:03:01, tasak wrote: > As far as I understand, when we implement ...
6 years, 3 months ago (2014-09-03 17:19:29 UTC) #22
jbroman
https://codereview.chromium.org/516273002/diff/220001/Source/core/dom/StyleElement.cpp File Source/core/dom/StyleElement.cpp (right): https://codereview.chromium.org/516273002/diff/220001/Source/core/dom/StyleElement.cpp#newcode145 Source/core/dom/StyleElement.cpp:145: inline static bool shouldBypassMainWorldCSP(Element* e) On 2014/09/02 23:53:32, jbroman ...
6 years, 3 months ago (2014-09-16 21:39:26 UTC) #23
jbroman
Previous change has now landed, so I'm bringing this up again. This will need to ...
6 years, 3 months ago (2014-09-16 21:42:50 UTC) #24
jbroman
On 2014/09/16 21:42:50, jbroman wrote: > Previous change has now landed, so I'm bringing this ...
6 years, 2 months ago (2014-09-30 13:22:26 UTC) #25
abarth-chromium
Sorry for the delay. I'm happy to defer to other reviewers. Maybe haraken would be ...
6 years, 2 months ago (2014-10-03 18:11:20 UTC) #26
haraken
The CL looks good, if abarth@ is fine with the private API added to WindowPrivateScript.idl. ...
6 years, 2 months ago (2014-10-04 00:56:20 UTC) #27
jbroman
https://codereview.chromium.org/516273002/diff/240001/Source/core/frame/WindowPrivateScript.idl File Source/core/frame/WindowPrivateScript.idl (right): https://codereview.chromium.org/516273002/diff/240001/Source/core/frame/WindowPrivateScript.idl#newcode11 Source/core/frame/WindowPrivateScript.idl:11: [OnlyExposedToPrivateScript] DOMString loadPlatformResource(DOMString name); On 2014/10/04 00:56:20, haraken wrote: ...
6 years, 2 months ago (2014-10-04 03:36:07 UTC) #28
haraken
https://codereview.chromium.org/516273002/diff/240001/Source/core/frame/WindowPrivateScript.idl File Source/core/frame/WindowPrivateScript.idl (right): https://codereview.chromium.org/516273002/diff/240001/Source/core/frame/WindowPrivateScript.idl#newcode11 Source/core/frame/WindowPrivateScript.idl:11: [OnlyExposedToPrivateScript] DOMString loadPlatformResource(DOMString name); On 2014/10/04 03:36:06, jbroman wrote: ...
6 years, 2 months ago (2014-10-05 23:54:39 UTC) #29
jbroman
On 2014/10/05 23:54:39, haraken wrote: > https://codereview.chromium.org/516273002/diff/240001/Source/core/frame/WindowPrivateScript.idl#newcode11 > Source/core/frame/WindowPrivateScript.idl:11: [OnlyExposedToPrivateScript] > DOMString loadPlatformResource(DOMString name); > ...
6 years, 2 months ago (2014-10-06 14:58:13 UTC) #30
haraken
On 2014/10/06 14:58:13, jbroman wrote: > On 2014/10/05 23:54:39, haraken wrote: > > > https://codereview.chromium.org/516273002/diff/240001/Source/core/frame/WindowPrivateScript.idl#newcode11 ...
6 years, 2 months ago (2014-10-06 15:20:34 UTC) #31
jbroman
On 2014/10/06 15:20:34, haraken wrote: > On 2014/10/06 14:58:13, jbroman wrote: > > On 2014/10/05 ...
6 years, 2 months ago (2014-10-07 20:14:45 UTC) #32
haraken
On 2014/10/07 20:14:45, jbroman wrote: > On 2014/10/06 15:20:34, haraken wrote: > > On 2014/10/06 ...
6 years, 2 months ago (2014-10-08 00:27:19 UTC) #33
PhistucK
On 2014/08/31 16:17:20, jbroman wrote: > On 2014/08/31 06:32:23, PhistucK wrote: > > Is there ...
6 years, 2 months ago (2014-10-17 07:36:49 UTC) #34
jbroman
On 2014/10/17 07:36:49, PhistucK wrote: > On 2014/08/31 16:17:20, jbroman wrote: > > On 2014/08/31 ...
6 years, 2 months ago (2014-10-17 12:50:04 UTC) #35
jbroman
Okay, I've adjusted this to simply have the CSS source inline in the script file ...
6 years, 2 months ago (2014-10-17 18:25:08 UTC) #36
haraken
On 2014/10/17 18:25:08, jbroman wrote: > Okay, I've adjusted this to simply have the CSS ...
6 years, 2 months ago (2014-10-18 05:25:48 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/516273002/300001
6 years, 2 months ago (2014-10-18 14:21:22 UTC) #39
commit-bot: I haz the power
A disapproval has been posted by following reviewers: abarth@chromium.org. Please make sure to get positive ...
6 years, 2 months ago (2014-10-18 14:21:26 UTC) #41
abarth-chromium
lgtm to make my name not red (didn't read the cl)
6 years, 2 months ago (2014-10-20 20:40:04 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/516273002/300001
6 years, 2 months ago (2014-10-20 20:41:21 UTC) #44
commit-bot: I haz the power
6 years, 2 months ago (2014-10-20 20:45:57 UTC) #45
Message was sent while issue was closed.
Committed patchset #12 (id:300001) as 184015

Powered by Google App Engine
This is Rietveld 408576698