commit | 41e9a50e2920b6614ac5019b25fd829cdbd41e43 | [log] [tgz] |
---|---|---|
author | Darren Shen <shend@chromium.org> | Wed Jan 03 02:54:39 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Jan 03 06:20:20 2018 |
tree | e97ec28686bf26af58c76941b581cae916effcdc | |
parent | 48fbfe0faf98c982606fcf6d2732c9adcf086f1a [diff] |
[css-typed-om] Remove secure context from toCSSValue. Currently we need a secure context mode to call toCSSValue. toCSSValue is used for converting CSSStyleValues to CSSValues. However, there's no reason why we need a secure context mode, since we don't do any parsing. This patch removes secure context mode from toCSSValue. We had to make two changes: - CSSUnsupportedValue takes a CSSValue instead of string. Previously, we would parse a string into a CSSValue, then convert it back into a string to give to CSSUnsupportedValue, which would then parse it again when needed. We can just store the CSSValue instead and parse once. - CSSUnparsedValue::toCSSValue creates a CSSVariableReferenceValue, which requires a CSSParserContext. This makes sense if we need to parse the tokens (e.g. for variable resolution). However, CSSUnparsedValue doesn't parse the tokens (hence its name), so it doesn't make sense to create a CSSParserContext. We added a new constructor to CSSVariableReferenceValue that doesn't take a CSSParserContext. Bug: 545318 Change-Id: I03bf66ab3061e00169ddff99b2a128ae3191f793 Reviewed-on: https://chromium-review.googlesource.com/845253 Commit-Queue: Darren Shen <shend@chromium.org> Reviewed-by: nainar <nainar@chromium.org> Cr-Commit-Position: refs/heads/master@{#526634}
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 .