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

Issue 2499373002: Implementation for feature policy - fullscreen (Closed)

Created:
4 years, 1 month ago by lunalu1
Modified:
4 years ago
Reviewers:
foolip, iclelland
CC:
chromium-reviews, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, lunalu1, blink-reviews, rwlbuis, igrigorik, raymes
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implementation for feature policy - fullscreen Disable fullscreen API unless enabled through feature policy. BUG=666761 Committed: https://crrev.com/719a425cbbbffdc724535a52cd1a507663cf6aad Cr-Commit-Position: refs/heads/master@{#436651}

Patch Set 1 : Initial checkin #

Patch Set 2 : Modified layout tests #

Total comments: 4

Patch Set 3 : Modified layout tests #

Total comments: 21

Patch Set 4 : Codereview update and added layout tests #

Total comments: 14

Patch Set 5 : Codereview update #

Total comments: 4

Patch Set 6 : Codereview update #

Total comments: 4

Patch Set 7 : Codereview update #

Patch Set 8 : Bug fix: handling the case when frame parent does not exist #

Total comments: 1

Messages

Total messages: 97 (69 generated)
foolip
https://codereview.chromium.org/2499373002/diff/100001/third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-enabledforself.php File third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-enabledforself.php (right): https://codereview.chromium.org/2499373002/diff/100001/third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-enabledforself.php#newcode28 third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-enabledforself.php:28: <iframe id="f3" src="resources/feature-policy-vibrate-enabled.html"></iframe> typo here? https://codereview.chromium.org/2499373002/diff/100001/third_party/WebKit/LayoutTests/http/tests/feature-policy/resources/feature-policy-fullscreen-disabled.html File third_party/WebKit/LayoutTests/http/tests/feature-policy/resources/feature-policy-fullscreen-disabled.html (right): ...
4 years ago (2016-11-28 23:18:30 UTC) #29
foolip
https://codereview.chromium.org/2499373002/diff/140001/third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-disabled.php File third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-disabled.php (right): https://codereview.chromium.org/2499373002/diff/140001/third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-disabled.php#newcode13 third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-disabled.php:13: <html> Tests can omit html, head and body. https://codereview.chromium.org/2499373002/diff/140001/third_party/WebKit/LayoutTests/http/tests/feature-policy/resources/feature-policy-fullscreen-disabled.html ...
4 years ago (2016-11-28 23:33:22 UTC) #31
foolip
https://codereview.chromium.org/2499373002/diff/140001/third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-enabledforself.php File third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-enabledforself.php (right): https://codereview.chromium.org/2499373002/diff/140001/third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-enabledforself.php#newcode21 third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-enabledforself.php:21: testRunner.dumpChildFramesAsText(); It turns out that this is the magic ...
4 years ago (2016-11-29 16:06:36 UTC) #34
lunalu1
Hi foolip@, thank you for reviewing my CL. I have made the changes upon your ...
4 years ago (2016-12-01 20:10:08 UTC) #46
foolip
lgtm % nits https://codereview.chromium.org/2499373002/diff/200001/third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-disabled-expected.txt File third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-disabled-expected.txt (right): https://codereview.chromium.org/2499373002/diff/200001/third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-disabled-expected.txt#newcode4 third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-disabled-expected.txt:4: FAIL Fullscreen disabled on URL: resources/feature-policy-fullscreen.html ...
4 years ago (2016-12-02 10:52:09 UTC) #52
lunalu1
Done. Thanks! Hi iclelland@, could you please lgtm to WebKit/Source/platform/feature_policy/FeaturePolicy* so that I can land ...
4 years ago (2016-12-02 19:22:07 UTC) #55
iclelland
https://codereview.chromium.org/2499373002/diff/260001/third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-enabledforself.php File third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-enabledforself.php (right): https://codereview.chromium.org/2499373002/diff/260001/third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-enabledforself.php#newcode35 third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-enabledforself.php:35: if (src === srcs[0] && iframe.id === "f2") { ...
4 years ago (2016-12-05 16:27:35 UTC) #66
lunalu1
Done. Please take a second look :) Thanks https://codereview.chromium.org/2499373002/diff/260001/third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-enabledforself.php File third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-enabledforself.php (right): https://codereview.chromium.org/2499373002/diff/260001/third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-enabledforself.php#newcode35 third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-enabledforself.php:35: if ...
4 years ago (2016-12-05 20:09:12 UTC) #68
lunalu1
Done. Please take a second look :) Thanks
4 years ago (2016-12-05 20:09:15 UTC) #69
lunalu1
Done. Please take a second look :) Thanks
4 years ago (2016-12-05 20:09:16 UTC) #70
lunalu1
Done. Please take a second look :) Thanks
4 years ago (2016-12-05 20:09:19 UTC) #71
lunalu1
Done. Please take a second look :) Thanks
4 years ago (2016-12-05 20:09:22 UTC) #72
lunalu1
Done. Please take a second look :) Thanks
4 years ago (2016-12-05 20:09:22 UTC) #73
lunalu1
Done. Please take a second look :) Thanks
4 years ago (2016-12-05 20:09:22 UTC) #74
lunalu1
Done. Please take a second look :) Thanks
4 years ago (2016-12-05 20:09:23 UTC) #75
lunalu1
Done. Please take a second look :) Thanks
4 years ago (2016-12-05 20:09:23 UTC) #76
lunalu1
Done. Please take a second look :) Thanks
4 years ago (2016-12-05 20:09:24 UTC) #77
iclelland
On 2016/12/05 20:09:24, loonybear wrote: > Done. Please take a second look :) > > ...
4 years ago (2016-12-05 20:36:52 UTC) #79
iclelland
https://codereview.chromium.org/2499373002/diff/280001/third_party/WebKit/Source/core/dom/Fullscreen.cpp File third_party/WebKit/Source/core/dom/Fullscreen.cpp (right): https://codereview.chromium.org/2499373002/diff/280001/third_party/WebKit/Source/core/dom/Fullscreen.cpp#newcode120 third_party/WebKit/Source/core/dom/Fullscreen.cpp:120: if (fullscreenSupported) { Can we add a comment here? ...
4 years ago (2016-12-05 20:48:31 UTC) #80
lunalu1
Done. Thanks https://codereview.chromium.org/2499373002/diff/280001/third_party/WebKit/Source/core/dom/Fullscreen.cpp File third_party/WebKit/Source/core/dom/Fullscreen.cpp (right): https://codereview.chromium.org/2499373002/diff/280001/third_party/WebKit/Source/core/dom/Fullscreen.cpp#newcode120 third_party/WebKit/Source/core/dom/Fullscreen.cpp:120: if (fullscreenSupported) { On 2016/12/05 20:48:30, iclelland ...
4 years ago (2016-12-05 21:07:32 UTC) #81
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/2499373002/300001
4 years ago (2016-12-05 21:08:25 UTC) #84
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/350088)
4 years ago (2016-12-05 22:22:54 UTC) #86
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/2499373002/320001
4 years ago (2016-12-06 16:45:16 UTC) #89
commit-bot: I haz the power
Committed patchset #8 (id:320001)
4 years ago (2016-12-06 18:20:18 UTC) #92
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/719a425cbbbffdc724535a52cd1a507663cf6aad Cr-Commit-Position: refs/heads/master@{#436651}
4 years ago (2016-12-06 18:23:21 UTC) #94
foolip
https://codereview.chromium.org/2499373002/diff/320001/third_party/WebKit/Source/core/dom/Fullscreen.cpp File third_party/WebKit/Source/core/dom/Fullscreen.cpp (right): https://codereview.chromium.org/2499373002/diff/320001/third_party/WebKit/Source/core/dom/Fullscreen.cpp#newcode126 third_party/WebKit/Source/core/dom/Fullscreen.cpp:126: parent->securityContext()->getFeaturePolicy()->isFeatureEnabled( I was working on https://codereview.chromium.org/2557943002/ today when I ...
4 years ago (2016-12-07 16:09:26 UTC) #95
iclelland
On 2016/12/07 16:09:26, foolip wrote: > https://codereview.chromium.org/2499373002/diff/320001/third_party/WebKit/Source/core/dom/Fullscreen.cpp > File third_party/WebKit/Source/core/dom/Fullscreen.cpp (right): > > https://codereview.chromium.org/2499373002/diff/320001/third_party/WebKit/Source/core/dom/Fullscreen.cpp#newcode126 > ...
4 years ago (2016-12-07 19:23:02 UTC) #96
foolip
4 years ago (2016-12-08 20:27:45 UTC) #97
Message was sent while issue was closed.
On 2016/12/07 19:23:02, iclelland wrote:
> On 2016/12/07 16:09:26, foolip wrote:
> >
>
https://codereview.chromium.org/2499373002/diff/320001/third_party/WebKit/Sou...
> > File third_party/WebKit/Source/core/dom/Fullscreen.cpp (right):
> > 
> >
>
https://codereview.chromium.org/2499373002/diff/320001/third_party/WebKit/Sou...
> > third_party/WebKit/Source/core/dom/Fullscreen.cpp:126:
> > parent->securityContext()->getFeaturePolicy()->isFeatureEnabled(
> > I was working on https://codereview.chromium.org/2557943002/ today when I
had
> to
> > wonder if it was OK to skip this test in the case of cross-process iframes.
> Will
> > this check that fullscreen is allowed by the policy for all parent frames up
> the
> > chain? If not, then it will be possible for some intermediate but
> cross-process
> > frame to go fullscreen in violation of the feature policy.
> 
> This implicitly checks that it's allowed by policy all the way to the main
frame
> -- each frame has a policy which is built from it's parent, plus it's own
> headers. What we're checking here is whether the parent frame had access to
the
> Fullscreen API, since if it didn't, it should not be allowed to enable it via
an
> iframe attribute in the child.
> 
> (This block is a hack, intended only to provide the correct behaviour for this
> one case until we have general support for feature policy on iframes)
> 
> Was there a reason you were wanting to skip it? (It should work in OOPIFs,
since
> the feature policy headers are replicated to remote frames, and the policy
> object can still be queried on remote frames)

All of the checks are skipped in the forCrossProcessDescendant case, because the
checks should have already been performed, and if any now fail it's too late to
do anything about.

If this check is implicitly recursive (like allowedToUseFullscreen) then all is
well.

Powered by Google App Engine
This is Rietveld 408576698