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

Issue 2801243002: More tweaks to <script nonce> hiding. (Closed)

Created:
3 years, 8 months ago by Mike West
Modified:
3 years, 7 months ago
CC:
blink-reviews, blink-reviews-frames_chromium.org, blink-reviews-html_chromium.org, blink-reviews-w3ctests_chromium.org, chromium-reviews, dglazkov+blink, krit, fmalita+watch_chromium.org, fs, gyuyoung2, kouhei+svg_chromium.org, pdr+svgwatchlist_chromium.org, rwlbuis, Stephen Chennney
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Move `<script nonce>` hiding to `Element`. We're evaluating a different approach to hiding the `nonce` content attribute, moving the behavior change up to `HTMLElement` and `SVGElement` rather than placing it on `{HTML,SVG}{Script,Style}Element`. This patch adds `nonce` to `ElementRareData` in order to support that approach, and wires up a new `NoncedElement` interface to the new properties. Still behind a flag while we're working out details. Intent to Implement and Ship: https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/wu_fMIYkyaQ/85j16Cg6BAAJ BUG=680419 Review-Url: https://codereview.chromium.org/2801243002 Cr-Commit-Position: refs/heads/master@{#472215} Committed: https://chromium.googlesource.com/chromium/src/+/23cd806334edf349b4371e63f231bc1361fe0a08

Patch Set 1 #

Patch Set 2 : Test. #

Patch Set 3 : Test. #

Patch Set 4 : Element. #

Total comments: 1

Patch Set 5 : Really behind a flag this time. #

Patch Set 6 : Rebase, rewrite. #

Patch Set 7 : Tests. #

Patch Set 8 : Moved tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+625 lines, -191 lines) Patch
M third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/content-security-policy/_unapproved/script-nonces-hidden.html View 1 2 3 4 5 6 7 1 chunk +114 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/content-security-policy/_unapproved/script-nonces-hidden-meta.html View 1 2 3 4 5 6 7 1 chunk +116 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/content-security-policy/_unapproved/script-nonces-hidden.html.headers View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/content-security-policy/_unapproved/svgscript-nonces-hidden.html View 1 2 3 4 5 6 7 1 chunk +122 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/content-security-policy/_unapproved/svgscript-nonces-hidden-meta.html View 1 2 3 4 5 6 7 1 chunk +122 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/external/wpt/content-security-policy/_unapproved/svgscript-nonces-hidden.html.headers View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/html/dom/reflection-metadata-expected.txt View 1 2 3 4 5 6 2 chunks +16 lines, -18 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/html/dom/reflection-misc-expected.txt View 1 2 3 4 5 1 chunk +30 lines, -31 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/nonces/script-nonces-hidden.php View 1 chunk +0 lines, -88 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 6 chunks +4 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt View 1 2 3 4 5 6 4 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 6 chunks +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/core_idl_files.gni View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.h View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.cpp View 1 2 3 4 5 2 chunks +11 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ElementRareData.h View 1 2 3 4 5 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ElementRareData.cpp View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/MockScriptElementBase.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
A third_party/WebKit/Source/core/dom/NoncedElement.idl View 1 2 3 4 5 1 chunk +13 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ScriptElementBase.h View 1 2 3 4 5 3 chunks +1 line, -7 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ScriptLoader.cpp View 1 2 3 4 5 6 2 chunks +2 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/dom/StyleElement.cpp View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h View 1 2 3 4 5 3 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp View 1 2 3 4 5 2 chunks +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLElement.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLElement.cpp View 1 2 3 4 5 2 chunks +19 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLElement.idl View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLScriptElement.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLScriptElement.cpp View 1 2 3 4 5 3 chunks +4 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLScriptElement.idl View 1 2 3 4 5 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/html/LinkResource.cpp View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGElement.cpp View 1 2 3 4 5 6 2 chunks +11 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGElement.idl View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGScriptElement.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/SVGScriptElement.cpp View 1 2 3 2 chunks +3 lines, -10 lines 0 comments Download

Messages

Total messages: 50 (41 generated)
Mike West
WDYT about this implementation strategy, Jochen?
3 years, 8 months ago (2017-04-11 12:15:16 UTC) #21
jochen (gone - plz use gerrit)
looks reasonable
3 years, 8 months ago (2017-04-11 12:17:47 UTC) #23
kouhei (in TOK)
+japhet for ScriptElementBase https://codereview.chromium.org/2801243002/diff/60001/third_party/WebKit/Source/core/dom/ScriptLoader.cpp File third_party/WebKit/Source/core/dom/ScriptLoader.cpp (right): https://codereview.chromium.org/2801243002/diff/60001/third_party/WebKit/Source/core/dom/ScriptLoader.cpp#newcode522 third_party/WebKit/Source/core/dom/ScriptLoader.cpp:522: // Otherwise, let cryptographic nonce be ...
3 years, 8 months ago (2017-04-11 12:24:18 UTC) #25
Mike West
On 2017/04/11 at 12:24:18, kouhei wrote: > +japhet for ScriptElementBase > > https://codereview.chromium.org/2801243002/diff/60001/third_party/WebKit/Source/core/dom/ScriptLoader.cpp > File ...
3 years, 8 months ago (2017-04-11 13:32:18 UTC) #28
Mike West
Jochen, mind taking a real look at this now? I think we're close enough on ...
3 years, 7 months ago (2017-05-16 14:04:10 UTC) #39
jochen (gone - plz use gerrit)
lgtm
3 years, 7 months ago (2017-05-16 14:17:06 UTC) #40
kouhei (in TOK)
lgtm
3 years, 7 months ago (2017-05-16 16:45:53 UTC) #43
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/2801243002/140001
3 years, 7 months ago (2017-05-16 18:15:12 UTC) #47
commit-bot: I haz the power
3 years, 7 months ago (2017-05-16 21:00:34 UTC) #50
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://chromium.googlesource.com/chromium/src/+/23cd806334edf349b4371e63f231...

Powered by Google App Engine
This is Rietveld 408576698