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

Issue 1868413002: Add about:flags support for doc.write script blocking. (Closed)

Created:
4 years, 8 months ago by Bryan McQuade
Modified:
4 years, 8 months ago
CC:
blink-reviews, chromium-reviews, Charlie Harrison, gavinp+loader_chromium.org, jkarlin, loading-reviews_chromium.org, tyoshino+watch_chromium.org, Yoav Weiss
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add about:flags support for doc.write script blocking. This patch introduces an additional blink setting which allows us to enable blocking only on slow (2G) connections, or on all connections. This is consistent with the 2G web font intervention, which has a feature for enabling on 2G, and an additional feature to force the intervention on in all connection types. We then add support for enabling the setting that enables blocking on all connection types from about:flags. This change also removes about:flags support from the now discontinued low priority iframe experiment, since it's nontrivial to add support for multiple blink settings in about:flags. BUG=602137 Committed: https://crrev.com/ed75dc7053dc072bdd0e72f64a869d59ec587f4b Cr-Commit-Position: refs/heads/master@{#386769}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 13

Patch Set 6 : #

Total comments: 11

Patch Set 7 : address comments #

Patch Set 8 : remove newlines #

Patch Set 9 : fix layout test #

Patch Set 10 : #

Patch Set 11 : add comment #

Total comments: 6

Patch Set 12 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+107 lines, -46 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 2 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/about_flags.cc View 1 2 3 4 1 chunk +6 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/loading/doc-write-async-third-party-script.html View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block.html View 1 2 3 4 5 6 7 3 chunks +5 lines, -7 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block-all-conn-types.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +45 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block-all-conn-types-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type.html View 1 2 3 4 5 6 2 chunks +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/Settings.in View 1 chunk +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/FrameFetchContext.cpp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +34 lines, -22 lines 0 comments Download

Messages

