commit | 9a107b936d3e7fbd9d7771e789ef3cecf9d7b333 | [log] [tgz] |
---|---|---|
author | Manish Jethani <m.jethani@eyeo.com> | Fri Feb 16 10:59:13 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Feb 16 10:59:13 2018 |
tree | 2fb7efe600dfecd9cbc035ede3af862428875b28 | |
parent | de687559b553287d29cf6f13d86724b83afcb909 [diff] |
Inject and remove style sheets by key This is the first in a series of patches to implement tabs.removeCSS A style sheet injected with tabs.insertCSS will have an internal autogenerated "key" that will be passed to StyleEngine. In the case of files, this will likely be just the fully qualified name of the file, whereas in the case of code it could be the code string itself or a hash digest of the code string. In either case, a call to tabs.removeCSS with the same options will deterministically generate the same internal key, thus enabling the removal of a previously injected style sheet without the explicit use of IDs and such. This patch lays the groundwork in StyleEngine that will enable us to implement behavior similar to that observed in Firefox 57.0. Changes: 1. WebStyleSheetId is now WebStyleSheetKey (WebString) 2. WebDocument::InsertStyleSheet now accepts an optional key as a parameter 3. StyleEngine::InjectSheet and StyleEngine::RemoveInjectedSheet now take StyleSheetKey (AtomicString) instead of WebStyleSheetId 4. Both WebDocument::RemoveInsertedStyleSheet and StyleEngine::RemoveInjectedSheet now take the CSS origin as a parameter 5. StyleEngine::RemoveInjectedSheet now removes only the last style sheet injected with the given key and only from the specified CSS origin BUG=608854 Change-Id: Ie62bfcb0d8309b18cbf0d2cd119c74908e396767 Reviewed-on: https://chromium-review.googlesource.com/877663 Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Rune Lillesveen <futhark@chromium.org> Commit-Queue: Manish Jethani <m.jethani@eyeo.com> Cr-Commit-Position: refs/heads/master@{#537281}
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 .