commit | 9494d72752c2199295be01cbe066ff4b39a5a6ec | [log] [tgz] |
---|---|---|
author | Manish Jethani <m.jethani@eyeo.com> | Sat Jan 20 00:28:47 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Sat Jan 20 00:28:47 2018 |
tree | 61779344c30d035fc2b5aa8c223bbf6e7f78f295 | |
parent | edec191b14134554835fbfee2c34324f0850808a [diff] |
Implement cssOrigin option for tabs.insertCSS crrev.com/c/765642 makes user style sheets opt-in. In this patch we implement the "cssOrigin" option for tabs.insertCSS, similar to Firefox. If the value is set to "user", the CSS will be injected as a user style sheet. Style sheets specified in an extension's manifest are still injected as author style sheets. These are the code-level changes: 1. InjectDetails in extension_types.json now has a new "cssOrigin" property that takes the values "author" (default) and "user" 2. ScriptExecutor::ExecuteScript now takes a css_origin parameter of type base::Optional<CSSOrigin> 3. ExtensionMsg_ExecuteCode_Params now has a new member called css_origin of type base::Optional<CSSOrigin>, the value of which comes from the API call and is propagated down to blink::WebDocument This API change is fully backwards compatible. BUG=632009 Change-Id: Ia41ea4b917c7a9a4729e0a340ed7b3be43abdc11 Reviewed-on: https://chromium-review.googlesource.com/778402 Commit-Queue: Will Harris <wfh@chromium.org> Reviewed-by: Will Harris <wfh@chromium.org> Reviewed-by: Devlin <rdevlin.cronin@chromium.org> Cr-Commit-Position: refs/heads/master@{#530686}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .