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

Issue 2359813002: Allows inline style in User-Agent shadow trees under CSP (Closed)

Created:
4 years, 3 months ago by sunyunjia
Modified:
4 years, 3 months ago
Reviewers:
tkent, dtapuska
CC:
blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Allows inline style in User-Agent shadow trees under CSP When a page specifies a CSP of style-src 'self', it does not allow inline style changes. However, the node under User-Agent shadow trees should be an exception as developers are not allowed to modify the inline-style, but blink may need it. So we add shadow dom elements as an exception under CSP. BUG=648589 Committed: https://crrev.com/bf99fb1ccc22a6b037045f6174d8a113d97f1ef7 Cr-Commit-Position: refs/heads/master@{#420456}

Patch Set 1 #

Patch Set 2 : Better test #

Total comments: 1

Patch Set 3 : Adds the check for user agent. #

Total comments: 1

Patch Set 4 : Check using containingShadowRoot and ShadowRootType #

Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -2 lines) Patch
A third_party/WebKit/LayoutTests/fast/events/touch/touch-action-range-input-csp.html View 1 1 chunk +95 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/forms/RangeInputType.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 27 (19 generated)
sunyunjia
PTAL, thanks!
4 years, 3 months ago (2016-09-21 16:59:14 UTC) #9
dtapuska
https://codereview.chromium.org/2359813002/diff/20001/third_party/WebKit/Source/core/dom/Element.cpp File third_party/WebKit/Source/core/dom/Element.cpp (right): https://codereview.chromium.org/2359813002/diff/20001/third_party/WebKit/Source/core/dom/Element.cpp#newcode3621 third_party/WebKit/Source/core/dom/Element.cpp:3621: } else if (modificationReason == ModifiedByCloning || ContentSecurityPolicy::shouldBypassMainWorld(&document()) || ...
4 years, 3 months ago (2016-09-21 17:05:53 UTC) #10
tkent
https://codereview.chromium.org/2359813002/diff/40001/third_party/WebKit/Source/core/dom/Element.cpp File third_party/WebKit/Source/core/dom/Element.cpp (right): https://codereview.chromium.org/2359813002/diff/40001/third_party/WebKit/Source/core/dom/Element.cpp#newcode3621 third_party/WebKit/Source/core/dom/Element.cpp:3621: } else if (modificationReason == ModifiedByCloning || ContentSecurityPolicy::shouldBypassMainWorld(&document()) || ...
4 years, 3 months ago (2016-09-21 22:52:07 UTC) #15
sunyunjia
Thanks for pointing this out! PTAL!
4 years, 3 months ago (2016-09-22 15:14:07 UTC) #20
tkent
lgtm
4 years, 3 months ago (2016-09-22 20:53:19 UTC) #21
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/2359813002/60001
4 years, 3 months ago (2016-09-22 20:54:20 UTC) #23
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 3 months ago (2016-09-22 21:01:09 UTC) #25
commit-bot: I haz the power
4 years, 3 months ago (2016-09-22 21:03:08 UTC) #27
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/bf99fb1ccc22a6b037045f6174d8a113d97f1ef7
Cr-Commit-Position: refs/heads/master@{#420456}

Powered by Google App Engine
This is Rietveld 408576698