Total messages: 29 (11 generated)
Bryan McQuade
shivanisha, PTAL for general review japhet, PTAL for Settings.in and FrameFetchContext changes jkarlin and csharrison, ...
4 years, 8 months ago (2016-04-11 12:57:27 UTC) #6
kinuko
(Drive-by) https://codereview.chromium.org/1868413002/diff/80001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp File third_party/WebKit/Source/core/loader/FrameFetchContext.cpp (right): https://codereview.chromium.org/1868413002/diff/80001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp#newcode80 third_party/WebKit/Source/core/loader/FrameFetchContext.cpp:80: bool ShouldDisallowFetchForMainFrameScript(const ResourceRequest& request, FetchRequest::DeferOption defer, Document& document) ...
4 years, 8 months ago (2016-04-11 13:02:27 UTC) #7
Bryan McQuade
Thanks! https://codereview.chromium.org/1868413002/diff/80001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp File third_party/WebKit/Source/core/loader/FrameFetchContext.cpp (right): https://codereview.chromium.org/1868413002/diff/80001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp#newcode80 third_party/WebKit/Source/core/loader/FrameFetchContext.cpp:80: bool ShouldDisallowFetchForMainFrameScript(const ResourceRequest& request, FetchRequest::DeferOption defer, Document& document) ...
4 years, 8 months ago (2016-04-11 13:15:24 UTC) #8
Bryan McQuade
Adding Kinuko as additional reviewer for blink changes. japhet or kinuko please feel free to ...
4 years, 8 months ago (2016-04-11 13:43:58 UTC) #11
shivanisha
https://codereview.chromium.org/1868413002/diff/100001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/1868413002/diff/100001/chrome/app/generated_resources.grd#newcode6550 chrome/app/generated_resources.grd:6550: + Disallows fetches for scripts inserted into the main ...
4 years, 8 months ago (2016-04-11 14:26:56 UTC) #12
jkarlin
https://codereview.chromium.org/1868413002/diff/80001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block.html File third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block.html (right): https://codereview.chromium.org/1868413002/diff/80001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block.html#newcode62 third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block.html:62: why this newline? https://codereview.chromium.org/1868413002/diff/80001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp File third_party/WebKit/Source/core/loader/FrameFetchContext.cpp (right): https://codereview.chromium.org/1868413002/diff/80001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp#newcode80 third_party/WebKit/Source/core/loader/FrameFetchContext.cpp:80: ...
4 years, 8 months ago (2016-04-11 14:52:27 UTC) #14
Bryan McQuade
Thanks! Addressed comments. PTAL. https://codereview.chromium.org/1868413002/diff/80001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block.html File third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block.html (right): https://codereview.chromium.org/1868413002/diff/80001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block.html#newcode62 third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block.html:62: On 2016/04/11 at 14:52:27, jkarlin ...
4 years, 8 months ago (2016-04-11 16:28:30 UTC) #15
shivanisha
https://codereview.chromium.org/1868413002/diff/100001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type.html File third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type.html (right): https://codereview.chromium.org/1868413002/diff/100001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type.html#newcode18 third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type.html:18: } I am good either ways. Since the test ...
4 years, 8 months ago (2016-04-11 16:57:56 UTC) #16
Bryan McQuade
https://codereview.chromium.org/1868413002/diff/100001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type.html File third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type.html (right): https://codereview.chromium.org/1868413002/diff/100001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type.html#newcode18 third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type.html:18: } On 2016/04/11 at 16:57:56, shivanisha wrote: > I ...
4 years, 8 months ago (2016-04-11 18:15:41 UTC) #17
Bryan McQuade
On 2016/04/11 at 18:15:41, Bryan McQuade wrote: > https://codereview.chromium.org/1868413002/diff/100001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type.html > File third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type.html (right): > > ...
4 years, 8 months ago (2016-04-11 18:44:04 UTC) #18
shivanisha
https://codereview.chromium.org/1868413002/diff/100001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type.html File third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type.html (right): https://codereview.chromium.org/1868413002/diff/100001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type.html#newcode18 third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type.html:18: } On 2016/04/11 at 18:15:40, Bryan McQuade wrote: > ...
4 years, 8 months ago (2016-04-11 19:01:07 UTC) #19
jkarlin
lgtm!
4 years, 8 months ago (2016-04-12 13:36:36 UTC) #20
shivanisha
On 2016/04/12 at 13:36:36, jkarlin wrote: > lgtm! lgtm
4 years, 8 months ago (2016-04-12 13:47:36 UTC) #21
Nate Chapin
LGTM w/nits https://codereview.chromium.org/1868413002/diff/200001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp File third_party/WebKit/Source/core/loader/FrameFetchContext.cpp (right): https://codereview.chromium.org/1868413002/diff/200001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp#newcode78 third_party/WebKit/Source/core/loader/FrameFetchContext.cpp:78: namespace { Why this namespace? https://codereview.chromium.org/1868413002/diff/200001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp#newcode80 third_party/WebKit/Source/core/loader/FrameFetchContext.cpp:80: ...
4 years, 8 months ago (2016-04-12 16:53:15 UTC) #22
Bryan McQuade
Thanks! Comments addressed. https://codereview.chromium.org/1868413002/diff/200001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp File third_party/WebKit/Source/core/loader/FrameFetchContext.cpp (right): https://codereview.chromium.org/1868413002/diff/200001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp#newcode78 third_party/WebKit/Source/core/loader/FrameFetchContext.cpp:78: namespace { On 2016/04/12 at 16:53:15, ...
4 years, 8 months ago (2016-04-12 17:28:38 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1868413002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1868413002/220001
4 years, 8 months ago (2016-04-12 19:21:43 UTC) #26
commit-bot: I haz the power
Committed patchset #12 (id:220001)
4 years, 8 months ago (2016-04-12 19:41:34 UTC) #27
commit-bot: I haz the power
4 years, 8 months ago (2016-04-12 19:42:53 UTC) #29
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/ed75dc7053dc072bdd0e72f64a869d59ec587f4b
Cr-Commit-Position: refs/heads/master@{#386769}

Powered by Google App Engine
This is Rietveld 408576698