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

Issue 2680083002: Initial Implementation of Iframe Attribute for Feature Policy (Part 1) (Closed)

Created:
3 years, 10 months ago by lunalu1
Modified:
3 years, 10 months ago
CC:
jbroman, blink-reviews, blink-reviews-api_chromium.org, blink-reviews-html_chromium.org, chromium-reviews, dglazkov+blink, kinuko+watch, lunalu1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Initial Implementation of Iframe Attribute for Feature Policy (Part 1) Enable iframe feature policy by attributes: allow="feature1 feature2", allowfullscreen, and allowpaymentrequest. See design doc: https://docs.google.com/a/google.com/document/d/1ZTuCRKNnWKQUn8gzufuRsCnjVXtPYxK30wWLaZ7Jslk/edit?usp=sharing Part 1: Introduce iframe allowAttr in HTMLIFrameElement::parseAttribute and store featureNames in HTMLIFrameElement Part 2: Pass featureNames from HTMLIFrameElement to frame owner and remote frame owner. Part 3: Set iframe feature policy in FrameLoader::didBeginDocument Part 4.a: Replace implementation of allowpaymentrequest by feature policy Part 4.b: Replace implementation of allowfullscreen by feature policy Part 5: WebVR BUG=682256 Review-Url: https://codereview.chromium.org/2680083002 Cr-Commit-Position: refs/heads/master@{#449847} Committed: https://chromium.googlesource.com/chromium/src/+/37f156fe308e0f249d087f48b046a93938be0cd9

Patch Set 1 #

Patch Set 2 : Removed getAllowedFeatureNames() from HTMLIFrameElement #

Total comments: 21

Patch Set 3 : Codereview: nit, added RuntimeFeatures::FeaturePolicyExperimentalFeatures #

Total comments: 6

Patch Set 4 : Codereview: nit #

Patch Set 5 : Moved hash function for WebFeaturePolicyFeature to where the enum is defined for ODR purpose #

Total comments: 9

Patch Set 6 : Codereview: nit, extracted a helper function to process error message for parsing DOMTokenList el… #

Patch Set 7 : Update rebase #

Total comments: 5

Patch Set 8 : Used Vector (sorted, unique) instead of HashSet for the list of allowed feature names #

Patch Set 9 : Codereview: nit + undid the change to generalize code for parseAllow/Permissions/Sandbox since ther… #

Patch Set 10 : Nit: replace std::vector by WTF::Vector in the implementation of HTMLIFrameElementAllow::parseAllow… #

Total comments: 2

Patch Set 11 : Codereview: nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+295 lines, -20 lines) Patch
M third_party/WebKit/Source/core/BUILD.gn View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/SandboxFlags.cpp View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/html/BUILD.gn View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLAttributeNames.json5 View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLIFrameElement.h View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp View 1 2 3 4 5 5 chunks +22 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLIFrameElement.idl View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/html/HTMLIFrameElementAllow.h View 1 2 3 4 5 6 7 1 chunk +46 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/html/HTMLIFrameElementAllow.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +72 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/html/HTMLIFrameElementAllowTest.cpp View 1 2 3 4 5 6 7 1 chunk +64 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLIFrameElementPermissions.cpp View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLIFrameElementTest.cpp View 3 chunks +22 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5 View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.h View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp View 1 2 3 4 5 2 chunks +36 lines, -0 lines 0 comments Download

Messages

Total messages: 69 (48 generated)
lunalu1
Hi Ian, Could you please take a look at this CL. A few tests are ...
3 years, 10 months ago (2017-02-08 00:12:44 UTC) #9
iclelland
I think this is looking really good -- thanks for doing this! https://codereview.chromium.org/2680083002/diff/20001/third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp File third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp ...
3 years, 10 months ago (2017-02-08 15:06:24 UTC) #11
iclelland
On 2017/02/08 00:12:44, loonybear wrote: > Hi Ian, > > Could you please take a ...
3 years, 10 months ago (2017-02-08 15:07:45 UTC) #12
lunalu1
Thanks for reviewing the CL. I have made the change based on your comments. Please ...
3 years, 10 months ago (2017-02-08 19:50:30 UTC) #13
iclelland
Thanks, Luna -- just a couple more comments. I think that WebFeaturePolicyFeatureHash.h needs to be ...
3 years, 10 months ago (2017-02-08 20:11:35 UTC) #16
lunalu1
Thanks Ian. Please take another look https://codereview.chromium.org/2680083002/diff/40001/third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp File third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp (right): https://codereview.chromium.org/2680083002/diff/40001/third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp#newcode234 third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp:234: // frameOwnerPropertiesChanged(); On ...
3 years, 10 months ago (2017-02-08 21:06:11 UTC) #19
Rick Byers
https://codereview.chromium.org/2680083002/diff/40001/third_party/WebKit/Source/core/html/HTMLIFrameElement.idl File third_party/WebKit/Source/core/html/HTMLIFrameElement.idl (right): https://codereview.chromium.org/2680083002/diff/40001/third_party/WebKit/Source/core/html/HTMLIFrameElement.idl#newcode34 third_party/WebKit/Source/core/html/HTMLIFrameElement.idl:34: [CEReactions, PutForwards=value, RuntimeEnabled=FeaturePolicy] readonly attribute DOMTokenList allow; On 2017/02/08 ...
3 years, 10 months ago (2017-02-09 19:00:35 UTC) #26
Rick Byers
https://codereview.chromium.org/2680083002/diff/80001/third_party/WebKit/Source/core/html/HTMLIFrameElement.idl File third_party/WebKit/Source/core/html/HTMLIFrameElement.idl (right): https://codereview.chromium.org/2680083002/diff/80001/third_party/WebKit/Source/core/html/HTMLIFrameElement.idl#newcode34 third_party/WebKit/Source/core/html/HTMLIFrameElement.idl:34: [CEReactions, PutForwards=value, RuntimeEnabled=FeaturePolicy] readonly attribute DOMTokenList allow; nit: put ...
3 years, 10 months ago (2017-02-09 20:59:59 UTC) #27
lunalu1
Hi Rick, Thanks for the comments. I made the change based on your comments, although ...
3 years, 10 months ago (2017-02-09 23:19:04 UTC) #29
lunalu1
Waiting for https://codereview.chromium.org/2687923002/ to land, so that I can remove the hash traits added for ...
3 years, 10 months ago (2017-02-10 16:40:30 UTC) #38
iclelland
LGTM from a feature-policy perspective
3 years, 10 months ago (2017-02-10 17:58:22 UTC) #44
Rick Byers
https://codereview.chromium.org/2680083002/diff/80001/third_party/WebKit/Source/core/html/HTMLIFrameElementAllowTest.cpp File third_party/WebKit/Source/core/html/HTMLIFrameElementAllowTest.cpp (right): https://codereview.chromium.org/2680083002/diff/80001/third_party/WebKit/Source/core/html/HTMLIFrameElementAllowTest.cpp#newcode16 third_party/WebKit/Source/core/html/HTMLIFrameElementAllowTest.cpp:16: TEST(HTMLIFrameElementAllowTest, ParseAllowedFeatureNamesValid) { On 2017/02/09 23:19:04, loonybear wrote: > ...
3 years, 10 months ago (2017-02-10 22:09:21 UTC) #47
lunalu1
Hi Rick, Thanks for your comments. Please see the comment below why what you were ...
3 years, 10 months ago (2017-02-10 23:04:13 UTC) #50
lunalu1
Hi Rick, Thanks for your comments. Please see the comment below why what you were ...
3 years, 10 months ago (2017-02-10 23:04:18 UTC) #51
Rick Byers
LGTM https://codereview.chromium.org/2680083002/diff/140001/third_party/WebKit/Source/core/html/HTMLIFrameElement.h File third_party/WebKit/Source/core/html/HTMLIFrameElement.h (right): https://codereview.chromium.org/2680083002/diff/140001/third_party/WebKit/Source/core/html/HTMLIFrameElement.h#newcode59 third_party/WebKit/Source/core/html/HTMLIFrameElement.h:59: static void addTokenError(StringBuilder& tokenErrors, On 2017/02/10 23:04:12, loonybear ...
3 years, 10 months ago (2017-02-11 04:09:19 UTC) #52
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/2680083002/180001
3 years, 10 months ago (2017-02-11 04:52:28 UTC) #55
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/2680083002/200001
3 years, 10 months ago (2017-02-11 05:30:36 UTC) #59
jbroman
https://codereview.chromium.org/2680083002/diff/200001/third_party/WebKit/Source/core/html/HTMLIFrameElementAllow.cpp File third_party/WebKit/Source/core/html/HTMLIFrameElementAllow.cpp (right): https://codereview.chromium.org/2680083002/diff/200001/third_party/WebKit/Source/core/html/HTMLIFrameElementAllow.cpp#newcode57 third_party/WebKit/Source/core/html/HTMLIFrameElementAllow.cpp:57: for (auto const feature : featureNames) { nit: STL ...
3 years, 10 months ago (2017-02-11 05:34:30 UTC) #62
jbroman
https://codereview.chromium.org/2680083002/diff/200001/third_party/WebKit/Source/core/html/HTMLIFrameElementAllow.cpp File third_party/WebKit/Source/core/html/HTMLIFrameElementAllow.cpp (right): https://codereview.chromium.org/2680083002/diff/200001/third_party/WebKit/Source/core/html/HTMLIFrameElementAllow.cpp#newcode57 third_party/WebKit/Source/core/html/HTMLIFrameElementAllow.cpp:57: for (auto const feature : featureNames) { On 2017/02/11 ...
3 years, 10 months ago (2017-02-11 05:36:09 UTC) #63
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/2680083002/220001
3 years, 10 months ago (2017-02-11 05:41:32 UTC) #66
commit-bot: I haz the power
3 years, 10 months ago (2017-02-11 07:20:35 UTC) #69
Message was sent while issue was closed.
Committed patchset #11 (id:220001) as
https://chromium.googlesource.com/chromium/src/+/37f156fe308e0f249d087f48b046...

Powered by Google App Engine
This is Rietveld 408576698